๐Ÿ’ป Rho SDK

The Rho SDK provides abstractions to assist developers with interacting with Rho smart contracts in a Typescript/Javascript environment.

Installation

npm install @rholabs/rho-sdk

Getting Started

In browser (read only):

import RhoSDK from '@rholabs/rho-sdk';

const rhoSDK = new RhoSDK({ network: 'testnet' });

Node.js:

import RhoSDK from '@rholabs/rho-sdk';

const rhoSDK = new RhoSDK({
  network: 'testnet',
  privateKey: '<PRIVATE_KEY>'
})

Using with Metamask:

if (window.ethereum) {
      const provider = new ethers.BrowserProvider(window.ethereum)
      await provider.send("eth_requestAccounts", [])
      const signer = await provider.getSigner()

      const sdk = new RhoSDK({ network: 'testnet', signer })
      const markets = await sdk.getActiveMarkets()
}

Last updated