payload

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package payload is a generated protocol buffer package.

It is generated from these files:

payload.proto

It has these top-level messages:

Any
TxInput
TxOutput
CallTx
SendTx
PermsTx
NameTx
BondTx
UnbondTx
GovTx

Index

Constants

View Source
const (
	TypeUnknown = Type(0x00)
	// Account transactions
	TypeSend = Type(0x01)
	TypeCall = Type(0x02)
	TypeName = Type(0x03)

	// Validation transactions
	TypeBond   = Type(0x11)
	TypeUnbond = Type(0x12)

	// Admin transactions
	TypePermissions = Type(0x21)
	TypeGovernance  = Type(0x22)
)

Types of Payload implementations

Variables

View Source
var (
	ErrInvalidLengthPayload = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPayload   = fmt.Errorf("proto: integer overflow")
)

Functions

func ValidateInputs added in v0.20.1

func ValidateInputs(getter state.AccountGetter, ins []*TxInput) error

Types

type Any added in v0.20.0

type Any struct {
	CallTx   *CallTx   `protobuf:"bytes,1,opt,name=CallTx" json:"CallTx,omitempty"`
	SendTx   *SendTx   `protobuf:"bytes,2,opt,name=SendTx" json:"SendTx,omitempty"`
	NameTx   *NameTx   `protobuf:"bytes,3,opt,name=NameTx" json:"NameTx,omitempty"`
	PermsTx  *PermsTx  `protobuf:"bytes,4,opt,name=PermsTx" json:"PermsTx,omitempty"`
	GovTx    *GovTx    `protobuf:"bytes,5,opt,name=GovTx" json:"GovTx,omitempty"`
	BondTx   *BondTx   `protobuf:"bytes,6,opt,name=BondTx" json:"BondTx,omitempty"`
	UnbondTx *UnbondTx `protobuf:"bytes,7,opt,name=UnbondTx" json:"UnbondTx,omitempty"`
}

func (*Any) Descriptor added in v0.20.0

func (*Any) Descriptor() ([]byte, []int)

func (*Any) GetBondTx added in v0.20.0

func (m *Any) GetBondTx() *BondTx

func (*Any) GetCallTx added in v0.20.0

func (m *Any) GetCallTx() *CallTx

func (*Any) GetGovTx added in v0.20.0

func (m *Any) GetGovTx() *GovTx

func (*Any) GetNameTx added in v0.20.0

func (m *Any) GetNameTx() *NameTx

func (*Any) GetPermsTx added in v0.20.0

func (m *Any) GetPermsTx() *PermsTx

func (*Any) GetSendTx added in v0.20.0

func (m *Any) GetSendTx() *SendTx

func (*Any) GetUnbondTx added in v0.20.0

func (m *Any) GetUnbondTx() *UnbondTx

func (*Any) Marshal added in v0.20.0

func (m *Any) Marshal() (dAtA []byte, err error)

func (*Any) MarshalTo added in v0.20.0

func (m *Any) MarshalTo(dAtA []byte) (int, error)

func (*Any) ProtoMessage added in v0.20.0

func (*Any) ProtoMessage()

func (*Any) Reset added in v0.20.0

func (m *Any) Reset()

func (*Any) Size added in v0.20.0

func (m *Any) Size() (n int)

func (*Any) String added in v0.20.0

func (m *Any) String() string

func (*Any) Unmarshal added in v0.20.0

func (m *Any) Unmarshal(dAtA []byte) error

func (*Any) XXX_MessageName added in v0.20.0

func (*Any) XXX_MessageName() string

type BondTx

type BondTx struct {
	Inputs   []*TxInput  `protobuf:"bytes,1,rep,name=Inputs" json:"Inputs,omitempty"`
	UnbondTo []*TxOutput `protobuf:"bytes,2,rep,name=UnbondTo" json:"UnbondTo,omitempty"`
}

func NewBondTx

func NewBondTx(pubkey crypto.PublicKey) (*BondTx, error)

func (*BondTx) AddInput

func (tx *BondTx) AddInput(st state.AccountGetter, pubkey crypto.PublicKey, amt uint64) error

func (*BondTx) AddInputWithSequence

func (tx *BondTx) AddInputWithSequence(pubkey crypto.PublicKey, amt uint64, sequence uint64) error

func (*BondTx) AddOutput

func (tx *BondTx) AddOutput(addr crypto.Address, amt uint64) error

func (*BondTx) Any added in v0.20.0

func (tx *BondTx) Any() *Any

