Adding a Nomos App

To be able to aggregate your application into our systems, follow this guide

First you must reach us, that way we can add your application to our APP dashboard, where we place every third party app that wants to extend their functionality to multisig wallets.

Modify your application

Just as normal EOA wallets, you need a provider that allows you to interact with the blockchain. Each wallet (keplr, cosmostation, leap, etc) has its own signer that will be passed to a CosmJs provider. This provider is normally used across your application to interact with smart contracts and native assets.

We created our own provider that implements the same functions as CosmJs and Archway SDK. This provider instead of sending functions to the blockchain, it sends them to our application (if your app is being rendered through an Iframe).

Nomos providers as wallet providers

You can treat our nomos providers just as any other wallet provider, your app will need to check if it's within an Iframe, and then it should use the nomos provider instead of any other provider you would normally use.

This provider will create a multisig proposal for any action that your application makes, so for example if the user swaps tokens on a DEX. The Nomos provider will convert this Swap into a Nomos proposal on the multisig that is being used. Then the users part of that multisig can approve that action and the swap will be executed by the shared wallet.

Example

You can initialize any of our Nomos providers the same as you would with the CosmWasm providers. If your application uses any of these two providers or another tool that wraps around them, you can integrate easily in our interface with the following:

const isIframe = window !== window.parent; //check if its an iframe
const client = isIframe
  ? await SigningNomosClient.connectWithSigner(network.rpc, offlineSigner) //use our provider
  : await SigningCosmWasmClient.connectWithSigner(network.rpc, offlineSigner); //use cosmos provider

We first check that we are on an iframe, that will mean that our application is inside the Nomos interface. Then we start the provider the same way we do it with the cosmwasm provider. Then any transaction made with the provider will be the same as with the conventional provider. Instead of sending transactions directly to the blockchain, the Nomos provider sends it to the parent window and our application transforms the message to be compatible with the multisig proposals.

//Send tokens example with our provider
await client.sendTokens(
  userAddress,
  receiverAddr,
  [{amount: amount.toString(), denom: "your_denom"}],
  "auto"
);

Last updated