erc7730.model.metadata module

Object model for ERC-7730 descriptors metadata section.

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

pydantic model erc7730.model.metadata.Metadata[source]View on GitHub

Bases: Model

Metadata Section.

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

Fields:
field constants: dict[str, str] | None = None

A set of values that can be used in format parameters. Can be referenced with a path expressionlike $.metadata.constants.CONSTANT_NAME

field enums: dict[str, str | dict[str, str]] | None = None

A set of enums that are used to format fields replacing values with human readable strings.

field info: OwnerInfo | None = None

The owner info section contains detailed information about the owner or target of the contract /message to be clear signed.

field owner: str | None = None

The display name of the owner or target of the contract / message to be clear signed.

field token: TokenInfo | None = None

A description of an ERC20 token exported by this format, that should be trusted. Not mandatory ifthe corresponding metadata can be fetched from the contract itself.

pydantic model erc7730.model.metadata.OwnerInfo[source]View on GitHub

Bases: Model

Main contract’s owner detailed information.

The owner info section contains detailed information about the owner or target of the contract / message to be clear signed.

Fields:
field lastUpdate: datetime | None [Required]

The date of the last update of the contract / message.

field legalName: str [Required]

The full legal name of the owner if different from the owner field.

field url: Url [Required]

URL with more info on the entity the user interacts with.

pydantic model erc7730.model.metadata.TokenInfo[source]View on GitHub

Bases: Model

Token Description.

A description of an ERC20 token exported by this format, that should be trusted. Not mandatory if the corresponding metadata can be fetched from the contract itself.

Fields:
field decimals: int [Required]

The number of decimals of the token ticker, used to display amounts.

field name: str [Required]

The token display name.

field ticker: str [Required]

A short capitalized ticker for the token, that will be displayed in front of correspondingamounts.