# How to detect Keplr
Keplr API may be undefined right after the webpage shown. Please check the How to detect Keplr first before reading this section.
# Connecting with SecretJS
SecretJS link: https://www.npmjs.com/package/secretjs (opens new window) The basics of using SecretJS is similar to CosmJS. Refer to the Use with CosmJs section for more information.
One difference between CosmJS and SecretJS is that we recommend using Keplr's EnigmaUtils
.
By using Keplr's EnigmaUtils
, you can use Keplr to encrypt/decrypt, and the decrypted transaction messages are shown to the user in a human-readable format.
# Suggest Adding SNIP-20 Tokens to Keplr
The webpage can request the user permission to add a SNIP-20 token to Keplr's token list. Will throw an error if the user rejects the request.
If a SNIP-20 with the same contract address already exists, nothing will happen.
# Get SNIP-20 Viewing Key
Returns the viewing key of a SNIP-20 token registered in Keplr.
If the SNIP-20 of the contract address doesn't exist, it will throw an error.
# Interaction Options
You can use Keplr native API’s to set interaction options even when using SecretJS. Please refer to this section.