Documentation ¶
Index ¶
- Constants
- func CalculateMinFee(o Operation, gas int64, withHeader bool) int64
- type ActivateAccount
- func (o *ActivateAccount) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o ActivateAccount) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o ActivateAccount) Kind() tezos.OpType
- func (o ActivateAccount) MarshalBinary() ([]byte, error)
- func (o ActivateAccount) MarshalJSON() ([]byte, error)
- func (o *ActivateAccount) UnmarshalBinary(data []byte) error
- type Ballot
- func (o *Ballot) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Ballot) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Ballot) Kind() tezos.OpType
- func (o Ballot) MarshalBinary() ([]byte, error)
- func (o Ballot) MarshalJSON() ([]byte, error)
- func (o *Ballot) UnmarshalBinary(data []byte) error
- type BlockHeader
- func (h BlockHeader) Bytes() []byte
- func (h *BlockHeader) DecodeBuffer(buf *bytes.Buffer) (err error)
- func (h BlockHeader) Digest() []byte
- func (h *BlockHeader) EncodeBuffer(buf *bytes.Buffer) error
- func (h BlockHeader) MarshalBinary() ([]byte, error)
- func (h BlockHeader) MarshalJSON() ([]byte, error)
- func (h *BlockHeader) Sign(key tezos.PrivateKey) error
- func (h *BlockHeader) UnmarshalBinary(data []byte) error
- func (h BlockHeader) WatermarkedBytes() []byte
- func (h *BlockHeader) WithSignature(sig tezos.Signature) *BlockHeader
- type Delegation
- func (o *Delegation) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Delegation) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Delegation) Kind() tezos.OpType
- func (o Delegation) MarshalBinary() ([]byte, error)
- func (o Delegation) MarshalJSON() ([]byte, error)
- func (o *Delegation) UnmarshalBinary(data []byte) error
- type DoubleBakingEvidence
- func (o *DoubleBakingEvidence) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o DoubleBakingEvidence) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o DoubleBakingEvidence) Kind() tezos.OpType
- func (o DoubleBakingEvidence) MarshalBinary() ([]byte, error)
- func (o DoubleBakingEvidence) MarshalJSON() ([]byte, error)
- func (o *DoubleBakingEvidence) UnmarshalBinary(data []byte) error
- type DoubleEndorsementEvidence
- func (o *DoubleEndorsementEvidence) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o DoubleEndorsementEvidence) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o DoubleEndorsementEvidence) Kind() tezos.OpType
- func (o DoubleEndorsementEvidence) MarshalBinary() ([]byte, error)
- func (o DoubleEndorsementEvidence) MarshalJSON() ([]byte, error)
- func (o *DoubleEndorsementEvidence) UnmarshalBinary(data []byte) error
- type Endorsement
- func (o *Endorsement) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Endorsement) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Endorsement) Kind() tezos.OpType
- func (o Endorsement) MarshalBinary() ([]byte, error)
- func (o Endorsement) MarshalJSON() ([]byte, error)
- func (o *Endorsement) UnmarshalBinary(data []byte) error
- type EndorsementWithSlot
- func (o *EndorsementWithSlot) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o EndorsementWithSlot) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o EndorsementWithSlot) Kind() tezos.OpType
- func (o EndorsementWithSlot) MarshalBinary() ([]byte, error)
- func (o EndorsementWithSlot) MarshalJSON() ([]byte, error)
- func (o *EndorsementWithSlot) UnmarshalBinary(data []byte) error
- type FailingNoop
- func (o *FailingNoop) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o FailingNoop) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o FailingNoop) Kind() tezos.OpType
- func (o FailingNoop) MarshalBinary() ([]byte, error)
- func (o FailingNoop) MarshalJSON() ([]byte, error)
- func (o *FailingNoop) UnmarshalBinary(data []byte) error
- type InlinedEndorsement
- type Manager
- func (o *Manager) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Manager) EncodeBuffer(buf *bytes.Buffer, _ *tezos.Params) error
- func (o Manager) EncodeJSON(buf *bytes.Buffer) error
- func (o Manager) GetCounter() int64
- func (o Manager) Limits() tezos.Limits
- func (o *Manager) WithCounter(c int64)
- func (o *Manager) WithLimits(limits tezos.Limits)
- func (o *Manager) WithSource(addr tezos.Address)
- type Op
- func (o *Op) Bytes() []byte
- func (o *Op) Digest() []byte
- func (o Op) Limits() tezos.Limits
- func (o *Op) MarshalJSON() ([]byte, error)
- func (o *Op) Sign(key tezos.PrivateKey) error
- func (o *Op) WatermarkedBytes() []byte
- func (o *Op) WithBranch(hash tezos.BlockHash) *Op
- func (o *Op) WithContents(op Operation) *Op
- func (o *Op) WithContentsFront(op Operation) *Op
- func (o *Op) WithLimits(limits []tezos.Limits, margin int64) *Op
- func (o *Op) WithParams(p *tezos.Params) *Op
- func (o *Op) WithSignature(sig tezos.Signature) *Op
- func (o *Op) WithSource(addr tezos.Address) *Op
- func (o *Op) WithTTL(n int64) *Op
- type Operation
- type Origination
- func (o *Origination) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Origination) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Origination) Kind() tezos.OpType
- func (o Origination) MarshalBinary() ([]byte, error)
- func (o Origination) MarshalJSON() ([]byte, error)
- func (o *Origination) UnmarshalBinary(data []byte) error
- type Proposals
- func (o *Proposals) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Proposals) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Proposals) Kind() tezos.OpType
- func (o Proposals) MarshalBinary() ([]byte, error)
- func (o Proposals) MarshalJSON() ([]byte, error)
- func (o *Proposals) UnmarshalBinary(data []byte) error
- type RegisterGlobalConstant
- func (o *RegisterGlobalConstant) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o RegisterGlobalConstant) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o RegisterGlobalConstant) Kind() tezos.OpType
- func (o RegisterGlobalConstant) MarshalBinary() ([]byte, error)
- func (o RegisterGlobalConstant) MarshalJSON() ([]byte, error)
- func (o *RegisterGlobalConstant) UnmarshalBinary(data []byte) error
- type Reveal
- func (o *Reveal) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Reveal) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Reveal) Kind() tezos.OpType
- func (o Reveal) MarshalBinary() ([]byte, error)
- func (o Reveal) MarshalJSON() ([]byte, error)
- func (o *Reveal) UnmarshalBinary(data []byte) error
- type SeedNonceRevelation
- func (o *SeedNonceRevelation) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o SeedNonceRevelation) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o SeedNonceRevelation) Kind() tezos.OpType
- func (o SeedNonceRevelation) MarshalBinary() ([]byte, error)
- func (o SeedNonceRevelation) MarshalJSON() ([]byte, error)
- func (o *SeedNonceRevelation) UnmarshalBinary(data []byte) error
- type SetDepositsLimit
- func (o *SetDepositsLimit) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o SetDepositsLimit) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o SetDepositsLimit) Kind() tezos.OpType
- func (o SetDepositsLimit) MarshalBinary() ([]byte, error)
- func (o SetDepositsLimit) MarshalJSON() ([]byte, error)
- func (o *SetDepositsLimit) UnmarshalBinary(data []byte) error
- type Simple
- type Transaction
- func (o *Transaction) DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) (err error)
- func (o Transaction) EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error
- func (o Transaction) Kind() tezos.OpType
- func (o Transaction) MarshalBinary() ([]byte, error)
- func (o Transaction) MarshalJSON() ([]byte, error)
- func (o *Transaction) UnmarshalBinary(data []byte) error
Constants ¶
const ( BlockWatermark byte = iota + 1 EndorsementWatermark OperationWatermark )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActivateAccount ¶
type ActivateAccount struct { Simple PublicKeyHash tezos.Address `json:"pkh"` Secret tezos.HexBytes `json:"secret"` }
ActivateAccount represents "activate_account" operation
func (*ActivateAccount) DecodeBuffer ¶
func (ActivateAccount) EncodeBuffer ¶
func (ActivateAccount) Kind ¶
func (o ActivateAccount) Kind() tezos.OpType
func (ActivateAccount) MarshalBinary ¶
func (o ActivateAccount) MarshalBinary() ([]byte, error)
func (ActivateAccount) MarshalJSON ¶
func (o ActivateAccount) MarshalJSON() ([]byte, error)
func (*ActivateAccount) UnmarshalBinary ¶
func (o *ActivateAccount) UnmarshalBinary(data []byte) error
type Ballot ¶
type Ballot struct { Simple Source tezos.Address `json:"source"` Period int32 `json:"period"` Proposal tezos.ProtocolHash `json:"proposal"` Ballot tezos.BallotVote `json:"ballot"` }
Ballot represents "ballot" operation
func (*Ballot) DecodeBuffer ¶
func (Ballot) MarshalBinary ¶
func (Ballot) MarshalJSON ¶
func (*Ballot) UnmarshalBinary ¶
type BlockHeader ¶
type BlockHeader struct { Level int32 `json:"level"` Proto byte `json:"proto"` Predecessor tezos.BlockHash `json:"predecessor"` Timestamp time.Time `json:"timestamp"` ValidationPass byte `json:"validation_pass"` OperationsHash tezos.OpListListHash `json:"operations_hash"` Fitness []tezos.HexBytes `json:"fitness"` Context tezos.ContextHash `json:"context"` PayloadHash tezos.PayloadHash `json:"payload_hash"` PayloadRound int `json:"payload_round"` Priority uint16 `json:"priority"` ProofOfWorkNonce tezos.HexBytes `json:"proof_of_work_nonce"` SeedNonceHash tezos.NonceHash `json:"seed_nonce_hash"` LbEscapeVote bool `json:"liquidity_baking_escape_vote"` Signature tezos.Signature `json:"signature"` }
BlockHeader represents block header
func (BlockHeader) Bytes ¶
func (h BlockHeader) Bytes() []byte
Bytes serializes the block header into binary form. When no signature is set, the result can be used as input for signing, if a signature is set the result is ready for broadcast.
func (*BlockHeader) DecodeBuffer ¶
func (h *BlockHeader) DecodeBuffer(buf *bytes.Buffer) (err error)
func (BlockHeader) Digest ¶
func (h BlockHeader) Digest() []byte
Digest returns a 32 byte blake2b hash for signing the block header. The pre-image is binary serialized (without signature) and prefixed with a watermark byte.
func (*BlockHeader) EncodeBuffer ¶
func (h *BlockHeader) EncodeBuffer(buf *bytes.Buffer) error
func (BlockHeader) MarshalBinary ¶
func (h BlockHeader) MarshalBinary() ([]byte, error)
func (BlockHeader) MarshalJSON ¶
func (h BlockHeader) MarshalJSON() ([]byte, error)
func (*BlockHeader) Sign ¶
func (h *BlockHeader) Sign(key tezos.PrivateKey) error
Sign signs the block header using a private key and generates a generic signature. If a valid signature already exists, this function is a noop.
func (*BlockHeader) UnmarshalBinary ¶
func (h *BlockHeader) UnmarshalBinary(data []byte) error
func (BlockHeader) WatermarkedBytes ¶
func (h BlockHeader) WatermarkedBytes() []byte
WatermarkedBytes serializes the block header and prefixes it with a watermark. This format is only used for signing.
func (*BlockHeader) WithSignature ¶
func (h *BlockHeader) WithSignature(sig tezos.Signature) *BlockHeader
WithSignature adds an externally created signature to the block header. Converts any non-generic signature first. No signature validation is performed, it is assumed the signature is correct.
type Delegation ¶
Delegation represents "delegation" operation
func (*Delegation) DecodeBuffer ¶
func (Delegation) EncodeBuffer ¶
func (Delegation) Kind ¶
func (o Delegation) Kind() tezos.OpType
func (Delegation) MarshalBinary ¶
func (o Delegation) MarshalBinary() ([]byte, error)
func (Delegation) MarshalJSON ¶
func (o Delegation) MarshalJSON() ([]byte, error)
func (*Delegation) UnmarshalBinary ¶
func (o *Delegation) UnmarshalBinary(data []byte) error
type DoubleBakingEvidence ¶
type DoubleBakingEvidence struct { Simple Bh1 BlockHeader `json:"bh1"` Bh2 BlockHeader `json:"bh2"` }
DoubleBakingEvidence represents "double_baking_evidence" operation
func (*DoubleBakingEvidence) DecodeBuffer ¶
func (DoubleBakingEvidence) EncodeBuffer ¶
func (DoubleBakingEvidence) Kind ¶
func (o DoubleBakingEvidence) Kind() tezos.OpType
func (DoubleBakingEvidence) MarshalBinary ¶
func (o DoubleBakingEvidence) MarshalBinary() ([]byte, error)
func (DoubleBakingEvidence) MarshalJSON ¶
func (o DoubleBakingEvidence) MarshalJSON() ([]byte, error)
func (*DoubleBakingEvidence) UnmarshalBinary ¶
func (o *DoubleBakingEvidence) UnmarshalBinary(data []byte) error
type DoubleEndorsementEvidence ¶
type DoubleEndorsementEvidence struct { Simple Op1 InlinedEndorsement `json:"op1"` Op2 InlinedEndorsement `json:"op2"` Slot int16 `json:"slot"` }
DoubleEndorsementEvidence represents "double_endorsement_evidence" operation
func (*DoubleEndorsementEvidence) DecodeBuffer ¶
func (DoubleEndorsementEvidence) EncodeBuffer ¶
func (DoubleEndorsementEvidence) Kind ¶
func (o DoubleEndorsementEvidence) Kind() tezos.OpType
func (DoubleEndorsementEvidence) MarshalBinary ¶
func (o DoubleEndorsementEvidence) MarshalBinary() ([]byte, error)
func (DoubleEndorsementEvidence) MarshalJSON ¶
func (o DoubleEndorsementEvidence) MarshalJSON() ([]byte, error)
func (*DoubleEndorsementEvidence) UnmarshalBinary ¶
func (o *DoubleEndorsementEvidence) UnmarshalBinary(data []byte) error
type Endorsement ¶
Endorsement represents "endorsement" operation
func (*Endorsement) DecodeBuffer ¶
func (Endorsement) EncodeBuffer ¶
func (Endorsement) Kind ¶
func (o Endorsement) Kind() tezos.OpType
func (Endorsement) MarshalBinary ¶
func (o Endorsement) MarshalBinary() ([]byte, error)
func (Endorsement) MarshalJSON ¶
func (o Endorsement) MarshalJSON() ([]byte, error)
func (*Endorsement) UnmarshalBinary ¶
func (o *Endorsement) UnmarshalBinary(data []byte) error
type EndorsementWithSlot ¶
type EndorsementWithSlot struct { Simple Endorsement InlinedEndorsement `json:"endorsement"` Slot int16 `json:"slot"` }
EndorsementWithSlot represents "endorsement_with_slot" operation
func (*EndorsementWithSlot) DecodeBuffer ¶
func (EndorsementWithSlot) EncodeBuffer ¶
func (EndorsementWithSlot) Kind ¶
func (o EndorsementWithSlot) Kind() tezos.OpType
func (EndorsementWithSlot) MarshalBinary ¶
func (o EndorsementWithSlot) MarshalBinary() ([]byte, error)
func (EndorsementWithSlot) MarshalJSON ¶
func (o EndorsementWithSlot) MarshalJSON() ([]byte, error)
func (*EndorsementWithSlot) UnmarshalBinary ¶
func (o *EndorsementWithSlot) UnmarshalBinary(data []byte) error
type FailingNoop ¶
FailingNoop represents "failing_noop" operations. Used for signing arbitrary messages and guaranteed to be not included on-chain. This prevents an attack vector where a message is crafted which looks like a regular transaction.
func (*FailingNoop) DecodeBuffer ¶
func (FailingNoop) EncodeBuffer ¶
func (FailingNoop) Kind ¶
func (o FailingNoop) Kind() tezos.OpType
func (FailingNoop) MarshalBinary ¶
func (o FailingNoop) MarshalBinary() ([]byte, error)
func (FailingNoop) MarshalJSON ¶
func (o FailingNoop) MarshalJSON() ([]byte, error)
func (*FailingNoop) UnmarshalBinary ¶
func (o *FailingNoop) UnmarshalBinary(data []byte) error
type InlinedEndorsement ¶
type InlinedEndorsement struct { Branch tezos.BlockHash `json:"branch"` Endorsement Endorsement `json:"operations"` Signature tezos.Signature `json:"signature"` }
InlinedEndorsement represents inlined endorsement operation with signature. This type is uses as part of other operations, but is not a stand-alone operation.
func (*InlinedEndorsement) DecodeBuffer ¶
func (InlinedEndorsement) EncodeBuffer ¶
type Manager ¶
type Manager struct { Source tezos.Address `json:"source"` Fee tezos.N `json:"fee"` Counter tezos.N `json:"counter"` GasLimit tezos.N `json:"gas_limit"` StorageLimit tezos.N `json:"storage_limit"` }
Manager contains fields common for all manager operations
func (*Manager) DecodeBuffer ¶
func (Manager) EncodeBuffer ¶
func (Manager) GetCounter ¶
func (*Manager) WithCounter ¶
func (*Manager) WithLimits ¶
func (*Manager) WithSource ¶
type Op ¶
type Op struct { Branch tezos.BlockHash `json:"branch"` Contents []Operation `json:"contents"` Signature tezos.Signature `json:"signature"` TTL int64 `json:"-"` Params *tezos.Params `json:"-"` }
Op is a container used to collect, serialize and sign Tezos operations. It serves as a low level building block for constructing and serializing operations, but is agnostic to the order/lifecycle in which data is added or updated.
func DecodeOp ¶
DecodeOp decodes an operation from its binary representation. The encoded data may or may not contain a signature.
func NewOp ¶
func NewOp() *Op
NewOp creates a new empty operation that uses default params and a default operation TTL.
func (*Op) Bytes ¶
Bytes serializes the operation into binary form. When no signature is set, the result can be used as input for signing, if a signature is set the result is ready to be broadcast. Returns a nil slice when branch or contents are empty.
func (*Op) Digest ¶
Digest returns a 32 byte blake2b hash for signing the operation. The pre-image is the binary serialized operation (without signature) prefixed with a type-dependent watermark byte.
func (Op) Limits ¶
Limits returns the sum of all limits (fee, gas, storage limit) currently set for all contained operations.
func (*Op) MarshalJSON ¶
MarshalJSON conditionally marshals the JSON format of the operation with checks for required fields. Omits signature for unsigned ops so that the encoding is compatible with remote forging.
func (*Op) Sign ¶
func (o *Op) Sign(key tezos.PrivateKey) error
Sign signs the operation using provided private key. If a valid signature already exists this function is a noop. Fails when either branch or contents are empty.
func (*Op) WatermarkedBytes ¶
WatermarkedBytes serializes the operation and prefixes it with a watermark. This format is only used for signing. Watermarked data is not useful anywhere else.
func (*Op) WithBranch ¶
WithBranch sets the branch for this operation to hash.
func (*Op) WithContents ¶
WithContents adds a Tezos operation to the end of the contents list.
func (*Op) WithContentsFront ¶
WithContentsFront adds a Tezos operation to the front of the contents list.
func (*Op) WithLimits ¶
WithLimits sets the limits (fee, gas and storage limit) of each contained operation to provided limits. Use this to apply values from simulation with an optional safety margin on gas. This will also calculate the minFee for each operation in the list and add the minFee for header bytes (branch and signature) to the first operation in a list.
Setting a user-defined fee for each individual operation is only honored when its higher than minFee. Note that when sending batch operations all fees must be >= the individual minFee. Otherwise the minFee rule will apply to all zero/lower fee operations and the entire batch may overpay (e.g. if you have the first operation pay all fees for example and set remaining fees to zero).
func (*Op) WithParams ¶
WithParams defines the protocol and other chain configuration params for which the operation will be encoded. If unset, defaults to tezos.DefaultParams.
func (*Op) WithSignature ¶
WithSignature adds an externally created signature to the operation. No signature validation is performed, it is assumed the signature is correct.
func (*Op) WithSource ¶
WithSource sets the source for all manager operations to addr.
func (*Op) WithTTL ¶
WithTTL sets a time-to-live for the operation in number of blocks. This may be used as a convenience method instead of setting a branch directly, but requires to use an autocomplete handler, wallet or custom function that fetches the hash of block head~N as branch. Note that serialization will fail until a brach is set.
type Operation ¶
type Operation interface { Kind() tezos.OpType Limits() tezos.Limits GetCounter() int64 WithSource(tezos.Address) WithCounter(int64) WithLimits(tezos.Limits) encoding.BinaryMarshaler encoding.BinaryUnmarshaler json.Marshaler EncodeBuffer(buf *bytes.Buffer, p *tezos.Params) error DecodeBuffer(buf *bytes.Buffer, p *tezos.Params) error }
Operation is a generic type used to handle different Tezos operation types inside an operation's contents list.
type Origination ¶
type Origination struct { Manager Balance tezos.N `json:"balance"` Delegate tezos.Address `json:"delegate,omitempty"` Script micheline.Script `json:"script"` }
Origination represents "origination" operation
func (*Origination) DecodeBuffer ¶
func (Origination) EncodeBuffer ¶
func (Origination) Kind ¶
func (o Origination) Kind() tezos.OpType
func (Origination) MarshalBinary ¶
func (o Origination) MarshalBinary() ([]byte, error)
func (Origination) MarshalJSON ¶
func (o Origination) MarshalJSON() ([]byte, error)
func (*Origination) UnmarshalBinary ¶
func (o *Origination) UnmarshalBinary(data []byte) error
type Proposals ¶
type Proposals struct { Simple Source tezos.Address `json:"source"` Period int32 `json:"period"` Proposals []tezos.ProtocolHash `json:"proposals"` }
Proposals represents "proposals" operation
func (*Proposals) DecodeBuffer ¶
func (Proposals) EncodeBuffer ¶
func (Proposals) MarshalBinary ¶
func (Proposals) MarshalJSON ¶
func (*Proposals) UnmarshalBinary ¶
type RegisterGlobalConstant ¶
RegisterGlobalConstant represents "register_global_constant" operation
func (*RegisterGlobalConstant) DecodeBuffer ¶
func (RegisterGlobalConstant) EncodeBuffer ¶
func (RegisterGlobalConstant) Kind ¶
func (o RegisterGlobalConstant) Kind() tezos.OpType
func (RegisterGlobalConstant) MarshalBinary ¶
func (o RegisterGlobalConstant) MarshalBinary() ([]byte, error)
func (RegisterGlobalConstant) MarshalJSON ¶
func (o RegisterGlobalConstant) MarshalJSON() ([]byte, error)
func (*RegisterGlobalConstant) UnmarshalBinary ¶
func (o *RegisterGlobalConstant) UnmarshalBinary(data []byte) error
type Reveal ¶
Reveal represents "reveal" operation
func (*Reveal) DecodeBuffer ¶
func (Reveal) MarshalBinary ¶
func (Reveal) MarshalJSON ¶
func (*Reveal) UnmarshalBinary ¶
type SeedNonceRevelation ¶
type SeedNonceRevelation struct { Simple Level int32 `json:"level,string"` Nonce tezos.HexBytes `json:"nonce"` }
SeedNonceRevelation represents "seed_nonce_revelation" operation
func (*SeedNonceRevelation) DecodeBuffer ¶
func (SeedNonceRevelation) EncodeBuffer ¶
func (SeedNonceRevelation) Kind ¶
func (o SeedNonceRevelation) Kind() tezos.OpType
func (SeedNonceRevelation) MarshalBinary ¶
func (o SeedNonceRevelation) MarshalBinary() ([]byte, error)
func (SeedNonceRevelation) MarshalJSON ¶
func (o SeedNonceRevelation) MarshalJSON() ([]byte, error)
func (*SeedNonceRevelation) UnmarshalBinary ¶
func (o *SeedNonceRevelation) UnmarshalBinary(data []byte) error
type SetDepositsLimit ¶
SetDepositsLimit represents "set_deposits_limit" operation
func (*SetDepositsLimit) DecodeBuffer ¶
func (SetDepositsLimit) EncodeBuffer ¶
func (SetDepositsLimit) Kind ¶
func (o SetDepositsLimit) Kind() tezos.OpType
func (SetDepositsLimit) MarshalBinary ¶
func (o SetDepositsLimit) MarshalBinary() ([]byte, error)
func (SetDepositsLimit) MarshalJSON ¶
func (o SetDepositsLimit) MarshalJSON() ([]byte, error)
func (*SetDepositsLimit) UnmarshalBinary ¶
func (o *SetDepositsLimit) UnmarshalBinary(data []byte) error
type Simple ¶
type Simple struct{}
Simple is an empty helper struct that's used to fulfil the Operation interface for anonymous, consensus and voting operations which do not contain fees and counter.
func (Simple) GetCounter ¶
func (*Simple) WithCounter ¶
func (*Simple) WithLimits ¶
func (*Simple) WithSource ¶
type Transaction ¶
type Transaction struct { Manager Amount tezos.N `json:"amount"` Destination tezos.Address `json:"destination"` Parameters *micheline.Parameters `json:"parameters,omitempty"` }
Transaction represents "transaction" operation
func (*Transaction) DecodeBuffer ¶
func (Transaction) EncodeBuffer ¶
func (Transaction) Kind ¶
func (o Transaction) Kind() tezos.OpType
func (Transaction) MarshalBinary ¶
func (o Transaction) MarshalBinary() ([]byte, error)
func (Transaction) MarshalJSON ¶
func (o Transaction) MarshalJSON() ([]byte, error)
func (*Transaction) UnmarshalBinary ¶
func (o *Transaction) UnmarshalBinary(data []byte) error