Skip to content

Commit fa54288

Browse files
authored
Merge pull request #2247 from blocknative/release/2.26.2
Release 2.26.2 (docs)
2 parents a51e6d4 + b186426 commit fa54288

File tree

46 files changed

+3408
-3306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3408
-3306
lines changed

.circleci/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ jobs:
255255
working_directory: ~/web3-onboard-monorepo/packages/trust
256256
steps:
257257
- node-build-steps
258+
build-okx:
259+
docker:
260+
- image: cimg/node:16.13.1
261+
working_directory: ~/web3-onboard-monorepo/packages/okx
262+
steps:
263+
- node-build-steps
258264
build-frontier:
259265
docker:
260266
- image: cimg/node:16.13.1
@@ -460,6 +466,12 @@ jobs:
460466
working_directory: ~/web3-onboard-monorepo/packages/passport
461467
steps:
462468
- node-build-steps
469+
build-bloom:
470+
docker:
471+
- image: cimg/node:18.0.0
472+
working_directory: ~/web3-onboard-monorepo/packages/bloom
473+
steps:
474+
- node-build-steps
463475

464476
# Build staging/Alpha releases
465477
build-staging-core:
@@ -552,6 +564,12 @@ jobs:
552564
working_directory: ~/web3-onboard-monorepo/packages/trust
553565
steps:
554566
- node-staging-build-steps
567+
build-staging-okx:
568+
docker:
569+
- image: cimg/node:16.13.1
570+
working_directory: ~/web3-onboard-monorepo/packages/okx
571+
steps:
572+
- node-staging-build-steps
555573
build-staging-frontier:
556574
docker:
557575
- image: cimg/node:16.13.1
@@ -756,6 +774,12 @@ jobs:
756774
working_directory: ~/web3-onboard-monorepo/packages/passport
757775
steps:
758776
- node-staging-build-steps
777+
build-staging-bloom:
778+
docker:
779+
- image: cimg/node:18.0.0
780+
working_directory: ~/web3-onboard-monorepo/packages/bloom
781+
steps:
782+
- node-staging-build-steps
759783