func (*BondTx) Descriptor added in v0.20.0

func (*BondTx) Descriptor() ([]byte, []int)

func (*BondTx) GetInputs

func (tx *BondTx) GetInputs() []*TxInput

func (*BondTx) Marshal added in v0.20.0

func (m *BondTx) Marshal() (dAtA []byte, err error)

func (*BondTx) MarshalTo added in v0.20.0

func (m *BondTx) MarshalTo(dAtA []byte) (int, error)

func (*BondTx) ProtoMessage added in v0.20.0

func (*BondTx) ProtoMessage()

func (*BondTx) Reset added in v0.20.0

func (m *BondTx) Reset()

func (*BondTx) Size added in v0.20.0

func (m *BondTx) Size() (n int)

func (*BondTx) String

func (tx *BondTx) String() string

func (*BondTx) Type

func (tx *BondTx) Type() Type

func (*BondTx) Unmarshal added in v0.20.0

func (m *BondTx) Unmarshal(dAtA []byte) error

func (*BondTx) XXX_MessageName added in v0.20.0

func (*BondTx) XXX_MessageName() string

type CallTx

type CallTx struct {
	// The caller's input
	Input *TxInput `protobuf:"bytes,1,opt,name=Input" json:"Input,omitempty"`
	// The contract address to call or nil if we are creating a contract
	Address *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,2,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address,omitempty"`
	// The upper bound on the amount of gas (and therefore EVM execution steps) this CallTx may generate
	GasLimit uint64 `protobuf:"varint,3,opt,name=GasLimit,proto3" json:"GasLimit,omitempty"`
	// Fee to offer validators for processing transaction
	Fee uint64 `protobuf:"varint,4,opt,name=Fee,proto3" json:"Fee,omitempty"`
	// EVM bytecode payload
	Data github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,5,opt,name=Data,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"Data"`
}

A instruction to run smart contract code in the EVM

func NewCallTx

func NewCallTx(st state.AccountGetter, from crypto.PublicKey, to *crypto.Address, data []byte,
	amt, gasLimit, fee uint64) (*CallTx, error)

func NewCallTxWithSequence

func NewCallTxWithSequence(from crypto.PublicKey, to *crypto.Address, data []byte,
	amt, gasLimit, fee, sequence uint64) *CallTx

func (*CallTx) Any added in v0.20.0

func (tx *CallTx) Any() *Any

func (*CallTx) CreatesContractAddress added in v0.20.0

func (tx *CallTx) CreatesContractAddress() *crypto.Address

Returns the contract address that this CallTx would create if CallTx.Address == nil otherwise returns nil

func (*CallTx) Descriptor added in v0.20.0

func (*CallTx) Descriptor() ([]byte, []int)

func (*CallTx) GetFee added in v0.20.0

func (m *CallTx) GetFee() uint64

func (*CallTx) GetGasLimit added in v0.20.0

func (m *CallTx) GetGasLimit() uint64

func (*CallTx) GetInput added in v0.20.0

func (m *CallTx) GetInput() *TxInput

func (*CallTx) GetInputs

func (tx *CallTx) GetInputs() []*TxInput

func (*CallTx) Marshal added in v0.20.0

func (m *CallTx) Marshal() (dAtA []byte, err error)

func (*CallTx) MarshalTo added in v0.20.0

func (m *CallTx) MarshalTo(dAtA []byte) (int, error)

func (*CallTx) ProtoMessage added in v0.20.0

func (*CallTx) ProtoMessage()

func (*CallTx) Reset added in v0.20.0

func (m *CallTx) Reset()

func (*CallTx) Size added in v0.20.0

func (m *CallTx) Size() (n int)

func (*CallTx) String

func (tx *CallTx) String() string

func (*CallTx) Type

func (tx *CallTx) Type() Type

func (*CallTx) Unmarshal added in v0.20.0

func (m *CallTx) Unmarshal(dAtA []byte) error

func (*CallTx) XXX_MessageName added in v0.20.0

func (*CallTx) XXX_MessageName() string

type ErrTxInvalidSequence

type ErrTxInvalidSequence struct {
	Input   *TxInput
	Account acm.Account
}

func (ErrTxInvalidSequence) Error

func (e ErrTxInvalidSequence) Error() string

func (ErrTxInvalidSequence) ErrorCode added in v0.20.0

func (e ErrTxInvalidSequence) ErrorCode() errors.Code

type GovTx added in v0.20.0

type GovTx struct {
	Inputs         []*TxInput              `protobuf:"bytes,1,rep,name=Inputs" json:"Inputs,omitempty"`
	AccountUpdates []*spec.TemplateAccount `protobuf:"bytes,2,rep,name=AccountUpdates" json:"AccountUpdates,omitempty"`
}

func (*GovTx) Any added in v0.20.0

func (tx *GovTx) Any() *Any

func (*GovTx) Descriptor added in v0.20.0

func (*GovTx) Descriptor() ([]byte, []int)

func (*GovTx) GetInputs added in v0.20.0

func (tx *GovTx) GetInputs() []*TxInput

func (*GovTx) Marshal added in v0.20.0

func (m *GovTx) Marshal() (dAtA []byte, err error)

func (*GovTx) MarshalTo added in v0.20.0

func (m *GovTx) MarshalTo(dAtA []byte) (int, error)

func (*GovTx) ProtoMessage added in v0.20.0

func (*GovTx) ProtoMessage()

func (*GovTx) Reset added in v0.20.0

func (m *GovTx) Reset()

func (*GovTx) Size added in v0.20.0

func (m *GovTx) Size() (n int)

func (*GovTx) String added in v0.20.0

func (tx *GovTx) String() string

func (*GovTx) Type added in v0.20.0

func (tx *GovTx) Type() Type

func (*GovTx) Unmarshal added in v0.20.0

func (m *GovTx) Unmarshal(dAtA []byte) error

func (*GovTx) XXX_MessageName added in v0.20.0

func (*GovTx) XXX_MessageName() string

type NameTx

type NameTx struct {
	// The name updater
	Input *TxInput `protobuf:"bytes,1,opt,name=Input" json:"Input,omitempty"`
	// The name to update or create
	Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	// The data to store against the name
	Data string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
	// The fee to provide that will determine the lenght of the name lease
	Fee uint64 `protobuf:"varint,4,opt,name=Fee,proto3" json:"Fee,omitempty"`
}

A request to claim a globally unique name across the entire chain with some optional data storage leased for a fee

func NewNameTx

func NewNameTx(st state.AccountGetter, from crypto.PublicKey, name, data string, amt, fee uint64) (*NameTx, error)

func NewNameTxWithSequence

func NewNameTxWithSequence(from crypto.PublicKey, name, data string, amt, fee, sequence uint64) *NameTx

func (*NameTx) Any added in v0.20.0

func (tx *NameTx) Any() *Any

func (*NameTx) Descriptor added in v0.20.0

func (*NameTx) Descriptor() ([]byte, []int)

func (*NameTx) GetData added in v0.20.0

func (m *NameTx) GetData() string

func (*NameTx) GetFee added in v0.20.0

func (m *NameTx) GetFee() uint64

func (*NameTx) GetInput added in v0.20.0

func (m *NameTx) GetInput() *TxInput

func (*NameTx) GetInputs

func (tx *NameTx) GetInputs() []*TxInput

func (*NameTx) GetName added in v0.20.0

func (m *NameTx) GetName() string

func (*NameTx) Marshal added in v0.20.0

func (m *NameTx) Marshal() (dAtA []byte, err error)

func (*NameTx) MarshalTo added in v0.20.0

func (m *NameTx) MarshalTo(dAtA []byte) (int, error)

func (*NameTx) ProtoMessage added in v0.20.0

func (*NameTx) ProtoMessage()

func (*NameTx) Reset added in v0.20.0

func (m *NameTx) Reset()

func (*NameTx) Size added in v0.20.0

func (m *NameTx) Size() (n int)

func (*NameTx) String

func (tx *NameTx) String() string

func (*NameTx) Type

func (tx *NameTx) Type() Type

func (*NameTx) Unmarshal added in v0.20.0

func (m *NameTx) Unmarshal(dAtA []byte) error

func (*NameTx) XXX_MessageName added in v0.20.0

func (*NameTx) XXX_MessageName() string

type Payload

type Payload interface {
	String() string
	GetInputs() []*TxInput
	Type() Type
	Any() *Any
	// The serialised size in bytes
	Size() int
}

func New

func New(txType Type) (Payload, error)

type PermsTx added in v0.20.0

type PermsTx struct {
	// The permission moderator
	Input *TxInput `protobuf:"bytes,1,opt,name=Input" json:"Input,omitempty"`
	// The modified permissions
	PermArgs permission.PermArgs `protobuf:"bytes,2,opt,name=PermArgs" json:"PermArgs"`
}

An update to the on-chain permissions

func NewPermsTx added in v0.20.0

func NewPermsTx(st state.AccountGetter, from crypto.PublicKey, args permission.PermArgs) (*PermsTx, error)

func NewPermsTxWithSequence added in v0.20.0

func NewPermsTxWithSequence(from crypto.PublicKey, args permission.PermArgs, sequence uint64) *PermsTx

func (*PermsTx) Any added in v0.20.0

func (tx *PermsTx) Any() *Any

func (*PermsTx) Descriptor added in v0.20.0

func (*PermsTx) Descriptor() ([]byte, []int)

func (*PermsTx) GetInput added in v0.20.0

func (m *PermsTx) GetInput() *TxInput

func (*PermsTx) GetInputs added in v0.20.0

func (tx *PermsTx) GetInputs() []*TxInput

func (*PermsTx) GetPermArgs added in v0.20.0

func (m *PermsTx) GetPermArgs() permission.PermArgs

func (*PermsTx) Marshal added in v0.20.0

func (m *PermsTx) Marshal() (dAtA []byte, err error)

func (*PermsTx) MarshalTo added in v0.20.0

func (m *PermsTx) MarshalTo(dAtA []byte) (int, error)

func (*PermsTx) ProtoMessage added in v0.20.0

func (*PermsTx) ProtoMessage()

func (*PermsTx) Reset added in v0.20.0

func (m *PermsTx) Reset()

func (*PermsTx) Size added in v0.20.0

func (m *PermsTx) Size() (n int)

func (*PermsTx) String added in v0.20.0

func (tx *PermsTx) String() string

func (*PermsTx) Type added in v0.20.0

func (tx *PermsTx) Type() Type

func (*PermsTx) Unmarshal added in v0.20.0

func (m *PermsTx) Unmarshal(dAtA []byte) error

func (*PermsTx) XXX_MessageName added in v0.20.0

func (*PermsTx) XXX_MessageName() string

type SendTx

type SendTx struct {
	// The payers
	Inputs []*TxInput `protobuf:"bytes,1,rep,name=Inputs" json:"Inputs,omitempty"`
	// The payees
	Outputs []*TxOutput `protobuf:"bytes,2,rep,name=Outputs" json:"Outputs,omitempty"`
}

A payment between two sets of parties

func NewSendTx

func NewSendTx() *SendTx

func (*SendTx) AddInput

func (tx *SendTx) AddInput(st state.AccountGetter, pubkey crypto.PublicKey, amt uint64) error

func (*SendTx) AddInputWithSequence

func (tx *SendTx) AddInputWithSequence(pubkey crypto.PublicKey, amt uint64, sequence uint64) error

func (*SendTx) AddOutput

func (tx *SendTx) AddOutput(addr crypto.Address, amt uint64) error

func (*SendTx) Any added in v0.20.0

func (tx *SendTx) Any() *Any

func (*SendTx) Descriptor added in v0.20.0

func (*SendTx) Descriptor() ([]byte, []int)

func (*SendTx) GetInputs

func (tx *SendTx) GetInputs() []*TxInput

func (*SendTx) Marshal added in v0.20.0

func (m *SendTx) Marshal() (dAtA []byte, err error)

func (*SendTx) MarshalTo added in v0.20.0

func (m *SendTx) MarshalTo(dAtA []byte) (int, error)

func (*SendTx) ProtoMessage added in v0.20.0

func (*SendTx) ProtoMessage()

func (*SendTx) Reset added in v0.20.0

func (m *SendTx) Reset()

func (*SendTx) Size added in v0.20.0

func (m *SendTx) Size() (n int)

func (*SendTx) String

func (tx *SendTx) String() string

func (*SendTx) Type

func (tx *SendTx) Type() Type

func (*SendTx) Unmarshal added in v0.20.0

func (m *SendTx) Unmarshal(dAtA []byte) error

func (*SendTx) XXX_MessageName added in v0.20.0

func (*SendTx) XXX_MessageName() string

type TxInput

type TxInput struct {
	// The address from which this input flows
	Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"`
	// The amount of native token to transfer from the input address
	Amount uint64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
	// The sequence number that this transaction will induce (i.e. one greater than the input account's current sequence)
	Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"`
}

