Skip to content

Latest commit

 

History

History
221 lines (156 loc) · 7.37 KB

EosApi.md

File metadata and controls

221 lines (156 loc) · 7.37 KB

moonsdk.api.EosApi

Load the API package

import 'package:moonsdk/api.dart';

All URIs are relative to https://beta.usemoon.ai

Method HTTP request Description
createEosAccount POST /eos
getEosAccount GET /eos/{accountName}
listEosAccounts GET /eos
signEosTransaction POST /eos/{accountName}/sign-tx

createEosAccount

AccountAPIResponse createEosAccount(authorization, eosInput)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getEosApi();
final String authorization = authorization_example; // String | 
final EosInput eosInput = ; // EosInput | 

try {
    final response = api.createEosAccount(authorization, eosInput);
    print(response);
} catch on DioException (e) {
    print('Exception when calling EosApi->createEosAccount: $e\n');
}

Parameters

Name Type Description Notes
authorization String
eosInput EosInput

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEosAccount

AccountAPIResponse getEosAccount(authorization, accountName)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getEosApi();
final String authorization = authorization_example; // String | 
final String accountName = accountName_example; // String | 

try {
    final response = api.getEosAccount(authorization, accountName);
    print(response);
} catch on DioException (e) {
    print('Exception when calling EosApi->getEosAccount: $e\n');
}

Parameters

Name Type Description Notes
authorization String
accountName String

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listEosAccounts

AccountAPIResponse listEosAccounts(authorization)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getEosApi();
final String authorization = authorization_example; // String | 

try {
    final response = api.listEosAccounts(authorization);
    print(response);
} catch on DioException (e) {
    print('Exception when calling EosApi->listEosAccounts: $e\n');
}

Parameters

Name Type Description Notes
authorization String

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

signEosTransaction

EosAPIResponse signEosTransaction(authorization, accountName, eosTransactionInput)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getEosApi();
final String authorization = authorization_example; // String | 
final String accountName = accountName_example; // String | 
final EosTransactionInput eosTransactionInput = ; // EosTransactionInput | 

try {
    final response = api.signEosTransaction(authorization, accountName, eosTransactionInput);
    print(response);
} catch on DioException (e) {
    print('Exception when calling EosApi->signEosTransaction: $e\n');
}

Parameters

Name Type Description Notes
authorization String
accountName String
eosTransactionInput EosTransactionInput

Return type

EosAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]