erc7730.model.input.v2.format module
Object model for ERC-7730 v2 descriptors display section enums and format types.
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
- class erc7730.model.input.v2.format.FieldFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]View on GitHub
Bases:
StrEnumThe format of the field (v2), that will be used to format the field value in a human readable way.
- ADDRESS_NAME = 'addressName'
The field should be displayed as a trusted name, or as a raw address if no names are found in trusted sources. List of trusted sources can be optionally specified in parameters.
- AMOUNT = 'amount'
The field should be displayed as an amount in underlying currency, converted using the best magnitude / ticker available.
- CALL_DATA = 'calldata'
The field is itself a calldata embedded in main call. Another ERC 7730 should be used to parse this field. If not available or not supported, the wallet MAY display a hash of the embedded calldata instead.
- CHAIN_ID = 'chainId'
The field should be displayed as a Blockchain explicit name, as defined in EIP-155. The name is resolved based on the chain id value.
- DATE = 'date'
The field should be displayed as a date. Suggested RFC3339 representation. Parameter specifies the encoding of the date.
- DURATION = 'duration'
The field should be displayed as a duration in HH:MM:ss form. Value is interpreted as a number of seconds.
- ENUM = 'enum'
The field should be displayed as a human readable string by converting the value using the enum referenced in parameters.
- INTEROPERABLE_ADDRESS_NAME = 'interoperableAddressName'
The field should be displayed as a trusted name using interoperable address name resolution.
- NFT_NAME = 'nftName'
The field should be displayed as a single NFT names, or as a raw token Id if a specific name is not found. Collection is specified by the collectionPath parameter.
- RAW = 'raw'
The field should be displayed as the natural representation of the underlying structured data type.
- TOKEN_AMOUNT = 'tokenAmount'
The field should be displayed as an amount, preceded by the ticker. The magnitude and ticker should be derived from the tokenPath parameter corresponding metadata.