Keystone
Wallet module for connecting Keystone hardware wallets to web3-onboard

@web3-onboard/keystone

Install

npm i @web3-onboard/keystone

Options

1
type KeystoneOptions = {
2
customNetwork?: CustomNetwork
3
}
4
5
interface CustomNetwork {
6
networkId: number
7
genesis: GenesisBlock
8
hardforks: Hardfork[]
9
bootstrapNodes: BootstrapNode[]
10
}
11
12
interface GenesisBlock {
13
hash: string
14
timestamp: string | null
15
gasLimit: number
16
difficulty: number
17
nonce: string
18
extraData: string
19
stateRoot: string
20
}
21
22
interface Hardfork {
23
name: string
24
block: number | null
25
}
26
27
interface BootstrapNode {
28
ip: string
29
port: number | string
30
network?: string
31
chainId?: number
32
id: string
33
location: string
34
comment: string
35
}
Copied!

Usage

1
import Onboard from '@web3-onboard/core'
2
import keystoneModule from '@web3-onboard/keystone'
3
4
const keystone = keystoneModule()
5
6
const onboard = Onboard({
7
// ... other Onboard options
8
wallets: [
9
keystone
10
//... other wallets
11
]
12
})
13
14
const connectedWallets = await onboard.connectWallet()
15
console.log(connectedWallets)
Copied!
Last modified 2mo ago
Copy link