760784
workflows:
761785
version: 2
@@ -851,6 +875,12 @@ workflows:
851875
<<: *deploy_production_filters
852876
- build-staging-trust:
853877
<<: *deploy_staging_filters
878+
okx:
879+
jobs:
880+
- build-okx:
881+
<<: *deploy_production_filters
882+
- build-staging-okx:
883+
<<: *deploy_staging_filters
854884
frontier:
855885
jobs:
856886
- build-frontier:
@@ -1055,3 +1085,9 @@ workflows:
10551085
<<: *deploy_production_filters
10561086
- build-staging-passport:
10571087
<<: *deploy_staging_filters
1088+
bloom:
1089+
jobs:
1090+
- build-bloom:
1091+
<<: *deploy_production_filters
1092+
- build-staging-bloom:
1093+
<<: *deploy_staging_filters

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ For full documentation, check out the README.md for each package or the [docs pa
108108
- [Arcana](packages/arcana-auth/README.md)
109109
- [Coinbase](packages/coinbase/README.md)
110110
- [Trust](packages/trust/README.md)
111+
- [OKX](packages/okx/README.md)
111112
- [WalletConnect](packages/walletconnect/README.md)
112113
- [Safe](packages/gnosis/README.md)
113114
- [Magic](packages/magic/README.md)

docs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"format": "prettier --plugin-search-dir . --write .",
1313
"prepare": "svelte-kit sync",
1414
"test": "playwright test",
15-
"w3o-latest-prod": "yarn add '@web3-onboard/core' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store' '@web3-onboard/blocto' '@web3-onboard/capsule' '@web3-onboard/particle-network' '@web3-onboard/metamask' '@web3-onboard/bitget' '@web3-onboard/arcana-auth' '@web3-onboard/venly'",
16-
"w3o-latest-alpha": "yarn add '@web3-onboard/core@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/blocto@next' '@web3-onboard/capsule@next' '@web3-onboard/metamask@next' '@web3-onboard/bitget@next' '@web3-onboard/arcana-auth@next' '@web3-onboard/venly@next' '@web3-onboard/particle-network@next'"
15+
"w3o-latest-prod": "yarn add '@web3-onboard/core' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/okx' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store' '@web3-onboard/blocto' '@web3-onboard/capsule' '@web3-onboard/particle-network' '@web3-onboard/metamask' '@web3-onboard/bitget' '@web3-onboard/arcana-auth' '@web3-onboard/venly'",
16+
"w3o-latest-alpha": "yarn add '@web3-onboard/core@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/okx@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/blocto@next' '@web3-onboard/capsule@next' '@web3-onboard/metamask@next' '@web3-onboard/bitget@next' '@web3-onboard/arcana-auth@next' '@web3-onboard/venly@next' '@web3-onboard/particle-network@next'"
1717
},
1818
"devDependencies": {
1919
"@algolia/client-search": "^4.17.0",
@@ -72,6 +72,7 @@
7272
"@web3-onboard/magic": "^2.2.1",
7373
"@web3-onboard/metamask": "^2.1.1",
7474
"@web3-onboard/mew-wallet": "^2.1.1",
75+
"@web3-onboard/okx": "2.0.0-alpha.1",
7576
"@web3-onboard/particle-network": "^2.1.1",
7677
"@web3-onboard/phantom": "^2.1.1",
7778
"@web3-onboard/portis": "^2.2.1",

docs/src/lib/services/onboard.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const intiOnboard = async (theme) => {
5151
const { default: torusModule } = await import('@web3-onboard/torus')
5252
const { default: uauthModule } = await import('@web3-onboard/uauth')
5353
const { default: trustModule } = await import('@web3-onboard/trust')
54+
const { default: okxModule } = await import('@web3-onboard/okx')
5455
const { default: xdefiModule } = await import('@web3-onboard/xdefi')
5556
const { default: cedeModule } = await import('@web3-onboard/cede-store')
5657
const { default: frameModule } = await import('@web3-onboard/frame')
@@ -93,6 +94,7 @@ const intiOnboard = async (theme) => {
9394
const taho = tahoModule()
9495
const torus = torusModule()
9596
const trust = trustModule()
97+
const okx = okxModule()
9698
const xdefi = xdefiModule()
9799
const cede = cedeModule()
98100
const bitget = bitgetModule()
@@ -152,6 +154,7 @@ const intiOnboard = async (theme) => {
152154
ledger,
153155
trezor,
154156
trust,
157+
okx,
155158
gnosis,
156159
taho,
157160
bitget,

docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ We recommend you add the [Core Repo](../../modules/core.md#install) and consider
193193
- [Magic](../../wallets/magic.md#login-options)
194194
- [MetaMask](../../wallets/metamask.md#install)
195195
- [MEW](../../wallets/mewwallet.md#install)
196+
- [OKX](../../wallets/okx.md#install)
196197
- [Portis](../../wallets/portis.md#install)
197198
- [Web3Auth](../../wallets/web3auth.md#install)
198199
- [WalletConnect](../../wallets/walletconnect.md#install)

docs/src/routes/docs/[...4]wallets/[...19]metamask/+page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: MetaMask
1111
## Wallet module for connecting MetaMask Wallet SDK to web3-onboard
1212

1313
The MetaMask Web3-Onboard module provides a reliable, secure, and seamless connection from your dapp to the MetaMask browser extension and MetaMask Mobile.
14-
See [MetaMask SDK Developer Docs](https://docs.metamask.io/wallet/how-to/connect/set-up-sdk/)
14+
See [MetaMask SDK Developer Docs](https://docs.metamask.io/wallet/how-to/use-sdk/)
1515

1616
<img src="{metaMaskSDKConnect}" alt="MetaMask SDK connect flow gif"/>
1717

docs/src/routes/docs/[...4]wallets/[...33]web3auth/+page.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,30 @@ For troubleshooting web3Auth errors, framework, polyfill, etc please see the [of
3535
```typescript
3636
import Onboard from '@web3-onboard/core'
3737
import web3authModule from '@web3-onboard/web3auth'
38+
import { EthereumPrivateKeyProvider } from '@web3auth/ethereum-provider'
39+
import { CHAIN_NAMESPACES } from '@web3auth/base'
40+
41+
const privateKeyProvider = new EthereumPrivateKeyProvider({
42+
config: {
43+
chainConfig: {
44+
chainId: `0xAA36A7`,
45+
rpcTarget: `https://rpc.sepolia.org/`,
46+
chainNamespace: CHAIN_NAMESPACES.EIP155,
47+
displayName: 'Sepolia',
48+
blockExplorerUrl: 'https://sepolia.etherscan.io',
49+
ticker: 'ETH',
50+
tickerName: 'Ether',
51+
logo: 'https://images.toruswallet.io/ethereum.svg'
52+
}
53+
}
54+
})
3855

56+
// must access via http://localhost:8080 to be whitelisted
3957
const web3auth = web3authModule({
4058
clientId:
41-
'DJuUOKvmNnlzy6ruVgeWYWIMKLRyYtjYa9Y10VCeJzWZcygDlrYLyXsBQjpJ2hxlBO9dnl8t9GmAC2qOP5vnIGo'
59+
'BErDmyuxFPtpvM_Isiy8RHNWOWYvkAUehrgmO0rDoe5yr33ixt5s98eT_qePTyRsgpN7SVQwrEUMx7gON0jBDQI',
60+
privateKeyProvider: privateKeyProvider,
61+
web3AuthNetwork: 'sapphire_devnet'
4262
})
4363

4464
const onboard = Onboard({
@@ -56,11 +76,15 @@ console.log(connectedWallets)
5676
## Types
5777

5878
```typescript
79+
import type { Web3AuthOptions, ModalConfig } from '@web3auth/modal'
80+
import type { CustomChainConfig, OPENLOGIN_NETWORK_TYPE } from '@web3auth/base'
5981
type Web3AuthModuleOptions = Omit<Web3AuthOptions, 'chainConfig'> & {
6082
chainConfig?: Partial<CustomChainConfig> & Pick<CustomChainConfig, 'chainNamespace'>
61-
6283
modalConfig?: Record<string, ModalConfig> | undefined
63-
84+
/**
85+
* Web3Auth Network to use for the session & the issued idToken
86+
*/
87+
web3AuthNetwork: OPENLOGIN_NETWORK_TYPE
6488
/**
6589
* @deprecated use web3Auth native Z-Index config through
6690
* uiConfig.modalZIndex
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: Bloom
3+
---
4+
5+
# {$frontmatter.title}
6+
7+
Wallet module for connecting Bloom to web3-onboard.
8+
9+
## Install
10+
11+
<Tabs values={['yarn', 'npm']}>
12+
<TabPanel value="yarn">
13+
14+
```sh copy
15+
yarn add @web3-onboard/bloom
16+
```
17+
18+
</TabPanel>
19+
<TabPanel value="npm">
20+
21+
```sh copy
22+
npm install @web3-onboard/bloom
23+
```
24+
25+
</TabPanel>
26+
</Tabs>
27+
28+
29+
```typescript
30+
type WalletConnectOptions = {
31+
/**
32+
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
33+
*/
34+
projectId: string
35+
/**
36+
* Defaults to `appMetadata.explore` that is supplied to the web3-onboard init
37+
* Strongly recommended to provide atleast one URL as it is required by some wallets (i.e. MetaMask)
38+
* To connect with walletconnect
39+
*/
40+
dappUrl?: string
41+
/**
42+
* List of Required Chain(s) ID for wallets to support in number format (integer or hex)
43+
* Defaults to [1] - Ethereum
44+
*/
45+
requiredChains?: number[] | undefined
46+
/**
47+
* List of Optional Chain(s) ID for wallets to support in number format (integer or hex)
48+
* Defaults to the chains provided within the web3-onboard init chain property
49+
*/
50+
optionalChains?: number[] | undefined
51+
/**
52+
* Additional required methods to be added to the default list of ['eth_sendTransaction', 'personal_sign']
53+
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/advanced/providers/ethereum#required-and-optional-methods
54+
*/
55+
additionalRequiredMethods?: string[] | undefined
56+
/**
57+
* Additional methods to be added to the default list of ['eth_sendTransaction', 'eth_signTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4']
58+
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
59+
*/
60+
additionalOptionalMethods?: string[] | undefined
61+
)
62+
```
63+
64+
## Usage
65+
66+
```typescript
67+
import Onboard from '@web3-onboard/core'
68+
import bloomModule from '@web3-onboard/bloom'
69+
70+
const wcInitOptions = {
71+
/**
72+
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
73+
*/
74+
projectId: 'abc123...',
75+
/**
76+
* Chains required to be supported by all wallets connecting to your DApp
77+
*/
78+
requiredChains: [1],
79+
/**
80+
* Chains required to be supported by all wallets connecting to your DApp
81+
*/
82+
optionalChains: [42161, 8453, 10, 137, 56],
83+
/**
84+
* Defaults to `appMetadata.explore` that is supplied to the web3-onboard init
85+
* Strongly recommended to provide atleast one URL as it is required by some wallets (i.e. MetaMask)
86+
* To connect with WalletConnect
87+
*/
88+
dappUrl: 'http://YourAwesomeDapp.com'
89+
}
90+
91+
// initialize the module with options
92+
const bloom = bloomModule(wcInitOptions)
93+
94+
// can also initialize with no options...
95+
96+
const onboard = Onboard({
97+
// ... other Onboard options
98+
wallets: [
99+
bloom
100+
//... other wallets
101+
]
102+
})
103+
104+
const connectedWallets = await onboard.connectWallet()
105+
106+
// Assuming only wallet connect is connected, index 0
107+
// `instance` will give insight into the WalletConnect info
108+
// such as namespaces, methods, chains, etc per wallet connected
109+
const { instance } = connectedWallets[0]
110+
111+
console.log(connectedWallets)
112+
```
113+
114+
## Build Environments
115+
116+
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: OKX Wallet
3+
---
4+
5+
# {$frontmatter.title}
6+
7+
Wallet module for connecting OKX wallet through Web3 Onboard
8+
9+
### Install
10+
11+
<Tabs values={['yarn', 'npm']}>
12+
<TabPanel value="yarn">
13+
14+
```sh copy
15+
yarn add @web3-onboard/okx
16+
```
17+
18+
</TabPanel>
19+
<TabPanel value="npm">
20+
21+
```sh copy
22+
npm install @web3-onboard/okx
23+
```
24+
25+
</TabPanel>
26+
</Tabs>
27+
28+
## Usage
29+
30+
```typescript
31+
import Onboard from '@web3-onboard/core'
32+
import okxWallet from '@web3-onboard/okx'
33+
34+
const okx = okxWallet()
35+
36+
const onboard = Onboard({
37+
// ... other Onboard options
38+
wallets: [
39+
okx
40+
//... other wallets
41+
]
42+
})
43+
44+
const connectedWallets = await onboard.connectWallet()
45+
console.log(connectedWallets)
46+
```
47+
48+
## Build Environments
49+
50+
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)

0 commit comments

Comments
 (0)