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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.