coinbase-wallet-sdk

CodeQL Advanced

Coinbase Wallet SDK

License Issues Pull Requests

A developer SDK for integrating with Coinbase Wallet, enabling seamless blockchain interactions in your application.


Table of Contents


Features


Installation

Install via npm:

npm install coinbase-wallet-sdk

Or with yarn:

yarn add coinbase-wallet-sdk

Quick Start

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);
});

Usage

Example: Sending a Transaction

provider.send('eth_sendTransaction', [{
  from: accounts[0],
  to: "0xRecipientAddress",
  value: "0x2386F26FC10000", // 0.01 ETH
}]);

API Reference

For the full list of available methods and options, see the API documentation.


Configuration

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)

Security


Contributing

Contributions are welcome! Please read the CONTRIBUTING.md for guidelines.


License

This project is licensed under the MIT License.


Support


Powered by Coinbase Wallet SDK. Not affiliated with Coinbase, Inc.