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 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 if the 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 = None

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.

Constraints:
  • min_length = 1

field url: HttpUrl [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.

Constraints:
  • ge = 0

  • le = 255

field name: str [Required]

The token display name.

Constraints:
  • min_length = 1

  • max_length = 255

field ticker: str [Required]

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

Constraints:
  • min_length = 1

  • max_length = 10

  • pattern = ^[a-zA-Z0-9_\-\.]+$