Skip to content
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
2 changes: 1 addition & 1 deletion docs/pages/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ Currently known support for the icrc34_delegation standard:
| ----------------- | ------------------------- |
| NFID Wallet | Yes |
| Plug | Yes |
| Oisy | No |
| OISY | No |
| Internet Identity | Yes |
| Stoic | Yes |
47 changes: 41 additions & 6 deletions docs/pages/getting-started/signers-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,62 @@ authors:
- name: "Dan Ostrovsky"
---

import { Callout } from "nextra/components"

# Customizing the list of wallets you support

By default, IdentityKit's `signers` is set to the order in which wallets adopted ICP wallet
standards.

1. NFID Wallet
2. Plug Wallet
3. Internet Identity
4. OISY Wallet

```jsx
import { IdentityKitProvider } from "@nfid/identitykit/react"

export const App = () => (
<IdentityKitProvider>
<YourApp />
</IdentityKitProvider>
)
```

To reorder your wallets list or to change default list, just add
`signers={[your_signers]}{:typescript}` as a prop in your IdentityKitProvider:

```jsx
import { IdentityKitProvider } from "@nfid/identitykit/react"
import { NFIDW, Plug, InternetIdentity, Stoic, OISY } from "@nfid/identitykit"

export const App = () => (
<IdentityKitProvider signers={[NFIDW, Plug, InternetIdentity, Stoic, OISY]}>
<YourApp />
</IdentityKitProvider>
)
```

- NFID Wallet (signerName: NFIDW)
- Plug Wallet (signerName: Plug)
- Internet Identity (signerName: InternetIdentity)
- PrimeVault (signerName: PrimeVault)
- Stoic (signerName: Stoic)
- _Coming soon:_ Oisy Wallet (signerName: Oisy)
- OISY Wallet (signerName: OISY)

