Fireblocks Web3 Provider
Fireblocks EIP-1193 Compatible Ethereum JavaScript Provider
Installation
npm install @fireblocks/fireblocks-web3-provider
Setup
import { FireblocksWeb3Provider, ChainId } from "@fireblocks/fireblocks-web3-provider";
const eip1193Provider = new FireblocksWeb3Provider({
privateKey: process.env.FIREBLOCKS_API_PRIVATE_KEY_PATH,
apiKey: process.env.FIREBLOCKS_API_KEY,
vaultAccountIds: process.env.FIREBLOCKS_VAULT_ACCOUNT_IDS,
chainId: ChainId.GOERLI,
})
Usage with ethers.js
import * as ethers from "ethers"
const provider = new ethers.providers.Web3Provider(eip1193Provider);
Usage with web3.js
import Web3 from "web3";
const web3 = new Web3(eip1193Provider);
API Documentation
new FireblocksWeb3Provider(config)
This class is an EIP-1193 Compatible Ethereum JavaScript Provider powered by the Fireblocks API
FireblocksProviderConfig
export type FireblocksProviderConfig = {
apiKey: string,
privateKey: string,
chainId?: ChainId,
rpcUrl?: string,
vaultAccountIds?: number | number[] | string | string[],
fallbackFeeLevel?: FeeLevel,
note?: string,
pollingInterval?: number,
oneTimeAddressesEnabled?: boolean,
externalTxId?: (() => string) | string,
}