erc7730.model.resolved.descriptor module

Module implementing an object model for ERC-7730 resolved descriptors.

This model represents descriptors after resolution phase:
  • URLs have been fetched

  • Contract addresses have been normalized to lowercase

  • References have been inlined

  • Constants have been inlined

  • Field definitions have been inlined

  • Selectors have been converted to 4 bytes form

pydantic model erc7730.model.resolved.descriptor.ResolvedERC7730Descriptor[source]View on GitHub

Bases: Model

An ERC7730 Clear Signing descriptor.

This model represents descriptors after resolution phase:
  • URLs have been fetched

  • Contract addresses have been normalized to lowercase

  • References have been inlined

  • Constants have been inlined

  • Field definitions have been inlined

  • Selectors have been converted to 4 bytes form

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

Fields:
field context: ResolvedContractContext | ResolvedEIP712Context [Required]

The binding context is a set of constraints that are used to bind the ERC7730 file to a specificstructured data being displayed. Currently, supported contexts include contract-specificconstraints or EIP712 message specific constraints.

field display: ResolvedDisplay [Required]

The display section contains all the information needed to format the data in a human readableway. It contains the constants and formatters used to display the data contained in the bound structure.

field metadata: Metadata [Required]

The metadata section contains information about constant values relevant in the scope of thecurrent contract / message (as matched by the context section)

field schema_: str | None = None (alias '$schema')

The schema that the document should conform to. This should be the URL of a version of the clear signing JSON schemas available under https://github.com/LedgerHQ/clear-signing-erc7730-registry/tree/master/specs