Gathering detailed insights and metrics for @coinbase/wallet-sdk
Gathering detailed insights and metrics for @coinbase/wallet-sdk
Gathering detailed insights and metrics for @coinbase/wallet-sdk
Gathering detailed insights and metrics for @coinbase/wallet-sdk
An open protocol that lets users connect their mobile wallets to your DApp
npm install @coinbase/wallet-sdk
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,500 Stars
988 Commits
573 Forks
169 Watching
16 Branches
60 Contributors
Updated on 27 Nov 2024
Minified
Minified + Gzipped
TypeScript (88.71%)
JavaScript (7.87%)
SCSS (3.05%)
Shell (0.37%)
Cumulative downloads
Total Downloads
Last day
-8.8%
82,647
Compared to previous day
Last week
6.1%
497,016
Compared to previous week
Last month
5.8%
2,029,684
Compared to previous month
Last year
71.9%
16,388,300
Compared to previous year
4
23
Check available versions:
1 # yarn 2 yarn info @coinbase/wallet-sdk versions 3 4 # npm 5 npm view @coinbase/wallet-sdk versions
Install latest version:
1# yarn 2yarn add @coinbase/wallet-sdk 3 4# npm 5npm install @coinbase/wallet-sdk
Check installed version:
1# yarn 2yarn list @coinbase/wallet-sdk 3 4# npm 5npm list @coinbase/wallet-sdk
Migrating from v3 to v4? Please see our v4 migration guide for a full list of breaking changes.
Compare installed version with latest:
1# yarn 2yarn outdated @coinbase/wallet-sdk 3 4# npm 5npm outdated @coinbase/wallet-sdk
Update to latest:
1# yarn 2yarn upgrade @coinbase/wallet-sdk --latest 3 4# npm 5npm update @coinbase/wallet-sdk
Initialize SDK
1const sdk = new CoinbaseWalletSDK({ 2 appName: 'SDK Playground', 3});
Make web3 Provider
1const provider = sdk.makeWeb3Provider();
Request accounts to initialize connection to wallet
1const addresses = provider.request({ 2 method: 'eth_requestAccounts', 3});
Make more requests
1provider.request('personal_sign', [ 2 `0x${Buffer.from('test message', 'utf8').toString('hex')}`, 3 addresses[0], 4]);
Handle provider events
1provider.on('connect', (info) => { 2 setConnect(info); 3}); 4 5provider.on('disconnect', (error) => { 6 setDisconnect({ code: error.code, message: error.message }); 7}); 8 9provider.on('accountsChanged', (accounts) => { 10 setAccountsChanged(accounts); 11}); 12 13provider.on('chainChanged', (chainId) => { 14 setChainChanged(chainId); 15}); 16 17provider.on('message', (message) => { 18 setMessage(message); 19});
The Coinbase Wallet SDK test dapp can be viewed here https://coinbase.github.io/coinbase-wallet-sdk/.
To run it locally follow these steps:
yarn install
yarn dev
No vulnerabilities found.
No security vulnerabilities found.