@chainsafe/web3-plugin-starknet
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Web3.js Plugin for Starknet

Web3.js plugin for Starknet developers.

RPC Methods

This plugin exposes the following RPC methods (type definitions can be found in src/types.ts):

starknet_call

public async call(
  transaction: CallRequest,
  blockNumber: BlockNumberOrTag
): Promise<HexString[]>

starknet_estimateFee

public async estimateFee(
  request: EstimateFeeRequest["request"],
  blockNumber: BlockNumberOrTag,
  simulationFlags?: EstimateFeeRequest["simulation_flags"]
): Promise<EstimateFeeResponse[]>

starknet_estimateMessageFee

public async estimateMessageFee(
  message: MsgFromL1,
  blockNumber: BlockNumberOrTag
): Promise<EstimateFeeResponse>

starknet_getNonce

public async getNonce(
  address: HexString,
  blockNumber: BlockNumberOrTag
): Promise<HexString>

starknet_getTransactionByBlockIdAndIndex

public async getTransactionByBlockIdAndIndex(
  index: number,
  blockNumber: BlockNumberOrTag
): Promise<TransactionWithHash>

starknet_getTransactionByHash

public async getTransactionByHash(
  transactionHash: HexString
): Promise<TransactionWithHash>

starknet_getTransactionReceipt

public async getTransactionReceipt(
  transactionHash: HexString
): Promise<TransactionReceipt>

starknet_getBlockTransactionCount

public async getBlockTransactionCount(
  blockNumber: BlockNumberOrTag
): Promise<number>

Additional Methods

getPendingTransactions

public async getPendingTransactions(): Promise<TransactionWithHash[]>

Contributing

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.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @chainsafe/web3-plugin-starknet

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

71.4 kB

Total Files

27

Last publish

Collaborators

  • beroburny
  • lykhoyda