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
- class erc7730.model.calldata.v1.value.CalldataDescriptorContainerPathV1(*, version: Literal[1] = 1, type: Literal['CONTAINER'] = 'CONTAINER', value: CalldataDescriptorContainerPathValueV1)[source]View on GitHub
Bases:
CalldataDescriptorStructV1Descriptor for the CONTAINER_PATH struct.
- 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['CONTAINER']
- version: Literal[1]
- class erc7730.model.calldata.v1.value.CalldataDescriptorContainerPathValueV1(*values)[source]View on GitHub
Bases:
IntEnumType of container paths.
- class erc7730.model.calldata.v1.value.CalldataDescriptorDataPathV1(*, version: Literal[1] = 1, type: Literal['DATA'] = 'DATA', elements: Annotated[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')]], MinLen(min_length=1), MaxLen(max_length=256)])[source]View on GitHub
Bases:
CalldataDescriptorStructV1Descriptor for the DATA_PATH struct.
- 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')]]
- 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['DATA']
- version: Literal[1]
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementArrayV1(*, type: Literal['ARRAY'] = 'ARRAY', weight: int, start: int | None, end: int | None)[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1Descriptor for the PATH_ELEMENT struct of type ARRAY.
- 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['ARRAY']
- weight: int
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementBaseV1[source]View on GitHub
Bases:
ModelDescriptor for the PATH_ELEMENT payload.
- 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.calldata.v1.value.CalldataDescriptorPathElementLeafV1(*, type: Literal['LEAF'] = 'LEAF', leaf_type: CalldataDescriptorPathLeafType)[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1Descriptor for the PATH_ELEMENT struct of type LEAF.
- leaf_type: CalldataDescriptorPathLeafType
- 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['LEAF']
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementRefV1(*, type: Literal['REF'] = 'REF')[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1Descriptor for the PATH_ELEMENT struct of type REF.
- 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['REF']
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementSliceV1(*, type: Literal['SLICE'] = 'SLICE', start: int | None, end: int | None)[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1Descriptor for the PATH_ELEMENT struct of type SLICE.
- 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['SLICE']
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementTupleV1(*, type: Literal['TUPLE'] = 'TUPLE', offset: int)[source]View on GitHub
Bases:
CalldataDescriptorPathElementBaseV1Descriptor for the PATH_ELEMENT struct of type TUPLE.
- 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].
- offset: int
- type: Literal['TUPLE']
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathElementType(*values)[source]View on GitHub
Bases:
IntEnumType of path element.
- class erc7730.model.calldata.v1.value.CalldataDescriptorPathLeafType(*values)[source]View on GitHub
Bases:
IntEnumType of path leaf element.
- class erc7730.model.calldata.v1.value.CalldataDescriptorTypeFamily(*values)[source]View on GitHub
Bases:
IntEnumType family of a value.
- class erc7730.model.calldata.v1.value.CalldataDescriptorValueBaseV1(*, version: Literal[1] = 1, type_family: CalldataDescriptorTypeFamily, type_size: Annotated[int | None, Ge(ge=0), Le(le=255)] = None)[source]View on GitHub
Bases:
CalldataDescriptorStructV1Descriptor for the VALUE struct.
- 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_family: CalldataDescriptorTypeFamily
- version: Literal[1]
- class erc7730.model.calldata.v1.value.CalldataDescriptorValueConstantV1(*, version: ~typing.Literal[1] = 1, type_family: ~erc7730.model.calldata.v1.value.CalldataDescriptorTypeFamily, type_size: ~typing.Annotated[int | None, ~annotated_types.Ge(ge=0), ~annotated_types.Le(le=255)] = None, type: ~typing.Literal['constant'] = 'constant', 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:
CalldataDescriptorValueBaseV1A 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.calldata.v1.value.CalldataDescriptorValuePathV1(*, version: Literal[1] = 1, type_family: CalldataDescriptorTypeFamily, type_size: Annotated[int | None, Ge(ge=0), Le(le=255)] = None, type: Literal['path'] = 'path', 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, binary_path: CalldataDescriptorContainerPathV1 | CalldataDescriptorDataPathV1)[source]View on GitHub
Bases:
CalldataDescriptorValueBaseV1A 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.
- 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
- 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')]
- 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['path']