Crate starknet_gateway

Source
Expand description

§🌌 Starknet Feeder Gateway client (WIP)


§🚀 Table of Contents


§📜 get_oldest_transaction_age
  • Description: Retrieves the age of the oldest transaction in the transaction pool.
  • Parameters: None.
  • Response: Age in seconds of the oldest transaction.

§📜 get_number_of_transactions_in_backlog
  • Description: Determines the count of transactions in the backlog.
  • Parameters: None.
  • Response: Number of transactions in the backlog.

§📜 get_block
  • Description: Fetches block details.
  • Parameters:
    • block_hash (Optional): Desired block’s hash.
    • block_number (Optional): Desired block’s number.
  • Response: Block details.

§📜 get_block_hash_by_id
  • Description: Retrieves a block’s hash using its ID.
  • Parameters:
    • block_id: Block’s ID.
  • Response: Block’s hash.

§📜 get_block_id_by_hash
  • Description: Gets a block’s ID using its hash.
  • Parameters:
    • block_hash: Block’s hash.
  • Response: Block’s ID.

§📜 get_contract_addresses
  • Description: Provides all deployed contract addresses.
  • Parameters: None.
  • Response: List of contract addresses.

§📜 get_class_by_hash
  • Description: Fetches the contract class via its hash.
  • Parameters:
    • class_hash: Contract class hash.
  • Response: Contract class details.

§📜 get_compiled_class_by_class_hash
  • Description: Acquires the compiled contract class via its hash.
  • Parameters:
    • class_hash: Contract class hash.
  • Response: Compiled contract class details.

§📜 get_state_update
  • Description: Retrieves state updates for a given block.
  • Parameters:
    • block_hash (Optional): Desired block’s hash.
    • block_number (Optional): Desired block’s number.
  • Response: State update details.

§📜 get_transaction
  • Description: Provides detailed transaction information.
  • Parameters:
    • tx_hash: Desired transaction’s hash.
  • Response: Transaction details.

§📜 get_transaction_status
  • Description: Checks a transaction’s current status.
  • Parameters:
    • tx_hash: Desired transaction’s hash.
  • Response: Transaction status.

§📜 get_signature
  • Description: Retrieves the signature of a given block.
  • Parameters:
    • block_hash (Optional): Desired block’s hash.
    • block_number (Optional): Desired block’s number.
  • Response: Block’s signature.

§📜 get_public_key
  • Description: Acquires the Starknet Feeder Gateway’s public key.
  • Parameters: None.
  • Response: Public key string.

Re-exports§

pub use sequencer::GatewayClientError as SequencerGatewayProviderError;
pub use sequencer::SequencerGatewayProvider;
pub use jsonrpc::JsonRpcClient;

Modules§

jsonrpc
sequencer

Structs§

StarknetErrorWithMessage

Enums§

AnyProvider
A convenient Box-able type that implements the Provider trait. This can be useful when you want to accept any built-in provider implementation from the library in your appliation, since the Provider trait itself cannot be Box-ed due to the use of associated type.
AnyProviderError
MaybeUnknownErrorCode
ProviderError

Traits§

Provider