Skip to main content

Crate pathfinder_serde

Crate pathfinder_serde 

Source
Expand description

Utilities used for serializing/deserializing sequencer REST API related data.

Modules§

u64_as_hex_str
A Serde helper module to be used as #[serde(with = "u64_as_hex_str")] Helps us keep primitive types in struct fields.

Structs§

CallParamAsDecimalStr
ConstructorParamAsDecimalStr
EthereumAddressAsHexStr
GasPriceAsHexStr
H256AsNoLeadingZerosHexStr
L1ToL2MessagePayloadElemAsDecimalStr
L2ToL1MessagePayloadElemAsDecimalStr
ResourceAmountAsHexStr
ResourcePricePerUnitAsHexStr
StarknetBlockNumberAsHexStr
TipAsHexStr
TransactionSignatureElemAsDecimalStr
U64AsHexStr
U256AsHexStr

Functions§

block_number_as_hex_str
Converts a BlockNumber to a RPC-compatible hex string.
bytes_as_hex_str
A convenience function which produces a “0x” prefixed hex str slice in a given buffer buf from an array of bytes. Panics if bytes.len() * 2 + 2 > buf.len()
bytes_to_hex_str
A convenience function which produces a “0x” prefixed hex string from a Felt.
extract_program_and_entry_points_by_type
Extract JSON representation of program and entry points from the contract definition.
h256_as_no_leading_zeros_hex_str
A convenience function which produces a “0x” prefixed hex string from a H256.
starkhash_to_dec_str
A helper conversion function. Only use with sequencer API related types.