Web3.js libraries are being sunset on March 4th, 2025. For migration guides and more details please refer to Chainsafe blog
Web3.js plugin for Starknet developers.
This plugin exposes the following RPC methods (type definitions can be found in src/types.ts):
public async call(
transaction: CallRequest,
blockNumber: BlockNumberOrTag
): Promise<HexString[]>
public async estimateFee(
request: EstimateFeeRequest["request"],
blockNumber: BlockNumberOrTag,
simulationFlags?: EstimateFeeRequest["simulation_flags"]
): Promise<EstimateFeeResponse[]>
public async estimateMessageFee(
message: MsgFromL1,
blockNumber: BlockNumberOrTag
): Promise<EstimateFeeResponse>
public async getNonce(
address: HexString,
blockNumber: BlockNumberOrTag
): Promise<HexString>
public async getTransactionByBlockIdAndIndex(
index: number,
blockNumber: BlockNumberOrTag
): Promise<TransactionWithHash>
public async getTransactionByHash(
transactionHash: HexString
): Promise<TransactionWithHash>
public async getTransactionReceipt(
transactionHash: HexString
): Promise<TransactionReceipt>
public async getBlockTransactionCount(
blockNumber: BlockNumberOrTag
): Promise<number>
public async getPendingTransactions(): Promise<TransactionWithHash[]>
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.