import moonsdkfrom moonsdk.models.broad_cast_raw_transaction_api_response import BroadCastRawTransactionAPIResponsefrom moonsdk.models.broadcast_input import BroadcastInputfrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->broadcast_tx: %s\n"% e)
import moonsdkfrom moonsdk.models.account_api_response import AccountAPIResponsefrom moonsdk.models.create_account_input import CreateAccountInputfrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->create_account: %s\n"% e)
import moonsdkfrom moonsdk.models.account_api_response import AccountAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->delete_account: %s\n"% e)
import moonsdkfrom moonsdk.models.deploy_input import DeployInputfrom moonsdk.models.transaction_api_response import TransactionAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->deploy_contract: %s\n"% e)
import moonsdkfrom moonsdk.models.account_api_response import AccountAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->get_account: %s\n"% e)
import moonsdkfrom moonsdk.models.balance_api_response import BalanceAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->get_balance: %s\n"% e)
import moonsdkfrom moonsdk.models.nonce_api_response import NonceAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->get_nonce: %s\n"% e)
import moonsdkfrom moonsdk.models.account_api_response import AccountAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->list_accounts: %s\n"% e)
import moonsdkfrom moonsdk.models.sign_message import SignMessagefrom moonsdk.models.sign_message_api_response import SignMessageAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->sign_message: %s\n"% e)
import moonsdkfrom moonsdk.models.input_body import InputBodyfrom moonsdk.models.transaction_api_response import TransactionAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->sign_transaction: %s\n"% e)
import moonsdkfrom moonsdk.models.sign_message_api_response import SignMessageAPIResponsefrom moonsdk.models.sign_typed_data import SignTypedDatafrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->sign_typed_data: %s\n"% e)
import moonsdkfrom moonsdk.models.input_body import InputBodyfrom moonsdk.models.transaction_api_response import TransactionAPIResponsefrom moonsdk.rest import ApiExceptionfrom 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: ApiKeyAuthconfiguration.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: BearerAuthconfiguration.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 clientasyncwith 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)exceptExceptionas e:print("Exception when calling AccountsApi->transfer_eth: %s\n"% e)