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

class erc7730.model.input.metadata.InputMetadata(*, owner: str | None = None, info: ~erc7730.model.metadata.OwnerInfo | None = None, token: ~erc7730.model.metadata.TokenInfo | None = None, 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, enums: ~typing.Annotated[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, ~annotated_types.MaxLen(max_length=32)] = None)[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)

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
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
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].