Get User Key from MetaMask Snap
nillion-user-key-manager
is an experimental MetaMask Snap for storing a Nillion user key locally in a snap with the MetaMask Flask browser extension.
- Install the MetaMask Flask browser extension
- Create a new test wallet in the MetaMask Flask browser extension
- Temporarily disable any other wallet browser extensions (Classic MetaMask, Rainbow Wallet, etc.) while using MetaMask Flask
- Visit the Nillion Key Management UI to generate a user key and store it locally in MetaMask Snaps - this saves your user key within MetaMask so it can be used by other Nillion web apps
- Use the following code to
getUserKeyFromSnap
. The user key is a parameter needed to instantiate a NillionClient.
packages/nextjs/utils/nillion/getUserKeyFromSnap.ts
loading...