<Callout type="info" emoji="ℹ️">
Note: By default, IdentityKit will automatically attempt to discover installed signer extensions
that have implemented the [ICRC-94
standard](https://github.com/dfinity/wg-identity-authentication/blob/main/topics/icrc_94_multi_injected_provider_discovery.md)
and will add the detected ones to the signers list (for example, PrimeVault)
</Callout>

To reorder your wallets list or to change default list, just add `signers={[your_signers]}{:jsx}` as
a prop in your IdentityKitProvider:
To disable automatic extension signers discovery set `discoverExtensionSigners` to `false:{jsx}`:

```jsx
import { IdentityKitProvider } from "@nfid/identitykit/react"
import { NFIDW, Plug, InternetIdentity, Stoic } from "@nfid/identitykit"

export const App = () => (
<IdentityKitProvider signers={[NFIDW, Plug, InternetIdentity, Stoic]} {...etc}>
<IdentityKitProvider discoverExtensionSigners={false}>
<YourApp />
</IdentityKitProvider>
)
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guides/authenticating-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ Currently known support for the icrc27_accounts standard:
| ----------------- | ----------------------- |
| NFID Wallet | Yes |
| Plug | Yes |
| Oisy | Yes |
| OISY | Yes |
| Internet Identity | No |
| Stoic | No |
2 changes: 1 addition & 1 deletion docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "The complete guide to NFID IdentityKit"

## Package status

![Static Badge](https://img.shields.io/badge/version-1.0.9-blue)
![Static Badge](https://img.shields.io/badge/version-1.0.10-blue)

![Static Badge](https://img.shields.io/badge/build-passing-brightgreen)

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/miscellaneous/local-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors:
Because signatures generated from ICP mainnet do not work in local development, executing calls to
locally running canisters requires wallet signatures to come from locally installed wallets.

One option is to install the NFID Wallet, Internet Identity, and Oisy canisters locally. Another
One option is to install the NFID Wallet, Internet Identity, and OISY canisters locally. Another
option is to use a simple wallet for development purposes and toggle production wallets on when
deploying to mainnet.

Expand Down
4 changes: 2 additions & 2 deletions docs/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const theme = {
light: 38,
},
banner: {
key: "1.0.9-release",
key: "1.0.10-release",
content: (
<a href="https://www.npmjs.com/package/@nfid/identitykit" target="_blank">
🎉 @nfid/identitykit@1.0.9 is released.
🎉 @nfid/identitykit@1.0.10 is released.
</a>
),
},
Expand Down
2 changes: 1 addition & 1 deletion examples/react-dapp/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const environment = import.meta.env.VITE_ENVIRONMENT
function App() {
const { resolvedTheme } = useTheme()
const nfidw: IdentityKitSignerConfig = { ...NFIDW, providerUrl: nfidSignerProviderUrl }
const signers = [nfidw, Plug, InternetIdentity, Stoic, OISY].concat(
const signers = [nfidw, Plug, InternetIdentity, OISY, Stoic].concat(
environment === "dev"
? [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/react-dapp/src/ui/molecules/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Header = () => {
href="https://www.npmjs.com/package/@nfid/identitykit"
className="absolute text-[10px] text-primary dark:text-teal-500 text-right right-0 bottom-0 mb-[-10px] me-[-10px]"
>
v1.0.9
v1.0.10
</a>
</div>
<div className="flex items-center space-x-2 sm:space-x-4">
Expand Down
2 changes: 1 addition & 1 deletion examples/react-demo/src/app-in-identitykit-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ConnectFailureError: Record<string, string> = {
}

const nfidw: IdentityKitSignerConfig = { ...NFIDW, providerUrl: nfidSignerProviderUrl }
const signers = [nfidw, Plug, InternetIdentity, Stoic, OISY].concat(
const signers = [nfidw, Plug, InternetIdentity, OISY, Stoic].concat(
environment === "dev"
? [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/react-demo/src/ui/molecules/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Header = () => {
href="https://www.npmjs.com/package/@nfid/identitykit"
className="absolute text-[10px] text-primary dark:text-teal-500 text-right right-0 bottom-0 mb-[-10px] me-[-10px]"
>
v1.0.9
v1.0.10
</a>
</div>
<div className="flex items-center space-x-2 sm:space-x-4">
Expand Down
2 changes: 1 addition & 1 deletion packages/identitykit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nfid/identitykit",
"version": "1.0.9",
"version": "1.0.10",
"description": "A React library for adding wallet connections to dApps.",
"keywords": [
"ICP",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function Copied(props: React.SVGProps<SVGSVGElement>) {
strokeLinecap="round"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M18.0131 13.4522V13.6147C18.0132 14.4022 18.0132 15.0818 17.94 15.6262C17.8615 16.2101 17.6843 16.7714 17.2288 17.2269C16.7734 17.6823 16.2121 17.8595 15.6282 17.938C15.0837 18.0112 14.4041 18.0112 13.6167 18.0112H11.7207C10.9332 18.0112 10.2536 18.0112 9.70915 17.938C9.12524 17.8595 8.56397 17.6823 8.10853 17.2269C7.65308 16.7714 7.47584 16.2101 7.39734 15.6262C7.32414 15.0818 7.32418 14.4022 7.32422 13.6147L7.32422 13.5556V11.7778L7.32422 11.7187C7.32418 10.9312 7.32414 10.2516 7.39734 9.7072C7.47584 9.12328 7.65308 8.56201 8.10853 8.10657C8.56397 7.65113 9.12524 7.47389 9.70915 7.39538C10.2536 7.32218 10.9332 7.32222 11.7207 7.32227L11.7798 7.32227H13.5576L13.6167 7.32227C14.3298 7.32223 14.9545 7.32219 15.4705 7.37656L13.7581 9.12233C13.6932 9.12228 13.6263 9.12227 13.5576 9.12227H11.7798C10.9163 9.12227 10.3592 9.12418 9.949 9.17933C9.56468 9.231 9.44658 9.31411 9.38132 9.37936C9.31606 9.44462 9.23295 9.56273 9.18129 9.94704C9.12613 10.3572 9.12422 10.9143 9.12422 11.7778V13.5556C9.12422 14.4191 9.12613 14.9762 9.18129 15.3864C9.23295 15.7707 9.31606 15.8888 9.38132 15.9541C9.44658 16.0193 9.56468 16.1024 9.949 16.1541C10.3592 16.2092 10.9163 16.2112 11.7798 16.2112H13.5576C14.4211 16.2112 14.9781 16.2092 15.3883 16.1541C15.7727 16.1024 15.8908 16.0193 15.956 15.9541C16.0213 15.8888 16.1044 15.7707 16.1561 15.3864C16.1569 15.3799 16.1578 15.3733 16.1586 15.3668L16.3425 15.1756L17.3496 14.1286L18.0131 13.4522Z"
fill={colors.green[500]}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
NFIDW,
Plug,
InternetIdentity,
Stoic,
OISY,
} from "../../../../lib"
import { useCreateIdentityKit, useCreatePromise, useProceedSigner } from "../../hooks"
import { validateUrl } from "../../utils"
Expand Down Expand Up @@ -65,7 +65,7 @@ export const Provider = <T extends IdentityKitAuthType>({
const { signers, featuredSigner } = useMemo(() => {
const signersList =
!props.signers || !props.signers.length
? [NFIDW, Plug, InternetIdentity, Stoic]
? [NFIDW, Plug, InternetIdentity, OISY]
: props.signers

const selectedFeaturedSigner =
Expand Down