Expand description
Call argument and return-value codecs for contract specs and local source metadata.
Structs§
- Contract
Metadata - Locally parsed method metadata recovered from project source files.
- Decoded
Abort - A contract abort payload decoded through exception metadata.
- Method
Metadata - Local argument and return type names parsed from a Rust method signature.
- Spec
Method Metadata - Contract spec metadata for one resolved contract method.
Enums§
- Abort
Decode Error - Why an abort buffer could not be decoded into an exception value.
- Call
Metadata - Type metadata used to encode arguments and decode return values.
- Error
- Contract metadata, argument encoding, or value decoding failed.
Functions§
- build_
type_ def_ index - Build an index of named embedded type definitions.
- decode_
abort - Decode an abort buffer (
[selector][payload]) into the exception it carries. - decode_
abort_ payload - Decode a payload against caller-supplied exception and type definitions.
- decode_
event_ spec_ value_ from_ reader - Decode one event value while rejecting enum discriminants absent from the spec.
- decode_
return - Decode contract return bytes into JSON using the resolved metadata when available.
- decode_
spec_ value - Decode one top-level contract spec value from a byte slice.
- decode_
spec_ value_ from_ reader - Decode one contract spec value from the current XDR reader position.
- encode_
args - Encode argument strings into contract calldata using the resolved metadata.
- format_
contract_ address - Format a contract address as unprefixed, case-sensitive base58.
- is_
erc20_ too_ large - method_
entrypoint_ id - Derive the canonical method selector from interface identity and method name.
- normalize_
type_ name - Normalize supported Rust syntax from locally parsed type names.
- parse_
contract_ address - Parse a Z
StrKeyor base58 contract address, including in typed calldata. - resolve_
spec_ method - Resolve a method from a supplied spec, rejecting ambiguous interface matches.
Returns
Nonewhen the method is absent; does not read files or discover projects. - spec_
id_ text - Render a spec id for a diagnostic, validating every segment.
- spec_
string_ text - Decode a spec string as UTF-8 text and validate it as a safe identifier.
Type Aliases§
- Type
DefIndex - Named contract type definitions keyed by contract type name.