Skip to main content
POST
/
wallets
/
{wallet_id}
/
addresses
import cobo_waas2
from cobo_waas2.models.address_info import AddressInfo
from cobo_waas2.models.create_address_request import CreateAddressRequest
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.WalletsApi(api_client)
    wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    create_address_request = cobo_waas2.CreateAddressRequest(chain_id="ETH", count=1)

    try:
        # Create addresses in wallet
        api_response = api_instance.create_address(
            wallet_id, create_address_request=create_address_request
        )
        print("The response of WalletsApi->create_address:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->create_address: %s\n" % e)

[
  {
    "address": "0x0000000000000000000000000000000000000000",
    "chain_id": "ETH",
    "memo": "82840924",
    "path": "m/44/0/2/0/0",
    "encoding": "ENCODING_P2PKH",
    "pubkey": "xpub6HFaEKt4XdwgEQrQmWr8AEAZ7XBSGh7QYFspwdE86sJn6PjkqsPwVQc2poriBdizqXnTB3UWurJJAZpFnD2DAp9vFTmM2gQ264AArYtFWLH",
    "x_only_pubkey": "0x165ed2f04462ec0d3d44dc8690fa9000903b5a96f14ad7f233c21ff748a17b54",
    "root_pubkey": "xpub661MyMwAqRbcG4vPNi58VQJrXW8D9VzmauuRq2rTY3oUVnKGuLTxQxvvoEXgLvZ7N9GQXQkWVgKn1rzEUUEm4NdvrBKUqjpNJEnn2UL4rYq",
    "taproot_script_tree_hash": "0x138fdd0f6c3803d45553e730c25924baf7be741b8a72a4e6fdbd9d44cb19f85b",
    "taproot_internal_address": "3HYV6ta67197syD1ZVFganpmL2wLz4RyoC",
    "stellar_trusted_token_ids": [
      "XLM_USDC"
    ]
  }
]
import cobo_waas2
from cobo_waas2.models.address_info import AddressInfo
from cobo_waas2.models.create_address_request import CreateAddressRequest
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.WalletsApi(api_client)
    wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    create_address_request = cobo_waas2.CreateAddressRequest(chain_id="ETH", count=1)

    try:
        # Create addresses in wallet
        api_response = api_instance.create_address(
            wallet_id, create_address_request=create_address_request
        )
        print("The response of WalletsApi->create_address:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->create_address: %s\n" % e)

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Path Parameters

wallet_id
string<uuid>
required

The wallet ID.

Body

application/json

The request body to generates addresses within a specified wallet.

chain_id
string
required

The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains.

Example:

"ETH"

count
integer
default:1
required

The number of addresses to create. This property will be ignored if you are generating tweaked Taproot addresses.

Required range: 1 <= x <= 50
Example:

1

taproot_script_tree_hashes
string[]

A list of script tree hashes used to generate a tweaked Taproot address. This property is required only if you want to generate tweaked Taproot addresses.

taproot_internal_address
string

The original Taproot address to be tweaked. This property is required only if you want to generate tweaked Taproot addresses.

Example:

"3HYV6ta67197syD1ZVFganpmL2wLz4RyoC"

encoding
enum<string>

The address encoding formats. This property only applies to blockchains that have a similar architecture to Bitcoin.

Available options:
ENCODING_P2PKH,
ENCODING_P2SH_P2WPKH,
ENCODING_BECH32,
ENCODING_P2PKH_UNCOMPRESSED,
ENCODING_P2SH_P2MS,
ENCODING_P2SH_P2WSH_P2MS,
ENCODING_P2TR,
ENCODING_ADA_BYRON,
ENCODING_ADA_SHELLEY,
ENCODING_DEFAULT
Example:

"ENCODING_P2PKH"

Response

The request was successful.

address
string
required

The wallet address.

Example:

"0x0000000000000000000000000000000000000000"

chain_id
string
required

The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains.

Example:

"ETH"

memo
string

The memo code.

Example:

"82840924"

path
string

The derivation path of the address. This property applies to MPC Wallets only. To learn the meaning of each level in the path, see Path levels.

Example:

"m/44/0/2/0/0"

encoding
enum<string>

The address encoding formats. This property only applies to blockchains that have a similar architecture to Bitcoin.

Available options:
ENCODING_P2PKH,
ENCODING_P2SH_P2WPKH,
ENCODING_BECH32,
ENCODING_P2PKH_UNCOMPRESSED,
ENCODING_P2SH_P2MS,
ENCODING_P2SH_P2WSH_P2MS,
ENCODING_P2TR,
ENCODING_ADA_BYRON,
ENCODING_ADA_SHELLEY,
ENCODING_DEFAULT
Example:

"ENCODING_P2PKH"

pubkey
string

The public key of the address. This property applies to MPC Wallets only.

Example:

"xpub6HFaEKt4XdwgEQrQmWr8AEAZ7XBSGh7QYFspwdE86sJn6PjkqsPwVQc2poriBdizqXnTB3UWurJJAZpFnD2DAp9vFTmM2gQ264AArYtFWLH"

x_only_pubkey
string

The 32-byte x-only public key in hexadecimal format after tweaking.

Example:

"0x165ed2f04462ec0d3d44dc8690fa9000903b5a96f14ad7f233c21ff748a17b54"

root_pubkey
string

The root public key of the address. This property applies to MPC Wallets only.

Example:

"xpub661MyMwAqRbcG4vPNi58VQJrXW8D9VzmauuRq2rTY3oUVnKGuLTxQxvvoEXgLvZ7N9GQXQkWVgKn1rzEUUEm4NdvrBKUqjpNJEnn2UL4rYq"

taproot_script_tree_hash
string

The information about the new address.

Example:

"0x138fdd0f6c3803d45553e730c25924baf7be741b8a72a4e6fdbd9d44cb19f85b"

taproot_internal_address
string

The Taproot address before tweaking.

Example:

"3HYV6ta67197syD1ZVFganpmL2wLz4RyoC"

stellar_trusted_token_ids
string[]

The list of token IDs for which this address has already established trustlines on the Stellar network.