Skip to content

Commit 70448d6

Browse files
authored
Merge branch 'develop' into develop
2 parents 9f7d631 + 07b5aab commit 70448d6

File tree

79 files changed

+1266
-1772
lines changed

Some content is hidden

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

79 files changed

+1266
-1772
lines changed

docs/package.json

Lines changed: 39 additions & 41 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'",
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'"
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'"
1717
},
1818
"devDependencies": {
1919
"@algolia/client-search": "^4.17.0",
@@ -36,60 +36,58 @@
3636
"prettier-plugin-svelte": "^2.8.1",
3737
"react": "^18.2.0",
3838
"react-dom": "^18.2.0",
39-
"rollup-plugin-polyfill-node": "^0.12.0",
39+
"rollup-plugin-polyfill-node": "^0.13.0",
4040
"shiki": "^0.12.0",
4141
"stream-browserify": "^3.0.0",
4242
"stream-http": "^3.2.0",
4343
"svelte": "^3.54.0",
4444
"svelte-check": "^3.0.1",
4545
"svelte-preprocess": "^5.0.3",
4646
"tslib": "^2.4.1",
47-
"typescript": "^5.0.4",
47+
"typescript": "^5.4.5",
4848
"unplugin-icons": "^0.14.0",
4949
"vite": "^4.5.3"
5050
},
5151
"type": "module",
5252
"dependencies": {
5353
"@safe-global/safe-apps-provider": "^0.18.0",
5454
"@safe-global/safe-apps-sdk": "^8.1.0",
55-
"@web3-onboard/arcana-auth": "^2.0.0",
56-
"@web3-onboard/bitget": "^2.0.0",
57-
"@web3-onboard/blocto": "^2.0.0",
58-
"@web3-onboard/capsule": "^2.0.3",
59-
"@web3-onboard/cede-store": "^2.2.0",
60-
"@web3-onboard/coinbase": "^2.2.7",
61-
"@web3-onboard/core": "^2.21.6",
62-
"@web3-onboard/dcent": "^2.2.7",
63-
"@web3-onboard/enkrypt": "^2.0.4",
64-
"@web3-onboard/fortmatic": "^2.0.19",
65-
"@web3-onboard/frame": "^2.0.2",
66-
"@web3-onboard/frontier": "^2.0.4",
67-
"@web3-onboard/gas": "^2.1.8",
68-
"@web3-onboard/gnosis": "^2.2.2",
69-
"@web3-onboard/infinity-wallet": "^2.0.4",
70-
"@web3-onboard/injected-wallets": "^2.10.17",
71-
"@web3-onboard/keepkey": "^2.3.7",
72-
"@web3-onboard/keystone": "^2.3.7",
73-
"@web3-onboard/ledger": "^2.6.0",
74-
"@web3-onboard/magic": "^2.1.7",
75-
"@web3-onboard/metamask": "^2.0.7",
76-
"@web3-onboard/mew-wallet": "^2.0.4",
55+
"@web3-onboard/bitget": "^2.1.0",
56+
"@web3-onboard/blocto": "^2.1.0",
57+
"@web3-onboard/cede-store": "^2.3.0",
58+
"@web3-onboard/coinbase": "^2.3.0",
59+
"@web3-onboard/core": "^2.22.0",
60+
"@web3-onboard/dcent": "^2.2.8",
61+
"@web3-onboard/enkrypt": "^2.1.0",
62+
"@web3-onboard/fortmatic": "^2.1.0",
63+
"@web3-onboard/frame": "^2.1.0",
64+
"@web3-onboard/frontier": "^2.1.0",
65+
"@web3-onboard/gas": "^2.2.0",
66+
"@web3-onboard/gnosis": "^2.3.0",
67+
"@web3-onboard/infinity-wallet": "^2.1.0",
68+
"@web3-onboard/injected-wallets": "^2.11.0",
69+
"@web3-onboard/keepkey": "^2.3.8",
70+
"@web3-onboard/keystone": "^2.3.8",
71+
"@web3-onboard/ledger": "^2.7.0",
72+
"@web3-onboard/magic": "^2.2.0",
73+
"@web3-onboard/metamask": "^2.1.0",
74+
"@web3-onboard/mew-wallet": "^2.1.0",
7775
"@web3-onboard/okx": "^2.0.0-alpha.1",
78-
"@web3-onboard/phantom": "^2.0.3",
79-
"@web3-onboard/portis": "^2.1.7",
80-
"@web3-onboard/sequence": "^2.0.8",
81-
"@web3-onboard/taho": "^2.0.5",
82-
"@web3-onboard/torus": "^2.2.6",
83-
"@web3-onboard/transaction-preview": "^2.0.8",
84-
"@web3-onboard/trezor": "^2.4.3",
85-
"@web3-onboard/trust": "^2.0.4",
86-
"@web3-onboard/uauth": "^2.1.1",
87-
"@web3-onboard/venly": "^2.0.0",
88-
"@web3-onboard/walletconnect": "^2.5.5",
89-
"@web3-onboard/web3auth": "^2.2.3",
90-
"@web3-onboard/xdefi": "^2.0.4",
91-
"@web3-onboard/zeal": "^2.0.4",
92-
"@web3-onboard/particle-network": "^2.0.1",
76+
"@web3-onboard/particle-network": "^2.1.0",
77+
"@web3-onboard/phantom": "^2.1.0",
78+
"@web3-onboard/portis": "^2.2.0",
79+
"@web3-onboard/sequence": "^2.1.0",
80+
"@web3-onboard/taho": "^2.1.0",
81+
"@web3-onboard/torus": "^2.3.0",
82+
"@web3-onboard/transaction-preview": "^2.1.0",
83+
"@web3-onboard/trezor": "^2.4.4",
84+
"@web3-onboard/trust": "^2.1.0",
85+
"@web3-onboard/uauth": "^2.2.0",
86+
"@web3-onboard/venly": "^2.1.0",
87+
"@web3-onboard/walletconnect": "^2.6.0",
88+
"@web3-onboard/web3auth": "^2.3.0",
89+
"@web3-onboard/xdefi": "^2.1.0",
90+
"@web3-onboard/zeal": "^2.1.0",
9391
"animejs": "^3.2.1",
9492
"bnc-sdk": "^4.6.6",
9593
"ethers": "^5.7.0",

docs/src/lib/services/onboard.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ const intiOnboard = async (theme) => {
5555
const { default: xdefiModule } = await import('@web3-onboard/xdefi')
5656
const { default: cedeModule } = await import('@web3-onboard/cede-store')
5757
const { default: frameModule } = await import('@web3-onboard/frame')
58-
const { default: arcanaModule } = await import('@web3-onboard/arcana-auth')
58+
// const { default: arcanaModule } = await import('@web3-onboard/arcana-auth')
5959
const { default: bloctoModule } = await import('@web3-onboard/blocto')
6060
const { default: venlyModule } = await import('@web3-onboard/venly')
6161
const { default: bitgetModule } = await import('@web3-onboard/bitget')
62-
const { default: capsuleModule, Environment } = await import('@web3-onboard/capsule')
62+
// // const { default: capsuleModule, Environment } = await import('@web3-onboard/capsule')
6363
const { default: particleAuthModule } = await import('@web3-onboard/particle-network')
6464
const INFURA_ID = '8b60d52405694345a99bcb82e722e0af'
6565

6666
const injected = injectedModule()
6767
const infinityWallet = infinityWalletModule()
68-
const arcanaWallet = arcanaModule({
69-
clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb'
70-
})
68+
// const arcanaWallet = arcanaModule({
69+
// clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb'
70+
// })
7171
const coinbase = coinbaseModule()
7272
const metamask = metamaskModule({
7373
options: {
@@ -133,10 +133,10 @@ const intiOnboard = async (theme) => {
133133
environment: 'staging'
134134
})
135135

136-
const capsule = capsuleModule({
137-
environment: Environment.DEVELOPMENT,
138-
apiKey: '992bbd9146d5de8ad0419f141d9a7ca7'
139-
})
136+
// // const capsule = capsuleModule({
137+
// // environment: Environment.DEVELOPMENT,
138+
// // apiKey: '992bbd9146d5de8ad0419f141d9a7ca7'
139+
// // })
140140

141141
const particle = particleAuthModule({
142142
projectId: 'b385ccf0-73c3-485a-9941-159b7855b806',
@@ -161,7 +161,7 @@ const intiOnboard = async (theme) => {
161161
xdefi,
162162
uauth,
163163
cede,
164-
arcanaWallet,
164+
// arcanaWallet,
165165
torus,
166166
sequence,
167167
dcent,
@@ -175,11 +175,9 @@ const intiOnboard = async (theme) => {
175175
frame,
176176
infinityWallet,
177177
blocto,
178-
capsule,
179178
particle,
179+
venly
180180
// capsule
181-
182-
// venly
183181
],
184182
chains: [
185183
{

docs/src/routes/docs/[...3]modules/[...1]core/+page.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ type InitOptions {
108108
wallets: WalletInit[]
109109
chains: Chain[]
110110
appMetadata?: AppMetadata
111+
/** Web3-Onboard module to add Wagmi support
112+
* see https://www.npmjs.com/package/@web3-onboard/wagmi
113+
*/
114+
wagmi?: typeof wagmi
111115
i18n?: i18nOptions
112116
accountCenter?: AccountCenterOptions
113117
apiKey?: string
@@ -388,6 +392,57 @@ It will allow you to customize the look and feel of Web3 Onboard, try different
388392
389393
---
390394
395+
#### wagmi
396+
397+
To add [WAGMI API](https://wagmi.sh/core/getting-started) support to your project you can simply install `web3-onboard/wagmi` import and pass in the [wagmi package](/docs/modules/wagmi) export directly into your onboard configuration. After doing so you can use all of the native WAGMI API functions directly from `@web3-onboard/wagmi`. This will give access to all WAGMI function available on or before `@wagmi/core` version `2.10.4`.
398+
After initialization an up-to-date WAGMI config will will be available from the onboard state object `onboard.state.get().wagmiConfig` which will need to be passed as the first prop of most [@wagmi/core](https://wagmi.sh/core/getting-started) methods. Wallets will also have a [wagmiConnector](#state) prop within the onboard state object which will allow you to target specific wallets for interactions. This can also be bi-passed if the primary or most recently connected wallet is the wallet meant for the transactions.
399+
The config and connectors can be used with the WAGMI API returned from this module or an external WAGMI instance.
400+
401+
Full documentation for the `@web3-onboard/wagmi` module can be found [here](/docs/modules/wagmi).
402+
403+
```typescript
404+
import Onboard from '@web3-onboard/core'
405+
import wagmi from '@web3-onboard/wagmi'
406+
import {
407+
sendTransaction as wagmiSendTransaction,
408+
switchChain,
409+
disconnect,
410+
getConnectors
411+
} from '@web3-onboard/wagmi'
412+
413+
const injected = injectedModule()
414+
415+
const onboard = Onboard({
416+
// This javascript object is unordered meaning props do not require a certain order
417+
wagmi,
418+
wallets: [injected],
419+
chains: [
420+
{
421+
id: '0x1',
422+
token: 'ETH',
423+
label: 'Ethereum',
424+
rpcUrl: 'https://mainnet.infura.io/v3/17c1e1500e384acfb6a72c5d2e67742e'
425+
}
426+
]
427+
// ... other Onboard options
428+
})
429+
430+
const sendTransaction = async () => {
431+
// current primary wallet - as multiple wallets can connect this value is the currently active
432+
const [activeWallet] = onboard.state.get().wallets
433+
const { wagmiConnector } = activeWallet
434+
const wagmiConfig = onboard.state.get().wagmiConfig
435+
const result = await wagmiSendTransaction(wagmiConfig, {
436+
to: toAddress,
437+
// desired connector to send txn from
438+
connector: wagmiConnector,
439+
value: parseEther('0.001')
440+
})
441+
console.log(result)
442+
}
443+
```
444+
---
445+
391446
#### disableFontDownload
392447

393448
If set to `true` the default `Inter` font will not be imported and instead the web based `sans-serif` font will be used if a font is not defined through the `Theme` or exposed css variable.
@@ -845,6 +900,13 @@ type WalletState = {
845900
accounts: Account[]
846901
chains: ConnectedChain[]
847902
instance?: unknown
903+
/**
904+
* WAGMI Connector object
905+
* Can be used to leverage all WAGMI functions from
906+
* the @web3-onboard/wagmi module
907+
* See https://www.npmjs.com/package/@web3-onboard/wagmi for more details
908+
*/
909+
wagmiConnector?: Connector
848910
}
849911

850912
type Account = {

0 commit comments

Comments
 (0)