erc7730.model.calldata.v1.instruction module
Data model for calldata descriptor instructions.
These model classes represent the exact same data fields that are serialized into TLV structs. See documentation in https://github.com/LedgerHQ/app-ethereum for specifications of this protocol
- class erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionBaseV1(*, version: Annotated[int, Ge(ge=0), Le(le=255)])[source]View on GitHub
Bases:
CalldataDescriptorStructV1,ABCBase class for calldata descriptor instructions.
- model_config = {'allow_inf_nan': False, 'arbitrary_types_allowed': False, 'extra': 'ignore', '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.calldata.v1.instruction.CalldataDescriptorInstructionEnumValueV1(*, version: ~typing.Literal[1] = 1, chain_id: ~typing.Annotated[int, ~annotated_types.Ge(ge=1)], address: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=42), ~annotated_types.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)], selector: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=10), ~annotated_types.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)], enum_id: str, id: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=255)], value: ~typing.Annotated[int, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=255)], name: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1)])[source]View on GitHub
Bases:
CalldataDescriptorInstructionBaseV1Instruction descriptor for the ENUM_VALUE struct.
- chain_id: int
- property descriptor: ', metadata=[MinLen(min_length=8), MaxLen(max_length=32768)])]View on GitHub
- enum_id: str
- id: int
- model_config = {'allow_inf_nan': False, 'arbitrary_types_allowed': False, 'extra': 'ignore', '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].
- name: str
- value: int
- version: Literal[1]
- class erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionFieldV1(*, version: Literal[1] = 1, name: Annotated[str, MinLen(min_length=1)], param: CalldataDescriptorParamRawV1 | CalldataDescriptorParamAmountV1 | CalldataDescriptorParamTokenAmountV1 | CalldataDescriptorParamNFTV1 | CalldataDescriptorParamDatetimeV1 | CalldataDescriptorParamDurationV1 | CalldataDescriptorParamUnitV1 | CalldataDescriptorParamEnumV1 | CalldataDescriptorParamTrustedNameV1 | CalldataDescriptorParamCalldataV1)[source]View on GitHub
Bases:
CalldataDescriptorInstructionBaseV1Instruction descriptor for the FIELD struct.
- property descriptor: ', metadata=[MinLen(min_length=8), MaxLen(max_length=32768)])]View on GitHub
- model_config = {'allow_inf_nan': False, 'arbitrary_types_allowed': False, 'extra': 'ignore', '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].
- name: str
- param: Annotated[CalldataDescriptorParamRawV1 | CalldataDescriptorParamAmountV1 | CalldataDescriptorParamTokenAmountV1 | CalldataDescriptorParamNFTV1 | CalldataDescriptorParamDatetimeV1 | CalldataDescriptorParamDurationV1 | CalldataDescriptorParamUnitV1 | CalldataDescriptorParamEnumV1 | CalldataDescriptorParamTrustedNameV1 | CalldataDescriptorParamCalldataV1, FieldInfo(annotation=NoneType, required=True, title='Field parameter', description='Format specific parameters for a calldata descriptor field.', discriminator='type')]
- version: Literal[1]
- class erc7730.model.calldata.v1.instruction.CalldataDescriptorInstructionTransactionInfoV1(*, version: ~typing.Literal[1] = 1, chain_id: ~typing.Annotated[int, ~annotated_types.Ge(ge=1)], address: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=42), ~annotated_types.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)], selector: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=10), ~annotated_types.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)], hash: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=64), ~annotated_types.MaxLen(max_length=64), _PydanticGeneralMetadata(pattern='^[a-f0-9]+$')], operation_type: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1)], creator_name: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, creator_legal_name: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, creator_url: ~typing.Annotated[~pydantic_string_url.HttpUrl | None, ~annotated_types.MinLen(min_length=1)] = None, contract_name: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, deploy_date: str | None = None)[source]View on GitHub
Bases:
CalldataDescriptorInstructionBaseV1Instruction descriptor for the TRANSACTION_INFO struct.
- chain_id: int
- creator_url: HttpUrl | None
- property descriptor: ', metadata=[MinLen(min_length=8), MaxLen(max_length=32768)])]View on GitHub
- hash: str
- model_config = {'allow_inf_nan': False, 'arbitrary_types_allowed': False, 'extra': 'ignore', '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].
- operation_type: str
- version: Literal[1]