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
- class erc7730.model.metadata.Metadata(*, owner: str | None = None, info: OwnerInfo | None = None, token: TokenInfo | None = None)[source]View on GitHub
Bases:
ModelMetadata Section.
The metadata section contains information about constant values relevant in the scope of the current contract / message (as matched by the context section)
- 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].
- class erc7730.model.metadata.OwnerInfo(*, legalName: Annotated[str, MinLen(min_length=1)], lastUpdate: datetime | None = None, deploymentDate: datetime | None = None, url: HttpUrl)[source]View on GitHub
Bases:
ModelMain 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.
- legalName: str
- 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].
- class erc7730.model.metadata.TokenInfo(*, name: Annotated[str, MinLen(min_length=1), MaxLen(max_length=255)], ticker: Annotated[str, MinLen(min_length=1), MaxLen(max_length=10), _PydanticGeneralMetadata(pattern='^[a-zA-Z0-9_\\\\-\\\\.]+$')], decimals: Annotated[int, Ge(ge=0), Le(le=255)])[source]View on GitHub
Bases:
ModelToken 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.
- decimals: int
- 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].
- name: str
- ticker: str