Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Coinbase Wallet #26

Closed
Tracked by #13
manuelbarbas opened this issue Nov 20, 2023 · 1 comment
Closed
Tracked by #13

Using Coinbase Wallet #26

manuelbarbas opened this issue Nov 20, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@manuelbarbas
Copy link
Collaborator

manuelbarbas commented Nov 20, 2023

Coinbase Wallet is a self-custody crypto wallet, available as a browser extension and a mobile app on Android and iOS

Install the NPM Packages

npm install --save web3 @coinbase/wallet-sdk

Example Code

import CoinbaseWalletSDK from '@coinbase/wallet-sdk'
import Web3 from 'web3'

const APP_NAME = 'My Awesome App'
const APP_LOGO_URL = 'https://example.com/logo.png'
const SKALE_JSONRPC_URL = 'https://your.skale.endpoint'
const SKALE_CHAIN_ID = 123456

// Initialize Coinbase Wallet SDK
export const coinbaseWallet = new CoinbaseWalletSDK({
  appName: APP_NAME,
  appLogoUrl: APP_LOGO_URL,
  darkMode: false
})

// Initialize a Web3 Provider object
export const skale = coinbaseWallet.makeWeb3Provider(SKALE_JSONRPC_URL, SKALE_CHAIN_ID)

// Initialize a Web3 object
export const web3 = new Web3(skale)
@manuelbarbas
Copy link
Collaborator Author

manuelbarbas commented Jan 4, 2024

What is: Wallet
Language: Javascript, Typescript
Target: Web

@manuelbarbas manuelbarbas added the documentation Improvements or additions to documentation label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant