erc7730.model.input.descriptor module

Package implementing an object model for ERC-7730 input descriptors.

This model represents descriptors before resolution phase:
  • URLs have been not been fetched yet

  • Contract addresses have not been normalized to lowercase

  • References have not been inlined

  • Constants have not been inlined

  • Field definitions have not been inlined

  • Nested fields have been flattened where possible

  • Selectors have been converted to 4 bytes form

class erc7730.model.input.descriptor.InputERC7730Descriptor(*, schema_: str | None = None, context: InputContractContext | InputEIP712Context, metadata: InputMetadata, display: InputDisplay)[source]View on GitHub

Bases: Model

An ERC7730 Clear Signing descriptor.

This model is directly serializable back the original JSON document.

Specification: https://github.com/LedgerHQ/clear-signing-erc7730-registry/tree/master/specs

JSON schema: https://github.com/LedgerHQ/clear-signing-erc7730-registry/blob/master/specs/erc7730-v1.schema.json

context: InputContractContext | InputEIP712Context
display: InputDisplay
metadata: InputMetadata
model_config = {'allow_inf_nan': False, 'arbitrary_types_allowed': False, 'extra': 'forbid', 'frozen': True, 'strict': True, 'validate_assignment': True, 'validate_default': True, 'validate_return': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

schema_: str | None