Spend more time building for your users, less on wallet integration

How much time did you spend integrating wallets to your dapp?

Did you build your own internal wallet to fix the problem of users having different principals when they sign in?

Do you want one package that handles wallet sign in, global wallet addresses for on-chain wallets like NFID Wallet, and transaction approvals without caring which wallet the user is connected with?

Then you should npm install NFID IdentityKit.

  • Conforms to all the new ICRC wallet standards
  • Currently supports NFID Wallet (with Plug, Internet Identity, and Stoic coming next week… Oisy next month)
  • One “Connect wallet” button for your users
  • Support for global addresses/principals from on-chain wallets

Join the Discord for support!

21 Likes

Thank you Dan for your dedication in building this product and all the time and effort it took. Will be an invaluable resource to builders and users on the IC

3 Likes

Version 0.0.0-alpha.7 released with support for:

  • NFID Wallet (and its global principal wallet address)
  • Internet Identity
  • Plug
  • Stoic

Check out the demo:
https://demo.identitykit.xyz

3 Likes

Version 0.0.0-alpha.11 released:

  • Simple hooks for 3 types of transaction execution with delegations
  • More UI customization options
  • Added signerClientOptions
  • fetchIcpBalance hook for the connected address
1 Like

TLDR on building dapps that need to execute 3 types of transactions (assuming user connected with a delegated identity / delegation):

  1. Executing transactions for which you don’t need the user to call themselves
  1. When a user connects with their wallet address
  1. When a user connects with an anonymous address
1 Like

Thank you so much for your work!

I was testing your demo on mobile (iOS Safari) and noticed that it does not work.

NFID works, all the other methods don’t :frowning:

The biggest barrier for icp adoption so far is that halve of the apps can not be accessed from mobile in my experience.

Do you plan to enable mobile browsers support in the future? :pray:

Do you have a website you could share publicly for us to take a look on?

I would say the primary difficulty so far has been buggy implementations by other signers, but I’d like to take a look at your app to verify.

Is the https://demo.identitykit.xyz/ updated with this? I’m still not getting plug to work.

Plug has standards implementation bugs that they just this week started fixing. They haven’t yet provided an ETA but we’ve sent them quite detailed instructions so I hope next week!

EDIT: They just responded to me that the fixes are in dev and ready for deploy tomorrow!

1 Like

Great thread! This is definitely something devs need to pay much more focused attention towards.

2 Likes

Thank you! This was a major collaboration between the DFINITY foundation, Internet Identity developers, ICP community members, and ourselves. We’re very much looking forward to seeing what devs build now that signer/wallet interactions have been standardized.

Plug update: they said they have 1 fix left.

4 Likes

https://demo.identitykit.xyz/

it’s on your demo website

I just tested the connection with Internet Identity on this demo page. I can confirm that there is an error displayed after establishing the connection:

  • Not supported

didn’t check the other login options.

update:

  • switching to the tab “Delegation” works and thus it is the correct behavior for Internet Identity. maybe the displayed error should include more details and a small explainer.

I suppose error handling could be improved in IdentityKit by catching certain JsonRPC error codes (2000 in this case) and wrapping it in error instances that link to IdentityKit documentation that e.g. explains the supported standards method.

1 Like

@marc0olo @CodingFu it’s true that Internet Identity doesn’t support icrc27_accounts, only delegations. We’ll implement something to make that more clear - thank you for that suggestion @sea-snake !

1 Like

IdentityKit v0.0.3 released:

  • Advanced Options in docs (exposing agent.js options)
  • Targets removed from II/Stoic (slide-computer dependency)
  • Next.js support without disabling ssr
  • Fixed infinite loader on first connect attempt via nfidw
  • Fixed II popup window blocked by safari
  • Added useIdentityKit() hooks: isInitializing, isUserConnecting
  • Manual connect will now throw errors when trying to connect when already connected or IdentityKit is initializing (NFID IdentityKit Docs - useIdentityKit)
1 Like

can you maybe also expose in the demo UI which version of IdentityKit it uses?

I can’t believe it’s not already there :rofl:

Yes of course, great suggestion, thank you and will do!

1 Like

Plug update: they said they’d have this build with bugs fixed out today.

Cc @skilesare

It’s available now :pray:

2 Likes