The Rho SDK provides abstractions to assist developers with interacting with Rho smart contracts in a Typescript/Javascript environment.
npm install @rholabs/rho-sdk
import RhoSDK from '@rholabs/rho-sdk';
const rhoSDK = new RhoSDK({ network: 'testnet' });
import RhoSDK from '@rholabs/rho-sdk';
const rhoSDK = new RhoSDK({
network: 'testnet',
privateKey: '<PRIVATE_KEY>'
})
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()
}