AccountsApi

moonsdk.AccountsApi

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

Method
HTTP request
Description

POST /accounts/{accountName}/broadcast-tx

POST /accounts

DELETE /accounts/{accountName}

POST /accounts/{accountName}/deploy

GET /accounts/{accountName}

GET /accounts/{accountName}/balance

GET /accounts/{accountName}/nonce

GET /accounts

POST /accounts/{accountName}/sign-message

POST /accounts/{accountName}/sign-transaction

POST /accounts/{accountName}/sign-typed-data

POST /accounts/{accountName}/transfer-eth

broadcast_tx

BroadCastRawTransactionAPIResponse broadcast_tx(authorization, account_name, broadcast_input)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.broad_cast_raw_transaction_api_response import BroadCastRawTransactionAPIResponse
from moonsdk.models.broadcast_input import BroadcastInput
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    authorization = 'authorization_example' # str | 
    account_name = 'account_name_example' # str | 
    broadcast_input = moonsdk.BroadcastInput() # BroadcastInput | 

    try:
        api_response = await api_instance.broadcast_tx(authorization, account_name, broadcast_input)
        print("The response of AccountsApi->broadcast_tx:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->broadcast_tx: %s\n" % e)

Parameters

Name
Type
Description
Notes

authorization

str

account_name

str

broadcast_input

Return type

BroadCastRawTransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

create_account

AccountAPIResponse create_account(authorization, create_account_input)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.account_api_response import AccountAPIResponse
from moonsdk.models.create_account_input import CreateAccountInput
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    authorization = 'authorization_example' # str | 
    create_account_input = moonsdk.CreateAccountInput() # CreateAccountInput | 

    try:
        api_response = await api_instance.create_account(authorization, create_account_input)
        print("The response of AccountsApi->create_account:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->create_account: %s\n" % e)

Parameters

Name
Type
Description
Notes

authorization

str

create_account_input

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

delete_account

AccountAPIResponse delete_account(authorization, account_name)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.account_api_response import AccountAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    authorization = 'authorization_example' # str | 
    account_name = 'account_name_example' # str | 

    try:
        api_response = await api_instance.delete_account(authorization, account_name)
        print("The response of AccountsApi->delete_account:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->delete_account: %s\n" % e)

Parameters

Name
Type
Description
Notes

authorization

str

account_name

str

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

deploy_contract

TransactionAPIResponse deploy_contract(authorization, account_name, deploy_input)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.deploy_input import DeployInput
from moonsdk.models.transaction_api_response import TransactionAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    authorization = 'authorization_example' # str | 
    account_name = 'account_name_example' # str | 
    deploy_input = moonsdk.DeployInput() # DeployInput | 

    try:
        api_response = await api_instance.deploy_contract(authorization, account_name, deploy_input)
        print("The response of AccountsApi->deploy_contract:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->deploy_contract: %s\n" % e)

Parameters

Name
Type
Description
Notes

authorization

str

account_name

str

deploy_input

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

get_account

AccountAPIResponse get_account(authorization, account_name)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.account_api_response import AccountAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    authorization = 'authorization_example' # str | 
    account_name = 'account_name_example' # str | 

    try:
        api_response = await api_instance.get_account(authorization, account_name)
        print("The response of AccountsApi->get_account:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->get_account: %s\n" % e)

Parameters

Name
Type
Description
Notes

authorization

str

account_name

str

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

get_balance

BalanceAPIResponse get_balance(account_name, authorization, chain_id)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.balance_api_response import BalanceAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 
    chain_id = 'chain_id_example' # str | 

    try:
        api_response = await api_instance.get_balance(account_name, authorization, chain_id)
        print("The response of AccountsApi->get_balance:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->get_balance: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

chain_id

str

Return type

BalanceAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

get_nonce

NonceAPIResponse get_nonce(account_name, authorization)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.nonce_api_response import NonceAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 

    try:
        api_response = await api_instance.get_nonce(account_name, authorization)
        print("The response of AccountsApi->get_nonce:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->get_nonce: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

Return type

NonceAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

list_accounts

AccountAPIResponse list_accounts(authorization)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.account_api_response import AccountAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    authorization = 'authorization_example' # str | 

    try:
        api_response = await api_instance.list_accounts(authorization)
        print("The response of AccountsApi->list_accounts:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->list_accounts: %s\n" % e)

Parameters

Name
Type
Description
Notes

authorization

str

Return type

AccountAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

sign_message

SignMessageAPIResponse sign_message(account_name, authorization, sign_message)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.sign_message import SignMessage
from moonsdk.models.sign_message_api_response import SignMessageAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 
    sign_message = moonsdk.SignMessage() # SignMessage | 

    try:
        api_response = await api_instance.sign_message(account_name, authorization, sign_message)
        print("The response of AccountsApi->sign_message:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->sign_message: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

sign_message

Return type

SignMessageAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

sign_transaction

TransactionAPIResponse sign_transaction(account_name, authorization, input_body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.input_body import InputBody
from moonsdk.models.transaction_api_response import TransactionAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 
    input_body = moonsdk.InputBody() # InputBody | 

    try:
        api_response = await api_instance.sign_transaction(account_name, authorization, input_body)
        print("The response of AccountsApi->sign_transaction:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->sign_transaction: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

input_body

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

sign_typed_data

SignMessageAPIResponse sign_typed_data(account_name, authorization, sign_typed_data)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.sign_message_api_response import SignMessageAPIResponse
from moonsdk.models.sign_typed_data import SignTypedData
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 
    sign_typed_data = moonsdk.SignTypedData() # SignTypedData | 

    try:
        api_response = await api_instance.sign_typed_data(account_name, authorization, sign_typed_data)
        print("The response of AccountsApi->sign_typed_data:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->sign_typed_data: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

sign_typed_data

Return type

SignMessageAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

transfer_eth

TransactionAPIResponse transfer_eth(account_name, authorization, input_body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.input_body import InputBody
from moonsdk.models.transaction_api_response import TransactionAPIResponse
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.AccountsApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 
    input_body = moonsdk.InputBody() # InputBody | 

    try:
        api_response = await api_instance.transfer_eth(account_name, authorization, input_body)
        print("The response of AccountsApi->transfer_eth:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountsApi->transfer_eth: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

input_body

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

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

Last updated