multiversx_sdk.abi package
Submodules
multiversx_sdk.abi.abi module
- class multiversx_sdk.abi.abi.Abi(definition: AbiDefinition)[source]
Bases:
object
- decode_endpoint_output_parameters(endpoint_name: str, encoded_values: list[bytes]) list[Any] [source]
- class multiversx_sdk.abi.abi.EndpointPrototype(input_parameters: list[Any], output_parameters: list[Any])[source]
Bases:
object
- class multiversx_sdk.abi.abi.EventPrototype(fields: list[EventField])[source]
Bases:
object
multiversx_sdk.abi.abi_definition module
- class multiversx_sdk.abi.abi_definition.AbiDefinition(constructor: EndpointDefinition, upgrade_constructor: EndpointDefinition, endpoints: list[EndpointDefinition], types: TypesDefinitions, events: list[EventDefinition])[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) AbiDefinition [source]
- get_event_definition(name: str) EventDefinition [source]
- classmethod load(path: Path) AbiDefinition [source]
- class multiversx_sdk.abi.abi_definition.EndpointDefinition(name: str, docs: str, mutability: str, inputs: list[ParameterDefinition], outputs: list[ParameterDefinition], payable_in_tokens: list[str], only_owner: bool, title: str = '')[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) EndpointDefinition [source]
- class multiversx_sdk.abi.abi_definition.EnumDefinition(name: str, variants: list[EnumVariantDefinition])[source]
Bases:
object
- classmethod from_dict(name: str, data: dict[str, Any]) EnumDefinition [source]
- class multiversx_sdk.abi.abi_definition.EnumVariantDefinition(name: str, discriminant: int, fields: list[FieldDefinition])[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) EnumVariantDefinition [source]
- class multiversx_sdk.abi.abi_definition.EventDefinition(identifier: str, inputs: list[EventTopicDefinition])[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) EventDefinition [source]
- class multiversx_sdk.abi.abi_definition.EventTopicDefinition(name: str, type: str, indexed: bool)[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) EventTopicDefinition [source]
- class multiversx_sdk.abi.abi_definition.ExplicitEnumDefinition(name: str, variants: list[ExplicitEnumVariantDefinition])[source]
Bases:
object
- classmethod from_dict(name: str, data: dict[str, Any]) ExplicitEnumDefinition [source]
- class multiversx_sdk.abi.abi_definition.ExplicitEnumVariantDefinition(name: str)[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) ExplicitEnumVariantDefinition [source]
- class multiversx_sdk.abi.abi_definition.FieldDefinition(name: str, description: str, type: str)[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) FieldDefinition [source]
- class multiversx_sdk.abi.abi_definition.NullEndpointDefinition[source]
Bases:
EndpointDefinition
- class multiversx_sdk.abi.abi_definition.ParameterDefinition(name: str, type: str)[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) ParameterDefinition [source]
- class multiversx_sdk.abi.abi_definition.StructDefinition(name: str, fields: list[FieldDefinition])[source]
Bases:
object
- classmethod from_dict(name: str, data: dict[str, Any]) StructDefinition [source]
- class multiversx_sdk.abi.abi_definition.TypesDefinitions(enums: list[EnumDefinition], explicit_enums: list[ExplicitEnumDefinition], structs: list[StructDefinition])[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) TypesDefinitions [source]
multiversx_sdk.abi.address_value module
multiversx_sdk.abi.array_value module
- class multiversx_sdk.abi.array_value.ArrayValue(length: int, items: list[ISingleValue] | None = None, item_creator: Callable[[], ISingleValue] | None = None)[source]
Bases:
object
- guard_length(items: list[ISingleValue])[source]
multiversx_sdk.abi.bigint_value module
multiversx_sdk.abi.biguint_value module
multiversx_sdk.abi.bool_value module
multiversx_sdk.abi.bytes_value module
multiversx_sdk.abi.code_metadata_value module
- class multiversx_sdk.abi.code_metadata_value.CodeMetadataValue(value: bytes = b'')[source]
Bases:
object
- classmethod new_from_code_metadata(code_metadata: CodeMetadata) CodeMetadataValue [source]
multiversx_sdk.abi.codec module
- class multiversx_sdk.abi.codec.Codec[source]
Bases:
object
- decode_nested(data: bytes, value: ISingleValue) None [source]
- decode_top_level(data: bytes, value: ISingleValue) None [source]
- encode_nested(value: ISingleValue) bytes [source]
- encode_top_level(value: ISingleValue) bytes [source]
multiversx_sdk.abi.counted_variadic_values module
- class multiversx_sdk.abi.counted_variadic_values.CountedVariadicValues(items: list[ISingleValue | MultiValue] | None = None, item_creator: Callable[[], ISingleValue | MultiValue] | None = None)[source]
Bases:
IPayloadHolder
multiversx_sdk.abi.enum_value module
multiversx_sdk.abi.explicit_enum_value module
- class multiversx_sdk.abi.explicit_enum_value.ExplicitEnumValue(value: str = '')[source]
Bases:
StringValue
multiversx_sdk.abi.fields module
- class multiversx_sdk.abi.fields.Field(name: str, value: ISingleValue)[source]
Bases:
object
multiversx_sdk.abi.interface module
multiversx_sdk.abi.list_value module
- class multiversx_sdk.abi.list_value.ListValue(items: list[ISingleValue] | None = None, item_creator: Callable[[], ISingleValue] | None = None)[source]
Bases:
object
multiversx_sdk.abi.multi_value module
- class multiversx_sdk.abi.multi_value.MultiValue(items: list[ISingleValue | MultiValue])[source]
Bases:
IPayloadHolder
multiversx_sdk.abi.option_value module
- class multiversx_sdk.abi.option_value.OptionValue(value: ISingleValue | None = None)[source]
Bases:
object
multiversx_sdk.abi.optional_value module
- class multiversx_sdk.abi.optional_value.OptionalValue(value: ISingleValue | MultiValue | None = None)[source]
Bases:
IPayloadHolder
multiversx_sdk.abi.parts module
- class multiversx_sdk.abi.parts.PartsHolder(parts: Sequence[bytes])[source]
Bases:
object
PartsHolder holds data parts (e.g. raw contract call arguments, raw contract return values). It allows one to easily construct parts (thus functioning as a builder of parts). It also allows one to focus on a specific part to read from (thus functioning as a reader of parts: think of a pick-up head). Both functionalities (building and reading) are kept within this single abstraction, for convenience.
Creates a new PartsHolder, which has the given parts. Focus is on the first part, if any, or “beyond the last part” otherwise.
multiversx_sdk.abi.serializer module
- class multiversx_sdk.abi.serializer.Serializer(parts_separator: str = '@')[source]
Bases:
object
The serializer follows the rules of the MultiversX Serialization format: https://docs.multiversx.com/developers/data/serialization-overview
multiversx_sdk.abi.small_int_values module
- class multiversx_sdk.abi.small_int_values.I16Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.small_int_values.I32Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.small_int_values.I64Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.small_int_values.I8Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.small_int_values.SmallIntValue(num_bytes: int, value: int = 0)[source]
Bases:
object
- class multiversx_sdk.abi.small_int_values.SmallUIntValue(num_bytes: int, value: int = 0)[source]
Bases:
object
- class multiversx_sdk.abi.small_int_values.U16Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.small_int_values.U32Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.small_int_values.U64Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.small_int_values.U8Value(value: int = 0)[source]
Bases:
SmallUIntValue
multiversx_sdk.abi.string_value module
multiversx_sdk.abi.struct_value module
multiversx_sdk.abi.token_identifier_value module
- class multiversx_sdk.abi.token_identifier_value.TokenIdentifierValue(value: str = '')[source]
Bases:
StringValue
multiversx_sdk.abi.tuple_value module
- class multiversx_sdk.abi.tuple_value.TupleValue(fields: list[ISingleValue])[source]
Bases:
object
multiversx_sdk.abi.type_formula module
- class multiversx_sdk.abi.type_formula.TypeFormula(name: str, type_parameters: list[TypeFormula])[source]
Bases:
object
multiversx_sdk.abi.type_formula_parser module
- class multiversx_sdk.abi.type_formula_parser.TypeFormulaParser[source]
Bases:
object
- BEGIN_TYPE_PARAMETERS = '<'
- COMMA = ','
- END_TYPE_PARAMETERS = '>'
- PUNCTUATION = [',', '<', '>']
- acquire_type_parameters(stack: list[Any]) list[TypeFormula] [source]
- acquire_type_with_parameters(stack: list[Any]) TypeFormula [source]
- parse_expression(expression: str) TypeFormula [source]
multiversx_sdk.abi.typesystem module
multiversx_sdk.abi.variadic_values module
- class multiversx_sdk.abi.variadic_values.VariadicValues(items: list[ISingleValue | MultiValue] | None = None, item_creator: Callable[[], ISingleValue | MultiValue] | None = None)[source]
Bases:
IPayloadHolder
Module contents
- class multiversx_sdk.abi.Abi(definition: AbiDefinition)[source]
Bases:
object
- decode_endpoint_output_parameters(endpoint_name: str, encoded_values: list[bytes]) list[Any] [source]
- class multiversx_sdk.abi.AbiDefinition(constructor: EndpointDefinition, upgrade_constructor: EndpointDefinition, endpoints: list[EndpointDefinition], types: TypesDefinitions, events: list[EventDefinition])[source]
Bases:
object
- classmethod from_dict(data: dict[str, Any]) AbiDefinition [source]
- get_event_definition(name: str) EventDefinition [source]
- classmethod load(path: Path) AbiDefinition [source]
- class multiversx_sdk.abi.AddressValue(value: bytes = b'')[source]
Bases:
object
- classmethod new_from_address(address: IAddress) AddressValue [source]
- class multiversx_sdk.abi.ArrayValue(length: int, items: list[ISingleValue] | None = None, item_creator: Callable[[], ISingleValue] | None = None)[source]
Bases:
object
- guard_length(items: list[ISingleValue])[source]
- class multiversx_sdk.abi.CodeMetadataValue(value: bytes = b'')[source]
Bases:
object
- classmethod new_from_code_metadata(code_metadata: CodeMetadata) CodeMetadataValue [source]
- class multiversx_sdk.abi.EnumValue(discriminant: int = 0, fields: list[Field] | None = None, fields_provider: Callable[[int], list[Field]] | None = None)[source]
Bases:
object
- class multiversx_sdk.abi.ExplicitEnumValue(value: str = '')[source]
Bases:
StringValue
- class multiversx_sdk.abi.Field(name: str, value: ISingleValue)[source]
Bases:
object
- class multiversx_sdk.abi.I16Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.I32Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.I64Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.I8Value(value: int = 0)[source]
Bases:
SmallIntValue
- class multiversx_sdk.abi.ListValue(items: list[ISingleValue] | None = None, item_creator: Callable[[], ISingleValue] | None = None)[source]
Bases:
object
- class multiversx_sdk.abi.MultiValue(items: list[ISingleValue | MultiValue])[source]
Bases:
IPayloadHolder
- class multiversx_sdk.abi.OptionValue(value: ISingleValue | None = None)[source]
Bases:
object
- class multiversx_sdk.abi.OptionalValue(value: ISingleValue | MultiValue | None = None)[source]
Bases:
IPayloadHolder
- class multiversx_sdk.abi.Serializer(parts_separator: str = '@')[source]
Bases:
object
The serializer follows the rules of the MultiversX Serialization format: https://docs.multiversx.com/developers/data/serialization-overview
- class multiversx_sdk.abi.TokenIdentifierValue(value: str = '')[source]
Bases:
StringValue
- class multiversx_sdk.abi.TupleValue(fields: list[ISingleValue])[source]
Bases:
object
- class multiversx_sdk.abi.U16Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.U32Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.U64Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.U8Value(value: int = 0)[source]
Bases:
SmallUIntValue
- class multiversx_sdk.abi.VariadicValues(items: list[ISingleValue | MultiValue] | None = None, item_creator: Callable[[], ISingleValue | MultiValue] | None = None)[source]
Bases:
IPayloadHolder