All URIs are relative to https://beta.usemoon.ai
Method | HTTP request | Description |
---|---|---|
BroadcastTx | POST /accounts/{accountName}/broadcast-tx | |
CreateAccount | POST /accounts | |
DeleteAccount | DELETE /accounts/{accountName} | |
DeployContract | POST /accounts/{accountName}/deploy | |
GetAccount | GET /accounts/{accountName} | |
GetBalance | GET /accounts/{accountName}/balance | |
GetNonce | GET /accounts/{accountName}/nonce | |
ListAccounts | GET /accounts | |
SignMessage | POST /accounts/{accountName}/sign-message | |
SignTransaction | POST /accounts/{accountName}/sign-transaction | |
SignTypedData | POST /accounts/{accountName}/sign-typed-data | |
TransferEth | POST /accounts/{accountName}/transfer-eth |
BroadCastRawTransactionAPIResponse BroadcastTx (string authorization, string accountName, BroadcastInput broadcastInput)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class BroadcastTxExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var authorization = "authorization_example"; // string |
var accountName = "accountName_example"; // string |
var broadcastInput = new BroadcastInput(); // BroadcastInput |
try
{
BroadCastRawTransactionAPIResponse result = apiInstance.BroadcastTx(authorization, accountName, broadcastInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.BroadcastTx: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the BroadcastTxWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<BroadCastRawTransactionAPIResponse> response = apiInstance.BroadcastTxWithHttpInfo(authorization, accountName, broadcastInput);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.BroadcastTxWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | ||
accountName | string | ||
broadcastInput | BroadcastInput |
BroadCastRawTransactionAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountAPIResponse CreateAccount (string authorization, CreateAccountInput createAccountInput)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class CreateAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var authorization = "authorization_example"; // string |
var createAccountInput = new CreateAccountInput(); // CreateAccountInput |
try
{
AccountAPIResponse result = apiInstance.CreateAccount(authorization, createAccountInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.CreateAccount: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the CreateAccountWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.CreateAccountWithHttpInfo(authorization, createAccountInput);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.CreateAccountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | ||
createAccountInput | CreateAccountInput |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountAPIResponse DeleteAccount (string authorization, string accountName)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class DeleteAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var authorization = "authorization_example"; // string |
var accountName = "accountName_example"; // string |
try
{
AccountAPIResponse result = apiInstance.DeleteAccount(authorization, accountName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.DeleteAccount: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the DeleteAccountWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.DeleteAccountWithHttpInfo(authorization, accountName);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.DeleteAccountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | ||
accountName | string |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionAPIResponse DeployContract (string authorization, string accountName, DeployInput deployInput)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class DeployContractExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var authorization = "authorization_example"; // string |
var accountName = "accountName_example"; // string |
var deployInput = new DeployInput(); // DeployInput |
try
{
TransactionAPIResponse result = apiInstance.DeployContract(authorization, accountName, deployInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.DeployContract: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the DeployContractWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TransactionAPIResponse> response = apiInstance.DeployContractWithHttpInfo(authorization, accountName, deployInput);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.DeployContractWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | ||
accountName | string | ||
deployInput | DeployInput |
TransactionAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountAPIResponse GetAccount (string authorization, string accountName)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class GetAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var authorization = "authorization_example"; // string |
var accountName = "accountName_example"; // string |
try
{
AccountAPIResponse result = apiInstance.GetAccount(authorization, accountName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.GetAccount: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetAccountWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.GetAccountWithHttpInfo(authorization, accountName);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.GetAccountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | ||
accountName | string |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BalanceAPIResponse GetBalance (string accountName, string authorization, string chainId)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class GetBalanceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
var chainId = "chainId_example"; // string |
try
{
BalanceAPIResponse result = apiInstance.GetBalance(accountName, authorization, chainId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.GetBalance: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetBalanceWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<BalanceAPIResponse> response = apiInstance.GetBalanceWithHttpInfo(accountName, authorization, chainId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.GetBalanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | string | ||
authorization | string | ||
chainId | string |
BalanceAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NonceAPIResponse GetNonce (string accountName, string authorization)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class GetNonceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
try
{
NonceAPIResponse result = apiInstance.GetNonce(accountName, authorization);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.GetNonce: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetNonceWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<NonceAPIResponse> response = apiInstance.GetNonceWithHttpInfo(accountName, authorization);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.GetNonceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | string | ||
authorization | string |
NonceAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountAPIResponse ListAccounts (string authorization)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class ListAccountsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var authorization = "authorization_example"; // string |
try
{
AccountAPIResponse result = apiInstance.ListAccounts(authorization);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.ListAccounts: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the ListAccountsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.ListAccountsWithHttpInfo(authorization);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.ListAccountsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | string |
AccountAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SignMessageAPIResponse SignMessage (string accountName, string authorization, SignMessage signMessage)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class SignMessageExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
var signMessage = new SignMessage(); // SignMessage |
try
{
SignMessageAPIResponse result = apiInstance.SignMessage(accountName, authorization, signMessage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.SignMessage: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the SignMessageWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<SignMessageAPIResponse> response = apiInstance.SignMessageWithHttpInfo(accountName, authorization, signMessage);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.SignMessageWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | string | ||
authorization | string | ||
signMessage | SignMessage |
SignMessageAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionAPIResponse SignTransaction (string accountName, string authorization, InputBody inputBody)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class SignTransactionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
var inputBody = new InputBody(); // InputBody |
try
{
TransactionAPIResponse result = apiInstance.SignTransaction(accountName, authorization, inputBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.SignTransaction: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the SignTransactionWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TransactionAPIResponse> response = apiInstance.SignTransactionWithHttpInfo(accountName, authorization, inputBody);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.SignTransactionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | string | ||
authorization | string | ||
inputBody | InputBody |
TransactionAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SignMessageAPIResponse SignTypedData (string accountName, string authorization, SignTypedData signTypedData)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class SignTypedDataExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
var signTypedData = new SignTypedData(); // SignTypedData |
try
{
SignMessageAPIResponse result = apiInstance.SignTypedData(accountName, authorization, signTypedData);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.SignTypedData: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the SignTypedDataWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<SignMessageAPIResponse> response = apiInstance.SignTypedDataWithHttpInfo(accountName, authorization, signTypedData);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.SignTypedDataWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | string | ||
authorization | string | ||
signTypedData | SignTypedData |
SignMessageAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionAPIResponse TransferEth (string accountName, string authorization, InputBody inputBody)
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class TransferEthExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new AccountsApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
var inputBody = new InputBody(); // InputBody |
try
{
TransactionAPIResponse result = apiInstance.TransferEth(accountName, authorization, inputBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.TransferEth: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the TransferEthWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<TransactionAPIResponse> response = apiInstance.TransferEthWithHttpInfo(accountName, authorization, inputBody);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountsApi.TransferEthWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | string | ||
authorization | string | ||
inputBody | InputBody |
TransactionAPIResponse
ApiKeyAuth, BearerAuth
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]