Michelson types¶
Base class¶
-
class
pytezos.michelson.types.base.
MichelsonType
[source]¶ -
aggregate_lazy_diff
(lazy_diff: List[dict], mode='readable') → MichelsonType[source]¶
-
args
: List[Union[Type[MichelsonType], Any]] = []¶
-
classmethod
create_type
(args: List[Type[Micheline]], annots: Optional[list] = None, **kwargs) → Type[MichelsonType][source]¶
-
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → MichelsonType[source]¶
-
field_name
: Optional[str] = None¶
-
classmethod
from_literal
(literal: Type[pytezos.michelson.micheline.Micheline]) → MichelsonType[source]¶
-
classmethod
from_micheline_value
(val_expr) → MichelsonType[source]¶
-
classmethod
from_python_object
(py_obj) → MichelsonType[source]¶
-
classmethod
generate_pydoc
(definitions: List[Tuple[str, str]], inferred_name=None, comparable=False) → str[source]¶
-
classmethod
get_anon_type
() → Type[MichelsonType][source]¶
-
static
match
(expr) → Type[MichelsonType][source]¶
-
merge_lazy_diff
(lazy_diff: List[dict]) → MichelsonType[source]¶
-
type_name
: Optional[str] = None¶
-
classmethod
unpack
(data: bytes) → MichelsonType[source]¶
-
-
pytezos.michelson.types.base.
generate_pydoc
(ty: Type[pytezos.michelson.types.base.MichelsonType], title=None)[source]¶
Core types¶
-
class
pytezos.michelson.types.core.
BytesType
(value: bytes = b'')[source]¶ -
-
prim
: Optional[str] = 'bytes'¶
-
-
class
pytezos.michelson.types.core.
StringType
(value: str = '')[source]¶ -
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → StringType[source]¶
-
classmethod
from_micheline_value
(val_expr) → StringType[source]¶
-
classmethod
from_python_object
(py_obj) → StringType[source]¶
-
classmethod
from_value
(value: str) → StringType[source]¶
-
prim
: Optional[str] = 'string'¶
-
classmethod
Domain types¶
-
class
pytezos.michelson.types.domain.
AddressType
(value: str = '')[source]¶ -
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → AddressType[source]¶
-
classmethod
from_micheline_value
(val_expr) → AddressType[source]¶
-
classmethod
from_python_object
(py_obj) → AddressType[source]¶
-
classmethod
from_value
(value: str) → AddressType[source]¶
-
prim
: Optional[str] = 'address'¶
-
classmethod
-
class
pytezos.michelson.types.domain.
ChainIdType
(value: str = '')[source]¶ -
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → ChainIdType[source]¶
-
classmethod
from_micheline_value
(val_expr) → ChainIdType[source]¶
-
classmethod
from_python_object
(py_obj) → ChainIdType[source]¶
-
classmethod
from_value
(value: str) → ChainIdType[source]¶
-
prim
: Optional[str] = 'chain_id'¶
-
classmethod
-
class
pytezos.michelson.types.domain.
ContractType
(value: str = '')[source]¶ -
classmethod
from_python_object
(py_obj) → ContractType[source]¶
-
prim
: Optional[str] = 'contract'¶
-
classmethod
-
class
pytezos.michelson.types.domain.
KeyHashType
(value: str = '')[source]¶ -
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → KeyHashType[source]¶
-
classmethod
from_micheline_value
(val_expr) → KeyHashType[source]¶
-
classmethod
from_value
(value: str) → KeyHashType[source]¶
-
prim
: Optional[str] = 'key_hash'¶
-
classmethod
-
class
pytezos.michelson.types.domain.
LambdaType
(value: Type[pytezos.michelson.micheline.Micheline])[source]¶ -
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → LambdaType[source]¶
-
classmethod
from_micheline_value
(val_expr) → LambdaType[source]¶
-
classmethod
from_python_object
(py_obj) → LambdaType[source]¶
-
prim
: Optional[str] = 'lambda'¶
-
classmethod
-
class
pytezos.michelson.types.domain.
MutezType
(value: int = 0)[source]¶ -
-
prim
: Optional[str] = 'mutez'¶
-
-
class
pytezos.michelson.types.domain.
SignatureType
(value: str = '')[source]¶ -
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → SignatureType[source]¶
-
classmethod
from_micheline_value
(val_expr) → SignatureType[source]¶
-
classmethod
from_python_object
(py_obj) → SignatureType[source]¶
-
classmethod
from_value
(value: str) → SignatureType[source]¶
-
prim
: Optional[str] = 'signature'¶
-
classmethod
-
class
pytezos.michelson.types.domain.
TimestampType
(value: int = 0)[source]¶ -
classmethod
from_micheline_value
(val_expr) → TimestampType[source]¶
-
classmethod
from_python_object
(py_obj) → TimestampType[source]¶
-
classmethod
from_value
(value: int) → TimestampType[source]¶
-
prim
: Optional[str] = 'timestamp'¶
-
classmethod
Big map type¶
-
class
pytezos.michelson.types.big_map.
BigMapType
(items: List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]], ptr: Optional[int] = None, removed_keys: Optional[List[pytezos.michelson.types.base.MichelsonType]] = None)[source]¶ -
aggregate_lazy_diff
(lazy_diff: List[dict], mode='readable') → BigMapType[source]¶
-
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → BigMapType[source]¶
-
static
empty
(key_type: Type[pytezos.michelson.types.base.MichelsonType], val_type: Type[pytezos.michelson.types.base.MichelsonType]) → BigMapType[source]¶
-
static
from_items
(items: List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]])[source]¶
-
classmethod
from_micheline_value
(val_expr) → BigMapType[source]¶
-
classmethod
from_python_object
(py_obj: Union[int, dict]) → BigMapType[source]¶
-
get
(key: pytezos.michelson.types.base.MichelsonType, dup=True) → Optional[pytezos.michelson.types.base.MichelsonType][source]¶
-
merge_lazy_diff
(lazy_diff: List[dict]) → BigMapType[source]¶
-
prim
: Optional[str] = 'big_map'¶
-
update
(key: pytezos.michelson.types.base.MichelsonType, val: Optional[pytezos.michelson.types.base.MichelsonType]) → Tuple[Optional[pytezos.michelson.types.base.MichelsonType], pytezos.michelson.types.base.MichelsonType][source]¶
-
BLS types¶
-
class
pytezos.michelson.types.bls.
BLS12_381_FrType
(value: int)[source]¶ -
-
classmethod
from_python_object
(py_obj) → BLS12_381_FrType[source]¶
-
classmethod
from_value
(value: int) → BLS12_381_FrType[source]¶
-
modulus
= 52435875175126190479447740508185965837690552500527637822603658699938581184513¶
-
prim
: Optional[str] = 'bls12_381_fr'¶
-
classmethod
-
class
pytezos.michelson.types.bls.
BLS12_381_G1Type
(value: bytes = b'')[source]¶ -
classmethod
from_point
(point: Tuple[py_ecc.fields.optimized_bls12_381_FQ]) → BLS12_381_G1Type[source]¶
-
prim
: Optional[str] = 'bls12_381_g1'¶
-
classmethod
List type¶
-
class
pytezos.michelson.types.list.
ListType
(items: List[pytezos.michelson.types.base.MichelsonType])[source]¶ -
-
static
empty
(item_type: Type[pytezos.michelson.types.base.MichelsonType])[source]¶
-
static
from_items
(items: List[pytezos.michelson.types.base.MichelsonType])[source]¶
-
classmethod
generate_pydoc
(definitions: List[Tuple[str, str]], inferred_name=None, comparable=False)[source]¶
-
prepend
(item: pytezos.michelson.types.base.MichelsonType) → ListType[source]¶
-
prim
: Optional[str] = 'list'¶
-
split_head
() → Tuple[pytezos.michelson.types.base.MichelsonType, ListType][source]¶
-
static
Map type¶
-
class
pytezos.michelson.types.map.
MapType
(items: List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]])[source]¶ -
-
classmethod
check_constraints
(items: List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]])[source]¶
-
contains
(key: pytezos.michelson.types.base.MichelsonType)[source]¶
-
static
empty
(key_type: Type[pytezos.michelson.types.base.MichelsonType], val_type: Type[pytezos.michelson.types.base.MichelsonType]) → MapType[source]¶
-
static
from_items
(items: List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]]) → MapType[source]¶
-
classmethod
generate_pydoc
(definitions: List[Tuple[str, str]], inferred_name=None, comparable=False)[source]¶
-
get
(key: pytezos.michelson.types.base.MichelsonType, dup=True) → Optional[pytezos.michelson.types.base.MichelsonType][source]¶
-
classmethod
parse_micheline_value
(val_expr) → List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]][source]¶
-
classmethod
parse_python_object
(py_obj) → List[Tuple[pytezos.michelson.types.base.MichelsonType, pytezos.michelson.types.base.MichelsonType]][source]¶
-
prim
: Optional[str] = 'map'¶
-
update
(key: pytezos.michelson.types.base.MichelsonType, val: Optional[pytezos.michelson.types.base.MichelsonType]) → Tuple[Optional[pytezos.michelson.types.base.MichelsonType], pytezos.michelson.types.base.MichelsonType][source]¶
-
classmethod
Operation type¶
-
class
pytezos.michelson.types.operation.
OperationType
(content: dict, ty: Optional[Type[pytezos.michelson.types.base.MichelsonType]] = None)[source]¶ -
classmethod
delegation
(source: str, delegate: Optional[str] = None) → OperationType[source]¶
-
classmethod
origination
(source: str, script: Type[pytezos.michelson.micheline.MichelineSequence], storage: pytezos.michelson.types.base.MichelsonType, balance: int = 0, delegate: Optional[str] = None) → OperationType[source]¶
-
prim
: Optional[str] = 'operation'¶
-
classmethod
transaction
(source: str, destination: str, amount: int, entrypoint: str, parameter: pytezos.michelson.types.base.MichelsonType) → OperationType[source]¶
-
classmethod
Option type¶
-
class
pytezos.michelson.types.option.
OptionType
(item: Optional[pytezos.michelson.types.base.MichelsonType])[source]¶ -
-
classmethod
dummy
(context: pytezos.context.abstract.AbstractContext) → OptionType[source]¶
-
static
from_some
(item: pytezos.michelson.types.base.MichelsonType) → OptionType[source]¶
-
get_some
() → pytezos.michelson.types.base.MichelsonType[source]¶
-
static
none
(some_type: Type[pytezos.michelson.types.base.MichelsonType]) → OptionType[source]¶
-
prim
: Optional[str] = 'option'¶
-
classmethod
Pair type¶
-
class
pytezos.michelson.types.pair.
PairType
(items: Tuple[pytezos.michelson.types.base.MichelsonType, …])[source]¶ -
access_comb
(idx: int) → pytezos.michelson.types.base.MichelsonType[source]¶
-
classmethod
create_type
(args: List[Type[Micheline]], annots: Optional[list] = None, **kwargs) → Type[PairType][source]¶
-
static
from_comb
(items: List[pytezos.michelson.types.base.MichelsonType]) → PairType[source]¶
-
classmethod
init
(items: List[pytezos.michelson.types.base.MichelsonType]) → PairType[source]¶
-
iter_comb
(include_nodes=False) → Generator[pytezos.michelson.types.base.MichelsonType, None, None][source]¶
-
classmethod
iter_type_args
(entrypoints=False, path='') → Generator[Tuple[str, Type[pytezos.michelson.types.base.MichelsonType]], None, None][source]¶
-
iter_values
(path='') → Generator[Tuple[str, pytezos.michelson.types.base.MichelsonType], None, None][source]¶
-
prim
: Optional[str] = 'pair'¶
-
update_comb
(idx: int, element: pytezos.michelson.types.base.MichelsonType) → PairType[source]¶
-
Sapling type¶
Set type¶
-
class
pytezos.michelson.types.set.
SetType
(items: List[pytezos.michelson.types.base.MichelsonType])[source]¶ -
-
classmethod
check_constraints
(items: List[pytezos.michelson.types.base.MichelsonType])[source]¶
-
contains
(item: pytezos.michelson.types.base.MichelsonType) → bool[source]¶
-
static
empty
(item_type: Type[pytezos.michelson.types.base.MichelsonType]) → SetType[source]¶
-
static
from_items
(items: List[pytezos.michelson.types.base.MichelsonType]) → SetType[source]¶
-
prim
: Optional[str] = 'set'¶
-
remove
(item: pytezos.michelson.types.base.MichelsonType) → SetType[source]¶
-
classmethod
Or type¶
-
class
pytezos.michelson.types.sum.
OrType
(items: Tuple[Union[pytezos.michelson.types.base.undefined, pytezos.michelson.types.base.MichelsonType], …])[source]¶ -
-
classmethod
create_type
(args: List[Type[Micheline]], annots: Optional[list] = None, **kwargs) → Type[OrType][source]¶
-
static
from_left
(left: pytezos.michelson.types.base.MichelsonType, right_type: Type[pytezos.michelson.types.base.MichelsonType])[source]¶
-
static
from_right
(right: pytezos.michelson.types.base.MichelsonType, left_type: Type[pytezos.michelson.types.base.MichelsonType])[source]¶
-
is_enum
: bool¶
-
classmethod
iter_type_args
(entrypoints=False, path='') → Generator[Tuple[str, Type[pytezos.michelson.types.base.MichelsonType]], None, None][source]¶
-
iter_values
(path='') → Generator[Tuple[str, pytezos.michelson.types.base.MichelsonType], None, None][source]¶
-
prim
: Optional[str] = 'or'¶
-
classmethod
Ticket type¶
-
class
pytezos.michelson.types.ticket.
TicketType
(ticketer: str, item: pytezos.michelson.types.base.MichelsonType, amount: int)[source]¶ -
static
create
(ticketer: str, item: pytezos.michelson.types.base.MichelsonType, amount: int) → TicketType[source]¶
-
classmethod
from_comb
(comb: pytezos.michelson.types.pair.PairType) → TicketType[source]¶
-
classmethod
from_micheline_value
(val_expr) → TicketType[source]¶
-
classmethod
generate_pydoc
(definitions: List[Tuple[str, str]], inferred_name=None, comparable=False) → str[source]¶
-
static
join
(left: TicketType, right: TicketType) → Optional[TicketType][source]¶
-
prim
: Optional[str] = 'ticket'¶
-
split
(amount_left: int, amount_right: int) → Optional[Tuple[TicketType, TicketType]][source]¶
-
to_comb
() → pytezos.michelson.types.pair.PairType[source]¶
-
static