An input to a transaction that may carry an Amount as a charge and whose sequence number must be one greater than that associated with the account at Address at the time of being received

func (*TxInput) Descriptor added in v0.20.0

func (*TxInput) Descriptor() ([]byte, []int)

func (*TxInput) GetAmount added in v0.20.0

func (m *TxInput) GetAmount() uint64

func (*TxInput) GetSequence added in v0.20.0

func (m *TxInput) GetSequence() uint64

func (*TxInput) Marshal added in v0.20.0

func (m *TxInput) Marshal() (dAtA []byte, err error)

func (*TxInput) MarshalTo added in v0.20.0

func (m *TxInput) MarshalTo(dAtA []byte) (int, error)

func (*TxInput) ProtoMessage added in v0.20.0

func (*TxInput) ProtoMessage()

func (*TxInput) Reset added in v0.20.0

func (m *TxInput) Reset()

func (*TxInput) Size added in v0.20.0

func (m *TxInput) Size() (n int)

func (*TxInput) String

func (input *TxInput) String() string

func (*TxInput) Unmarshal added in v0.20.0

func (m *TxInput) Unmarshal(dAtA []byte) error

func (*TxInput) Validate added in v0.20.1

func (input *TxInput) Validate(acc acm.Account) error

func (*TxInput) XXX_MessageName added in v0.20.0

