npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cobo-test

v1.0.5

Published

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

Downloads

8

Readme

cobo-waas2-js-sdk

CoboWaas2 - JavaScript client for cobo-waas2-js-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 SDK is automatically generated by the OpenAPI Generator project:

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

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install cobo-waas2 --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your cobo-waas2-js-sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/CoboGlobal/cobo-waas2-js-sdk then install it via:

    npm install CoboGlobal/cobo-waas2-js-sdk --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

const CoboWaas2 = require('cobo-waas2');

// initial default api client
const apiClient = CoboWaas2.ApiClient.instance
// for dev env
//apiClient.setEnv(CoboWaas2.Env.DEV);
apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
// call api
const api = new CoboWaas2.DevelopersWebhooksApi()
const opts = {
  'CreateWebhookEndpointRequest': new CoboWaas2.CreateWebhookEndpointRequest() // {CreateWebhookEndpointRequest} The request body to register a webhook endpoint.
};
api.createWebhookEndpoint(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

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

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- CoboWaas2.DevelopersWebhooksApi | createWebhookEndpoint | POST /webhooks/endpoints | Register webhook endpoint CoboWaas2.DevelopersWebhooksApi | getWebhookEndpointById | GET /webhooks/endpoints/{endpoint_id} | Get webhook endpoint information CoboWaas2.DevelopersWebhooksApi | getWebhookEventById | GET /webhooks/endpoints/{endpoint_id}/events/{event_id} | Retrieve event information CoboWaas2.DevelopersWebhooksApi | listWebhookEndpoints | GET /webhooks/endpoints | List webhook endpoints CoboWaas2.DevelopersWebhooksApi | listWebhookEventDefinitions | GET /webhooks/events/definitions | Get webhook event types CoboWaas2.DevelopersWebhooksApi | listWebhookEventLogs | GET /webhooks/endpoints/{endpoint_id}/events/{event_id}/logs | List webhook event logs CoboWaas2.DevelopersWebhooksApi | listWebhookEvents | GET /webhooks/endpoints/{endpoint_id}/events | List all webhook events CoboWaas2.DevelopersWebhooksApi | retryWebhookEventById | POST /webhooks/endpoints/{endpoint_id}/events/{event_id}/retry | Retry event CoboWaas2.DevelopersWebhooksApi | updateWebhookEndpointById | PUT /webhooks/endpoints/{endpoint_id} | Update webhook endpoint CoboWaas2.TransactionsApi | cancelTransactionById | POST /transactions/{transaction_id}/cancel | Cancel transaction CoboWaas2.TransactionsApi | createContractCallTransaction | POST /transactions/contract_call | Call smart contract CoboWaas2.TransactionsApi | createMessageSignTransaction | POST /transactions/message_sign | Sign message CoboWaas2.TransactionsApi | createTransferTransaction | POST /transactions/transfer | Transfer token CoboWaas2.TransactionsApi | dropTransactionById | POST /transactions/{transaction_id}/drop | Drop transaction CoboWaas2.TransactionsApi | estimateFee | POST /transactions/estimate_fee | Estimate transaction fee CoboWaas2.TransactionsApi | getTransactionById | GET /transactions/{transaction_id} | Get transaction information CoboWaas2.TransactionsApi | listTransactions | GET /transactions | List all transactions CoboWaas2.TransactionsApi | resendTransactionById | POST /transactions/{transaction_id}/resend | Resend transaction CoboWaas2.TransactionsApi | speedupTransactionById | POST /transactions/{transaction_id}/speedup | Speed up transaction CoboWaas2.WalletsApi | checkAddressValidity | GET /wallets/check_address_validity | Check address validity CoboWaas2.WalletsApi | createAddress | POST /wallets/{wallet_id}/addresses | Create addresses in wallet CoboWaas2.WalletsApi | createWallet | POST /wallets | Create wallet CoboWaas2.WalletsApi | deleteWalletById | POST /wallets/{wallet_id}/delete | Delete wallet CoboWaas2.WalletsApi | getAddress | GET /wallets/{wallet_id}/addresses/{address} | Get address information CoboWaas2.WalletsApi | getChainById | GET /wallets/chains/{chain_id} | Get chain information CoboWaas2.WalletsApi | getMaxTransferableValue | GET /wallets/{wallet_id}/max_transferable_value | Get maximum transferable value CoboWaas2.WalletsApi | getTokenById | GET /wallets/tokens/{token_id} | Get token information CoboWaas2.WalletsApi | getWalletById | GET /wallets/{wallet_id} | Get wallet information CoboWaas2.WalletsApi | listAddresses | GET /wallets/{wallet_id}/addresses | List wallet addresses CoboWaas2.WalletsApi | listEnabledChains | GET /wallets/enabled_chains | List enabled chains CoboWaas2.WalletsApi | listEnabledTokens | GET /wallets/enabled_tokens | List enabled tokens CoboWaas2.WalletsApi | listSupportedChains | GET /wallets/chains | List supported chains CoboWaas2.WalletsApi | listSupportedTokens | GET /wallets/tokens | List supported tokens CoboWaas2.WalletsApi | listTokenBalancesForAddress | GET /wallets/{wallet_id}/addresses/{address}/tokens | List token balances by address CoboWaas2.WalletsApi | listTokenBalancesForWallet | GET /wallets/{wallet_id}/tokens | List token balances by wallet CoboWaas2.WalletsApi | listUtxos | GET /wallets/{wallet_id}/utxos | List UTXOs CoboWaas2.WalletsApi | listWallets | GET /wallets | List all wallets CoboWaas2.WalletsApi | lockUtxos | POST /wallets/{wallet_id}/utxos/lock | Lock UTXOs CoboWaas2.WalletsApi | unlockUtxos | POST /wallets/{wallet_id}/utxos/unlock | Unlock UTXOs CoboWaas2.WalletsApi | updateWalletById | PUT /wallets/{wallet_id} | Update wallet CoboWaas2.WalletsMPCWalletsApi | cancelTssRequestById | POST /wallets/mpc/vaults/{vault_id}/tss_requests/{tss_request_id}/cancel | Cancel TSS request CoboWaas2.WalletsMPCWalletsApi | createKeyShareHolderGroup | POST /wallets/mpc/vaults/{vault_id}/key_share_holder_groups | Create key share holder group CoboWaas2.WalletsMPCWalletsApi | createMpcProject | POST /wallets/mpc/projects | Create project CoboWaas2.WalletsMPCWalletsApi | createMpcVault | POST /wallets/mpc/vaults | Create vault CoboWaas2.WalletsMPCWalletsApi | createTssRequest | POST /wallets/mpc/vaults/{vault_id}/tss_requests | Create TSS request CoboWaas2.WalletsMPCWalletsApi | deleteKeyShareHolderGroupById | POST /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id}/delete | Delete key share holder group CoboWaas2.WalletsMPCWalletsApi | getKeyShareHolderGroupById | GET /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} | Get key share holder group information CoboWaas2.WalletsMPCWalletsApi | getMpcProjectById | GET /wallets/mpc/projects/{project_id} | Get project information CoboWaas2.WalletsMPCWalletsApi | getMpcVaultById | GET /wallets/mpc/vaults/{vault_id} | Get vault information CoboWaas2.WalletsMPCWalletsApi | getTssRequestById | GET /wallets/mpc/vaults/{vault_id}/tss_requests/{tss_request_id} | Get TSS request CoboWaas2.WalletsMPCWalletsApi | listCoboKeyHolders | GET /wallets/mpc/cobo_key_share_holders | List all Cobo key share holders CoboWaas2.WalletsMPCWalletsApi | listKeyShareHolderGroups | GET /wallets/mpc/vaults/{vault_id}/key_share_holder_groups | List all key share holder groups CoboWaas2.WalletsMPCWalletsApi | listMpcProjects | GET /wallets/mpc/projects | List all projects CoboWaas2.WalletsMPCWalletsApi | listMpcVaults | GET /wallets/mpc/vaults | List all vaults CoboWaas2.WalletsMPCWalletsApi | listTssRequests | GET /wallets/mpc/vaults/{vault_id}/tss_requests | List TSS requests CoboWaas2.WalletsMPCWalletsApi | updateKeyShareHolderGroupById | PUT /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} | Update key share holder group CoboWaas2.WalletsMPCWalletsApi | updateMpcProjectById | PUT /wallets/mpc/projects/{project_id} | Update project name CoboWaas2.WalletsMPCWalletsApi | updateMpcVaultById | PUT /wallets/mpc/vaults/{vault_id} | Update vault name

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