erc7730.model.input.v2.metadata module
Object model for ERC-7730 v2 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-v2.schema.json
- pydantic model erc7730.model.input.v2.metadata.InputMapDefinition[source]View on GitHub
Bases:
ModelA map definition for context-dependent constants.
Maps are used to provide context-dependent values based on a key resolution.
- pydantic model erc7730.model.input.v2.metadata.InputMetadata[source]View on GitHub
Bases:
ModelMetadata Section (v2).
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[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Id', description='An internal identifier that can be used either for clarity specifying what the element is or as a reference in device specific sections.', examples=['some_identifier'], metadata=[MinLen(min_length=1)]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)], str | int | bool | float | None] | None = None
A set of values that can be used in format parameters. Can be referenced with a path expression like $.metadata.constants.CONSTANT_NAME
- field contractName: str | None = None
The name of the contract targeted by the transaction or message.
- field enums: dict[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Id', description='An internal identifier that can be used either for clarity specifying what the element is or as a reference in device specific sections.', examples=['some_identifier'], metadata=[MinLen(min_length=1)]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)], ~pydantic_string_url.HttpUrl | ~typing.Annotated[dict[str, str], FieldInfo(annotation=NoneType, required=True, title='Enum Definition', description='A mapping of enum values to human readable strings.', examples=[{'1': 'stable', '2': 'variable'}], metadata=[MinLen(min_length=1), MaxLen(max_length=32)])]] | None = None
A set of enums that are used to format fields replacing values with human readable strings.
- Constraints:
max_length = 32
- field info: InputOwnerInfo | None = None
The owner info section contains detailed information about the owner or target of the contract / message to be clear signed.
- field maps: dict[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Id', description='An internal identifier that can be used either for clarity specifying what the element is or as a reference in device specific sections.', examples=['some_identifier'], metadata=[MinLen(min_length=1)]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)], ~erc7730.model.input.v2.metadata.InputMapDefinition] | None = None
A set of maps that are used to manage context dependent constants. Maps can be used in place of constants, and the corresponding constant is based on the map key resolved value.
- pydantic model erc7730.model.input.v2.metadata.InputOwnerInfo[source]View on GitHub
Bases:
ModelMain contract’s owner detailed information (v2).
The owner info section contains detailed information about the owner or target of the contract / message to be clear signed.
Note: legalName and lastUpdate are v1 backward compatibility extensions not present in the v2 JSON schema. The v2 schema only defines deploymentDate and url for info. These fields are retained for smooth migration.
- Fields:
- field lastUpdate: datetime | None = None
[v1 compat] The date of the last update of the contract / message. Not present in v2 schema, retained for backward compatibility. Use deploymentDate instead.