npm i @yfi/sdk
To use the SDK, you will need to instantiate a Yearn object with your desired configuration;
import { Yearn } from "@yfi/sdk";
import { JsonRpcProvider } from "@ethersproject/providers";
// Ethereum mainnet
const chainId = 1;
// It is recommended to use Alchemy for your Web3 provider when using the Yearn SDK.
const rpcUrl = "https://eth-mainnet.alchemyapi.io/v2/secret-id-here";
const yearn = new Yearn(chainId, {
provider: new JsonRpcProvider(rpcUrl)
});
Autogenerated documentation can be found here.
yarn lint
). Commit messages follow Conventional Commits.npm login
yarn build
np
and follow the instructionsyarn build
yalc publish
yalc add @yfi/sdk
yarn install
yarn start
Generated using TypeDoc