Initialization
TypeScript SDK
import { Contract, providers, utils, Wallet } from "ethers";
import { CoreSDK, getEnvConfigById } from "@bosonprotocol/core-sdk";
import { EthersAdapter } from "@bosonprotocol/ethers-sdk";
const envName = "testing"; // amoy testnet
const configId = "testing-80002-0";
const defaultConfig = getEnvConfigById(envName, configId);
const ethereumProvider = new providers.JsonRpcProvider(
"https://yourEthereumRPCProvider"
);
const signerWallet = Wallet.createRandom(ethereumProvider);
const coreSDK = CoreSDK.fromDefaultConfig({
envName,
configId,
web3Lib: new EthersAdapter(provider, signerWallet),
});envName
configId
Last updated