Versions in this module Expand all Collapse all v1 v1.12.2 Apr 13, 2022 Changes in this version + const CONST_ENTRYPOINT + const CONST_ITEM + const CONST_KEY + const CONST_PARAM + const CONST_RETURN + const CONST_UNION_LEFT + const CONST_UNION_RIGHT + const CONST_VALUE + const EMPTY_LABEL + const FieldAnnoPrefix + const PATH_SEPARATOR + const RENDER_TYPE_FAIL + const RENDER_TYPE_PANIC + const RENDER_TYPE_PRIM + const TypeAnnoPrefix + const TypeStruct + const TypeUnion + const VarAnnoPrefix + var BigmapRefType = Prim + var EmptyPrim = Prim + var IDexter = Interface("DEXTER") + var IManager = Interface("MANAGER") + var ISetDelegate = Interface("SET_DELEGATE") + var ITzip12 = Interface("TZIP-012") + var ITzip5 = Interface("TZIP-005") + var ITzip7 = Interface("TZIP-007") + var InterfaceSpecs = map[Interface][]Prim + var InvalidPrim = Prim + var PrimSkip = errors.New("skip branch") + var WellKnownInterfaces = []Interface + func DisableLog() + func IsEqualPrim(p1, p2 Prim, withAnno bool) bool + func IsManagerTz(buf []byte) bool + func KeyHash(buf []byte) tezos.ExprHash + func Trace(fn func(log LogFn)) + func UseLogger(logger logpkg.Logger) + func UseTrace(fn LogFn) + type BigmapDiff []BigmapDiffElem + func (b *BigmapDiff) UnmarshalBinary(data []byte) error + func (b BigmapDiff) MarshalBinary() ([]byte, error) + type BigmapDiffElem struct + Action DiffAction + DestId int64 + Id int64 + Key Prim + KeyHash tezos.ExprHash + KeyType Prim + SourceId int64 + Value Prim + ValueType Prim + func (e *BigmapDiffElem) UnmarshalJSON(data []byte) error + func (e BigmapDiffElem) Encoding() PrimType + func (e BigmapDiffElem) GetKey(typ Type) Key + func (e BigmapDiffElem) GetKeyPtr(typ Type) *Key + func (e BigmapDiffElem) MarshalJSON() ([]byte, error) + type Ciphertext struct + Cv []byte + Epk []byte + NonceEnc []byte + NonceOut []byte + PayloadEnc []byte + PayloadOut []byte + func (c *Ciphertext) UnmarshalJSON(data []byte) error + func (c Ciphertext) MarshalJSON() ([]byte, error) + type Code struct + BadCode *Prim + Code Prim + Param Prim + Storage Prim + View Prim + func (c *Code) DecodeBuffer(buf *bytes.Buffer) error + func (c *Code) UnmarshalBinary(data []byte) error + func (c *Code) UnmarshalJSON(data []byte) error + func (c Code) MarshalBinary() ([]byte, error) + func (c Code) MarshalJSON() ([]byte, error) + type ConstantDict map[string]Prim + func (d *ConstantDict) Add(address tezos.ExprHash, value Prim) + func (d ConstantDict) Get(address tezos.ExprHash) (Prim, bool) + func (d ConstantDict) GetString(address string) (Prim, bool) + func (d ConstantDict) Has(address tezos.ExprHash) bool + type DiffAction byte + const DiffActionAlloc + const DiffActionCopy + const DiffActionRemove + const DiffActionUpdate + func ParseDiffAction(data string) (DiffAction, error) + func (a *DiffAction) UnmarshalText(data []byte) error + func (a DiffAction) MarshalText() ([]byte, error) + func (a DiffAction) String() string + type Entrypoint struct + Branch string + Id int + Name string + Prim *Prim + Typedef []Typedef + func (e Entrypoint) IsCallback() bool + func (e Entrypoint) Type() Type + type Entrypoints map[string]Entrypoint + func (e Entrypoints) FindBranch(branch string) (Entrypoint, bool) + func (e Entrypoints) FindId(id int) (Entrypoint, bool) + type Features uint16 + const FeatureAccountFactory + const FeatureChainId + const FeatureContractFactory + const FeatureDelegatable + const FeatureGlobalConstant + const FeatureLambda + const FeatureSapling + const FeatureSetDelegate + const FeatureSpendable + const FeatureTicket + const FeatureTimelock + const FeatureTransferTokens + const FeatureView + func (f Features) Array() []string + func (f Features) Contains(x Features) bool + func (f Features) MarshalJSON() ([]byte, error) + func (f Features) String() string + type Interface string + func (m Interface) Contains(e Entrypoint) bool + func (m Interface) ContainsStrict(e Entrypoint) bool + func (m Interface) FuncPrim(name string) Prim + func (m Interface) FuncType(name string) Type + func (m Interface) Matches(e Entrypoints) bool + func (m Interface) MatchesStrict(e Entrypoints) bool + func (m Interface) String() string + type Interfaces []Interface + func (i *Interfaces) Parse(s string) error + func (i *Interfaces) UnmarshalText(b []byte) error + func (i Interfaces) Contains(x Interface) bool + func (i Interfaces) MarshalJSON() ([]byte, error) + func (i Interfaces) MarshalText() ([]byte, error) + func (i Interfaces) String() string + type Key struct + AddrKey tezos.Address + BoolKey bool + BytesKey []byte + IntKey *big.Int + KeyKey tezos.Key + PrimKey Prim + SignatureKey tezos.Signature + StringKey string + TimeKey time.Time + Type Type + func DecodeKey(typ Type, b []byte) (Key, error) + func NewKey(typ Type, key Prim) (Key, error) + func NewKeyPtr(typ Type, key Prim) (*Key, error) + func ParseKey(typ OpCode, val string) (Key, error) + func (k Key) Bytes() []byte + func (k Key) Hash() tezos.ExprHash + func (k Key) IsPacked() bool + func (k Key) MarshalBinary() ([]byte, error) + func (k Key) MarshalJSON() ([]byte, error) + func (k Key) Prim() Prim + func (k Key) PrimPtr() *Prim + func (k Key) String() string + func (k Key) Unpack() (Key, error) + func (k Key) UnpackPrim() (p Prim, err error) + type LogFn logpkg.LogfFn + type OpCode byte + const D_ELT + const D_FALSE + const D_LEFT + const D_NONE + const D_PAIR + const D_RIGHT + const D_SOME + const D_TRUE + const D_UNIT + const H_CONSTANT + const I_ABS + const I_ADD + const I_ADDRESS + const I_AMOUNT + const I_AND + const I_APPLY + const I_BALANCE + const I_BLAKE2B + const I_CAR + const I_CAST + const I_CDR + const I_CHAIN_ID + const I_CHECK_SIGNATURE + const I_COMPARE + const I_CONCAT + const I_CONS + const I_CONTRACT + const I_CREATE_ACCOUNT + const I_CREATE_CONTRACT + const I_DIG + const I_DIP + const I_DROP + const I_DUG + const I_DUP + const I_EDIV + const I_EMPTY_BIG_MAP + const I_EMPTY_MAP + const I_EMPTY_SET + const I_EQ + const I_EXEC + const I_FAILWITH + const I_GE + const I_GET + const I_GET_AND_UPDATE + const I_GT + const I_HASH_KEY + const I_IF + const I_IF_CONS + const I_IF_LEFT + const I_IF_NONE + const I_IMPLICIT_ACCOUNT + const I_INT + const I_ISNAT + const I_ITER + const I_JOIN_TICKETS + const I_KECCAK + const I_LAMBDA + const I_LE + const I_LEFT + const I_LEVEL + const I_LOOP + const I_LOOP_LEFT + const I_LSL + const I_LSR + const I_LT + const I_MAP + const I_MEM + const I_MUL + const I_NEG + const I_NEQ + const I_NEVER + const I_NIL + const I_NONE + const I_NOT + const I_NOW + const I_OPEN_CHEST + const I_OR + const I_PACK + const I_PAIR + const I_PAIRING_CHECK + const I_PUSH + const I_READ_TICKET + const I_RENAME + const I_RIGHT + const I_SAPLING_EMPTY_STATE + const I_SAPLING_VERIFY_UPDATE + const I_SELF + const I_SELF_ADDRESS + const I_SENDER + const I_SET_DELEGATE + const I_SHA256 + const I_SHA3 + const I_SHA512 + const I_SIZE + const I_SLICE + const I_SOME + const I_SOURCE + const I_SPLIT_TICKET + const I_STEPS_TO_QUOTA + const I_SUB + const I_SUB_MUTEZ + const I_SWAP + const I_TICKET + const I_TOTAL_VOTING_POWER + const I_TRANSFER_TOKENS + const I_UNIT + const I_UNPACK + const I_UNPAIR + const I_UPDATE + const I_VIEW + const I_VOTING_POWER + const I_XOR + const K_CODE + const K_PARAMETER + const K_STORAGE + const K_VIEW + const T_ADDRESS + const T_BIG_MAP + const T_BLS12_381_FR + const T_BLS12_381_G1 + const T_BLS12_381_G2 + const T_BOOL + const T_BYTES + const T_CHAIN_ID + const T_CHEST + const T_CHEST_KEY + const T_CONTRACT + const T_INT + const T_KEY + const T_KEY_HASH + const T_LAMBDA + const T_LIST + const T_MAP + const T_MUTEZ + const T_NAT + const T_NEVER + const T_OPERATION + const T_OPTION + const T_OR + const T_PAIR + const T_SAPLING_STATE + const T_SAPLING_TRANSACTION + const T_SET + const T_SIGNATURE + const T_STRING + const T_TICKET + const T_TIMESTAMP + const T_UNIT + func InferKeyType(val string) OpCode + func ParseKeyType(typ string) (OpCode, error) + func ParseOpCode(str string) (OpCode, error) + func (o OpCode) Byte() byte + func (op OpCode) IsKeyCode() bool + func (op OpCode) IsTypeCode() bool + func (op OpCode) IsValid() bool + func (op OpCode) MarshalText() ([]byte, error) + func (op OpCode) PrimType() PrimType + func (op OpCode) String() string + func (op OpCode) TypeCode() OpCode + type Parameters struct + Entrypoint string + Value Prim + func (p *Parameters) DecodeBuffer(buf *bytes.Buffer) error + func (p *Parameters) UnmarshalBinary(data []byte) error + func (p *Parameters) UnmarshalJSON(data []byte) error + func (p Parameters) Branch(prefix string, eps Entrypoints) string + func (p Parameters) EncodeBuffer(buf *bytes.Buffer) error + func (p Parameters) MapEntrypoint(typ Type) (Entrypoint, Prim, error) + func (p Parameters) MarshalBinary() ([]byte, error) + func (p Parameters) MarshalJSON() ([]byte, error) + func (p Parameters) Unwrap(branch string) Prim + type Prim struct + Anno []string + Args PrimList + Bytes []byte + Int *big.Int + OpCode OpCode + String string + Type PrimType + WasPacked bool + func ASSERT_CMPEQ() Prim + func DELEGATE_ENTRY() Prim + func DO_ENTRY() Prim + func DUUP() Prim + func IFCMPNEQ(left, right Prim) Prim + func NewBig(i *big.Int) Prim + func NewBigmapRef(id int64) Prim + func NewBigmapRefType(anno string) Prim + func NewBytes(b []byte) Prim + func NewCode(c OpCode, args ...Prim) Prim + func NewCodeAnno(c OpCode, anno string, args ...Prim) Prim + func NewCombPair(contents ...Prim) Prim + func NewCombPairType(contents ...Prim) Prim + func NewInt64(i int64) Prim + func NewNat(i *big.Int) Prim + func NewPair(l, r Prim) Prim + func NewPairType(l, r Prim, anno ...string) Prim + func NewPrim(c OpCode, anno ...string) Prim + func NewSeq(args ...Prim) Prim + func NewString(s string) Prim + func UNPAIR() Prim + func (p *Prim) DecodeBuffer(buf *bytes.Buffer) error + func (p *Prim) StripAnno(name string) + func (p *Prim) UnmarshalBinary(data []byte) error + func (p *Prim) UnmarshalJSON(data []byte) error + func (p *Prim) UnpackJSON(val interface{}) error + func (p *Prim) UnpackPrimitive(val map[string]interface{}) error + func (p *Prim) UnpackScalar(val interface{}) error + func (p *Prim) UnpackSequence(val []interface{}) error + func (p *Prim) Visit(f PrimVisitorFunc) error + func (p Prim) BuildType() Type + func (p Prim) CanUnfold(typ Type) bool + func (p Prim) Clone() Prim + func (p Prim) Constants() []tezos.ExprHash + func (p Prim) ContainsOpCode(typ OpCode) bool + func (p Prim) Decode(v interface{}) error + func (p Prim) Dump() string + func (p Prim) DumpLimit(n int) string + func (p Prim) EncodeBuffer(buf *bytes.Buffer) error + func (p Prim) Features() Features + func (p Prim) FindLabels(label string) ([]Prim, bool) + func (p Prim) FindOpCodes(typ OpCode) ([]Prim, bool) + func (p Prim) FoldPair() Prim + func (p Prim) GetFieldAnno() string + func (p Prim) GetFieldAnnoAny() string + func (p Prim) GetIndex(index []int) (Prim, error) + func (p Prim) GetIndexExt(index []int, typ OpCode) (Prim, error) + func (p Prim) GetPath(path string) (Prim, error) + func (p Prim) GetPathExt(path string, typ OpCode) (Prim, error) + func (p Prim) GetTypeAnno() string + func (p Prim) GetTypeAnnoAny() string + func (p Prim) GetVarAnno() string + func (p Prim) GetVarAnnoAny() string + func (p Prim) GetVarOrFieldAnno() string + func (p Prim) HasAnno() bool + func (p Prim) HasFieldAnno() bool + func (p Prim) HasSimilarChildTypes() bool + func (p Prim) HasTypeAnno() bool + func (p Prim) HasVarAnno() bool + func (p Prim) HasVarOrFieldAnno() bool + func (p Prim) Hash64() uint64 + func (p Prim) Index(label string) ([]int, bool) + func (p Prim) IsConstant() bool + func (p Prim) IsContainerType() bool + func (p Prim) IsConvertedComb() bool + func (p Prim) IsElt() bool + func (p Prim) IsEmpty() bool + func (p Prim) IsEmptyBigmap() bool + func (p Prim) IsEqual(p2 Prim) bool + func (p Prim) IsEqualWithAnno(p2 Prim) bool + func (p Prim) IsInstruction() bool + func (p Prim) IsLambda() bool + func (p Prim) IsList() bool + func (p Prim) IsMap() bool + func (p Prim) IsNil() bool + func (p Prim) IsPacked() bool + func (p Prim) IsPackedAny() bool + func (p Prim) IsPair() bool + func (p Prim) IsScalar() bool + func (p Prim) IsScalarType() bool + func (p Prim) IsSequence() bool + func (p Prim) IsSet() bool + func (p Prim) IsTicket() bool + func (p Prim) IsValid() bool + func (p Prim) LooksLikeCode() bool + func (p Prim) LooksLikeContainer() bool + func (p Prim) LooksLikeMap() bool + func (p Prim) LooksLikeSet() bool + func (p Prim) MarshalBinary() ([]byte, error) + func (p Prim) MarshalJSON() ([]byte, error) + func (p Prim) MatchesAnno(anno string) bool + func (p Prim) MigrateToBabylonStorage(managerHash []byte) Prim + func (p Prim) Pack() []byte + func (p Prim) UnfoldPair(typ Type) []Prim + func (p Prim) UnfoldPairRecursive(typ Type) []Prim + func (p Prim) Unpack() (pp Prim, err error) + func (p Prim) UnpackAll() (Prim, error) + func (p Prim) Value(as OpCode) interface{} + func (p Prim) Walk(f PrimWalkerFunc) error + type PrimList []Prim + func (l PrimList) Last() Prim + type PrimMarshaler interface + MarshalPrim func() (Prim, error) + type PrimType byte + const PrimBinary + const PrimBinaryAnno + const PrimBytes + const PrimInt + const PrimNullary + const PrimNullaryAnno + const PrimSequence + const PrimString + const PrimUnary + const PrimUnaryAnno + const PrimVariadicAnno + func ParsePrimType(val string) (PrimType, error) + func (t PrimType) IsValid() bool + func (t PrimType) MarshalText() ([]byte, error) + func (t PrimType) String() string + func (t PrimType) TypeCode() OpCode + type PrimUnmarshaler interface + UnmarshalPrim func(Prim) error + type PrimVisitorFunc func(p *Prim) error + type PrimWalkerFunc func(p Prim) error + type SaplingDiffElem struct + Action DiffAction + MemoSize int + Updates SaplingUpdate + type SaplingUpdate struct + Ciphertexts []Ciphertext + Commitments [][]byte + Nullifiers [][]byte + type Script struct + Code Code + Storage Prim + func MakeManagerScript(managerHash []byte) (*Script, error) + func NewScript() *Script + func (p *Script) DecodeBuffer(buf *bytes.Buffer) error + func (p *Script) UnmarshalBinary(data []byte) error + func (p Script) EncodeBuffer(buf *bytes.Buffer) error + func (p Script) MarshalBinary() ([]byte, error) + func (s *Script) BigmapTypesByName() map[string]Type + func (s *Script) BigmapsById() []int64 + func (s *Script) BigmapsByName() map[string]int64 + func (s *Script) CodeHash() uint64 + func (s *Script) Constants() []tezos.ExprHash + func (s *Script) Entrypoints(withPrim bool) (Entrypoints, error) + func (s *Script) ExpandConstants(dict ConstantDict) + func (s *Script) Features() Features + func (s *Script) Implements(i Interface) bool + func (s *Script) ImplementsStrict(i Interface) bool + func (s *Script) InterfaceHash() uint64 + func (s *Script) Interfaces() Interfaces + func (s *Script) InterfacesStrict() Interfaces + func (s *Script) MigrateToBabylonAddDo(managerHash []byte) + func (s *Script) MigrateToBabylonSetDelegate(managerHash []byte) + func (s *Script) ParamType() Type + func (s *Script) ResolveEntrypointPath(name string) string + func (s *Script) StorageHash() uint64 + func (s *Script) StorageType() Type + func (s *Script) Views(withPrim, withCode bool) (Views, error) + type Stack []Prim + func NewStack(args ...Prim) *Stack + func (s *Stack) Empty() bool + func (s *Stack) Len() int + func (s *Stack) Peek() Prim + func (s *Stack) Pop() Prim + func (s *Stack) Push(args ...Prim) + func (s Stack) Dump() string + func (s Stack) DumpIdent(indent int) string + type Type struct + func NewType(p Prim) Type + func NewTypePtr(p Prim) *Type + func TicketType(t Prim) Type + func (t *Type) UnmarshalBinary(buf []byte) error + func (t *Type) UnmarshalJSON(buf []byte) error + func (t Type) Clone() Type + func (t Type) Entrypoints(withPrim bool) (Entrypoints, error) + func (t Type) HasLabel() bool + func (t Type) IsEqual(t2 Type) bool + func (t Type) IsEqualWithAnno(t2 Type) bool + func (t Type) Label() string + func (t Type) Left() Type + func (t Type) MarshalJSON() ([]byte, error) + func (t Type) ResolveEntrypointPath(name string) string + func (t Type) Right() Type + func (t Type) Typedef(name string) Typedef + func (t Type) TypedefPtr(name string) *Typedef + type Typedef struct + Args []Typedef + Name string + Optional bool + Type string + func (a Typedef) Equal(b Typedef) bool + func (a Typedef) StrictEqual(b Typedef) bool + func (t Typedef) String() string + type Value struct + Render int + Type Type + Value Prim + func NewValue(typ Type, val Prim) Value + func NewValuePtr(typ Type, val Prim) *Value + func (e *Value) FixType() + func (e *Value) Map() (interface{}, error) + func (e Value) Dump() string + func (e Value) DumpLimit(n int) string + func (e Value) DumpTo(w io.Writer) + func (e Value) MarshalJSON() ([]byte, error) + func (v *Value) Decode(buf []byte) error + func (v *Value) GetAddress(label string) (tezos.Address, bool) + func (v *Value) GetBig(label string) (*big.Int, bool) + func (v *Value) GetBool(label string) (bool, bool) + func (v *Value) GetBytes(label string) ([]byte, bool) + func (v *Value) GetInt64(label string) (int64, bool) + func (v *Value) GetKey(label string) (tezos.Key, bool) + func (v *Value) GetSignature(label string) (tezos.Signature, bool) + func (v *Value) GetString(label string) (string, bool) + func (v *Value) GetTime(label string) (time.Time, bool) + func (v *Value) GetValue(label string) (interface{}, bool) + func (v *Value) Unmarshal(val interface{}) error + func (v *Value) Walk(label string, fn ValueWalkerFunc) error + func (v Value) IsPacked() bool + func (v Value) IsPackedAny() bool + func (v Value) Unpack() (Value, error) + func (v Value) UnpackAll() (Value, error) + type ValueWalkerFunc func(label string, value interface{}) error + type View struct + Code Prim + Name string + Param Type + Prim Prim + Retval Type + func NewView(p Prim) View + func NewViewPtr(p Prim) *View + func (v View) Clone() View + func (v View) IsEqual(v2 View) bool + func (v View) IsEqualWithAnno(v2 View) bool + func (v View) IsEqualWithCode(v2 View) bool + func (v View) IsValid() bool + func (v View) MarshalJSON() ([]byte, error) + func (v View) Typedef() Typedef + func (v View) TypedefPtr(name string) *Typedef + type Views map[string]View