erc7730.model.input.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.input.metadata.InputMetadata[source]View on GitHub
Bases:
Metadata
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[~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 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