TUTORIAL
How to Create Viewing Keys to Access Your Secret Tokens
One of the best things about Secret Tokens is that you get to decide who can see your funds, as viewing access is gated using viewing keys.
Here, we’ll show you step-by-step how to create Secret Token viewing keys using a variety of methods.
The viewing key generation methods we’ll cover:
- The SiennaSwap app
- The IBC wrap app (for IBC tokens)
- Manually add with the Keplr extension token list
What are Secret Tokens and viewing keys?
Secret Tokens are coins or tokens made private by encrypting balance and transaction details. Viewing keys act like passwords that give you, and others you share these with, the ability to access these encrypted details.
This means only people with the proper viewing key can see the Secret Tokens you hold and access details of your transactions.
METHOD 1
Creating viewing keys with the SiennaSwap app
SiennaSwap is one of the Secret DeFi apps you can use to create Secret Token viewing keys. Here are the steps to take:
- Navigate to the SiennaSwap app and approve connecting your Keplr wallet
- Select the Secret Token you’d like to get a viewing key for by clicking on the “token picker” and choosing your coin or token of choice
- Click on “View Balance” in the swap menu
- Click on “Create Key” in the notification that appears
After clicking on “View Balance”, you’ll have to approve a series of pop-ups that will add the Secret Token to your Keplr wallet:
- The first screen shows the smart contract address of the Secret Token you’re connecting with—click “Submit”
- The second screen asks you to pay gas fees—click “Approve”
If all went well, you should’ve created a viewing key for your Secret Token! With this viewing key, you can access your Secret Token balance in the Secret Network tab of your Keplr extension wallet and in the SiennaSwap user interface.
METHOD 2
Creating viewing keys with the IBC wrap app (for IBC tokens)
You can also use the Secret IBC Bridge interface to create a Secret Token viewing key:
- Navigate to the Secret IBC Portal
- Connect your Keplr wallet by clicking on “Connect wallet” in the top right corner
- Click on the lil’ “thinking face” emoji (you’ll see “Set viewing key” when you hover over it)
- Click “Submit” in the pop-up window that appears and “Approve” the transaction
METHOD 3
Manually add viewing keys with the Keplr extension Token list
You can also create Secret Token viewing keys by connecting your Keplr wallet to the smart contract of the Secret Token you’re trying to add without needing to use any external apps. This is similar to how you’d add ERC-20 tokens to your MetaMask wallet.
Here are the steps to do so:
STEP 1
Find the smart contract address of the Secret Token you’d like a viewing key for
- Head over to the Secret Analytics website
- Click on the SNIP tab in the left-side menu
- Scroll down until you see the list of Secret Tokens
- Copy the “Contract Address” displayed next to the Secret Token you’d like to create a viewing key for
STEP 2
Add the Secret Token to your Keplr wallet
Now it’s time to go to your Keplr wallet extension and create the viewing key for this Secret Token:
- Open your Keplr wallet extension and click on the menu in the left-hand corner
- Select “Add Token”
- Paste the contract address you copied into the “Contract Address” field and click “Submit”
- You’ll need to pay some gas fees to complete this action — click “Approve” on the next screen
Congratulations! You’ve now successfully created a viewing key for your Secret Token. You can access your Secret Token balance in the Secret Network tab of your Keplr wallet extension.
That’s it! Now you know several ways to create viewing keys for your Secret Tokens, allowing you and select others to view your funds.