Cosmos Snap Provider
Installation
npm install @leapwallet/cosmos-snap-provideror
yarn add @leapwallet/cosmos-snap-providerMethods
cosmjsOfflineSigner
import { SigningStargateClient } from '@cosmjs/cosmwasm-stargate';
import { GasPrice } from '@cosmjs/stargate';
import { cosmjsOfflineSigner } from '@leapwallet/cosmos-snap-provider';
const offlineSigner = new cosmjsOfflineSigner(chainId);
const accounts = await offlineSigner.getAccounts();
const rpcUrl = ""; // Populate with an RPC URL corresponding to the given chainId
const stargateClient = await SigningStargateClient.connectWithSigner(
rpcUrl,
offlineSigner,
{
gasPrice: GasPrice.fromString("0.0025ujuno"),
}
);getSnap
connectSnap
getKey
SuggestChain
Last updated