Skip to content

Commit

Permalink
updated version and usage.md
Browse files Browse the repository at this point in the history
  • Loading branch information
makylfang committed May 27, 2024
1 parent 8a685a0 commit 809d1bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arcana/auth-wagmi",
"version": "3.0.0-beta.4",
"version": "3.0.0",
"description": "Wagmi connector for Arcana Auth",
"author": "makylfang",
"license": "MIT",
Expand Down
54 changes: 11 additions & 43 deletions usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ For wagmi < 1.0.0 use `@arcana/[email protected]`

For wagmi >= 1.0.0, use `@arcana/[email protected]`

For wagmi >= 2.0.0, use `@arcana/[email protected]`

## Install

```sh
Expand All @@ -18,11 +20,9 @@ With plug n play connect modal
import { ArcanaConnector } from "@arcana/auth-wagmi"
import { AuthProvider } from "@arcana/auth"

const auth = new AuthProvider(`${arcana_client_id}`) // Singleton
const connector = new ArcanaConnector({
options: {
auth,
}
const auth = new AuthProvider(`${arcana_client_id}`)
const connector = ArcanaConnector({
auth,
})
```

Expand All @@ -32,45 +32,13 @@ With custom UI
import { ArcanaConnector } from "@arcana/auth-wagmi"
import { AuthProvider } from "@arcana/auth"

const auth = new AuthProvider(`${arcana_client_id}`) // Singleton
const connector = new ArcanaConnector({
options: {
auth,
// specify here or in setLogin function as shown below
login: {
provider: "google"
// email: '[email protected]' // if provider is `passwordless`
}
}
})

// OR

connector.setLogin({
provider: "google"
// email: '[email protected]' // if provider is `passwordless`
})
```

## Configuration

## Add Chains

Configure the chains that will show up in the Arcana wallet within your app's context. In the example below, the chains configured are: Optimism, Polygon and Ethereum Mainnet.

```ts
import { mainnet, optimism, polygon } from '@wagmi/core/chains'
import { ArcanaConnector } from "@arcana/auth-wagmi"
import { AuthProvider } from "@arcana/auth"

const auth = new AuthProvider(`${arcana_client_id}`)

const connector = new ArcanaConnector({
chains: [mainnet, optimism, polygon],
options: {
auth,
},
const connector = ArcanaConnector({
auth,
loginType: {
provider: "google"
}
})
```

For more details on connectors and integrating your app with Wagmi, see [Wagmi documentation](https://wagmi.sh/core/getting-started).
For more details on connectors and integrating your app with Wagmi, see [Wagmi documentation](https://wagmi.sh/react/getting-started).

0 comments on commit 809d1bd

Please sign in to comment.