Quick Start
Installation
yarn add @charged-particles/sdk
npm install @charged-particles/sdkGetting started
// Node
import Charged from '@charged-particles/sdk'
// Creating a signer. This is optional, used for making transactions.
const wallet = ethers.wallet.fromMnemonic(seedPhrase);
// Multiple providers array
const mySpecialProviders = [
{
network: 1,
service: {
'alchemy': 'apiKey',
},
},
{
network: 42,
service: {
'rpcUrl': '<https://eth-kovan.alchemyapi.io/v2/><key>'
}
}
];
const charged = new Charged({providers: mySpecialProviders, signer: wallet});
// Ethers
const ethersProvider = ethers.getDefaultProvider();
const charged = new Charged({providers: ethersProvider, signer: wallet});
// Web3
var web3 = new Web3('<http://localhost:8545>');
const charged = new Charged({providers: ethersProvider, signer: wallet});Configuration
Interacting with the protocol
Utilities
Last updated