func (*TxInput) XXX_MessageName() string

type TxOutput

type TxOutput struct {
	// The address to which this output flows
	Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"`
	// The amount of native token to transfer to the output address
	Amount uint64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
}

An output from a transaction that may carry an amount as a charge

func (*TxOutput) Descriptor added in v0.20.0

func (*TxOutput) Descriptor() ([]byte, []int)

func (*TxOutput) GetAmount added in v0.20.0

func (m *TxOutput) GetAmount() uint64

func (*TxOutput) Marshal added in v0.20.0

func (m *TxOutput) Marshal() (dAtA []byte, err error)

func (*TxOutput) MarshalTo added in v0.20.0

func (m *TxOutput) MarshalTo(dAtA []byte) (int, error)

func (*TxOutput) ProtoMessage added in v0.20.0

func (*TxOutput) ProtoMessage()

func (*TxOutput) Reset added in v0.20.0

func (m *TxOutput) Reset()

func (*TxOutput) Size added in v0.20.0

func (m *TxOutput) Size() (n int)

func (*TxOutput) String

func (txOut *TxOutput) String() string

func (*TxOutput) Unmarshal added in v0.20.0

func (m *TxOutput) Unmarshal(dAtA []byte) error

func (*TxOutput) XXX_MessageName added in v0.20.0

