A developer SDK for integrating with Coinbase Wallet, enabling seamless blockchain interactions in your application.
Install via npm:
npm install coinbase-wallet-sdk
Or with yarn:
yarn add coinbase-wallet-sdk
import CoinbaseWalletSDK from 'coinbase-wallet-sdk';
const wallet = new CoinbaseWalletSDK({
appName: "My DApp",
appLogoUrl: "https://myapp.com/logo.png",
darkMode: false
});
// Connect to wallet
const provider = wallet.makeWeb3Provider("https://mainnet.infura.io/v3/<INFURA_KEY>", 1);
// Enable provider (request accounts)
provider.enable().then(accounts => {
console.log("Connected accounts:", accounts);
});
provider.send('eth_sendTransaction', [{
from: accounts[0],
to: "0xRecipientAddress",
value: "0x2386F26FC10000", // 0.01 ETH
}]);
For the full list of available methods and options, see the API documentation.
Option | Type | Description |
---|---|---|
appName | String | Name of your application |
appLogoUrl | String | URL of your app logo |
darkMode | Boolean | Enable dark mode for UI (default: false) |
Contributions are welcome! Please read the CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License.
Powered by Coinbase Wallet SDK. Not affiliated with Coinbase, Inc.