All URIs are relative to https://api.dev.cobo.com/v2
Method | HTTP request | Description |
---|---|---|
checkAddressChainsValidity | GET /wallets/check_address_chains_validity | Check address validity across chains |
checkAddressValidity | GET /wallets/check_address_validity | Check address validity |
checkAddressesValidity | GET /wallets/check_addresses_validity | Check addresses validity |
createAddress | POST /wallets/{wallet_id}/addresses | Create addresses in wallet |
createWallet | POST /wallets | Create wallet |
deleteWalletById | POST /wallets/{wallet_id}/delete | Delete wallet |
getChainById | GET /wallets/chains/{chain_id} | Get chain information |
getMaxTransferableValue | GET /wallets/{wallet_id}/max_transferable_value | Get maximum transferable value |
getTokenById | GET /wallets/tokens/{token_id} | Get token information |
getWalletById | GET /wallets/{wallet_id} | Get wallet information |
listAddresses | GET /wallets/{wallet_id}/addresses | List wallet addresses |
listEnabledChains | GET /wallets/enabled_chains | List enabled chains |
listEnabledTokens | GET /wallets/enabled_tokens | List enabled tokens |
listSupportedChains | GET /wallets/chains | List supported chains |
listSupportedTokens | GET /wallets/tokens | List supported tokens |
listTokenBalancesForAddress | GET /wallets/{wallet_id}/addresses/{address}/tokens | List token balances by address |
listTokenBalancesForWallet | GET /wallets/{wallet_id}/tokens | List token balances by wallet |
listUtxos | GET /wallets/{wallet_id}/utxos | List UTXOs |
listWallets | GET /wallets | List all wallets |
lockUtxos | POST /wallets/{wallet_id}/utxos/lock | Lock UTXOs |
unlockUtxos | POST /wallets/{wallet_id}/utxos/unlock | Unlock UTXOs |
updateWalletById | PUT /wallets/{wallet_id} | Update wallet |
[CheckAddressChainsValidity200ResponseInner] checkAddressChainsValidity(address, chain_ids)
Check address validity across chains
This operation verifies if a given address is valid for a list of chains.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
const chain_ids = "BTC,ETH";
apiInstance.checkAddressChainsValidity(address, chain_ids).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
address | String | The wallet address. | |
chain_ids | String | A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains. |
[CheckAddressChainsValidity200ResponseInner]
- Content-Type: Not defined
- Accept: application/json
CheckAddressValidity200Response checkAddressValidity(chain_id, address)
Check address validity
This operation verifies if a given address is valid for a specific chain.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const chain_id = "ETH";
const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
apiInstance.checkAddressValidity(chain_id, address).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
chain_id | String | 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. | |
address | String | The wallet address. |
CheckAddressValidity200Response
- Content-Type: Not defined
- Accept: application/json
[CheckAddressesValidity200ResponseInner] checkAddressesValidity(chain_id, addresses)
Check addresses validity
This operation verifies if given addresses are valid for a specific chain.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const chain_id = "ETH";
const addresses = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97";
apiInstance.checkAddressesValidity(chain_id, addresses).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
chain_id | String | 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. | |
addresses | String | A list of wallet addresses, separated by comma. You can specify a maximum of 100 addresses. |
[CheckAddressesValidity200ResponseInner]
- Content-Type: Not defined
- Accept: application/json
[AddressInfo] createAddress(wallet_id, opts)
Create addresses in wallet
This operation generates one or more addresses within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const opts = {
'CreateAddressRequest': new CoboWaas2.CreateAddressRequest()
};
apiInstance.createAddress(wallet_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
CreateAddressRequest | CreateAddressRequest | The request body to generates addresses within a specified wallet. | [optional] |
- Content-Type: application/json
- Accept: application/json
CreatedWalletInfo createWallet(opts)
Create wallet
This operation creates a wallet with the provided information. <Note>This operation is not applicable to Smart Contract Wallets.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const opts = {
'CreateWalletParams': new CoboWaas2.CreateWalletParams()
};
apiInstance.createWallet(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
CreateWalletParams | CreateWalletParams | The request body to create a wallet | [optional] |
- Content-Type: application/json
- Accept: application/json
DeleteWalletById201Response deleteWalletById(wallet_id)
Delete wallet
This operation deletes a specified wallet. <Note>This operation is applicable to Exchange Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
apiInstance.deleteWalletById(wallet_id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. |
- Content-Type: Not defined
- Accept: application/json
ChainInfo getChainById(chain_id)
Get chain information
This operation retrieves the detailed information about a specified chain.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const chain_id = "ETH";
apiInstance.getChainById(chain_id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
chain_id | String | 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. |
- Content-Type: Not defined
- Accept: application/json
MaxTransferableValue getMaxTransferableValue(wallet_id, token_id, fee_rate, to_address, opts)
Get maximum transferable value
This operation retrieves the maximum amount that you can transfer from a wallet or a specified wallet address, along with the corresponding transaction fee. You must specify `to_address` in your query because it affects the transaction fee. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const token_id = "ETH_USDT";
const fee_rate = "10";
const to_address = "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE";
const opts = {
'from_address': "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE"
};
apiInstance.getMaxTransferableValue(wallet_id, token_id, fee_rate, to_address, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
token_id | String | The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. | |
fee_rate | String | The fee rate in sats/vByte or gas price in wei. | |
to_address | String | The recipient's address. | |
from_address | String | The sender's address. For EVM addresses in MPC Wallets, this parameter is required. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ExtendedTokenInfo getTokenById(token_id)
Get token information
This operation retrieves the detailed information about a specified token.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const token_id = "ETH_USDT";
apiInstance.getTokenById(token_id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
token_id | String | The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. |
- Content-Type: Not defined
- Accept: application/json
WalletInfo getWalletById(wallet_id)
Get wallet information
This operation retrieves the detailed information about a specified wallet.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
apiInstance.getWalletById(wallet_id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. |
- Content-Type: Not defined
- Accept: application/json
ListAddresses200Response listAddresses(wallet_id, opts)
List wallet addresses
This operation retrieves a list of addresses within a specified wallet.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const opts = {
'chain_ids': "BTC,ETH",
'addresses': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listAddresses(wallet_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
chain_ids | String | A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains. | [optional] |
addresses | String | A list of wallet addresses, separated by comma. For addresses requiring a memo, append the memo after the address using the ' | ' separator (e.g., "address |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListSupportedChains200Response listEnabledChains(opts)
List enabled chains
This operation retrieves all the chains that can be used by your organization. You can filter the result by wallet type or subtype. If you do not specify a wallet type, this operation returns a combination of chains that can be used by your organization for each wallet type.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const opts = {
'wallet_type': new CoboWaas2.WalletType(),
'wallet_subtype': new CoboWaas2.WalletSubtype(),
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listEnabledChains(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_type | WalletType | The wallet type. - `Custodial`: Custodial Wallets - `MPC`: MPC Wallets - `SmartContract`: Smart Contract Wallets - `Exchange`: Exchange Wallets | [optional] |
wallet_subtype | WalletSubtype | The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
ListSupportedChains200Response
- Content-Type: Not defined
- Accept: application/json
ListSupportedTokens200Response listEnabledTokens(opts)
List enabled tokens
This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, and chain IDs. If you do not specify a wallet type, this operation returns a combination of tokens that can be used by your organization for each wallet type.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const opts = {
'wallet_type': new CoboWaas2.WalletType(),
'wallet_subtype': new CoboWaas2.WalletSubtype(),
'chain_ids': "BTC,ETH",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listEnabledTokens(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_type | WalletType | The wallet type. - `Custodial`: Custodial Wallets - `MPC`: MPC Wallets - `SmartContract`: Smart Contract Wallets - `Exchange`: Exchange Wallets | [optional] |
wallet_subtype | WalletSubtype | The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional] |
chain_ids | String | A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
ListSupportedTokens200Response
- Content-Type: Not defined
- Accept: application/json
ListSupportedChains200Response listSupportedChains(opts)
List supported chains
This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported chains here. We regularly update the list with new additions. If you want to request support for a specific chain or token, please contact us.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const opts = {
'wallet_type': new CoboWaas2.WalletType(),
'wallet_subtype': new CoboWaas2.WalletSubtype(),
'chain_ids': "BTC,ETH",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listSupportedChains(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_type | WalletType | The wallet type. - `Custodial`: Custodial Wallets - `MPC`: MPC Wallets - `SmartContract`: Smart Contract Wallets - `Exchange`: Exchange Wallets | [optional] |
wallet_subtype | WalletSubtype | The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional] |
chain_ids | String | A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
ListSupportedChains200Response
- Content-Type: Not defined
- Accept: application/json
ListSupportedTokens200Response listSupportedTokens(opts)
List supported tokens
This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported tokens here. We regularly update the list with new additions. If you want to request support for a specific chain or token, please contact us.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const opts = {
'wallet_type': new CoboWaas2.WalletType(),
'wallet_subtype': new CoboWaas2.WalletSubtype(),
'chain_ids': "BTC,ETH",
'token_ids': "ETH_USDT,ETH_USDC",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listSupportedTokens(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_type | WalletType | The wallet type. - `Custodial`: Custodial Wallets - `MPC`: MPC Wallets - `SmartContract`: Smart Contract Wallets - `Exchange`: Exchange Wallets | [optional] |
wallet_subtype | WalletSubtype | The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional] |
chain_ids | String | A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains. | [optional] |
token_ids | String | A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
ListSupportedTokens200Response
- Content-Type: Not defined
- Accept: application/json
ListTokenBalancesForAddress200Response listTokenBalancesForAddress(wallet_id, address, opts)
List token balances by address
The operation retrieves a list of token balances for a specified address within a wallet. <Note>This operation is applicable to MPC Wallets and Smart Contract Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
const opts = {
'token_ids': "ETH_USDT,ETH_USDC",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listTokenBalancesForAddress(wallet_id, address, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
address | String | The wallet address. | |
token_ids | String | A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
ListTokenBalancesForAddress200Response
- Content-Type: Not defined
- Accept: application/json
ListTokenBalancesForAddress200Response listTokenBalancesForWallet(wallet_id, opts)
List token balances by wallet
The operation retrieves a list of token balances within a specified wallet. <Note>This operation is not applicable to Exchange Wallets.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const opts = {
'token_ids': "ETH_USDT,ETH_USDC",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listTokenBalancesForWallet(wallet_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
token_ids | String | A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
ListTokenBalancesForAddress200Response
- Content-Type: Not defined
- Accept: application/json
ListUtxos200Response listUtxos(wallet_id, token_id, opts)
List UTXOs
The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const token_id = "ETH_USDT";
const opts = {
'address': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listUtxos(wallet_id, token_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
token_id | String | The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. | |
address | String | The wallet address. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListWallets200Response listWallets(opts)
List all wallets
This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const opts = {
'wallet_type': new CoboWaas2.WalletType(),
'wallet_subtype': new CoboWaas2.WalletSubtype(),
'project_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
'vault_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
'limit': 10,
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
};
apiInstance.listWallets(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_type | WalletType | The wallet type. - `Custodial`: Custodial Wallets - `MPC`: MPC Wallets - `SmartContract`: Smart Contract Wallets - `Exchange`: Exchange Wallets | [optional] |
wallet_subtype | WalletSubtype | The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional] |
project_id | String | The project ID, which you can retrieve by calling List all projects. | [optional] |
vault_id | String | The vault ID, which you can retrieve by calling List all vaults. | [optional] |
limit | Number | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] |
before | String | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | [optional] |
after | String | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional] |
- Content-Type: Not defined
- Accept: application/json
LockUtxos201Response lockUtxos(wallet_id, opts)
Lock UTXOs
This operation locks the UTXOs with specified transaction hashes. Locked UTXOs cannot be transferred until unlocked. <Note>This operation is applicable to MPC Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const opts = {
'LockUtxosRequest': new CoboWaas2.LockUtxosRequest()
};
apiInstance.lockUtxos(wallet_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
LockUtxosRequest | LockUtxosRequest | The request body of the Lock/Unlock UTXOs operation. | [optional] |
- Content-Type: application/json
- Accept: application/json
LockUtxos201Response unlockUtxos(wallet_id, opts)
Unlock UTXOs
This operation unlocks the UTXOs with specified transaction hashes. Locked UTXOs cannot be transferred until unlocked. <Note>This operation is applicable to MPC Wallets only.</Note>
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const opts = {
'LockUtxosRequest': new CoboWaas2.LockUtxosRequest()
};
apiInstance.unlockUtxos(wallet_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
LockUtxosRequest | LockUtxosRequest | The request body of the Lock/Unlock UTXOs operation. | [optional] |
- Content-Type: application/json
- Accept: application/json
WalletInfo updateWalletById(wallet_id, opts)
Update wallet
This operation updates the information of a specified wallet. For Exchange Wallets, you can update the API key, API secret, and other information about your exchange accounts with this operation. For other wallet types, you can only update the wallet name.
const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.WalletsApi();
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const opts = {
'UpdateWalletParams': new CoboWaas2.UpdateWalletParams()
};
apiInstance.updateWalletById(wallet_id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
wallet_id | String | The wallet ID. | |
UpdateWalletParams | UpdateWalletParams | The request body. | [optional] |
- Content-Type: application/json
- Accept: application/json