cdp.openapi_client.api package¶
Submodules¶
cdp.openapi_client.api.evm_accounts_api module¶
Coinbase Developer Platform APIs
The Coinbase Developer Platform APIs - leading the world’s transition onchain.
The version of the OpenAPI document: 2.0.0 Contact: cdp@coinbase.com Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
- class cdp.openapi_client.api.evm_accounts_api.EVMAccountsApi(api_client=None)¶
Bases:
object
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
- async create_evm_account(x_wallet_auth=None, x_idempotency_key=None, create_evm_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create an EVM account
Creates a new EVM account.
- Parameters:
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
create_evm_account_request (CreateEvmAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async create_evm_account_with_http_info(x_wallet_auth=None, x_idempotency_key=None, create_evm_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create an EVM account
Creates a new EVM account.
- Parameters:
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
create_evm_account_request (CreateEvmAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmAccount]
- Returns:
Returns the result object.
- async create_evm_account_without_preload_content(x_wallet_auth=None, x_idempotency_key=None, create_evm_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create an EVM account
Creates a new EVM account.
- Parameters:
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
create_evm_account_request (CreateEvmAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async get_evm_account(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get an EVM account by address
Gets an EVM account by its address.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. The address does not need to be checksummed. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async get_evm_account_by_name(name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get an EVM account by name
Gets an EVM account by its name.
- Parameters:
name (str) – The name of the EVM account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async get_evm_account_by_name_with_http_info(name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get an EVM account by name
Gets an EVM account by its name.
- Parameters:
name (str) – The name of the EVM account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmAccount]
- Returns:
Returns the result object.
- async get_evm_account_by_name_without_preload_content(name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get an EVM account by name
Gets an EVM account by its name.
- Parameters:
name (str) – The name of the EVM account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async get_evm_account_with_http_info(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get an EVM account by address
Gets an EVM account by its address.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. The address does not need to be checksummed. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmAccount]
- Returns:
Returns the result object.
- async get_evm_account_without_preload_content(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get an EVM account by address
Gets an EVM account by its address.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. The address does not need to be checksummed. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async list_evm_accounts(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List EVM accounts
Lists the EVM accounts belonging to the developer’s CDP Project. The response is paginated, and by default, returns 20 accounts per page.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async list_evm_accounts_with_http_info(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List EVM accounts
Lists the EVM accounts belonging to the developer’s CDP Project. The response is paginated, and by default, returns 20 accounts per page.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[ListEvmAccounts200Response]
- Returns:
Returns the result object.
- async list_evm_accounts_without_preload_content(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List EVM accounts
Lists the EVM accounts belonging to the developer’s CDP Project. The response is paginated, and by default, returns 20 accounts per page.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async send_evm_transaction(address, x_wallet_auth=None, x_idempotency_key=None, send_evm_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Send a transaction
Signs a transaction with the given EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/). The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). Transaction fields and API behavior - to (Required): The address of the contract or account to send the transaction to. - chainId (Ignored): The value of the chainId field in the transaction is ignored. The transaction will be sent to the network indicated by the network field in the request body. - nonce (Optional): The nonce to use for the transaction. If not provided, the API will assign a nonce to the transaction based on the current state of the account. - maxPriorityFeePerGas (Optional): The maximum priority fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions. - maxFeePerGas (Optional): The maximum fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions. - gasLimit (Optional): The gas limit to use for the transaction. If not provided, the API will estimate a value based on the to and data fields of the transaction. - value (Optional): The amount of ETH, in wei, to send with the transaction. - data (Optional): The data to send with the transaction; only used for contract calls. - accessList (Optional): The access list to use for the transaction.
- Parameters:
address (str) – The 0x-prefixed address of the Ethereum account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
send_evm_transaction_request (SendEvmTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async send_evm_transaction_with_http_info(address, x_wallet_auth=None, x_idempotency_key=None, send_evm_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Send a transaction
Signs a transaction with the given EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/). The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). Transaction fields and API behavior - to (Required): The address of the contract or account to send the transaction to. - chainId (Ignored): The value of the chainId field in the transaction is ignored. The transaction will be sent to the network indicated by the network field in the request body. - nonce (Optional): The nonce to use for the transaction. If not provided, the API will assign a nonce to the transaction based on the current state of the account. - maxPriorityFeePerGas (Optional): The maximum priority fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions. - maxFeePerGas (Optional): The maximum fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions. - gasLimit (Optional): The gas limit to use for the transaction. If not provided, the API will estimate a value based on the to and data fields of the transaction. - value (Optional): The amount of ETH, in wei, to send with the transaction. - data (Optional): The data to send with the transaction; only used for contract calls. - accessList (Optional): The access list to use for the transaction.
- Parameters:
address (str) – The 0x-prefixed address of the Ethereum account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
send_evm_transaction_request (SendEvmTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SendEvmTransaction200Response]
- Returns:
Returns the result object.
- async send_evm_transaction_without_preload_content(address, x_wallet_auth=None, x_idempotency_key=None, send_evm_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Send a transaction
Signs a transaction with the given EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/). The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). Transaction fields and API behavior - to (Required): The address of the contract or account to send the transaction to. - chainId (Ignored): The value of the chainId field in the transaction is ignored. The transaction will be sent to the network indicated by the network field in the request body. - nonce (Optional): The nonce to use for the transaction. If not provided, the API will assign a nonce to the transaction based on the current state of the account. - maxPriorityFeePerGas (Optional): The maximum priority fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions. - maxFeePerGas (Optional): The maximum fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions. - gasLimit (Optional): The gas limit to use for the transaction. If not provided, the API will estimate a value based on the to and data fields of the transaction. - value (Optional): The amount of ETH, in wei, to send with the transaction. - data (Optional): The data to send with the transaction; only used for contract calls. - accessList (Optional): The access list to use for the transaction.
- Parameters:
address (str) – The 0x-prefixed address of the Ethereum account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
send_evm_transaction_request (SendEvmTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async sign_evm_hash(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_hash_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a hash
Signs an arbitrary 32 byte hash with the given EVM account.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_hash_request (SignEvmHashRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async sign_evm_hash_with_http_info(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_hash_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a hash
Signs an arbitrary 32 byte hash with the given EVM account.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_hash_request (SignEvmHashRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SignEvmHash200Response]
- Returns:
Returns the result object.
- async sign_evm_hash_without_preload_content(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_hash_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a hash
Signs an arbitrary 32 byte hash with the given EVM account.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_hash_request (SignEvmHashRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async sign_evm_message(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_message_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign an EIP-191 message
Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given EVM account. Per the specification, the message in the request body is prepended with 0x19 <0x45 (E)> <thereum Signed Message:n” + len(message)> before being signed.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_message_request (SignEvmMessageRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async sign_evm_message_with_http_info(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_message_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign an EIP-191 message
Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given EVM account. Per the specification, the message in the request body is prepended with 0x19 <0x45 (E)> <thereum Signed Message:n” + len(message)> before being signed.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_message_request (SignEvmMessageRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SignEvmMessage200Response]
- Returns:
Returns the result object.
- async sign_evm_message_without_preload_content(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_message_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign an EIP-191 message
Signs an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) message with the given EVM account. Per the specification, the message in the request body is prepended with 0x19 <0x45 (E)> <thereum Signed Message:n” + len(message)> before being signed.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_message_request (SignEvmMessageRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async sign_evm_transaction(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a transaction
Signs a transaction with the given EVM account. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/). The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_transaction_request (SignEvmTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async sign_evm_transaction_with_http_info(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a transaction
Signs a transaction with the given EVM account. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/). The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_transaction_request (SignEvmTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SignEvmTransaction200Response]
- Returns:
Returns the result object.
- async sign_evm_transaction_without_preload_content(address, x_wallet_auth=None, x_idempotency_key=None, sign_evm_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a transaction
Signs a transaction with the given EVM account. The transaction should be serialized as a hex string using [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/). The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md). The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
- Parameters:
address (str) – The 0x-prefixed address of the EVM account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_evm_transaction_request (SignEvmTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
cdp.openapi_client.api.evm_smart_accounts_api module¶
Coinbase Developer Platform APIs
The Coinbase Developer Platform APIs - leading the world’s transition onchain.
The version of the OpenAPI document: 2.0.0 Contact: cdp@coinbase.com Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
- class cdp.openapi_client.api.evm_smart_accounts_api.EVMSmartAccountsApi(api_client=None)¶
Bases:
object
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
- async create_evm_smart_account(create_evm_smart_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a Smart Account
Creates a new Smart Account.
- Parameters:
create_evm_smart_account_request (CreateEvmSmartAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async create_evm_smart_account_with_http_info(create_evm_smart_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a Smart Account
Creates a new Smart Account.
- Parameters:
create_evm_smart_account_request (CreateEvmSmartAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmSmartAccount]
- Returns:
Returns the result object.
- async create_evm_smart_account_without_preload_content(create_evm_smart_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a Smart Account
Creates a new Smart Account.
- Parameters:
create_evm_smart_account_request (CreateEvmSmartAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async get_evm_smart_account(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Smart Account by address
Gets a Smart Account by its address.
- Parameters:
address (str) – The 0x-prefixed address of the Smart Account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async get_evm_smart_account_with_http_info(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Smart Account by address
Gets a Smart Account by its address.
- Parameters:
address (str) – The 0x-prefixed address of the Smart Account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmSmartAccount]
- Returns:
Returns the result object.
- async get_evm_smart_account_without_preload_content(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Smart Account by address
Gets a Smart Account by its address.
- Parameters:
address (str) – The 0x-prefixed address of the Smart Account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async get_user_operation(address, user_op_hash, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a user operation
Gets a user operation by its hash.
- Parameters:
address (str) – The address of the Smart Account the user operation belongs to. (required)
user_op_hash (str) – The hash of the user operation to fetch. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async get_user_operation_with_http_info(address, user_op_hash, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a user operation
Gets a user operation by its hash.
- Parameters:
address (str) – The address of the Smart Account the user operation belongs to. (required)
user_op_hash (str) – The hash of the user operation to fetch. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmUserOperation]
- Returns:
Returns the result object.
- async get_user_operation_without_preload_content(address, user_op_hash, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a user operation
Gets a user operation by its hash.
- Parameters:
address (str) – The address of the Smart Account the user operation belongs to. (required)
user_op_hash (str) – The hash of the user operation to fetch. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async list_evm_smart_accounts(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Smart Accounts
Lists the Smart Accounts belonging to the developer’s CDP Project. The response is paginated, and by default, returns 20 accounts per page.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async list_evm_smart_accounts_with_http_info(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Smart Accounts
Lists the Smart Accounts belonging to the developer’s CDP Project. The response is paginated, and by default, returns 20 accounts per page.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[ListEvmSmartAccounts200Response]
- Returns:
Returns the result object.
- async list_evm_smart_accounts_without_preload_content(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Smart Accounts
Lists the Smart Accounts belonging to the developer’s CDP Project. The response is paginated, and by default, returns 20 accounts per page.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async prepare_user_operation(address, prepare_user_operation_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Prepare a user operation
Prepares a new user operation on a Smart Account for a specific network.
- Parameters:
address (str) – The address of the Smart Account to create the user operation on. (required)
prepare_user_operation_request (PrepareUserOperationRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async prepare_user_operation_with_http_info(address, prepare_user_operation_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Prepare a user operation
Prepares a new user operation on a Smart Account for a specific network.
- Parameters:
address (str) – The address of the Smart Account to create the user operation on. (required)
prepare_user_operation_request (PrepareUserOperationRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmUserOperation]
- Returns:
Returns the result object.
- async prepare_user_operation_without_preload_content(address, prepare_user_operation_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Prepare a user operation
Prepares a new user operation on a Smart Account for a specific network.
- Parameters:
address (str) – The address of the Smart Account to create the user operation on. (required)
prepare_user_operation_request (PrepareUserOperationRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async send_user_operation(address, user_op_hash, send_user_operation_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Send a user operation
Sends a user operation with a signature. The signature that is sent should be 65 bytes, consisting of the r, s, and v values of the ECDSA signature. Note that the v value should conform to the personal_sign standard, which means it should be 27 or 28.
- Parameters:
address (str) – The address of the Smart Account to send the user operation from. (required)
user_op_hash (str) – The hash of the user operation to send. (required)
send_user_operation_request (SendUserOperationRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async send_user_operation_with_http_info(address, user_op_hash, send_user_operation_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Send a user operation
Sends a user operation with a signature. The signature that is sent should be 65 bytes, consisting of the r, s, and v values of the ECDSA signature. Note that the v value should conform to the personal_sign standard, which means it should be 27 or 28.
- Parameters:
address (str) – The address of the Smart Account to send the user operation from. (required)
user_op_hash (str) – The hash of the user operation to send. (required)
send_user_operation_request (SendUserOperationRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[EvmUserOperation]
- Returns:
Returns the result object.
- async send_user_operation_without_preload_content(address, user_op_hash, send_user_operation_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Send a user operation
Sends a user operation with a signature. The signature that is sent should be 65 bytes, consisting of the r, s, and v values of the ECDSA signature. Note that the v value should conform to the personal_sign standard, which means it should be 27 or 28.
- Parameters:
address (str) – The address of the Smart Account to send the user operation from. (required)
user_op_hash (str) – The hash of the user operation to send. (required)
send_user_operation_request (SendUserOperationRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
cdp.openapi_client.api.evm_token_balances_api module¶
Coinbase Developer Platform APIs
The Coinbase Developer Platform APIs - leading the world’s transition onchain.
The version of the OpenAPI document: 2.0.0 Contact: cdp@coinbase.com Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
- class cdp.openapi_client.api.evm_token_balances_api.EVMTokenBalancesApi(api_client=None)¶
Bases:
object
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
- async list_evm_token_balances(address, network, page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List EVM token balances
Lists the token balances of an EVM address on a given network. The balances include ERC-20 tokens and the native gas token (usually ETH). The response is paginated, and by default, returns 20 balances per page. Note: This endpoint is still under development and does not yet provide strong freshness guarantees. Specifically, balances of new tokens can, on occasion, take up to ~30 seconds to appear, while balances of tokens already belonging to an address will generally be close to chain tip. Freshness of new token balances will improve over the coming weeks.
- Parameters:
address (str) – The 0x-prefixed EVM address to get balances for. The address does not need to be checksummed. (required)
network (ListEvmTokenBalancesNetwork) – The human-readable network name to get the balances for. (required)
page_size (int) – The number of balances to return per page.
page_token (str) – The token for the next page of balances. Will be empty if there are no more balances to fetch.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async list_evm_token_balances_with_http_info(address, network, page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List EVM token balances
Lists the token balances of an EVM address on a given network. The balances include ERC-20 tokens and the native gas token (usually ETH). The response is paginated, and by default, returns 20 balances per page. Note: This endpoint is still under development and does not yet provide strong freshness guarantees. Specifically, balances of new tokens can, on occasion, take up to ~30 seconds to appear, while balances of tokens already belonging to an address will generally be close to chain tip. Freshness of new token balances will improve over the coming weeks.
- Parameters:
address (str) – The 0x-prefixed EVM address to get balances for. The address does not need to be checksummed. (required)
network (ListEvmTokenBalancesNetwork) – The human-readable network name to get the balances for. (required)
page_size (int) – The number of balances to return per page.
page_token (str) – The token for the next page of balances. Will be empty if there are no more balances to fetch.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[ListEvmTokenBalances200Response]
- Returns:
Returns the result object.
- async list_evm_token_balances_without_preload_content(address, network, page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List EVM token balances
Lists the token balances of an EVM address on a given network. The balances include ERC-20 tokens and the native gas token (usually ETH). The response is paginated, and by default, returns 20 balances per page. Note: This endpoint is still under development and does not yet provide strong freshness guarantees. Specifically, balances of new tokens can, on occasion, take up to ~30 seconds to appear, while balances of tokens already belonging to an address will generally be close to chain tip. Freshness of new token balances will improve over the coming weeks.
- Parameters:
address (str) – The 0x-prefixed EVM address to get balances for. The address does not need to be checksummed. (required)
network (ListEvmTokenBalancesNetwork) – The human-readable network name to get the balances for. (required)
page_size (int) – The number of balances to return per page.
page_token (str) – The token for the next page of balances. Will be empty if there are no more balances to fetch.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
cdp.openapi_client.api.faucets_api module¶
Coinbase Developer Platform APIs
The Coinbase Developer Platform APIs - leading the world’s transition onchain.
The version of the OpenAPI document: 2.0.0 Contact: cdp@coinbase.com Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
- class cdp.openapi_client.api.faucets_api.FaucetsApi(api_client=None)¶
Bases:
object
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
- async request_evm_faucet(request_evm_faucet_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Request funds on EVM test networks
Request funds from the CDP Faucet on supported EVM test networks. Faucets are available for ETH, USDC, EURC, and cbBTC on Base Sepolia and Ethereum Sepolia. To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested. These limits are applied at both the CDP User level and the blockchain address level. A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address. | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits| |:-----:|:————————-:|:--------------------------------:| | ETH | 0.0001 ETH | 0.1 ETH | | USDC | 1 USDC | 10 USDC | | EURC | 1 EURC | 10 EURC | | cbBTC | 0.0001 cbBTC | 0.001 cbBTC |
- Parameters:
request_evm_faucet_request (RequestEvmFaucetRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async request_evm_faucet_with_http_info(request_evm_faucet_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Request funds on EVM test networks
Request funds from the CDP Faucet on supported EVM test networks. Faucets are available for ETH, USDC, EURC, and cbBTC on Base Sepolia and Ethereum Sepolia. To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested. These limits are applied at both the CDP User level and the blockchain address level. A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address. | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits| |:-----:|:————————-:|:--------------------------------:| | ETH | 0.0001 ETH | 0.1 ETH | | USDC | 1 USDC | 10 USDC | | EURC | 1 EURC | 10 EURC | | cbBTC | 0.0001 cbBTC | 0.001 cbBTC |
- Parameters:
request_evm_faucet_request (RequestEvmFaucetRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[RequestEvmFaucet200Response]
- Returns:
Returns the result object.
- async request_evm_faucet_without_preload_content(request_evm_faucet_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Request funds on EVM test networks
Request funds from the CDP Faucet on supported EVM test networks. Faucets are available for ETH, USDC, EURC, and cbBTC on Base Sepolia and Ethereum Sepolia. To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested. These limits are applied at both the CDP User level and the blockchain address level. A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address. | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits| |:-----:|:————————-:|:--------------------------------:| | ETH | 0.0001 ETH | 0.1 ETH | | USDC | 1 USDC | 10 USDC | | EURC | 1 EURC | 10 EURC | | cbBTC | 0.0001 cbBTC | 0.001 cbBTC |
- Parameters:
request_evm_faucet_request (RequestEvmFaucetRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async request_solana_faucet(request_solana_faucet_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Request funds on Solana devnet
Request funds from the CDP Faucet on Solana devnet. Faucets are available for SOL. To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested. These limits are applied at both the CDP User level and the blockchain address level. A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address. | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits| |:-----:|:————————-:|:--------------------------------:| | SOL | 0.00125 SOL | 0.0125 SOL | | USDC | 1 USDC | 10 USDC |
- Parameters:
request_solana_faucet_request (RequestSolanaFaucetRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async request_solana_faucet_with_http_info(request_solana_faucet_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Request funds on Solana devnet
Request funds from the CDP Faucet on Solana devnet. Faucets are available for SOL. To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested. These limits are applied at both the CDP User level and the blockchain address level. A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address. | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits| |:-----:|:————————-:|:--------------------------------:| | SOL | 0.00125 SOL | 0.0125 SOL | | USDC | 1 USDC | 10 USDC |
- Parameters:
request_solana_faucet_request (RequestSolanaFaucetRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[RequestSolanaFaucet200Response]
- Returns:
Returns the result object.
- async request_solana_faucet_without_preload_content(request_solana_faucet_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Request funds on Solana devnet
Request funds from the CDP Faucet on Solana devnet. Faucets are available for SOL. To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested. These limits are applied at both the CDP User level and the blockchain address level. A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address. | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits| |:-----:|:————————-:|:--------------------------------:| | SOL | 0.00125 SOL | 0.0125 SOL | | USDC | 1 USDC | 10 USDC |
- Parameters:
request_solana_faucet_request (RequestSolanaFaucetRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
cdp.openapi_client.api.solana_accounts_api module¶
Coinbase Developer Platform APIs
The Coinbase Developer Platform APIs - leading the world’s transition onchain.
The version of the OpenAPI document: 2.0.0 Contact: cdp@coinbase.com Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
- class cdp.openapi_client.api.solana_accounts_api.SolanaAccountsApi(api_client=None)¶
Bases:
object
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
- async create_solana_account(x_wallet_auth=None, x_idempotency_key=None, create_solana_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a Solana account
Creates a new Solana account.
- Parameters:
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
create_solana_account_request (CreateSolanaAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async create_solana_account_with_http_info(x_wallet_auth=None, x_idempotency_key=None, create_solana_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a Solana account
Creates a new Solana account.
- Parameters:
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
create_solana_account_request (CreateSolanaAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SolanaAccount]
- Returns:
Returns the result object.
- async create_solana_account_without_preload_content(x_wallet_auth=None, x_idempotency_key=None, create_solana_account_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Create a Solana account
Creates a new Solana account.
- Parameters:
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
create_solana_account_request (CreateSolanaAccountRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async get_solana_account(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Solana account by address
Gets a Solana account by its address.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async get_solana_account_by_name(name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Solana account by name
Gets a Solana account by its name.
- Parameters:
name (str) – The name of the Solana account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async get_solana_account_by_name_with_http_info(name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Solana account by name
Gets a Solana account by its name.
- Parameters:
name (str) – The name of the Solana account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SolanaAccount]
- Returns:
Returns the result object.
- async get_solana_account_by_name_without_preload_content(name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Solana account by name
Gets a Solana account by its name.
- Parameters:
name (str) – The name of the Solana account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async get_solana_account_with_http_info(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Solana account by address
Gets a Solana account by its address.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SolanaAccount]
- Returns:
Returns the result object.
- async get_solana_account_without_preload_content(address, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get a Solana account by address
Gets a Solana account by its address.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async list_solana_accounts(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Solana accounts or get account by name
Lists the Solana accounts belonging to the developer. The response is paginated, and by default, returns 20 accounts per page. If a name is provided, the response will contain only the account with that name.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async list_solana_accounts_with_http_info(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Solana accounts or get account by name
Lists the Solana accounts belonging to the developer. The response is paginated, and by default, returns 20 accounts per page. If a name is provided, the response will contain only the account with that name.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[ListSolanaAccounts200Response]
- Returns:
Returns the result object.
- async list_solana_accounts_without_preload_content(page_size=None, page_token=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Solana accounts or get account by name
Lists the Solana accounts belonging to the developer. The response is paginated, and by default, returns 20 accounts per page. If a name is provided, the response will contain only the account with that name.
- Parameters:
page_size (int) – The number of accounts to return per page.
page_token (str) – The token for the next page of accounts, if any.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async sign_solana_message(address, x_wallet_auth=None, x_idempotency_key=None, sign_solana_message_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a message
Signs an arbitrary message with the given Solana account. WARNING: Never sign a message that you didn’t generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_solana_message_request (SignSolanaMessageRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async sign_solana_message_with_http_info(address, x_wallet_auth=None, x_idempotency_key=None, sign_solana_message_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a message
Signs an arbitrary message with the given Solana account. WARNING: Never sign a message that you didn’t generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_solana_message_request (SignSolanaMessageRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SignSolanaMessage200Response]
- Returns:
Returns the result object.
- async sign_solana_message_without_preload_content(address, x_wallet_auth=None, x_idempotency_key=None, sign_solana_message_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a message
Signs an arbitrary message with the given Solana account. WARNING: Never sign a message that you didn’t generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_solana_message_request (SignSolanaMessageRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.
- async sign_solana_transaction(address, x_wallet_auth=None, x_idempotency_key=None, sign_solana_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a transaction
Signs a transaction with the given Solana account. The unsigned transaction should be serialized into a byte array and then encoded as base64. Transaction types The following transaction types are supported: * [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) * [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html) The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_solana_transaction_request (SignSolanaTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
- async sign_solana_transaction_with_http_info(address, x_wallet_auth=None, x_idempotency_key=None, sign_solana_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a transaction
Signs a transaction with the given Solana account. The unsigned transaction should be serialized into a byte array and then encoded as base64. Transaction types The following transaction types are supported: * [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) * [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html) The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_solana_transaction_request (SignSolanaTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ApiResponse[SignSolanaTransaction200Response]
- Returns:
Returns the result object.
- async sign_solana_transaction_without_preload_content(address, x_wallet_auth=None, x_idempotency_key=None, sign_solana_transaction_request=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Sign a transaction
Signs a transaction with the given Solana account. The unsigned transaction should be serialized into a byte array and then encoded as base64. Transaction types The following transaction types are supported: * [Legacy transactions](https://solana-labs.github.io/solana-web3.js/classes/Transaction.html) * [Versioned transactions](https://solana-labs.github.io/solana-web3.js/classes/VersionedTransaction.html) The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.
- Parameters:
address (str) – The base58 encoded address of the Solana account. (required)
x_wallet_auth (str) – A JWT signed using your Wallet Secret, encoded in base64. Refer to the [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token) section of our Authentication docs for more details on how to generate your Wallet Token.
x_idempotency_key (str) – An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-v2/docs/idempotency) for more information on using idempotency keys.
sign_solana_transaction_request (SignSolanaTransactionRequest)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
ClientResponse
- Returns:
Returns the result object.