CubWallet Docs
中文

CubWallet developer docs

CubWallet (小熊钱包) is a BitShares wallet for Chrome. It injects a read-only window.bitshares object into web pages. A dApp uses that object to request account access, read the current network, and — after the user confirms — sign or broadcast a transaction.

These pages document the API the extension actually implements, as read from the source. Methods or events that do not exist are not described here. The API matches CubWallet 0.17 and this branch.

What you can do

What you cannot do

A page cannot read private keys, the backup phrase or the owner key, and it cannot sign without the user confirming in the wallet. The owner key is stored in a separate encrypted vault and is not decrypted on a normal unlock. The wallet uses it only after the user re-enters the wallet password and types the account name in the approval window.

The provider is injected only on https origins and on http://localhost / http://127.0.0.1, and only in the top-level frame. Opening a file with file://, or embedding the page in an iframe, will not see the wallet.

Next steps

  1. Quickstart: copy-paste connect and sign-only transfer code.
  2. Detect the wallet: window.bitshares, isCubWallet and bitshares#initialized.
  3. API reference: parameters, return values and errors for every RPC method.
  4. Exercise each method and the common operations on the test dApp.

TypeScript typings: bitshares-provider.d.ts.