erc7730.model.resolved.display module
- class erc7730.model.resolved.display.ResolvedAddressNameParameters(*, types: AddressNameType] | None, ~annotated_types.MinLen(min_length=1)] = None, sources: Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, senderAddress: Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Contract Address', description='An Ethereum contract address, can be lowercase or EIP-55.', metadata=[MinLen(min_length=42), MaxLen(max_length=42), _PydanticGeneralMetadata(pattern='^0x[a-fA-F0-9]+$')]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)]] | None, ~annotated_types.MinLen(min_length=1)] = None)[source]View on GitHub
Bases:
ModelAddress Names Formatting Parameters.
- 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].
- senderAddress: list[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Contract Address', description='An Ethereum contract address, can be lowercase or EIP-55.', metadata=[MinLen(min_length=42), MaxLen(max_length=42), _PydanticGeneralMetadata(pattern='^0x[a-fA-F0-9]+$')]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)]] | None
- types: list[AddressNameType] | None
- class erc7730.model.resolved.display.ResolvedCallDataParameters(*, callee: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)], selector: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None = None, chainId: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None = None, amount: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None = None, spender: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None = None)[source]View on GitHub
Bases:
ModelEmbedded Calldata Formatting Parameters.
- amount: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None
- callee: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)]
- chainId: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | 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].
- selector: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None
- spender: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None
- class erc7730.model.resolved.display.ResolvedDateParameters(*, encoding: DateEncoding)[source]View on GitHub
Bases:
ModelDate Formatting Parameters
- encoding: DateEncoding
- 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.resolved.display.ResolvedDisplay(*, formats: dict[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='EIP12 Type Identifier', description='An EIP-712 scalar or structured type identifier.')] | ~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Selector', description='An Ethereum contract function identifier, in 4 bytes, hex encoded form.', metadata=[MinLen(min_length=10), MaxLen(max_length=10), _PydanticGeneralMetadata(pattern='^0x[a-z0-9]+$')]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)], ~erc7730.model.resolved.display.ResolvedFormat])[source]View on GitHub
Bases:
ModelDisplay Formatting Info Section.
- formats: dict[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='EIP12 Type Identifier', description='An EIP-712 scalar or structured type identifier.')] | ~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Selector', description='An Ethereum contract function identifier, in 4 bytes, hex encoded form.', metadata=[MinLen(min_length=10), MaxLen(max_length=10), _PydanticGeneralMetadata(pattern='^0x[a-z0-9]+$')]), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)], ~erc7730.model.resolved.display.ResolvedFormat]
- 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.resolved.display.ResolvedEnumParameters(*, enumId: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)])[source]View on GitHub
Bases:
ModelEnum Formatting Parameters.
- 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.resolved.display.ResolvedFieldBase(*, value: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)])[source]View on GitHub
Bases:
ModelA field formatter, containing formatting information of a single field in a message.
- 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].
- value: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)]
- class erc7730.model.resolved.display.ResolvedFieldDescription(*, value: ~typing.Annotated[~erc7730.model.resolved.display.ResolvedValuePath | ~erc7730.model.resolved.display.ResolvedValueConstant, ~pydantic.types.Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)], id: ~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)] | None = None, label: str, format: ~erc7730.model.display.FieldFormat | None, params: ~typing.Annotated[~typing.Annotated[~erc7730.model.resolved.display.ResolvedAddressNameParameters, ~pydantic.types.Tag(tag=address_name)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedCallDataParameters, ~pydantic.types.Tag(tag=call_data)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedTokenAmountParameters, ~pydantic.types.Tag(tag=token_amount)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedNftNameParameters, ~pydantic.types.Tag(tag=nft_name)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedDateParameters, ~pydantic.types.Tag(tag=date)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedUnitParameters, ~pydantic.types.Tag(tag=unit)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedEnumParameters, ~pydantic.types.Tag(tag=enum)], ~pydantic.types.Discriminator(discriminator=~erc7730.model.unions.field_parameters_discriminator, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None = None)[source]View on GitHub
Bases:
ResolvedFieldBaseA field formatter, containing formatting information of a single field in a message.
- format: FieldFormat | None
- label: 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].
- params: Annotated[Annotated[ResolvedAddressNameParameters, Tag(tag=address_name)] | Annotated[ResolvedCallDataParameters, Tag(tag=call_data)] | Annotated[ResolvedTokenAmountParameters, Tag(tag=token_amount)] | Annotated[ResolvedNftNameParameters, Tag(tag=nft_name)] | Annotated[ResolvedDateParameters, Tag(tag=date)] | Annotated[ResolvedUnitParameters, Tag(tag=unit)] | Annotated[ResolvedEnumParameters, Tag(tag=enum)], Discriminator(discriminator=field_parameters_discriminator, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None
- class erc7730.model.resolved.display.ResolvedFormat(*, id: ~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)] | None = None, intent: ~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Simple Intent', description='A description of the intent of the structured data signing, that will be displayed to the user.', metadata=[MinLen(min_length=1), MaxLen(max_length=256)])] | ~typing.Annotated[dict[str, str], FieldInfo(annotation=NoneType, required=True, title='Complex Intent', description='A description of the intent of the structured data signing, that will be displayed to the user.', metadata=[MinLen(min_length=1), MaxLen(max_length=32)])] | None = None, screens: dict[str, list[~erc7730.model.display.Screen]] | None = None, fields: list[~typing.Annotated[~typing.Annotated[~erc7730.model.resolved.display.ResolvedFieldDescription, ~pydantic.types.Tag(tag=field_description)] | ~typing.Annotated[~erc7730.model.resolved.display.ResolvedNestedFields, ~pydantic.types.Tag(tag=nested_fields)], ~pydantic.types.Discriminator(discriminator=~erc7730.model.unions.field_discriminator, custom_error_type=None, custom_error_message=None, custom_error_context=None)]], required: list[~erc7730.model.paths.DataPath | ~erc7730.model.paths.ContainerPath] | None = None, excluded: list[~erc7730.model.paths.DataPath] | None = None)[source]View on GitHub
Bases:
FormatBaseA structured data format specification, containing formatting information of fields in a single type of message.
- fields: list[Annotated[Annotated[ResolvedFieldDescription, Tag(tag=field_description)] | Annotated[ResolvedNestedFields, Tag(tag=nested_fields)], Discriminator(discriminator=field_discriminator, custom_error_type=None, custom_error_message=None, custom_error_context=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].
- required: list[DataPath | ContainerPath] | None
- class erc7730.model.resolved.display.ResolvedNestedFields(*, value: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)])[source]View on GitHub
Bases:
ResolvedFieldBaseA single set of field formats, allowing recursivity in the schema.
Used to group whole definitions for structures for instance. This allows nesting definitions of formats, but note that support for deep nesting will be device dependent.
- fields: list[ResolvedField]
- 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.resolved.display.ResolvedNftNameParameters(*, collection: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)])[source]View on GitHub
Bases:
ModelNFT Names Formatting Parameters.
- collection: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=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].
- class erc7730.model.resolved.display.ResolvedTokenAmountParameters(*, token: ResolvedValueConstant, ~pydantic.types.Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None = None, nativeCurrencyAddress: list[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Contract Address', description='An Ethereum contract address (normalized to lowercase).', metadata=[MinLen(min_length=42), MaxLen(max_length=42), _PydanticGeneralMetadata(pattern='^0x[a-f0-9]+$')]), ~pydantic.functional_validators.BeforeValidator(func=~erc7730.model.types.<lambda>, json_schema_input_type=PydanticUndefined), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)]] | None = None, threshold: Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Hexadecimal string', description='A byte array encoded as an hexadecimal string.', metadata=[_PydanticGeneralMetadata(pattern='^0x[a-f0-9]+$')]), ~pydantic.functional_validators.BeforeValidator(func=~erc7730.model.types.<lambda>, json_schema_input_type=PydanticUndefined), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)] | None = None, message: str | None = None)[source]View on GitHub
Bases:
ModelToken Amount Formatting Parameters.
- 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].
- nativeCurrencyAddress: list[~typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, title='Contract Address', description='An Ethereum contract address (normalized to lowercase).', metadata=[MinLen(min_length=42), MaxLen(max_length=42), _PydanticGeneralMetadata(pattern='^0x[a-f0-9]+$')]), ~pydantic.functional_validators.BeforeValidator(func=~erc7730.model.types.<lambda>, json_schema_input_type=PydanticUndefined), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)]] | None
- token: Annotated[ResolvedValuePath | ResolvedValueConstant, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)] | None
- class erc7730.model.resolved.display.ResolvedUnitParameters(*, base: str, decimals: Annotated[int | None, Ge(ge=0), Le(le=255)] = None, prefix: bool | None = None)[source]View on GitHub
Bases:
ModelUnit Formatting Parameters.
- base: 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.resolved.display.ResolvedValueConstant(*, type: ~typing.Literal['constant'] = 'constant', type_family: ~erc7730.common.abi.ABIDataType, type_size: ~typing.Annotated[int | None, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=255)] = None, value: str | int | bool | float, raw: ~typing.Annotated[str, _PydanticGeneralMetadata(pattern='^0x[a-f0-9]+$'), ~pydantic.functional_validators.BeforeValidator(func=~erc7730.model.types.<lambda>, json_schema_input_type=PydanticUndefined), ~erc7730.common.pydantic.ErrorTypeLabel(func=~erc7730.common.pydantic.ErrorTypeLabel._validator.<locals>.validate, json_schema_input_type=PydanticUndefined)])[source]View on GitHub
Bases:
ModelA constant value.
- 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].
- type: Literal['constant']
- class erc7730.model.resolved.display.ResolvedValuePath(*, type: Literal['path'] = 'path', path: Annotated[ContainerPath | DataPath, AfterValidator(func=_validate_absolute)])[source]View on GitHub
Bases:
ModelA path to the field in the structured data. The path is a JSON path expression that can be used to extract the field value from the structured data.
- 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].
- path: Annotated[ContainerPath | DataPath, FieldInfo(annotation=NoneType, required=True, title='Resolved Path', description='A path in the input designating value(s) either in the container of the structured data to besigned or the structured data schema (ABI path for contracts, path in the message types itself for EIP-712).', discriminator='type'), AfterValidator(func=_validate_absolute)]
- type: Literal['path']