SX.js
GitHub
Quick start
Installation
npm install @snapshot-labs/sx@betayarn add @snapshot-labs/sx@betabun add @snapshot-labs/sx@betaConfiguration
Clients
import { clients, evmSepolia } from '@snapshot-labs/sx';
const clientConfig = { networkConfig: evmSepolia }
const client = new clients.EthereumTx(clientConfig);
const ethSigClient = new clients.EthereumSig(clientConfig);import { clients } from '@snapshot-labs/sx';
import { Provider, constants } from 'starknet';
const ethUrl = 'https://rpc.snapshot.org/1';
const manaUrl = 'https://mana.pizza';
const starkProvider = new Provider({ sequencer: { network: constants.NetworkName.SN_GOERLI } });
const clientConfig = {
starkProvider,
manaUrl,
ethUrl
};
const client = new clients.StarkNetTx(clientConfig);
const starkSigClient = new clients.StarkNetSig(clientConfig);Usage
Cast a vote
Create a proposal
Update a proposal
Get voting power
Last updated
Was this helpful?
