erc7730.model.calldata.v1.value module
Data model for calldata descriptor references to values (a.k.a., binary paths).
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
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorContainerPathV1[source]View on GitHub
Bases:
CalldataDescriptorStructV1
Descriptor for the CONTAINER_PATH struct.
- Fields:
- field type: Literal['CONTAINER'] = 'CONTAINER'
Type of the path
- field value: CalldataDescriptorContainerPathValueV1 [Required]
Container field
- field version: Literal[1] = 1
Version of the CONTAINER_PATH struct
- class erc7730.model.calldata.v1.value.CalldataDescriptorContainerPathValueV1(*values)[source]View on GitHub
Bases:
IntEnum
Type of container paths.
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorDataPathV1[source]View on GitHub
Bases:
CalldataDescriptorStructV1
Descriptor for the DATA_PATH struct.
- Fields:
- field elements: list[Annotated[CalldataDescriptorPathElementTupleV1 | CalldataDescriptorPathElementArrayV1 | CalldataDescriptorPathElementRefV1 | CalldataDescriptorPathElementLeafV1 | CalldataDescriptorPathElementSliceV1, FieldInfo(annotation=NoneType, required=True, title='Path element', description='Data path element to reach the target value in the serialized transaction', discriminator='type')]] [Required]
Path element to reach the target value
- Constraints:
min_length = 1
max_length = 256
- field type: Literal['DATA'] = 'DATA'
Type of the path
- field version: Literal[1] = 1
Version of the VALUE struct
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorPathElementArrayV1[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1
Descriptor for the PATH_ELEMENT struct of type ARRAY.
- field end: int | None [Required]
End offset in array (exclusive). If not provided, upper bound is array end.
- field start: int | None [Required]
Start offset in array (inclusive). If not provided, lower bound is array start.
- field type: Literal['ARRAY'] = 'ARRAY'
Type of the parameter
- field weight: int [Required]
Size of each array element in chunks
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorPathElementBaseV1[source]View on GitHub
Bases:
Model
Descriptor for the PATH_ELEMENT payload.
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorPathElementLeafV1[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1
Descriptor for the PATH_ELEMENT struct of type LEAF.
- Fields:
- field leaf_type: CalldataDescriptorPathLeafType [Required]
Type of the leaf element
- field type: Literal['LEAF'] = 'LEAF'
Type of the parameter
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorPathElementRefV1[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1
Descriptor for the PATH_ELEMENT struct of type REF.
- Fields:
- field type: Literal['REF'] = 'REF'
Type of the parameter
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorPathElementSliceV1[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1
Descriptor for the PATH_ELEMENT struct of type SLICE.
- field type: Literal['SLICE'] = 'SLICE'
Type of the parameter
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorPathElementTupleV1[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1
Descriptor for the PATH_ELEMENT struct of type TUPLE.
- Fields:
- field offset: int [Required]
Move by {value} slots from current slot
- field type: Literal['TUPLE'] = 'TUPLE'
Type of the parameter
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementType(*values)[source]View on GitHub
Bases:
IntEnum
Type of path element.
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathLeafType(*values)[source]View on GitHub
Bases:
IntEnum
Type of path leaf element.
- class erc7730.model.calldata.v1.value.CalldataDescriptorTypeFamily(*values)[source]View on GitHub
Bases:
IntEnum
Type family of a value.
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorValueBaseV1[source]View on GitHub
Bases:
CalldataDescriptorStructV1
Descriptor for the VALUE struct.
- Fields:
- field type_family: CalldataDescriptorTypeFamily [Required]
Type family of the value
- field version: Literal[1] = 1
Version of the VALUE struct
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorValueConstantV1[source]View on GitHub
Bases:
CalldataDescriptorValueBaseV1
A constant value.
- Fields:
raw (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.
- field raw: validate, json_schema_input_type=PydanticUndefined)] [Required]
The constant value, serialized and hex encoded.
- Constraints:
pattern = ^0x[a-f0-9]+$
func = <function ErrorTypeLabel._validator.<locals>.validate at 0x7fa6e3239440>
json_schema_input_type = PydanticUndefined
- field type: Literal['constant'] = 'constant'
The value type identifier (discriminator for values discriminated union).
- pydantic model erc7730.model.calldata.v1.value.CalldataDescriptorValuePathV1[source]View on GitHub
Bases:
CalldataDescriptorValueBaseV1
A 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.
- Fields:
- field abi_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)] | None = None
Path to reach the target value in the container or serialized transaction
- field binary_path: Annotated[CalldataDescriptorContainerPathV1 | CalldataDescriptorDataPathV1, FieldInfo(annotation=NoneType, required=True, title='Path', description='Data or container path to reach the target value in the serialized transaction', discriminator='type')] [Required]
Path to reach the target value in the container or serialized transaction
- field type: Literal['path'] = 'path'
The value type identifier (discriminator for values discriminated union).