Skip to main content

Crate quai_abi

Crate quai_abi 

Source
Expand description

Bounded Solidity ABI encoding, contract interfaces and EIP-712 hashing.

Validated against pinned quais.js with explicit stricter input policies. Signing, contract execution and provider network policy belong to other crates.

Structs§

AbiCoder
Canonical, bounded Solidity ABI parameter encoding and decoding.
AbiConstructor
Constructor arguments, encoded without a function selector.
AbiCustomError
A declared custom error; matching bytes do not authenticate their origin.
AbiEvent
A compiled event declaration, including indexed-field positions.
AbiFunction
A compiled contract function with an exact four-byte selector.
AbiInterface
Bounded validated JSON ABI. Name/selector collisions never silently choose a declaration.
AbiParameter
Validated parameter tree for binding generation and tuple/array traversal.
AbiResult
Ordered decoded fields with optional unique names. Values are eagerly decoded; there are no deferred errors, proxy properties or method-name collisions. Nested ABI tuples remain positional values; use parameter metadata to interpret them.
AbiType
Validated ABI type with cached size/depth metadata; construction is bounded.
AbiValue
An immutable, bounded ABI value whose type, range, arity and byte lengths were checked on construction. Debug prints the type and encoded size, not contents.
ParsedCall
Canonically decoded call data; declaration matching does not prove execution.
ParsedLog
Canonically decoded nonanonymous log, without emitter or chain authentication.
SolidityArtifact
Validated contract ABI and exact nonempty creation bytecode. Compiler metadata is not trusted as evidence that ABI and bytecode correspond to one another.
TypedData
An immutable, validated EIP-712 RPC document with its cached signing hash.
TypedDataEncoder
Validated acyclic schema with cached canonical type strings and type hashes.
TypedDataField
One named field, preserving the declared order in its enclosing struct.
TypedValueEncoder
A validated EIP-712 type expression bound to an immutable compiled schema. Unlike an ABI encoder, bytes/strings and arrays produce a hash word.

Enums§

AbiError
Errors in bounded canonical Solidity ABI operations.
AbiEventValue
An event field decoded from data/a static topic, or an unrecoverable topic hash.
AbiFilterTopic
Encoded positional event topic, ready to map into a provider log filter.
AbiFilterValue
A filter in event declaration order, including non-indexed fields. Non-indexed fields must be Any; an omitted suffix is also unrestricted.
AbiFormat
ABI fragment and parameter formatting, with explicit names and indexed-field policy.
ParsedRevert
Decoded, unauthenticated revert data. It may be forged or forwarded by a contract.
StateMutability
Solidity’s declared function/constructor/fallback mutability.
TypedDataError
Errors never include a message’s potentially sensitive value contents.

Constants§

MAX_DATA_BYTES
Maximum UTF-8 JSON document or combined value string/key bytes.
MAX_DEPTH
Maximum nested schema dependencies, JSON containers or encoding recursion.
MAX_FIELDS
Maximum total fields in one schema.
MAX_FILTER_ALTERNATIVES
Maximum alternatives in one event topic, matching the provider filter policy.
MAX_SCHEMA_BYTES
Maximum combined schema identifier and type-expression bytes.
MAX_TYPES
Maximum declared struct types in one schema.
MAX_VALUE_NODES
Maximum visited JSON values, including array elements and object values.

Functions§

function_selector
Canonical function/error selector derived from its signature.
hash_domain
Hash the standard domain, using its prescribed field order and omitting nulls. Unknown keys are rejected even when null; no name resolution is performed.
hash_typed_data
Validate a schema and hash its domain-separated primary value.
indexed_event_topic
Compute a Solidity indexed-event topic. Compound values use the specification’s special in-place encoding, not normal ABI encoding or packed encoding. Hashes of dynamic/compound indexed values cannot recover the original value.
signature_hash
Canonicalize and hash a function/error/event signature, normalizing aliases.
solidity_packed
Concatenate packed values using the pinned quais.js solidityPacked layout. Scalars use their declared widths, primitive array elements use 32-byte words, and strings/dynamic bytes contribute raw bytes without lengths. Tuples fail.
solidity_packed_keccak256
Keccak-256 of the exact packed bytes. Dynamic-field ambiguity still applies.
solidity_packed_sha256
SHA-256 of the exact packed bytes. Dynamic-field ambiguity still applies.

Type Aliases§

TypedDataTypes
Named struct definitions; each field vector retains its declared order.