Skip to content

Commit 870ec27

Browse files
authored
Update Ledger init options and add Zeal and Phantom Wallet docs (#1456)
* Update new Ledger init options * Add Zeal wallet * Add Zeal docs * Add Phantom docs * Add link to appMetaData docs within Getting Started -> Installation - per gh issue
1 parent 04b537e commit 870ec27

File tree

5 files changed

+115
-47
lines changed

5 files changed

+115
-47
lines changed

docs/src/routes/docs/[...2]getting-started/[...1]installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const chains = [
6969
#### App Metadata (Optional)
7070

7171
You can add metadata about your dapp.
72+
A full definition of `appMetaData` options can be found [here](/docs/modules/core#options)
7273

7374
```ts
7475
const appMetadata = {

docs/src/routes/docs/[...4]wallets/ledger.md

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Wallet module for connecting Ledger hardware wallets to web3-onboard
88
<TabPanel value="yarn">
99

1010
```sh copy
11-
yarn add @web3-onboard/ledger
11+
yarn add @web3-onboard/core @web3-onboard/ledger
1212
```
1313

1414
</TabPanel>
1515
<TabPanel value="npm">
1616

1717
```sh copy
18-
npm install @web3-onboard/ledger
18+
npm install @web3-onboard/core @web3-onboard/ledger
1919
```
2020

2121
</TabPanel>
@@ -24,40 +24,11 @@ npm install @web3-onboard/ledger
2424
## Options
2525

2626
```typescript
27-
type LedgerOptions = {
28-
customNetwork?: CustomNetwork
29-
}
30-
31-
interface CustomNetwork {
32-
networkId: number
33-
genesis: GenesisBlock
34-
hardforks: Hardfork[]
35-
bootstrapNodes: BootstrapNode[]
36-
}
37-
38-
interface GenesisBlock {
39-
hash: string
40-
timestamp: string | null
41-
gasLimit: number
42-
difficulty: number
43-
nonce: string
44-
extraData: string
45-
stateRoot: string
46-
}
47-
48-
interface Hardfork {
49-
name: string
50-
block: number | null
51-
}
52-
53-
interface BootstrapNode {
54-
ip: string
55-
port: number | string
56-
network?: string
27+
interface LedgerOptions {
5728
chainId?: number
58-
id: string
59-
location: string
60-
comment: string
29+
bridge?: string
30+
infuraId?: string
31+
rpc?: { [chainId: number]: string }
6132
}
6233
```
6334

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Phantom
2+
3+
:::admonition type=warning
4+
The module for connecting Phantom to web3-onboard is still in alpha testing and Phantom Eth mainnet coverage is not fully public yet but will be soon. Please visit the [Official Phantom Site](https://phantom.app/) for more details.
5+
:::
6+
7+
[Web3-Onboard](https://onboard.blocknative.com/) is an open-source, framework-agnostic JavaScript library to onboard users to web3 apps. This package can be used to integrate [Phantom Wallet](https://phantom.app/) support into Web3-Onboard's "Connect Wallet" modal. With this module the Phantom option will be shown even if the extension is not installed on the users browser or used within the Phantom app. If selected the user will be taken to a download screen and prompted to create a Phantom wallet. For more information on Phantom, please refer to the [Phantom developer docs](https://docs.phantom.app/).
8+
9+
### Install
10+
11+
<Tabs values={['yarn', 'npm']}>
12+
<TabPanel value="yarn">
13+
14+
```sh copy
15+
yarn add @web3-onboard/core @web3-onboard/phantom
16+
```
17+
18+
</TabPanel>
19+
<TabPanel value="npm">
20+
21+
```sh copy
22+
npm install @web3-onboard/core @web3-onboard/phantom
23+
```
24+
25+
</TabPanel>
26+
</Tabs>
27+
28+
## Usage
29+
30+
```typescript
31+
import Onboard from '@web3-onboard/core'
32+
import phantomModule from '@web3-onboard/phantom'
33+
34+
// initialize the module
35+
const phantom = phantomModule()
36+
37+
const onboard = Onboard({
38+
// ... other Onboard options
39+
wallets: [
40+
phantom
41+
//... other wallets
42+
]
43+
})
44+
45+
const connectedWallets = await onboard.connectWallet()
46+
console.log(connectedWallets)
47+
```
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
# Zeal
3+
4+
## Wallet module for connecting Zeal to web3-onboard
5+
6+
See [Zeal](https://www.zeal.app/) for details.
7+
8+
For any questions or issues related to integration with Zeal wallet do not hesitate to contact our builders via [[email protected]](mailto:[email protected]) OR ping us on twitter [@withzeal](https://twitter.com/withzeal)
9+
10+
## Install
11+
12+
<Tabs values={['yarn', 'npm']}>
13+
<TabPanel value="yarn">
14+
15+
```sh copy
16+
yarn add @web3-onboard/core @web3-onboard/zeal
17+
```
18+
19+
</TabPanel>
20+
<TabPanel value="npm">
21+
22+
```sh copy
23+
npm install @web3-onboard/core @web3-onboard/zeal
24+
```
25+
26+
</TabPanel>
27+
</Tabs>
28+
29+
30+
## Usage
31+
32+
```typescript
33+
import Onboard from '@web3-onboard/core'
34+
import zealWalletModule from '@web3-onboard/zeal'
35+
36+
// initialize the module with options
37+
const zealWalletSdk = zealWalletModule()
38+
39+
const onboard = Onboard({
40+
// ... other Onboard options
41+
wallets: [
42+
zealWalletModule()
43+
//... other wallets
44+
]
45+
})
46+
47+
const connectedWallets = await onboard.connectWallet()
48+
console.log(connectedWallets)
49+
```

docs/yarn.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,10 +3249,10 @@
32493249
tallyho-detect-provider "^1.0.0"
32503250
tallyho-onboarding "^1.0.2"
32513251

3252-
"@web3-onboard/torus@^2.2.0-alpha.1":
3253-
version "2.2.0-alpha.1"
3254-
resolved "https://registry.yarnpkg.com/@web3-onboard/torus/-/torus-2.2.0-alpha.1.tgz#e86498bf9c9151968d33605134e5ac40149512ef"
3255-
integrity sha512-6A6gOtcsd+Bcx7pAx5enk7JNsEpq6hmMq40+zJgdmue4MT8BnyNeQM8V/8CWrJKxfQx0IExakiVpVDj303wBhA==
3252+
"@web3-onboard/torus@^2.2.0":
3253+
version "2.2.0"
3254+
resolved "https://registry.yarnpkg.com/@web3-onboard/torus/-/torus-2.2.0.tgz#6a844c99d783bbab2370f87b70f30a4cb8f36f07"
3255+
integrity sha512-0iaN3o13p5oCy//3FfEDdbRJnV1Y3QWXLWDTuaxJiYh/Qdj7tc7OORWxfAb3FB94vyaqIFV5jvLK8p7AYoQHmQ==
32563256
dependencies:
32573257
"@toruslabs/torus-embed" "1.38.2"
32583258
"@web3-onboard/common" "^2.2.3"
@@ -3272,10 +3272,10 @@
32723272
hdkey "^2.0.1"
32733273
trezor-connect "^8.2.11"
32743274

3275-
"@web3-onboard/uauth@^2.0.1-alpha.1":
3276-
version "2.0.1-alpha.1"
3277-
resolved "https://registry.yarnpkg.com/@web3-onboard/uauth/-/uauth-2.0.1-alpha.1.tgz#7cc64fa99d8018688805e6bd7c482940afe3ab79"
3278-
integrity sha512-LCVgvF7UZ1VHYoHV8W/hadTXkQQVO+v0H9Ack7olBRuUBAJwcO+6cPe+bflmKhZXanunFwtVwBSeQkPyPqOMmA==
3275+
"@web3-onboard/uauth@^2.0.1":
3276+
version "2.0.1"
3277+
resolved "https://registry.yarnpkg.com/@web3-onboard/uauth/-/uauth-2.0.1.tgz#998eff50eb1b0a109d48748a122e7a277229a7fd"
3278+
integrity sha512-wSS9E8rpGubKzttDei2RgU+fdGr4u1/wuV36QjFQyf/ADWHbd4EiILs+iRdf0HxG7UBRVtqSDyv1r6uGeIixmg==
32793279
dependencies:
32803280
"@ethersproject/providers" "^5.5.0"
32813281
"@uauth/js" "^2.4.0"
@@ -3296,10 +3296,10 @@
32963296
"@web3-onboard/common" "^2.2.3"
32973297
rxjs "^7.5.2"
32983298

3299-
"@web3-onboard/web3auth@^2.1.4-alpha.1":
3300-
version "2.1.4-alpha.1"
3301-
resolved "https://registry.yarnpkg.com/@web3-onboard/web3auth/-/web3auth-2.1.4-alpha.1.tgz#4fc916c245669ed298c48aae0797ad7e4197a1a2"
3302-
integrity sha512-ipIpXiwIB+trnCTjW/Z+gk8YraGb++QxuET4AP4dpwi/heivHGts64yiuddIxvSTXUipcoUwKjhTjp5GzPMDLw==
3299+
"@web3-onboard/web3auth@^2.1.4":
3300+
version "2.1.4"
3301+
resolved "https://registry.yarnpkg.com/@web3-onboard/web3auth/-/web3auth-2.1.4.tgz#2972914deec9b88ee5619822eebb651087735ff3"
3302+
integrity sha512-9G68PwvMhaN/F8pW2drxiGX/C5J/Vq6Vmb+u3XqLezkJjx2fZ15NzwBpnq538ChCQQIOOUE1yaKAZwIqNMDUbw==
33033303
dependencies:
33043304
"@web3-onboard/common" "^2.2.3"
33053305
"@web3auth/base" "^3.3.0"

0 commit comments

Comments
 (0)