From 8cb3df686e8a699cc9bbdb6c64fc3113a641875d Mon Sep 17 00:00:00 2001 From: Kat Leight <33187102+leightkt@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:22:49 -0600 Subject: [PATCH] Release 2.24.7 (#1864) * Arcana Auth SDK support (#1744) * Fix: Aracana Config (#1857) * add steps * build staging steps * update arcana package and yarn (#1858) * update arcana package and yarn * fix spacing in config * try update spacing * reset spacing on config * update ci branch for test * add ts-ignore * reset config to develop * add file extension to icon --------- Co-authored-by: Adam Carpenter * Update Arcana Auth SDK version (#1860) * update arcana/demo packages and root version * add ts-ignore for arcana * Feat: Add native Base chain support and to all quickstarts (#1859) * Add Base chain to all quickstarts * Bump core package in demo * update core, react, vue versions --------- Co-authored-by: Adam Carpenter Co-authored-by: mmjee --- .circleci/config.yml | 20 ++++++- README.md | 7 +++ docs/package.json | 3 +- docs/src/lib/services/onboard.js | 31 +++++----- docs/src/routes/+page.md | 6 ++ .../[...1]introduction/+page.md | 21 ++++--- .../[...1]installation/+page.md | 6 ++ .../docs/[...3]modules/[...1]core/+page.md | 30 +++++----- .../docs/[...3]modules/[...3]react/+page.md | 6 ++ .../docs/[...3]modules/[...6]vue/+page.md | 6 ++ .../+page.md | 0 .../+page.md | 6 ++ .../+page.md | 0 .../+page.md | 0 .../{[...13]ledger => [...14]ledger}/+page.md | 0 .../{[...14]magic => [...15]magic}/+page.md | 0 .../{[...15]mew => [...16]mew}/+page.md | 0 .../+page.md | 0 .../+page.md | 0 .../{[...18]portis => [...19]portis}/+page.md | 0 .../docs/[...4]wallets/[...1]arcana/+page.md | 59 +++++++++++++++++++ .../{[...19]taho => [...20]taho}/+page.md | 0 .../+page.md | 0 .../{[...21]torus => [...22]torus}/+page.md | 0 .../{[...22]trezor => [...23]trezor}/+page.md | 0 .../{[...23]uauth => [...24]uauth}/+page.md | 0 .../{[...23]venly => [...25]venly}/+page.md | 0 .../+page.md | 6 ++ .../+page.md | 0 .../+page.md | 0 .../{[...27]xdefi => [...29]xdefi}/+page.md | 0 .../{[...1]blocto => [...2]blocto}/+page.md | 0 .../{[...28]zeal => [...30]zeal}/+page.md | 0 .../+page.md | 0 .../{[...3]dcent => [...4]dcent}/+page.md | 0 .../{[...4]enkrypt => [...5]enkrypt}/+page.md | 0 .../+page.md | 0 .../{[...6]frame => [...7]frame}/+page.md | 0 .../+page.md | 0 .../{[...8]gnosis => [...9]gnosis}/+page.md | 0 examples/with-ledger/package.json | 2 +- examples/with-ledger/pages/index.js | 21 ++----- examples/with-nextjs-13/package.json | 2 +- examples/with-nextjs/package.json | 2 +- examples/with-nextjs/pages/_app.js | 8 ++- examples/with-sveltekit/package.json | 2 +- .../with-sveltekit/src/lib/web3-onboard.ts | 8 ++- examples/with-vanilla-js/package.json | 2 +- examples/with-vanilla-js/src/onboard.js | 6 ++ examples/with-vite-react/package.json | 2 +- examples/with-vite-react/src/web3-onboard.ts | 18 ++---- .../src/components/HelloWorld.vue | 6 ++ package.json | 2 +- packages/arcana-auth/README.md | 36 +++++++++++ packages/arcana-auth/package.json | 22 +++++++ packages/arcana-auth/src/icon.ts | 38 ++++++++++++ packages/arcana-auth/src/index.ts | 31 ++++++++++ packages/arcana-auth/tsconfig.json | 15 +++++ packages/core/README.md | 14 ++++- packages/core/package.json | 2 +- packages/core/src/utils.ts | 5 ++ packages/demo/package.json | 3 +- packages/demo/src/App.svelte | 16 ++++- packages/injected/README.md | 6 ++ packages/react/README.md | 24 +++++--- packages/react/package.json | 4 +- packages/vue/README.md | 10 +++- packages/vue/package.json | 4 +- yarn.lock | 19 ++++++ 69 files changed, 443 insertions(+), 94 deletions(-) rename docs/src/routes/docs/[...4]wallets/{[...9]infinitywallet => [...10]infinitywallet}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...10]injected => [...11]injected}/+page.md (98%) rename docs/src/routes/docs/[...4]wallets/{[...11]keepkey => [...12]keepkey}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...12]keystone => [...13]keystone}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...13]ledger => [...14]ledger}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...14]magic => [...15]magic}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...15]mew => [...16]mew}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...16]mewwallet => [...17]mewwallet}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...17]phantom => [...18]phantom}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...18]portis => [...19]portis}/+page.md (100%) create mode 100644 docs/src/routes/docs/[...4]wallets/[...1]arcana/+page.md rename docs/src/routes/docs/[...4]wallets/{[...19]taho => [...20]taho}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...20]tallyho => [...21]tallyho}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...21]torus => [...22]torus}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...22]trezor => [...23]trezor}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...23]uauth => [...24]uauth}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...23]venly => [...25]venly}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...24]walletconnect => [...26]walletconnect}/+page.md (97%) rename docs/src/routes/docs/[...4]wallets/{[...25]walletlink => [...27]walletlink}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...26]web3auth => [...28]web3auth}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...27]xdefi => [...29]xdefi}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...1]blocto => [...2]blocto}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...28]zeal => [...30]zeal}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...2]coinbase => [...3]coinbase}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...3]dcent => [...4]dcent}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...4]enkrypt => [...5]enkrypt}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...5]fortmatic => [...6]fortmatic}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...6]frame => [...7]frame}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...7]frontier => [...8]frontier}/+page.md (100%) rename docs/src/routes/docs/[...4]wallets/{[...8]gnosis => [...9]gnosis}/+page.md (100%) create mode 100644 packages/arcana-auth/README.md create mode 100644 packages/arcana-auth/package.json create mode 100644 packages/arcana-auth/src/icon.ts create mode 100644 packages/arcana-auth/src/index.ts create mode 100644 packages/arcana-auth/tsconfig.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 93dd73fc8..8e77be428 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -395,6 +395,12 @@ jobs: working_directory: ~/web3-onboard-monorepo/packages/cede-store steps: - node-build-steps + build-arcana-auth: + docker: + - image: cimg/node:16.13.1 + working_directory: ~/web3-onboard-monorepo/packages/arcana-auth + steps: + - node-build-steps build-blocto: docker: - image: cimg/node:16.13.1 @@ -637,6 +643,12 @@ jobs: working_directory: ~/web3-onboard-monorepo/packages/cede-store steps: - node-staging-build-steps + build-staging-arcana-auth: + docker: + - image: cimg/node:16.13.1 + working_directory: ~/web3-onboard-monorepo/packages/arcana-auth + steps: + - node-staging-build-steps build-staging-blocto: docker: - image: cimg/node:16.13.1 @@ -881,12 +893,18 @@ workflows: <<: *deploy_production_filters - build-staging-cede-store: <<: *deploy_staging_filters + arcana-auth: + jobs: + - build-arcana-auth: + <<: *deploy_production_filters + - build-staging-arcana-auth: + <<: *deploy_staging_filters blocto: jobs: - build-blocto: <<: *deploy_production_filters - build-staging-blocto: - <<: *deploy_staging_filters + <<: *deploy_staging_filters venly: jobs: - build-venly: diff --git a/README.md b/README.md index 677acdc62..d6b918ea0 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ const onboard = Onboard({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl: MAINNET_RPC_URL + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) @@ -87,6 +93,7 @@ For full documentation, check out the README.md for each package or the [docs pa **SDK Wallets** +- [Arcana](packages/arcana-auth/README.md) - [Coinbase](packages/coinbase/README.md) - [Trust](packages/trust/README.md) - [WalletConnect](packages/walletconnect/README.md) diff --git a/docs/package.json b/docs/package.json index 724579674..34f0045c5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -49,10 +49,11 @@ }, "type": "module", "dependencies": { + "@web3-onboard/arcana-auth": "^2.0.0-alpha.1", "@web3-onboard/blocto": "^2.0.0", "@web3-onboard/cede-store": "^2.1.0-alpha.1", "@web3-onboard/coinbase": "^2.2.5-alpha.1", - "@web3-onboard/core": "^2.20.5-alpha.1", + "@web3-onboard/core": "^2.21.0-alpha.1", "@web3-onboard/dcent": "^2.2.7", "@web3-onboard/enkrypt": "^2.0.4", "@web3-onboard/fortmatic": "^2.0.19", diff --git a/docs/src/lib/services/onboard.js b/docs/src/lib/services/onboard.js index 811c45ce3..e60216e5c 100644 --- a/docs/src/lib/services/onboard.js +++ b/docs/src/lib/services/onboard.js @@ -53,12 +53,16 @@ const intiOnboard = async (theme) => { const { default: xdefiModule } = await import('@web3-onboard/xdefi') const { default: cedeModule } = await import('@web3-onboard/cede-store') const { default: frameModule } = await import('@web3-onboard/frame') + const { default: arcanaModule } = await import('@web3-onboard/arcana-auth') const { default: bloctoModule } = await import('@web3-onboard/blocto') const { default: venlyModule } = await import('@web3-onboard/venly') const INFURA_ID = '8b60d52405694345a99bcb82e722e0af' const injected = injectedModule() const infinityWallet = infinityWalletModule() + const arcanaWallet = arcanaModule({ + clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb' + }) const coinbase = coinbaseModule() const dcent = dcentModule() const walletConnect = walletConnectModule({ @@ -115,10 +119,11 @@ const intiOnboard = async (theme) => { }) return Onboard({ - connect: { autoConnectAllPreviousWallet: true }, + connect: { autoConnectAllPreviousWallet: true }, wallets: [ injected, walletConnect, + arcanaWallet, coinbase, ledger, trezor, @@ -172,10 +177,16 @@ const intiOnboard = async (theme) => { rpcUrl: 'https://rpc.sepolia.org/' }, { - id: '0x13881', + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x89', token: 'MATIC', - label: 'Polygon - Mumbai', - rpcUrl: 'https://matic-mumbai.chainstacklabs.com' + label: 'Polygon', + rpcUrl: 'https://matic-mainnet.chainstacklabs.com' }, { id: '0x38', @@ -183,12 +194,6 @@ const intiOnboard = async (theme) => { label: 'Binance', rpcUrl: 'https://bsc-dataseed.binance.org/' }, - { - id: '0x89', - token: 'MATIC', - label: 'Polygon', - rpcUrl: 'https://matic-mainnet.chainstacklabs.com' - }, { id: '0xfa', token: 'FTM', @@ -206,12 +211,6 @@ const intiOnboard = async (theme) => { token: 'ARB-ETH', label: 'Arbitrum', rpcUrl: 'https://rpc.ankr.com/arbitrum' - }, - { - id: 84531, - token: 'ETH', - label: 'Base Goerli', - rpcUrl: 'https://goerli.base.org' } ], appMetadata: { diff --git a/docs/src/routes/+page.md b/docs/src/routes/+page.md index 7edd1acb9..8ecc94d75 100644 --- a/docs/src/routes/+page.md +++ b/docs/src/routes/+page.md @@ -117,6 +117,12 @@ const onboard = Onboard({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl: MAINNET_RPC_URL + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) diff --git a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md index 499d75d21..a91abd4b2 100644 --- a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md +++ b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md @@ -105,6 +105,12 @@ const onboard = Onboard({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl: MAINNET_RPC_URL + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) @@ -148,24 +154,25 @@ We recommend you add the [Core Repo](../../modules/core.md#install) and consider **SDK Wallets** +- [Arcana Auth](../../wallets/arcana.md#install) +- [Blocto](../../docs/wallets/blocto.md#install) - [Coinbase](../../wallets/coinbase.md#install) -- [WalletConnect](../../wallets/walletconnect.md#install) +- [Fortmatic](../../wallets/fortmatic.md#install) +- [Frame](../../wallets/frame.md#install) - [Gnosis](../../wallets/gnosis.md#install) - [Magic](../../wallets/magic.md#login-options) -- [Fortmatic](../../wallets/fortmatic.md#install) - [MEW](../../wallets/mewwallet.md#install) - [Portis](../../wallets/portis.md#install) - [Web3Auth](../../wallets/web3auth.md#install) -- [Frame](../../wallets/frame.md#install) -- [Blocto](../../docs/wallets/blocto.md#install) +- [WalletConnect](../../wallets/walletconnect.md#install) **Hardware Wallets** -- [Ledger](../../wallets/ledger.md#install) -- [Trezor](../../wallets/trezor.md#install) +- [D'cent](../../wallets/dcent.md#install) - [Keystone](../../wallets/keystone.md#install) - [KeepKey](../../wallets/keepkey.md#install) -- [D'cent](../../wallets/dcent.md#install) +- [Ledger](../../wallets/ledger.md#install) +- [Trezor](../../wallets/trezor.md#install) **Frameworks** diff --git a/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md b/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md index 956587cd2..9d0c8bff6 100644 --- a/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md +++ b/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md @@ -66,6 +66,12 @@ const chains = [ token: 'MATIC', label: 'Matic Mainnet', rpcUrl: 'https://matic-mainnet.chainstacklabs.com' + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] ``` diff --git a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md index d1ed41801..9de1946b5 100644 --- a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md @@ -64,14 +64,14 @@ If you would like to support all wallets, then you can install all of the wallet ```sh copy -yarn add @web3-onboard/coinbase @web3-onboard/fortmatic @web3-onboard/gnosis @web3-onboard/injected-wallets @web3-onboard/keepkey @web3-onboard/keystone @web3-onboard/ledger @web3-onboard/magic @web3-onboard/portis @web3-onboard/react @web3-onboard/torus @web3-onboard/trezor @web3-onboard/walletconnect @web3-onboard/web3auth @web3-onboard/dcent @web3-onboard/sequence @web3-onboard/enkrypt @web3-onboard/mew-wallet @web3-onboard/uauth @web3-onboard/zeal @web3-onboard/frontier +yarn add @web3-onboard/coinbase @web3-onboard/fortmatic @web3-onboard/gnosis @web3-onboard/injected-wallets @web3-onboard/arcana-auth @web3-onboard/keepkey @web3-onboard/keystone @web3-onboard/ledger @web3-onboard/magic @web3-onboard/portis @web3-onboard/react @web3-onboard/torus @web3-onboard/trezor @web3-onboard/walletconnect @web3-onboard/web3auth @web3-onboard/dcent @web3-onboard/sequence @web3-onboard/enkrypt @web3-onboard/mew-wallet @web3-onboard/uauth @web3-onboard/zeal @web3-onboard/frontier ``` ```sh copy -npm install @web3-onboard/coinbase @web3-onboard/fortmatic @web3-onboard/gnosis @web3-onboard/injected-wallets @web3-onboard/keepkey @web3-onboard/keystone @web3-onboard/ledger @web3-onboard/magic @web3-onboard/portis @web3-onboard/react @web3-onboard/torus @web3-onboard/trezor @web3-onboard/walletconnect @web3-onboard/web3auth @web3-onboard/dcent @web3-onboard/sequence @web3-onboard/enkrypt @web3-onboard/mew-wallet @web3-onboard/uauth @web3-onboard/zeal @web3-onboard/frontier +npm install @web3-onboard/coinbase @web3-onboard/fortmatic @web3-onboard/gnosis @web3-onboard/injected-wallets @web3-onboard/arcana-auth @web3-onboard/keepkey @web3-onboard/keystone @web3-onboard/ledger @web3-onboard/magic @web3-onboard/portis @web3-onboard/react @web3-onboard/torus @web3-onboard/trezor @web3-onboard/walletconnect @web3-onboard/web3auth @web3-onboard/dcent @web3-onboard/sequence @web3-onboard/enkrypt @web3-onboard/mew-wallet @web3-onboard/uauth @web3-onboard/zeal @web3-onboard/frontier ``` @@ -287,7 +287,7 @@ type ConnectModalOptions = { */ removeWhereIsMyWalletWarning?: boolean /** - * Hide the "I don't have a wallet" link displayed + * Hide the "I don't have a wallet" link displayed * on the left panel of the connect modal */ removeIDontHaveAWalletInfoLink?: boolean @@ -633,18 +633,24 @@ const onboard = Onboard({ label: 'Sepolia', rpcUrl: 'https://rpc.sepolia.org/' }, + { + id: '0x89', + token: 'MATIC', + label: 'Matic', + rpcUrl: 'https://matic-mainnet.chainstacklabs.com' + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' + }, { id: '0x38', token: 'BNB', label: 'Binance Smart Chain', rpcUrl: 'https://bsc-dataseed.binance.org/' }, - { - id: '0x89', - token: 'MATIC', - label: 'Matic Mainnet', - rpcUrl: 'https://matic-mainnet.chainstacklabs.com' - }, { id: 10, token: 'OETH', @@ -656,12 +662,6 @@ const onboard = Onboard({ token: 'ARB-ETH', label: 'Arbitrum', rpcUrl: 'https://rpc.ankr.com/arbitrum' - }, - { - id: 84531, - token: 'ETH', - label: 'Base Goerli', - rpcUrl: 'https://goerli.base.org' } ], appMetadata: { diff --git a/docs/src/routes/docs/[...3]modules/[...3]react/+page.md b/docs/src/routes/docs/[...3]modules/[...3]react/+page.md index 2e1067bd8..36fff6d8b 100644 --- a/docs/src/routes/docs/[...3]modules/[...3]react/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...3]react/+page.md @@ -54,6 +54,12 @@ init({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) diff --git a/docs/src/routes/docs/[...3]modules/[...6]vue/+page.md b/docs/src/routes/docs/[...3]modules/[...6]vue/+page.md index 05828a26d..96239e2bd 100644 --- a/docs/src/routes/docs/[...3]modules/[...6]vue/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...6]vue/+page.md @@ -43,6 +43,12 @@ const web3Onboard = init({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) diff --git a/docs/src/routes/docs/[...4]wallets/[...9]infinitywallet/+page.md b/docs/src/routes/docs/[...4]wallets/[...10]infinitywallet/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...9]infinitywallet/+page.md rename to docs/src/routes/docs/[...4]wallets/[...10]infinitywallet/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...10]injected/+page.md b/docs/src/routes/docs/[...4]wallets/[...11]injected/+page.md similarity index 98% rename from docs/src/routes/docs/[...4]wallets/[...10]injected/+page.md rename to docs/src/routes/docs/[...4]wallets/[...11]injected/+page.md index e196545ee..83bd4fdc1 100644 --- a/docs/src/routes/docs/[...4]wallets/[...10]injected/+page.md +++ b/docs/src/routes/docs/[...4]wallets/[...11]injected/+page.md @@ -47,6 +47,12 @@ const onboard = Onboard({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl: MAINNET_RPC_URL + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ], appMetadata: { diff --git a/docs/src/routes/docs/[...4]wallets/[...11]keepkey/+page.md b/docs/src/routes/docs/[...4]wallets/[...12]keepkey/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...11]keepkey/+page.md rename to docs/src/routes/docs/[...4]wallets/[...12]keepkey/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...12]keystone/+page.md b/docs/src/routes/docs/[...4]wallets/[...13]keystone/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...12]keystone/+page.md rename to docs/src/routes/docs/[...4]wallets/[...13]keystone/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...13]ledger/+page.md b/docs/src/routes/docs/[...4]wallets/[...14]ledger/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...13]ledger/+page.md rename to docs/src/routes/docs/[...4]wallets/[...14]ledger/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...14]magic/+page.md b/docs/src/routes/docs/[...4]wallets/[...15]magic/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...14]magic/+page.md rename to docs/src/routes/docs/[...4]wallets/[...15]magic/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...15]mew/+page.md b/docs/src/routes/docs/[...4]wallets/[...16]mew/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...15]mew/+page.md rename to docs/src/routes/docs/[...4]wallets/[...16]mew/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...16]mewwallet/+page.md b/docs/src/routes/docs/[...4]wallets/[...17]mewwallet/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...16]mewwallet/+page.md rename to docs/src/routes/docs/[...4]wallets/[...17]mewwallet/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...17]phantom/+page.md b/docs/src/routes/docs/[...4]wallets/[...18]phantom/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...17]phantom/+page.md rename to docs/src/routes/docs/[...4]wallets/[...18]phantom/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...18]portis/+page.md b/docs/src/routes/docs/[...4]wallets/[...19]portis/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...18]portis/+page.md rename to docs/src/routes/docs/[...4]wallets/[...19]portis/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...1]arcana/+page.md b/docs/src/routes/docs/[...4]wallets/[...1]arcana/+page.md new file mode 100644 index 000000000..d516948c3 --- /dev/null +++ b/docs/src/routes/docs/[...4]wallets/[...1]arcana/+page.md @@ -0,0 +1,59 @@ +--- +title: Arcana Auth +--- + +# {$frontmatter.title} + +:::admonition type=warning +To ensure proper functionality of the embedded Arcana wallet in the Arcana Auth SDK, it may be necessary to disable certain other wallets that operate as browser extensions. +::: + +:::admonition type=tip +To enable the Arcana wallet in Web3 apps, developers must register and configure the authentication providers with the [Arcana Network](https://arcana.network) through the [Arcana Dashboard](https://dashboard.arcana.network) and obtain a unique client ID. Install and integrate the Auth SDK with the app using the registered client ID. Use the built-in plug-and-play login feature or plug in any custom UI to onboard users. Once the users authenticate, the Arcana wallet is accessible in the app's context to sign blockchain transactions and perform other Web3 wallet operations. + +For details, see [Quick Start Guide](https://docs.arcana.network/auth-quick-start.html). +::: + +[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 [Arcana Wallet](https://docs.arcana.network/concepts/anwallet/index.html) support into Web3-Onboard's "Connect Wallet" modal. With this module, the Arcana wallet option will be shown for any app that integrates with the Arcana Auth SDK and uses it to onboard users. There is no need to download any browser extension. For more information on how to use the Arcana Wallet, please refer to the [Arcana Wallet User Guide](https://docs.arcana.network/user-guides/wallet-ui/index.html). + +### Install + + + + +```sh copy +yarn add @web3-onboard/core @web3-onboard/arcana-auth +``` + + + + +```sh copy +npm install @web3-onboard/core @web3-onboard/arcana-auth +``` + + + + +## Usage + +```typescript +import Onboard from '@web3-onboard/core' +import arcanaAuthModule from '@web3-onboard/arcana-auth' + +// initialize the module +const arcanaAuth = arcanaAuthModule({ + clientID: '' +}) + +const onboard = Onboard({ + // ... other Onboard options + wallets: [ + arcanaAuth, + //... other wallets + ] +}) + +const connectedWallets = await onboard.connectWallet() +console.log(connectedWallets) +``` diff --git a/docs/src/routes/docs/[...4]wallets/[...19]taho/+page.md b/docs/src/routes/docs/[...4]wallets/[...20]taho/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...19]taho/+page.md rename to docs/src/routes/docs/[...4]wallets/[...20]taho/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...20]tallyho/+page.md b/docs/src/routes/docs/[...4]wallets/[...21]tallyho/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...20]tallyho/+page.md rename to docs/src/routes/docs/[...4]wallets/[...21]tallyho/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...21]torus/+page.md b/docs/src/routes/docs/[...4]wallets/[...22]torus/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...21]torus/+page.md rename to docs/src/routes/docs/[...4]wallets/[...22]torus/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...22]trezor/+page.md b/docs/src/routes/docs/[...4]wallets/[...23]trezor/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...22]trezor/+page.md rename to docs/src/routes/docs/[...4]wallets/[...23]trezor/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...23]uauth/+page.md b/docs/src/routes/docs/[...4]wallets/[...24]uauth/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...23]uauth/+page.md rename to docs/src/routes/docs/[...4]wallets/[...24]uauth/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...23]venly/+page.md b/docs/src/routes/docs/[...4]wallets/[...25]venly/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...23]venly/+page.md rename to docs/src/routes/docs/[...4]wallets/[...25]venly/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...24]walletconnect/+page.md b/docs/src/routes/docs/[...4]wallets/[...26]walletconnect/+page.md similarity index 97% rename from docs/src/routes/docs/[...4]wallets/[...24]walletconnect/+page.md rename to docs/src/routes/docs/[...4]wallets/[...26]walletconnect/+page.md index b154a4c38..f0e738d61 100644 --- a/docs/src/routes/docs/[...4]wallets/[...24]walletconnect/+page.md +++ b/docs/src/routes/docs/[...4]wallets/[...26]walletconnect/+page.md @@ -135,6 +135,12 @@ const onboard = Onboard({ ], chains: [ // chains that are passed as optional chains to WC wallet after cleaning and parsing as number[] + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' + }, { id: '0x89', token: 'MATIC', diff --git a/docs/src/routes/docs/[...4]wallets/[...25]walletlink/+page.md b/docs/src/routes/docs/[...4]wallets/[...27]walletlink/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...25]walletlink/+page.md rename to docs/src/routes/docs/[...4]wallets/[...27]walletlink/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...26]web3auth/+page.md b/docs/src/routes/docs/[...4]wallets/[...28]web3auth/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...26]web3auth/+page.md rename to docs/src/routes/docs/[...4]wallets/[...28]web3auth/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...27]xdefi/+page.md b/docs/src/routes/docs/[...4]wallets/[...29]xdefi/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...27]xdefi/+page.md rename to docs/src/routes/docs/[...4]wallets/[...29]xdefi/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...1]blocto/+page.md b/docs/src/routes/docs/[...4]wallets/[...2]blocto/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...1]blocto/+page.md rename to docs/src/routes/docs/[...4]wallets/[...2]blocto/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...28]zeal/+page.md b/docs/src/routes/docs/[...4]wallets/[...30]zeal/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...28]zeal/+page.md rename to docs/src/routes/docs/[...4]wallets/[...30]zeal/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...2]coinbase/+page.md b/docs/src/routes/docs/[...4]wallets/[...3]coinbase/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...2]coinbase/+page.md rename to docs/src/routes/docs/[...4]wallets/[...3]coinbase/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...3]dcent/+page.md b/docs/src/routes/docs/[...4]wallets/[...4]dcent/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...3]dcent/+page.md rename to docs/src/routes/docs/[...4]wallets/[...4]dcent/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...4]enkrypt/+page.md b/docs/src/routes/docs/[...4]wallets/[...5]enkrypt/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...4]enkrypt/+page.md rename to docs/src/routes/docs/[...4]wallets/[...5]enkrypt/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...5]fortmatic/+page.md b/docs/src/routes/docs/[...4]wallets/[...6]fortmatic/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...5]fortmatic/+page.md rename to docs/src/routes/docs/[...4]wallets/[...6]fortmatic/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...6]frame/+page.md b/docs/src/routes/docs/[...4]wallets/[...7]frame/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...6]frame/+page.md rename to docs/src/routes/docs/[...4]wallets/[...7]frame/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...7]frontier/+page.md b/docs/src/routes/docs/[...4]wallets/[...8]frontier/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...7]frontier/+page.md rename to docs/src/routes/docs/[...4]wallets/[...8]frontier/+page.md diff --git a/docs/src/routes/docs/[...4]wallets/[...8]gnosis/+page.md b/docs/src/routes/docs/[...4]wallets/[...9]gnosis/+page.md similarity index 100% rename from docs/src/routes/docs/[...4]wallets/[...8]gnosis/+page.md rename to docs/src/routes/docs/[...4]wallets/[...9]gnosis/+page.md diff --git a/examples/with-ledger/package.json b/examples/with-ledger/package.json index 6a4ab5482..c4982257e 100644 --- a/examples/with-ledger/package.json +++ b/examples/with-ledger/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@web3-onboard/ledger": "^2.4.3-alpha.1", - "@web3-onboard/react": "^2.6.7-alpha.3", + "@web3-onboard/react": "^2.8.11-alpha.1", "next": "12.2.4", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/with-ledger/pages/index.js b/examples/with-ledger/pages/index.js index c174e0126..a67ad5570 100644 --- a/examples/with-ledger/pages/index.js +++ b/examples/with-ledger/pages/index.js @@ -16,7 +16,6 @@ const buttonStyles = { fontFamily: 'inherit' } - const INFURA__KEY = 'cf540cb0b3b643d399e59aef4f5ac179' const ledger = ledgerModule() @@ -31,16 +30,10 @@ init({ rpcUrl: `https://mainnet.infura.io/v3/${INFURA__KEY}` }, { - id: '0x3', - token: 'tROP', - label: 'Ropsten', - rpcUrl: `https://ropsten.infura.io/v3/${INFURA__KEY}` - }, - { - id: '0x4', - token: 'rETH', - label: 'Rinkeby', - rpcUrl: `https://rinkeby.infura.io/v3/${INFURA__KEY}` + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' }, { id: '0x38', @@ -62,9 +55,9 @@ init({ } ], appMetadata: { - name: "Web3-Onboard Demo", + name: 'Web3-Onboard Demo', icon: 'My App Icon', - description: "A demo of Web3-Onboard with Ledger." + description: 'A demo of Web3-Onboard with Ledger.' }, accountCenter: { desktop: { @@ -75,8 +68,6 @@ init({ } }) - - export default function Home() { const [{ wallet, connecting }, connect, disconnect] = useConnectWallet() diff --git a/examples/with-nextjs-13/package.json b/examples/with-nextjs-13/package.json index 8a6219006..00a063903 100644 --- a/examples/with-nextjs-13/package.json +++ b/examples/with-nextjs-13/package.json @@ -29,7 +29,7 @@ "@web3-onboard/trezor": "^2.4.0", "@web3-onboard/trust": "^2.0.2", "@web3-onboard/walletconnect": "^2.3.6", - "@web3-onboard/react": "^2.8.0", + "@web3-onboard/react": "^2.8.11-alpha.1", "ethers": "^5.7.2", "next": "13.1.6", "react": "18.2.0", diff --git a/examples/with-nextjs/package.json b/examples/with-nextjs/package.json index c427a5938..fbef32e63 100644 --- a/examples/with-nextjs/package.json +++ b/examples/with-nextjs/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@web3-onboard/react": "2.6.7-alpha.3", + "@web3-onboard/react": "2.8.11-alpha.1", "next": "12.2.5", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/with-nextjs/pages/_app.js b/examples/with-nextjs/pages/_app.js index 3e48b2674..6f1824185 100644 --- a/examples/with-nextjs/pages/_app.js +++ b/examples/with-nextjs/pages/_app.js @@ -17,8 +17,14 @@ const polygonMainnet = { label: 'Polygon', rpcUrl: 'https://matic-mainnet.chainstacklabs.com' } +const baseMainnet = { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' +} -const chains = [ethereumRopsten, polygonMainnet] +const chains = [ethereumRopsten, polygonMainnet, baseMainnet] const wallets = [injectedModule()] const web3Onboard = init({ diff --git a/examples/with-sveltekit/package.json b/examples/with-sveltekit/package.json index f74a50464..b46608387 100644 --- a/examples/with-sveltekit/package.json +++ b/examples/with-sveltekit/package.json @@ -32,7 +32,7 @@ "type": "module", "dependencies": { "@fontsource/fira-mono": "^4.5.10", - "@web3-onboard/core": "^2.17.0", + "@web3-onboard/core": "^2.21.0", "@web3-onboard/injected-wallets": "^2.8.5", "@web3-onboard/walletconnect": "^2.3.6", "buffer": "^6.0.3" diff --git a/examples/with-sveltekit/src/lib/web3-onboard.ts b/examples/with-sveltekit/src/lib/web3-onboard.ts index 34f4ebd2c..5ce8d77bf 100644 --- a/examples/with-sveltekit/src/lib/web3-onboard.ts +++ b/examples/with-sveltekit/src/lib/web3-onboard.ts @@ -7,7 +7,7 @@ const injected = injectedWalletsModule() const walletConnect = walletConnectModule({ connectFirstChainId: true, qrcodeModalOptions: { - mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar'] + mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar'] } }) @@ -27,6 +27,12 @@ const chains = [ token: 'MATIC', label: 'Matic Mainnet', rpcUrl: 'https://matic-mainnet.chainstacklabs.com' + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] diff --git a/examples/with-vanilla-js/package.json b/examples/with-vanilla-js/package.json index 1651146ef..233518368 100644 --- a/examples/with-vanilla-js/package.json +++ b/examples/with-vanilla-js/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@web3-onboard/coinbase": "^2.2.2", - "@web3-onboard/core": "^2.17.0-alpha.2", + "@web3-onboard/core": "^2.21.0", "@web3-onboard/injected-wallets": "^2.8.4", "@web3-onboard/walletconnect": "^2.3.5" } diff --git a/examples/with-vanilla-js/src/onboard.js b/examples/with-vanilla-js/src/onboard.js index bf12f8ee2..9c7c4e030 100644 --- a/examples/with-vanilla-js/src/onboard.js +++ b/examples/with-vanilla-js/src/onboard.js @@ -21,6 +21,12 @@ const chains = [ token: 'MATIC', label: 'Matic Mainnet', rpcUrl: 'https://matic-mainnet.chainstacklabs.com' + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] diff --git a/examples/with-vite-react/package.json b/examples/with-vite-react/package.json index ac5f57bac..12f05a876 100644 --- a/examples/with-vite-react/package.json +++ b/examples/with-vite-react/package.json @@ -21,7 +21,7 @@ "@web3-onboard/mew": "^2.1.3", "@web3-onboard/mew-wallet": "^2.0.4", "@web3-onboard/portis": "^2.1.4", - "@web3-onboard/react": "^2.8.0", + "@web3-onboard/react": "^2.8.11-alpha.1", "@web3-onboard/sequence": "^2.0.5", "@web3-onboard/taho": "^2.0.5", "@web3-onboard/tallyho": "^2.0.1", diff --git a/examples/with-vite-react/src/web3-onboard.ts b/examples/with-vite-react/src/web3-onboard.ts index 84587cb82..328d01c4b 100644 --- a/examples/with-vite-react/src/web3-onboard.ts +++ b/examples/with-vite-react/src/web3-onboard.ts @@ -114,23 +114,17 @@ export default init({ // used for network requests rpcUrl: `https://mainnet.infura.io/v3/${INFURA_KEY}` }, - { - id: '0x3', - token: 'tROP', - label: 'Ethereum Ropsten Testnet', - rpcUrl: `https://ropsten.infura.io/v3/${INFURA_KEY}` - }, - { - id: '0x4', - token: 'rETH', - label: 'Ethereum Rinkeby Testnet', - rpcUrl: `https://rinkeby.infura.io/v3/${INFURA_KEY}` - }, { id: '0x89', token: 'MATIC', label: 'Matic Mainnet', rpcUrl: 'https://matic-mainnet.chainstacklabs.com' + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ], appMetadata: { diff --git a/examples/with-vuejs-v2/src/components/HelloWorld.vue b/examples/with-vuejs-v2/src/components/HelloWorld.vue index d343da149..9df2db142 100644 --- a/examples/with-vuejs-v2/src/components/HelloWorld.vue +++ b/examples/with-vuejs-v2/src/components/HelloWorld.vue @@ -43,6 +43,12 @@ const web3Onboard = init({ label: 'Ethereum Mainnet', rpcUrl, }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' + } ], }); diff --git a/package.json b/package.json index e70283f68..bd6941a9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "web3-onboard-monorepo", - "version": "2.24.6", + "version": "2.24.7", "private": true, "workspaces": { "packages": [ diff --git a/packages/arcana-auth/README.md b/packages/arcana-auth/README.md new file mode 100644 index 000000000..ad8e0ad86 --- /dev/null +++ b/packages/arcana-auth/README.md @@ -0,0 +1,36 @@ +# @web3-onboard/arcana-auth + +## Wallet module for connecting Arcana Wallet SDK to web3-onboard + +[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 [Arcana Wallet](https://docs.arcana.network/concepts/anwallet/index.html) support into Web3-Onboard's "Connect Wallet" modal. With this module, the Arcana wallet option will be shown for any app that integrates with the Arcana Auth SDK and uses it to onboard users. There is no need to download any browser extension. For more information on how to use the Arcana Wallet, please refer to the [Arcana Wallet User Guide](https://docs.arcana.network/user-guides/wallet-ui/index.html). Web3 app developers can refer to the [Arcana Wallet Developer Docs](https://docs.arcana.network/auth-quick-start.html) + +**Note** + +To ensure proper functionality of the embedded Arcana wallet in the Arcana Auth SDK, it may be necessary to disable certain other wallets that operate as browser extensions. + +### Install + +`npm install @web3-onboard/core @web3-onboard/arcana-auth` + +## Usage + +```typescript +import Onboard from '@web3-onboard/core' +import arcanaAuthModule from '@web3-onboard/arcana-auth' + +// initialize the module +const arcanaAuth = arcanaAuthModule({ + clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb' +}) + +const onboard = Onboard({ + // ... other Onboard options + wallets: [ + arcanaAuth, + //... other wallets + ] +}) + +const connectedWallets = await onboard.connectWallet() +console.log(connectedWallets) +``` diff --git a/packages/arcana-auth/package.json b/packages/arcana-auth/package.json new file mode 100644 index 000000000..d47cf60f3 --- /dev/null +++ b/packages/arcana-auth/package.json @@ -0,0 +1,22 @@ +{ + "name": "@web3-onboard/arcana-auth", + "version": "2.0.0", + "license": "MIT", + "description": "Arcana wallet is a built-in, secure Web3 wallet that users can access instantly when logging into an app integrated with the Arcana Auth SDK. It offers a customizable interface that can be branded to match the app's style. Users don't need to generate or manage cryptographic keys or remember passphrases. The wallet uses advanced distributed key generation, giving users full control over their wallets while onboarding Web3 apps using familiar Web2 authentication methods. It is user-friendly, secure, and puts users in control of their Web3 experience.", + "private": false, + "module": "dist/index.js", + "browser": "dist/index.js", + "main": "dist/index.js", + "scripts": { + "build": "tsc", + "dev": "tsc -w", + "type-check": "tsc --noEmit" + }, + "dependencies": { + "@arcana/auth": "^1.0.7", + "@web3-onboard/common": "2.3.3" + }, + "devDependencies": { + "typescript": "^5.1.6" + } +} diff --git a/packages/arcana-auth/src/icon.ts b/packages/arcana-auth/src/icon.ts new file mode 100644 index 000000000..b36ae647d --- /dev/null +++ b/packages/arcana-auth/src/icon.ts @@ -0,0 +1,38 @@ +export default "\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" + +"\n" diff --git a/packages/arcana-auth/src/index.ts b/packages/arcana-auth/src/index.ts new file mode 100644 index 000000000..57be577fd --- /dev/null +++ b/packages/arcana-auth/src/index.ts @@ -0,0 +1,31 @@ +import { createEIP1193Provider, WalletInit } from '@web3-onboard/common' +import icon from './icon.js' +import type { ConstructorParams } from '@arcana/auth/types' + +export default function (opts: { + clientID: string + params?: ConstructorParams +}): WalletInit { + return () => ({ + label: 'Arcana Auth', + async getIcon() { + return icon + }, + async getInterface() { + const { AuthProvider } = await import('@arcana/auth') + + const instance = new AuthProvider(opts.clientID, opts.params) + await instance.init() + return new Promise((resolve, reject) => { + // @ts-ignore + instance.provider.once('connect', () => { + resolve({ + provider: createEIP1193Provider(instance.provider), + instance + }) + }) + instance.connect().catch(reject) + }) + } + }) +} diff --git a/packages/arcana-auth/tsconfig.json b/packages/arcana-auth/tsconfig.json new file mode 100644 index 000000000..592d71e8f --- /dev/null +++ b/packages/arcana-auth/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"], + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + "declarationDir": "dist", + "paths": { + "*": ["./src/*", "./node_modules/*"] + }, + "typeRoots": ["node_modules/@types"], + "strict": false, + "allowSyntheticDefaultImports": true + } +} diff --git a/packages/core/README.md b/packages/core/README.md index 33c862f99..ee5e30996 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -253,7 +253,7 @@ type ConnectModalOptions = { */ removeWhereIsMyWalletWarning?: boolean /** - * Hide the "I don't have a wallet" link displayed + * Hide the "I don't have a wallet" link displayed * on the left panel of the connect modal */ removeIDontHaveAWalletInfoLink?: boolean @@ -578,6 +578,12 @@ const onboard = Onboard({ label: 'Goerli', rpcUrl: ETH_GOERLI_RPC }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' + }, { id: '0x38', token: 'BNB', @@ -865,6 +871,12 @@ const onboard = Onboard({ rpcUrl: `https://mainnet.infura.io/v3/${INFURA_KEY}` || `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}` + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) diff --git a/packages/core/package.json b/packages/core/package.json index 4b5336b32..3237e2e34 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.20.5", + "version": "2.21.0", "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index 66663bc73..a6a696c9f 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -125,6 +125,7 @@ export const chainIdToLabel: Record = { '0x45': 'Optimism Kovan', '0xa86a': 'Avalanche', '0xa4ec': 'Celo', + '0x2105': 'Base', '0x14a33': 'Base Goerli', '0x64': 'Gnosis', '0x63564C40': 'Harmony One', @@ -209,6 +210,10 @@ export const chainStyles: Record = { icon: arbitrumIcon, color: '#33394B' }, + '0x2105': { + icon: baseIcon, + color: '#0259F9' + }, '0x14a33': { icon: baseIcon, color: '#0259F9' diff --git a/packages/demo/package.json b/packages/demo/package.json index 2ece2d750..1346ea252 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -24,10 +24,11 @@ "webpack-dev-server": "4.7.4" }, "dependencies": { + "@web3-onboard/arcana-auth": "^2.0.0", "@web3-onboard/cede-store": "^2.1.0", "@web3-onboard/blocto": "2.0.0", "@web3-onboard/coinbase": "^2.2.5", - "@web3-onboard/core": "^2.20.5", + "@web3-onboard/core": "^2.21.0-alpha.1", "@web3-onboard/dcent": "^2.2.7", "@web3-onboard/enkrypt": "^2.0.3", "@web3-onboard/fortmatic": "^2.0.18", diff --git a/packages/demo/src/App.svelte b/packages/demo/src/App.svelte index ab804192d..1557da6cf 100644 --- a/packages/demo/src/App.svelte +++ b/packages/demo/src/App.svelte @@ -30,6 +30,7 @@ import frontierModule from '@web3-onboard/frontier' import bloctoModule from '@web3-onboard/blocto' import cedeStoreModule from '@web3-onboard/cede-store' + import arcanaAuthModule from '@web3-onboard/arcana-auth' import venlyModule from '@web3-onboard/venly' import { recoverAddress, @@ -41,7 +42,7 @@ import { share } from 'rxjs/operators' import VConsole from 'vconsole' import blocknativeIcon from './blocknative-icon.js' - import DappAuth from '@blocto/dappauth'; + import DappAuth from '@blocto/dappauth' if (window.innerWidth < 700) { new VConsole() @@ -131,6 +132,10 @@ 'DJuUOKvmNnlzy6ruVgeWYWIMKLRyYtjYa9Y10VCeJzWZcygDlrYLyXsBQjpJ2hxlBO9dnl8t9GmAC2qOP5vnIGo' }) + const arcanaAuth = arcanaAuthModule({ + clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb' + }) + const torus = torusModule() const infinityWallet = infinityWalletModule() const ledger = ledgerModule({ projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5' }) @@ -212,6 +217,7 @@ xdefi, frameWallet, cedeStore, + arcanaAuth, blocto, venly ], @@ -247,7 +253,7 @@ id: '0x5', token: 'ETH', label: 'Goerli', - rpcUrl: `https://goerli.infura.io/v3/${infura_key}` + rpcUrl: 'https://ethereum-goerli.publicnode.com' }, { id: '0x13881', @@ -255,6 +261,12 @@ label: 'Polygon - Mumbai', rpcUrl: 'https://matic-mumbai.chainstacklabs.com ' }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' + }, { id: '0x38', token: 'BNB', diff --git a/packages/injected/README.md b/packages/injected/README.md index f42e4bc92..9421054e0 100644 --- a/packages/injected/README.md +++ b/packages/injected/README.md @@ -20,6 +20,12 @@ const onboard = Onboard({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl: MAINNET_RPC_URL + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ], appMetadata: { diff --git a/packages/react/README.md b/packages/react/README.md index f4c8239f5..8a6a99b22 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -43,6 +43,12 @@ init({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) @@ -61,7 +67,10 @@ function App() { return (
-
@@ -72,6 +81,7 @@ export default App ``` ### Using the `Web3OnboardProvider` + You can use the context provider `Web3OnboardProvider` to better manage global state. Simply wrap the provider around your `App` and the initialized web3Onboard instance will be available in all children components. See example below. @@ -95,9 +105,9 @@ const web3Onboard = init({ wallets, chains, appMetadata: { - name: "Web3-Onboard Demo", + name: 'Web3-Onboard Demo', icon: 'App Icon', - description: "A demo of Web3-Onboard." + description: 'A demo of Web3-Onboard.' } }) @@ -165,6 +175,7 @@ const [ ``` + **`setPrimaryWallet`** The primary wallet (first in the list of connected wallets) and primary account (first in the list of connected accounts for a wallet) can be set by using the `setPrimaryWallet` function. The wallet that is set needs to be passed in for the first parameter and if you would like to set the primary account, the address of that account also needs to be passed in: @@ -174,10 +185,7 @@ setPrimaryWallet(wallets[1]) // set the second wallet in the wallets array as the primary wallet // as well as setting the third account in that wallet as the primary account -setPrimaryWallet( - wallets[1], - wallets[1].accounts[2].address -) +setPrimaryWallet(wallets[1], wallets[1].accounts[2].address) ``` ## `useSetChain` @@ -203,7 +211,7 @@ type SetChainOptions = { chainNamespace?: string wallet?: WalletState['label'], // if chain was instantiated without rpcUrl, include here. Used for network requests - rpcUrl?: string, + rpcUrl?: string, // if chain was instantiated without token, include here. Used for display, eg Ethereum Mainnet label?: string, // if chain was instantiated without label, include here. The native token symbol, eg ETH, BNB, MATIC diff --git a/packages/react/package.json b/packages/react/package.json index 1908440c1..07e0315c7 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/react", - "version": "2.8.10", + "version": "2.8.11", "description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -63,7 +63,7 @@ }, "dependencies": { "@web3-onboard/common": "^2.3.3", - "@web3-onboard/core": "^2.20.5", + "@web3-onboard/core": "^2.21.0", "use-sync-external-store": "1.0.0" }, "peerDependencies": { diff --git a/packages/vue/README.md b/packages/vue/README.md index 5d7528698..043966047 100644 --- a/packages/vue/README.md +++ b/packages/vue/README.md @@ -24,7 +24,9 @@ const injected = injectedModule() // Only one RPC endpoint required per chain const rpcAPIKey = '' || '' -const rpcUrl = `https://eth-mainnet.g.alchemy.com/v2/${rpcAPIKey}` || `https://mainnet.infura.io/v3/${rpcAPIKey}` +const rpcUrl = + `https://eth-mainnet.g.alchemy.com/v2/${rpcAPIKey}` || + `https://mainnet.infura.io/v3/${rpcAPIKey}` const web3Onboard = init({ wallets: [injected], @@ -34,6 +36,12 @@ const web3Onboard = init({ token: 'ETH', label: 'Ethereum Mainnet', rpcUrl + }, + { + id: '0x2105', + token: 'ETH', + label: 'Base', + rpcUrl: 'https://mainnet.base.org' } ] }) diff --git a/packages/vue/package.json b/packages/vue/package.json index 261fe05f9..d53dbf701 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/vue", - "version": "2.7.9", + "version": "2.7.10", "description": "A collection of Vue Composables for integrating Web3-Onboard in to a Vue or Nuxt project. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -63,7 +63,7 @@ "@vueuse/core": "^8.4.2", "@vueuse/rxjs": "^8.2.0", "@web3-onboard/common": "^2.3.3", - "@web3-onboard/core": "^2.20.5", + "@web3-onboard/core": "^2.21.0", "vue-demi": "^0.12.4" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 3c02c1c68..dbd942f83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -154,6 +154,15 @@ resolved "https://registry.yarnpkg.com/@apocentre/alias-sampling/-/alias-sampling-0.5.3.tgz#897ff181b48ad7b2bcb4ecf29400214888244f08" integrity sha512-7UDWIIF9hIeJqfKXkNIzkVandlwLf1FWTSdrb9iXvOP8oF544JRXQjCbiTmCv2c9n44n/FIWtehhBfNuAx2CZA== +"@arcana/auth@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@arcana/auth/-/auth-1.0.7.tgz#58ed216b3e7a9cbea4ce64ce638b56f8739003e0" + integrity sha512-QSbVntohr0iTRJ/+FHYulNAC1agooNJXJOotNTnR75hXUMy1w5DNluvxCpEwa0gToyaKWmjqw3zVW4D7UoWtRw== + dependencies: + "@metamask/safe-event-emitter" "^2.0.0" + eth-rpc-errors "^4.0.3" + penpal "^6.0.1" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -9939,6 +9948,11 @@ penpal@3.0.7: resolved "https://registry.yarnpkg.com/penpal/-/penpal-3.0.7.tgz#d252711ed93b30f1d867eb82342785b3a95f5f75" integrity sha512-WSXiq5HnEvzvY05SHhaXcsviUmCvh4Ze8AiIZzvmdzaaYAAx4rx8c6Xq6+MaVDG/Nfve3VmGD8HyRP3CkPvPbQ== +penpal@^6.0.1: + version "6.2.2" + resolved "https://registry.yarnpkg.com/penpal/-/penpal-6.2.2.tgz#20a0a0592881a959e8c87116d854f9528b1aa601" + integrity sha512-RQD7hTx14/LY7QoS3tQYO3/fzVtwvZI+JeS5udgsu7FPaEDjlvfK9HBcme9/ipzSPKnrxSgacI9PI7154W62YQ== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -12145,6 +12159,11 @@ typescript@^4.6.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@^5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" + integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== + uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0"