Add Leap to a Secret dapp

This is how you can add Connect to Leap on SCRT dapps

Adding Connect to Leap on your dapp should be fairly straightforward. You can either refer to the methods we have added below or use the docs made by the SCRT core team here : https://github.com/scrtlabs/secret.js#leap-cosmos-wallet

Suggest Adding SNIP-20 Tokens to Leap

The webpage can request the user permission to add a SNIP-20 token to Leap'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.

async suggestToken(chainId: string, contractAddress: string): Promise<void>

Get SNIP-20 Viewing Key

Returns the viewing key of a SNIP-20 token registered in Leap. If the SNIP-20 of the contract address doesn't exist, it will throw an error.

async getSecret20ViewingKey( chainId: string, contractAddress: string ): Promise<string>;

Update SNIP-20 Viewing Key

Updates the viewing key of a SNIP-20 token. If the SNIP-20 of the contract address exist, nothing will happen.

async updateViewingKey( chainId: string, contractAddress: string , viewingKey: string): Promise<void>;

We hope this information helps you integrate Leap into your SCRT Dapp. If you have any questions or need further assistance, please don't hesitate to reach out to us at support@leapwallet.io

Last updated