func (*TxOutput) XXX_MessageName() string

type Type

type Type uint32

func TxTypeFromString

func TxTypeFromString(name string) Type

func (Type) Marshal added in v0.20.0

func (typ Type) Marshal() ([]byte, error)

Protobuf support

func (Type) MarshalText

func (typ Type) MarshalText() ([]byte, error)

func (Type) String

func (typ Type) String() string

func (*Type) Unmarshal added in v0.20.0

func (typ *Type) Unmarshal(data []byte) error

func (*Type) UnmarshalText

func (typ *Type) UnmarshalText(data []byte) error

type UnbondTx

type UnbondTx struct {
	Input   *TxInput                                     `protobuf:"bytes,1,opt,name=Input" json:"Input,omitempty"`
	Address github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,2,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address"`
	Height  uint64                                       `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"`
}

func NewUnbondTx

func NewUnbondTx(address crypto.Address, height uint64) *UnbondTx

func (*UnbondTx) Any added in v0.20.0

func (tx *UnbondTx) Any() *Any

func (*UnbondTx) Descriptor added in v0.20.0

func (*UnbondTx) Descriptor() ([]byte, []int)

func (*UnbondTx) GetInputs

func (tx *UnbondTx) GetInputs() []*TxInput

func (*UnbondTx) Marshal added in v0.20.0

func (m *UnbondTx) Marshal() (dAtA []byte, err error)

func (*UnbondTx) MarshalTo added in v0.20.0

func (m *UnbondTx) MarshalTo(dAtA []byte) (int, error)

func (*UnbondTx) ProtoMessage added in v0.20.0

func (*UnbondTx) ProtoMessage()

func (*UnbondTx) Reset added in v0.20.0

func (m *UnbondTx) Reset()

func (*UnbondTx) Size added in v0.20.0

func (m *UnbondTx) Size() (n int)

func (*UnbondTx) String

func (tx *UnbondTx) String() string

func (*UnbondTx) Type

func (tx *UnbondTx) Type() Type

func (*UnbondTx) Unmarshal added in v0.20.0

func (m *UnbondTx) Unmarshal(dAtA []byte) error

func (*UnbondTx) XXX_MessageName added in v0.20.0

func (*UnbondTx) XXX_MessageName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL