erc7730.model.resolved.display module

pydantic model erc7730.model.resolved.display.ResolvedDisplay[source]View on GitHub

Bases: Model

Display Formatting Info Section.

Fields:
field definitions: dict[str, ResolvedFieldDefinition] | None = None

A set of definitions that can be used to share formatting information between multiple messages /functions. The definitions can be referenced by the key name in an internal path.

field formats: dict[str, ResolvedFormat] [Required]

The list includes formatting info for each field of a structure. This list is indexed by a keyidentifying uniquely the message’s type in the abi. For smartcontracts, it is the selector of thefunction or its signature; and for EIP712 messages it is the primaryType of the message.

pydantic model erc7730.model.resolved.display.ResolvedEnumParameters[source]View on GitHub

Bases: Model

Enum Formatting Parameters.

Fields:
field ref: str [Required] (alias '$ref')
pydantic model erc7730.model.resolved.display.ResolvedFieldDefinition[source]View on GitHub

Bases: Model

TODO this should be removed from the resolved state and only have ResolvedFieldDescription

Fields:
field format: FieldFormat | None [Required]

The format of the field, that will be used to format the field value in a human readable way.

field id: 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 areference in device specific sections.', metadata=[MinLen(min_length=1)])] | None = None (alias '$id')

An internal identifier that can be used either for clarity specifying what the element is or as areference in device specific sections.

field label: str [Required]

The label of the field, that will be displayed to the user in front of the formatted field value.

field params: Annotated[Annotated[AddressNameParameters, Tag(tag=address_name)] | Annotated[CallDataParameters, Tag(tag=call_data)] | Annotated[TokenAmountParameters, Tag(tag=token_amount)] | Annotated[NftNameParameters, Tag(tag=nft_name)] | Annotated[DateParameters, Tag(tag=date)] | Annotated[UnitParameters, 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 = None

Format specific parameters that are used to format the field value in a human readable way.

pydantic model erc7730.model.resolved.display.ResolvedFieldDescription[source]View on GitHub

Bases: ResolvedFieldDefinition, FieldsBase

A field formatter, containing formatting information of a single field in a message.

Fields:

pydantic model erc7730.model.resolved.display.ResolvedFormat[source]View on GitHub

Bases: FormatBase

A structured data format specification, containing formatting information of fields in a single type of message.

Fields:
field 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)]] [Required]

An array containing the ordered definitions of fields formats.

pydantic model erc7730.model.resolved.display.ResolvedNestedFields[source]View on GitHub

Bases: FieldsBase

A 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:
field fields: list[ResolvedField] [Required]

Nested fields formats.