Skip to main content

Cobo Wallet as a Service 2.0

Project description

cobo-waas2-python-sdk

The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo’s WaaS API offering. It enables you to access Cobo’s full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features:

  • A unified API for Cobo’s all four wallet types
  • Support for 80+ chains and 3000+ tokens
  • A comprehensive selection of webhook events
  • Flexible usage models for MPC Wallets, including Organization-Controlled Wallets and User-Controlled Wallets
  • Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls
  • Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more

For more information about the WaaS 2.0 API, see Introduction to WaaS 2.0.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v2
  • Package version: 1.5.0
  • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.cobo.com/waas

Requirements.

Python 3.7+

Installation & Usage

pip install

pip install cobo-waas2==1.5.0

Then import the package:

import cobo_waas2

Getting Started

Please follow the installation procedure and then run the following:

import cobo_waas2
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_type = cobo_waas2.WalletType.CUSTODIAL
    wallet_subtype = cobo_waas2.WalletSubtype.ASSET
    chain_ids = 'BTC,ETH'
    limit = 10
    before = ''
    after = ''

    try:
        # List supported chains
        api_response = api_instance.list_supported_chains(wallet_type=wallet_type, wallet_subtype=wallet_subtype, chain_ids=chain_ids, limit=limit, before=before, after=after)
        print("The response of WalletsApi->list_supported_chains:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->list_supported_chains: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.dev.cobo.com/v2

Class Method HTTP request Description
AddressBooksApi list_address_books GET /address_books List address book entries
DevelopersWebhooksApi create_webhook_endpoint POST /webhooks/endpoints Register webhook endpoint
DevelopersWebhooksApi get_webhook_endpoint_by_id GET /webhooks/endpoints/{endpoint_id} Get webhook endpoint information
DevelopersWebhooksApi get_webhook_event_by_id GET /webhooks/endpoints/{endpoint_id}/events/{event_id} Retrieve event information
DevelopersWebhooksApi list_webhook_endpoints GET /webhooks/endpoints List webhook endpoints
DevelopersWebhooksApi list_webhook_event_definitions GET /webhooks/events/definitions Get webhook event types
DevelopersWebhooksApi list_webhook_event_logs GET /webhooks/endpoints/{endpoint_id}/events/{event_id}/logs List webhook event logs
DevelopersWebhooksApi list_webhook_events GET /webhooks/endpoints/{endpoint_id}/events List all webhook events
DevelopersWebhooksApi retry_webhook_event_by_id POST /webhooks/endpoints/{endpoint_id}/events/{event_id}/retry Retry event
DevelopersWebhooksApi trigger_test_webhook_event POST /webhooks/events/trigger Trigger test event
DevelopersWebhooksApi update_webhook_endpoint_by_id PUT /webhooks/endpoints/{endpoint_id} Update webhook endpoint
OAuthApi get_token GET /oauth/token Get Org Access Token
OAuthApi refresh_token POST /oauth/token Refresh Org Access Token
StakingsApi create_stake_activity POST /stakings/activities/stake Create stake activity
StakingsApi create_unstake_activity POST /stakings/activities/unstake Create unstake activity
StakingsApi create_withdraw_activity POST /stakings/activities/withdraw Create withdraw activity
StakingsApi get_staking_activity_by_id GET /stakings/activities/{activity_id} Get staking activity details
StakingsApi get_staking_by_id GET /stakings/{staking_id} Get staking position details
StakingsApi get_staking_estimation_fee POST /stakings/estimate_fee Estimate staking fees
StakingsApi get_staking_pool_by_id GET /stakings/pools/{pool_id} Get staking pool details
StakingsApi list_staking_activities GET /stakings/activities List staking activities
StakingsApi list_staking_pools GET /stakings/pools List staking pools
StakingsApi list_stakings GET /stakings List staking positions
TransactionsApi broadcast_signed_transactions POST /transactions/broadcast Broadcast signed transactions
TransactionsApi cancel_transaction_by_id POST /transactions/{transaction_id}/cancel Cancel transaction
TransactionsApi check_loop_transfers GET /transactions/check_loop_transfers Check Cobo Loop transfers
TransactionsApi create_contract_call_transaction POST /transactions/contract_call Call smart contract
TransactionsApi create_message_sign_transaction POST /transactions/message_sign Sign message
TransactionsApi create_transfer_transaction POST /transactions/transfer Transfer token
TransactionsApi drop_transaction_by_id POST /transactions/{transaction_id}/drop Drop transaction
TransactionsApi estimate_fee POST /transactions/estimate_fee Estimate transaction fee
TransactionsApi get_transaction_by_id GET /transactions/{transaction_id} Get transaction information
TransactionsApi list_transactions GET /transactions List all transactions
TransactionsApi resend_transaction_by_id POST /transactions/{transaction_id}/resend Resend transaction
TransactionsApi speedup_transaction_by_id POST /transactions/{transaction_id}/speedup Speed up transaction
WalletsApi check_address_validity GET /wallets/check_address_validity Check address validity
WalletsApi check_addresses_validity GET /wallets/check_addresses_validity Check addresses validity
WalletsApi create_address POST /wallets/{wallet_id}/addresses Create addresses in wallet
WalletsApi create_wallet POST /wallets Create wallet
WalletsApi delete_wallet_by_id POST /wallets/{wallet_id}/delete Delete wallet
WalletsApi get_address GET /wallets/{wallet_id}/addresses/{address} Get address information
WalletsApi get_chain_by_id GET /wallets/chains/{chain_id} Get chain information
WalletsApi get_max_transferable_value GET /wallets/{wallet_id}/max_transferable_value Get maximum transferable value
WalletsApi get_token_by_id GET /wallets/tokens/{token_id} Get token information
WalletsApi get_wallet_by_id GET /wallets/{wallet_id} Get wallet information
WalletsApi list_addresses GET /wallets/{wallet_id}/addresses List wallet addresses
WalletsApi list_enabled_chains GET /wallets/enabled_chains List enabled chains
WalletsApi list_enabled_tokens GET /wallets/enabled_tokens List enabled tokens
WalletsApi list_supported_chains GET /wallets/chains List supported chains
WalletsApi list_supported_tokens GET /wallets/tokens List supported tokens
WalletsApi list_token_balances_for_address GET /wallets/{wallet_id}/addresses/{address}/tokens List token balances by address
WalletsApi list_token_balances_for_wallet GET /wallets/{wallet_id}/tokens List token balances by wallet
WalletsApi list_utxos GET /wallets/{wallet_id}/utxos List UTXOs
WalletsApi list_wallets GET /wallets List all wallets
WalletsApi lock_utxos POST /wallets/{wallet_id}/utxos/lock Lock UTXOs
WalletsApi unlock_utxos POST /wallets/{wallet_id}/utxos/unlock Unlock UTXOs
WalletsApi update_wallet_by_id PUT /wallets/{wallet_id} Update wallet
WalletsExchangeWalletApi list_asset_balances_for_exchange_wallet GET /wallets/{wallet_id}/exchanges/assets List asset balances
WalletsExchangeWalletApi list_exchanges GET /wallets/exchanges List supported exchanges
WalletsExchangeWalletApi list_supported_assets_for_exchange GET /wallets/exchanges/{exchange_id}/assets List supported assets
WalletsExchangeWalletApi list_supported_chains_for_exchange GET /wallets/exchanges/{exchange_id}/assets/{asset_id}/chains List supported chains
WalletsMPCWalletsApi cancel_tss_request_by_id POST /wallets/mpc/vaults/{vault_id}/tss_requests/{tss_request_id}/cancel Cancel TSS request
WalletsMPCWalletsApi create_key_share_holder_group POST /wallets/mpc/vaults/{vault_id}/key_share_holder_groups Create key share holder group
WalletsMPCWalletsApi create_mpc_project POST /wallets/mpc/projects Create project
WalletsMPCWalletsApi create_mpc_vault POST /wallets/mpc/vaults Create vault
WalletsMPCWalletsApi create_tss_request POST /wallets/mpc/vaults/{vault_id}/tss_requests Create TSS request
WalletsMPCWalletsApi delete_key_share_holder_group_by_id POST /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id}/delete Delete key share holder group
WalletsMPCWalletsApi get_key_share_holder_group_by_id GET /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} Get key share holder group information
WalletsMPCWalletsApi get_mpc_project_by_id GET /wallets/mpc/projects/{project_id} Get project information
WalletsMPCWalletsApi get_mpc_vault_by_id GET /wallets/mpc/vaults/{vault_id} Get vault information
WalletsMPCWalletsApi get_tss_request_by_id GET /wallets/mpc/vaults/{vault_id}/tss_requests/{tss_request_id} Get TSS request
WalletsMPCWalletsApi list_cobo_key_holders GET /wallets/mpc/cobo_key_share_holders List all Cobo key share holders
WalletsMPCWalletsApi list_key_share_holder_groups GET /wallets/mpc/vaults/{vault_id}/key_share_holder_groups List all key share holder groups
WalletsMPCWalletsApi list_mpc_projects GET /wallets/mpc/projects List all projects
WalletsMPCWalletsApi list_mpc_vaults GET /wallets/mpc/vaults List all vaults
WalletsMPCWalletsApi list_tss_requests GET /wallets/mpc/vaults/{vault_id}/tss_requests List TSS requests
WalletsMPCWalletsApi update_key_share_holder_group_by_id PUT /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} Update key share holder group
WalletsMPCWalletsApi update_mpc_project_by_id PUT /wallets/mpc/projects/{project_id} Update project name
WalletsMPCWalletsApi update_mpc_vault_by_id PUT /wallets/mpc/vaults/{vault_id} Update vault name
WalletsSmartContractWalletsApi list_safe_wallet_delegates POST /wallets/{wallet_id}/smart_contracts/delegates List Delegates

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

