LogoLogo
  • Welcome!
  • The Protocol
    • Overview
    • Stakeholders
    • SecretTokens
    • Viewing Keys
    • Bridges
    • SEFI Token
    • CSHBK Token
    • Governance
  • User Guide
    • Swapping
    • Liquidity Providing
    • Tutorials
      • How to Buy SCRT in the U.S. Tutorial - Coinbase and Osmosis
      • Secret Ethereum Bridge (Video Tutorial)
      • Secret BSC Bridge (Video Tutorial)
      • Secret Monero Bridge (Video Tutorial) (1 of 4)
      • Secret Monero Bridge (Written Tutorial)
      • SecretSwap Full Length (Video Tutorial)
      • Trade & Earn Yield on SecretSwap (Written Tutorial)
      • Provide Liquidity on SecretSwap (Written Tutorial)
      • SEFI Governance (Written Tutorial)
    • Frequently Asked Questions
    • Glossary
  • Developer Guide
    • Create a New Pair
    • Factory
    • Query
    • Pair
  • Resources
    • Contract Addresses
Powered by GitBook
On this page
  1. The Protocol

Viewing Keys

Viewing Keys allow users to see balances of SecretTokens

PreviousSecretTokensNextBridges

Last updated 3 years ago

The encrypted nature of the secret smart contracts that power SecretTokens and SecretSwap means that the balances on your wallet are not visible by default, even to you. In order to see these balances, you need to create the corresponding viewing keys.

In the SecretSwap app, you can select a SecretToken from the drop-down and the app will check your wallet for a viewing key. If one is found, the app will show your balance, otherwise it will show a button showing "View Balance".

Clicking this button triggers the creation of a viewing key for that SecretToken for your wallet. will prompt you to approve this creation and submit the transaction.

This transaction needs a small amount of SCRT for network fees.

Once this transaction is completed, the SecretSwap app will show your balance for that SecretToken, even if zero. Each SecretToken you wish to hold in your wallet will need a viewing key created. These keys can be copied and then imported into Keplr if you switch your wallet to a different browser.

Adding Viewing Keys directly from Keplr

Clicking the 'Add Token' option from the menu will open the following dialogue box:

Paste the contract address in the 'Contract Address' field and Keplr wallet will auto-populate the remainder of the details. In this example, we're adding the viewing key for sWBTC. Click the 'Submit' button and you'll once again be asked to authorize gas usage.

Once you approve the gas usage, the Viewing Key will be added to your wallet and the balance of your added asset should now be showing on SecretSwap or showing as '0' if you have none of this asset. It's that simple!

Viewing Keys can also be added directly from your Keplr wallet. In order to do this, you'll first need the contract address of the token you're going to be adding. A list of contract addresses can be found here or on . Once you have the contract address for the token you'd like to add, open your Keplr wallet and click the button consisting of three lines in the top left corner. This will open the menu and reveal the following options:

Click 'Submit' when populated
Click 'Approve' to finalize
secretanalytics.xyz
Keplr
Select the 'Add Token' option from this menu