Sei Dapp Integration

Welcome to Ramper Wallet Extension Developer Guide. This documentation contains guides for developers to get started developing on Ramper Wallet Extension.โ€Œ

To detect Ramper Wallet Extension with Cosmos Base Chain

To detect whether your browser is running Ramper Extension, please use:

if (window.ramper2) {
  console.log('Ramper Extension is installed!');
}

To connect Ramper Wallet Extension

To connect Ramper Wallet Extension means to access the user's [blockchain - like Cosmos] account(s).

// Connect only
window.ramper2.cosmos.enable(chainId: string);
// Connect & get accounts
window.ramper2.cosmos.getKey(chainId: string);

Currently, chains support: ['atlantic-2','pacific-1']

To disconnect the Ramper Wallet Extension

To disconnect Ramper Extension, please use:

window.ramper2.cosmos.disconnect();

To experience functions

Once your account is connected, let's start experiencing more functions.โ€Œ

Get Current Account

If the webpage has permission and Ramper wallet is unlocked, this function will return the address and public key in the following format:

Sign Amino:

Like signAmino method of CosmJS OfflineDirectSigner, however, Ramperโ€™s signAmino function takes the chain-id as a required parameter. Signs Proto-encoded StdSignDoc.

Sign Direct:

Like signDirect method of CosmJS OfflineDirectSigner, however, Ramperโ€™s signDirect function takes the chain-id as a required parameter. Signs Proto-encoded StdSignDoc.

Sign Arbitrary:

Delegate Transaction broadcasting:

To handle events

List of events

Currently, we only support some action events from the wallet extension

Events

Trigger

accountsChanged

Receive when active account changed in Extension

cosmosChanged

Receive when active chain changed in Extension

Method

Description

Method

Description

on(event, callback)

Add event listener

off(event, callback)

Remove event listener

Last updated