CoboAuth

  • Type: API key
  • API key parameter name: BIZ-API-KEY
  • Location: HTTP header

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://auth.cobo.com/authorize
  • Scopes:
  • custodial_asset_wallet:create: Create access to custodial asset wallets
  • custodial_asset_wallet:add: Generate address access to custodial asset wallets
  • custodial_asset_wallet:edit: Change wallet name access to custodial asset wallets
  • custodial_asset_wallet:withdraw: Withdraw access to custodial asset wallets
  • mpc_organization_controlled_wallet:create: Create access to MPC organization-controlled wallets
  • mpc_organization_controlled_wallet:add: Generate address access to MPC organization-controlled wallets
  • mpc_organization_controlled_wallet:edit: Change wallet name access to MPC organization-controlled wallets
  • mpc_organization_controlled_wallet:withdraw: Withdraw access to MPC organization-controlled wallets
  • mpc_organization_controlled_wallet:contract_call: Contract call access to MPC organization-controlled wallets
  • mpc_organization_controlled_wallet:message_sign: Message sign access to MPC organization-controlled wallets
  • mpc_organization_controlled_vault:manage: Create/Edit access to MPC organization-controlled vaults
  • mpc_organization_controlled_key_group:manage: Create/Edit/Delete access to MPC organization-controlled key groups
  • mpc_organization_controlled_tss_request:manage: Create/Cancel access to MPC organization-controlled tss requests
  • mpc_user_controlled_wallet:create: Create access to MPC user-controlled wallets
  • mpc_user_controlled_wallet:add: Generate address access to MPC user-controlled wallets
  • mpc_user_controlled_wallet:edit: Change wallet name access to MPC user-controlled wallets
  • mpc_user_controlled_wallet:withdraw: Withdraw access to MPC user-controlled wallets
  • mpc_user_controlled_wallet:contract_call: Contract call access to MPC user-controlled wallets
  • mpc_user_controlled_wallet:message_sign: Message sign access to MPC user-controlled wallets
  • mpc_user_controlled_project:manage: Create/Edit access to MPC user-controlled projects
  • mpc_user_controlled_vault:manage: Create/Edit access to MPC user-controlled vaults
  • mpc_user_controlled_key_group:manage: Create/Edit/Delete access to MPC user-controlled key groups
  • mpc_user_controlled_tss_request:manage: Create/Cancel access to MPC user-controlled tss requests
  • webhook:resend: Resend access to webhook events
  • webhook_url:edit: Create/Edit access to webhook urls

Author

help@cobo.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cobo_waas2-1.5.0-py3-none-any.whl (480.1 kB view details)

Uploaded Python 3

File details

Details for the file cobo_waas2-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: cobo_waas2-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 480.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for cobo_waas2-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 875546afb55689b87a15047007c3dac33b6fa78c3ffbe4e5d3c09fb2f64b4d22
MD5 6b1fb9e6a8f79f69bb36bc420de99e69
BLAKE2b-256 88acd4de6b00f691524505ecfee7439e17320ec93a122d9dec3dbe8f9f008c36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page