New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@chainsafe/web3-plugin-starknet

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/web3-plugin-starknet

Starknet plugin to extend web3.js with additional methods

npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-25%
Maintainers
2
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 07 May 2024

Related posts