Crate pathfinder_common

Crate pathfinder_common 

Source
Expand description

Contains core functions and types that are widely used but have no real home of their own.

This includes many trivial wrappers around Felt which help by providing additional type safety.

Re-exports§

pub use signature::BlockCommitmentSignature;
pub use state_update::StateUpdate;

Modules§

casm_class
class_definition
consts
Repeated constants used around pathfinder
event
hash
Contains the FeltHash trait and implementations thereof for the Pedersen and Poseidon hashes.
integration_testing
macro_prelude
prelude
receipt
signature
state_update
test_utils
Various test utils used in other pathfinder related crates
transaction
trie

Macros§

account_deployment_data_elem
account_deployment_data_elem_bytes
block_commitment_signature_elem
block_commitment_signature_elem_bytes
block_hash
block_hash_bytes
byte_code_offset
byte_code_offset_bytes
call_param
call_param_bytes
call_result_value
call_result_value_bytes
casm_hash
casm_hash_bytes
class_commitment
class_commitment_bytes
class_commitment_leaf_hash
class_commitment_leaf_hash_bytes
class_hash
class_hash_bytes
constructor_param
constructor_param_bytes
contract_address
contract_address_bytes
contract_address_salt
contract_address_salt_bytes
contract_nonce
contract_nonce_bytes
contract_root
contract_root_bytes
contract_state_hash
contract_state_hash_bytes
entry_point
entry_point_bytes
event_commitment
event_commitment_bytes
event_data
event_data_bytes
event_key
event_key_bytes
fee
fee_bytes
felt
Creates a Felt from a hex string literal verified at compile time.
felt_bytes
Creates a pathfinder_crypto::Felt from a byte slice, resulting in compile-time error when invalid.
l1_to_l2_message_nonce
l1_to_l2_message_nonce_bytes
l1_to_l2_message_payload_elem
l1_to_l2_message_payload_elem_bytes
l2_to_l1_message_payload_elem
l2_to_l1_message_payload_elem_bytes
paymaster_data_elem
paymaster_data_elem_bytes
proposal_commitment
proposal_commitment_bytes
public_key
public_key_bytes
receipt_commitment
receipt_commitment_bytes
sequencer_address
sequencer_address_bytes
sierra_hash
sierra_hash_bytes
state_commitment
state_commitment_bytes
state_diff_commitment
state_diff_commitment_bytes
storage_address
storage_address_bytes
storage_commitment
storage_commitment_bytes
storage_value
storage_value_bytes
transaction_commitment
transaction_commitment_bytes
transaction_hash
transaction_hash_bytes
transaction_nonce
transaction_nonce_bytes
transaction_signature_elem
transaction_signature_elem_bytes

Structs§

AccountDeploymentDataElem
BlockCommitmentSignatureElem
BlockHash
BlockHeader
BlockHeaderBuilder
BlockNumber
A Starknet block number.
BlockTimestamp
The timestamp of a Starknet block.
ByteCodeOffset
CallParam
CallResultValue
CasmHash
ChainId
ClassCommitment
ClassCommitmentLeafHash
ClassHash
ConsensusInfo
ConstructorParam
ContractAddress
ContractAddressSalt
ContractClass
ContractNonce
ContractRoot
ContractStateHash
EntryPoint
EthereumAddress
An Ethereum address.
EventCommitment
EventData
EventKey
Fee
FromSliceError
GasPrice
Starknet gas price.
GasPriceHex
A hex representation of a GasPrice.
L1BlockNumber
An Ethereum block number.
L1ToL2MessageNonce
L1ToL2MessagePayloadElem
L1TransactionHash
An Ethereum transaction hash.
L2ToL1MessagePayloadElem
PaymasterDataElem
ProposalCommitment
PublicKey
ReceiptCommitment
ResourceAmount
Starknet resource bound: amount.
ResourcePricePerUnit
Starknet resource bound: price per unit.
SequencerAddress
SierraHash
SignedBlockHeader
StarknetVersion
StateCommitment
StateDiffCommitment
StorageAddress
StorageCommitment
StorageValue
Tip
TipHex
TransactionCommitment
TransactionHash
TransactionIndex
A Starknet transaction index.
TransactionNonce
TransactionSignatureElem
TransactionVersion
Starknet transaction version.

Enums§

AllowedOrigins
BlockId
A way of identifying a specific block that has been finalized.
Chain
Starknet chain.
EthereumChain
Ethereum network chains running Starknet.
L1DataAvailabilityMode

Functions§

calculate_class_commitment_leaf_hash
Calculate class commitment tree leaf hash value.
truncated_keccak
See: https://github.com/starkware-libs/cairo-lang/blob/64a7f6aed9757d3d8d6c28bd972df73272b0cb0a/src/starkware/starknet/public/abi.py#L21-L26