Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arcana Auth SDK support #1744

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ 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
build-blocto:
docker:
- image: cimg/node:16.13.1
Expand Down Expand Up @@ -637,6 +641,10 @@ 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
build-staging-blocto:
docker:
- image: cimg/node:16.13.1
Expand Down Expand Up @@ -881,6 +889,12 @@ 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:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,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)
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
},
"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",
Expand Down
5 changes: 5 additions & 0 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -119,6 +123,7 @@ const intiOnboard = async (theme) => {
wallets: [
injected,
walletConnect,
arcanaWallet,
coinbase,
ledger,
trezor,
Expand Down
15 changes: 8 additions & 7 deletions docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,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**

Expand Down
4 changes: 2 additions & 2 deletions docs/src/routes/docs/[...3]modules/[...1]core/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ If you would like to support all wallets, then you can install all of the wallet
<TabPanel value="yarn">

```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
```

</TabPanel>
<TabPanel value="npm">

```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
```

</TabPanel>
Expand Down
59 changes: 59 additions & 0 deletions docs/src/routes/docs/[...4]wallets/[...1]arcana/+page.md
Original file line number Diff line number Diff line change
@@ -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

<Tabs values={['yarn', 'npm']}>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/arcana-auth
```

</TabPanel>
<TabPanel value="npm">

```sh copy
npm install @web3-onboard/core @web3-onboard/arcana-auth
```

</TabPanel>
</Tabs>

## Usage

```typescript
import Onboard from '@web3-onboard/core'
import arcanaAuthModule from '@web3-onboard/arcana-auth'

// initialize the module
const arcanaAuth = arcanaAuthModule({
clientID: '<your client ID>'
})

const onboard = Onboard({
// ... other Onboard options
wallets: [
arcanaAuth,
//... other wallets
]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```
36 changes: 36 additions & 0 deletions packages/arcana-auth/README.md
Original file line number Diff line number Diff line change
@@ -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)
```
21 changes: 21 additions & 0 deletions packages/arcana-auth/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@web3-onboard/arcana-auth",
"version": "2.0.0-alpha.1",
"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.6"
},
"devDependencies": {
"typescript": "^5.1.6"
}
}
38 changes: 38 additions & 0 deletions packages/arcana-auth/src/icon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export default "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<svg fill=\"none\" viewBox=\"0 0 600 537\" xmlns=\"http://www.w3.org/2000/svg\">\n" +
"<path d=\"M600 0H0v537h600z\" fill=\"#fff\"/>\n" +
"<path d=\"M258.7 290.754a58.208 58.208 0 0 1-39.08 21.286 58.242 58.242 0 0 1-42.711-12.527 58.07 58.07 0 0 1-19.775-39.826 58.044 58.044 0 0 1 14.207-42.129l83.141-98.943a58.208 58.208 0 0 1 39.077-21.283 58.244 58.244 0 0 1 42.708 12.524 58.068 58.068 0 0 1 19.776 39.823 58.046 58.046 0 0 1-14.202 42.127L258.7 290.754Zm-61.001-15.984a26.47 26.47 0 0 0 19.412 5.694 26.457 26.457 0 0 0 17.762-9.673l83.131-98.922a26.39 26.39 0 0 0 6.455-19.147 26.401 26.401 0 0 0-8.986-18.102 26.476 26.476 0 0 0-19.412-5.692 26.459 26.459 0 0 0-17.762 9.671L195.163 237.5a26.381 26.381 0 0 0 2.536 37.27Z\" clip-rule=\"evenodd\" fill=\"#121212\" fill-rule=\"evenodd\"/>\n" +
"<g filter=\"url(#h)\">\n" +
"<path d=\"m273.27 232.49 32.715-38.904 11.549 9.913-32.7 38.901-11.564-9.91z\" fill=\"#848484\"/>\n" +
"</g>\n" +
"<g filter=\"url(#g)\">\n" +
"<path d=\"m214.8 179.43 31.861-35.615 12.31 5.687-31.846 35.61-12.325-5.682z\" fill=\"#848484\"/>\n" +
"</g>\n" +
"<path d=\"m340.07 290.34a56.96 56.96 0 0 0 38.937 21.71 57.003 57.003 0 0 0 22.654-2.144 56.954 56.954 0 0 0 20.004-10.834 56.82 56.82 0 0 0 20.204-39.704 56.818 56.818 0 0 0-14.646-42.067l-82.945-98.73a58.101 58.101 0 0 0-81.592-8.741 57.95 57.95 0 0 0-19.729 39.738 57.93 57.93 0 0 0 14.168 42.037l82.945 98.735zm60.858-15.95a26.404 26.404 0 0 1-37.087-3.971l-82.945-98.709a26.336 26.336 0 0 1 2.525-37.169 26.416 26.416 0 0 1 19.369-5.683 26.399 26.399 0 0 1 17.723 9.654l82.945 98.688a26.334 26.334 0 0 1 3.764 29.046 26.374 26.374 0 0 1-6.294 8.144z\" clip-rule=\"evenodd\" fill=\"#121212\" fill-rule=\"evenodd\"/>\n" +
"<g filter=\"url(#f)\">\n" +
"<path d=\"m350.39 134.31 25.535 35.155-13.966 1.988-25.538-35.145 13.969-1.998z\" fill=\"#848484\"/>\n" +
"</g>\n" +
"<path d=\"m322.1 165.54 22.228 23.209c30.57-42.637-4.144-90.359-40.401-91.6l-9.35 32.058c22-3.527 36.019 18.095 27.523 36.333z\" fill=\"url(#e)\"/>\n" +
"<path d=\"M72.483 440c-6.579 0-12.574-1.587-17.986-4.761-5.366-3.219-9.635-7.618-12.808-13.195-3.126-5.622-4.689-12.016-4.689-19.18 0-6.983 1.516-13.24 4.55-18.772 3.032-5.577 7.208-9.976 12.527-13.195 5.365-3.265 11.5-4.897 18.406-4.897 5.086 0 9.822.952 14.207 2.857 4.433 1.859 8.049 4.466 10.848 7.821v-8.502h21.486v69.648H97.538v-9.182c-3.266 3.672-7.022 6.484-11.268 8.433-4.245 1.95-8.841 2.925-13.787 2.925Zm6.369-17.752c3.732 0 7.045-.816 9.938-2.448 2.893-1.678 5.156-3.968 6.789-6.87s2.45-6.212 2.45-9.93c0-3.763-.84-7.074-2.52-9.93-1.633-2.902-3.896-5.169-6.79-6.802-2.845-1.677-6.135-2.516-9.867-2.516-3.686 0-6.976.839-9.868 2.516-2.893 1.633-5.18 3.9-6.859 6.802-1.68 2.902-2.52 6.212-2.52 9.93s.817 7.028 2.45 9.93a18.552 18.552 0 0 0 6.859 6.87c2.892 1.632 6.205 2.448 9.938 2.448ZM144.298 437.824v-69.648h21.486v9.999c2.659-3.9 5.902-6.893 9.728-8.978 3.872-2.131 8.025-3.197 12.457-3.197 2.52 0 5.133.363 7.839 1.088 2.706.726 4.969 1.655 6.788 2.789l-8.958 17.616c-1.586-1.043-3.452-1.859-5.599-2.449-2.099-.635-4.059-.952-5.879-.952-2.799 0-5.458.703-7.978 2.108-2.519 1.406-4.549 3.242-6.089 5.51-1.539 2.221-2.309 4.625-2.309 7.209v38.905h-21.486ZM247.261 440c-5.459 0-10.615-.952-15.467-2.857-4.806-1.904-9.052-4.534-12.738-7.889-3.686-3.401-6.578-7.323-8.678-11.767-2.1-4.489-3.149-9.295-3.149-14.419 0-4.942.98-9.635 2.939-14.079 2.006-4.444 4.806-8.389 8.398-11.835 3.64-3.446 7.886-6.166 12.738-8.161 4.899-1.995 10.195-2.993 15.887-2.993 4.619 0 9.051.635 13.297 1.904 4.293 1.27 7.745 2.902 10.358 4.897l-7.348 14.08c-3.5-2.494-7.839-3.741-13.018-3.741-4.432 0-8.188.952-11.268 2.856-3.079 1.905-5.435 4.376-7.068 7.414-1.587 3.038-2.38 6.235-2.38 9.59 0 3.673.863 7.028 2.59 10.066 1.726 2.993 4.152 5.373 7.278 7.142 3.173 1.768 6.836 2.652 10.988 2.652 2.566 0 4.969-.34 7.209-1.02 2.239-.68 4.129-1.587 5.669-2.721l7.348 14.08c-2.659 1.949-6.089 3.559-10.288 4.829-4.199 1.315-8.631 1.972-13.297 1.972ZM317.435 440c-6.578 0-12.574-1.587-17.986-4.761-5.366-3.219-9.635-7.618-12.808-13.195-3.126-5.622-4.689-12.016-4.689-19.18 0-6.983 1.517-13.24 4.549-18.772 3.033-5.577 7.209-9.976 12.528-13.195 5.366-3.265 11.501-4.897 18.406-4.897 5.086 0 9.822.952 14.208 2.857 4.432 1.859 8.048 4.466 10.847 7.821v-8.502h21.486v69.648H342.49v-9.182c-3.266 3.672-7.022 6.484-11.267 8.433-4.246 1.95-8.842 2.925-13.788 2.925Zm6.369-17.752c3.733 0 7.045-.816 9.938-2.448 2.893-1.678 5.156-3.968 6.789-6.87s2.449-6.212 2.449-9.93c0-3.763-.839-7.074-2.519-9.93-1.633-2.902-3.896-5.169-6.789-6.802-2.846-1.677-6.135-2.516-9.868-2.516-3.686 0-6.975.839-9.868 2.516-2.893 1.633-5.179 3.9-6.859 6.802-1.679 2.902-2.519 6.212-2.519 9.93s.816 7.028 2.449 9.93a18.553 18.553 0 0 0 6.859 6.87c2.893 1.632 6.205 2.448 9.938 2.448ZM389.25 437.824v-69.648h21.486v7.754c2.753-2.993 6.182-5.396 10.288-7.209 4.152-1.814 8.725-2.721 13.717-2.721 5.506 0 10.335 1.179 14.487 3.537 4.2 2.312 7.489 5.554 9.868 9.726 2.38 4.126 3.57 8.955 3.57 14.487v44.074H441.18v-39.653c0-4.988-1.353-8.865-4.059-11.631-2.66-2.811-6.322-4.216-10.988-4.216-3.173 0-5.926.634-8.258 1.904-2.287 1.224-4.06 2.925-5.319 5.101-1.214 2.131-1.82 4.557-1.82 7.278v41.217H389.25ZM516.459 440c-6.579 0-12.574-1.587-17.986-4.761-5.366-3.219-9.635-7.618-12.808-13.195-3.126-5.622-4.689-12.016-4.689-19.18 0-6.983 1.516-13.24 4.549-18.772 3.033-5.577 7.209-9.976 12.528-13.195 5.365-3.265 11.501-4.897 18.406-4.897 5.086 0 9.821.952 14.207 2.857 4.433 1.859 8.049 4.466 10.848 7.821v-8.502H563v69.648h-21.486v-9.182c-3.266 3.672-7.022 6.484-11.268 8.433-4.245 1.95-8.841 2.925-13.787 2.925Zm6.369-17.752c3.732 0 7.045-.816 9.938-2.448 2.893-1.678 5.156-3.968 6.789-6.87s2.449-6.212 2.449-9.93c0-3.763-.84-7.074-2.519-9.93-1.633-2.902-3.896-5.169-6.789-6.802-2.846-1.677-6.136-2.516-9.868-2.516-3.686 0-6.976.839-9.868 2.516-2.893 1.633-5.179 3.9-6.859 6.802-1.68 2.902-2.519 6.212-2.519 9.93s.816 7.028 2.449 9.93a18.553 18.553 0 0 0 6.859 6.87c2.893 1.632 6.205 2.448 9.938 2.448Z\" fill=\"#121212\"/>\n" +
"<defs>\n" +
"<filter id=\"h\" x=\"232.73\" y=\"153.05\" width=\"125.34\" height=\"129.89\" color-interpolation-filters=\"sRGB\" filterUnits=\"userSpaceOnUse\">\n" +
"<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n" +
"<feBlend in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"/>\n" +
"<feGaussianBlur result=\"effect1_foregroundBlur_666_173\" stdDeviation=\"20.27\"/>\n" +
"</filter>\n" +
"<filter id=\"g\" x=\"174.26\" y=\"103.27\" width=\"125.25\" height=\"122.38\" color-interpolation-filters=\"sRGB\" filterUnits=\"userSpaceOnUse\">\n" +
"<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n" +
"<feBlend in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"/>\n" +
"<feGaussianBlur result=\"effect1_foregroundBlur_666_173\" stdDeviation=\"20.27\"/>\n" +
"</filter>\n" +
"<filter id=\"f\" x=\"295.88\" y=\"93.774\" width=\"120.58\" height=\"118.22\" color-interpolation-filters=\"sRGB\" filterUnits=\"userSpaceOnUse\">\n" +
"<feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n" +
"<feBlend in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"/>\n" +
"<feGaussianBlur result=\"effect1_foregroundBlur_666_173\" stdDeviation=\"20.27\"/>\n" +
"</filter>\n" +
"<linearGradient id=\"e\" x1=\"317.47\" x2=\"337.03\" y1=\"113.89\" y2=\"186.18\" gradientUnits=\"userSpaceOnUse\">\n" +
"<stop stop-color=\"#121212\" offset=\"0\"/>\n" +
"<stop stop-color=\"#171717\" offset=\"1\"/>\n" +
"</linearGradient>\n" +
"</defs>\n" +
"</svg>\n"
30 changes: 30 additions & 0 deletions packages/arcana-auth/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { createEIP1193Provider, WalletInit } from '@web3-onboard/common'
import icon from './icon'
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) => {
instance.provider.once('connect', () => {
resolve({
provider: createEIP1193Provider(instance.provider),
instance
})
})
instance.connect().catch(reject)
})
}
})
}
15 changes: 15 additions & 0 deletions packages/arcana-auth/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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
}
}
1 change: 1 addition & 0 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"webpack-dev-server": "4.7.4"
},
"dependencies": {
"@web3-onboard/arcana-auth": "^2.0.0-alpha.1",
"@web3-onboard/cede-store": "^2.1.0",
"@web3-onboard/blocto": "2.0.0",
"@web3-onboard/coinbase": "^2.2.5",
Expand Down
Loading
Loading