Documentation ¶
Overview ¶
Package txs is a generated protocol buffer package.
It is generated from these files:
txs.proto
It has these top-level messages:
Envelope Signatory Receipt
Index ¶
- Variables
- func NewAminoCodec() *aminoCodec
- func NewJSONCodec() *jsonCodec
- type Codec
- type Decoder
- type Encoder
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)
- func (m *Envelope) GetSignatories() []Signatory
- func (m *Envelope) Marshal() (dAtA []byte, err error)
- func (m *Envelope) MarshalTo(dAtA []byte) (int, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (txEnv *Envelope) Sign(signingAccounts ...acm.AddressableSigner) error
- func (m *Envelope) Size() (n int)
- func (txEnv *Envelope) String() string
- func (txEnv *Envelope) Tagged() query.Tagged
- func (m *Envelope) Unmarshal(dAtA []byte) error
- func (txEnv *Envelope) Validate() error
- func (txEnv *Envelope) Verify(getter state.AccountGetter, chainID string) error
- func (*Envelope) XXX_MessageName() string
- type Receipt
- func (*Receipt) Descriptor() ([]byte, []int)
- func (receipt *Receipt) Encode() ([]byte, error)
- func (m *Receipt) GetCreatesContract() bool
- func (m *Receipt) GetTxType() github_com_hyperledger_burrow_txs_payload.Type
- func (m *Receipt) Marshal() (dAtA []byte, err error)
- func (m *Receipt) MarshalTo(dAtA []byte) (int, error)
- func (*Receipt) ProtoMessage()
- func (m *Receipt) Reset()
- func (m *Receipt) Size() (n int)
- func (m *Receipt) String() string
- func (m *Receipt) Unmarshal(dAtA []byte) error
- func (*Receipt) XXX_MessageName() string
- type Signatory
- func (*Signatory) Descriptor() ([]byte, []int)
- func (m *Signatory) GetPublicKey() *crypto.PublicKey
- func (m *Signatory) Marshal() (dAtA []byte, err error)
- func (m *Signatory) MarshalTo(dAtA []byte) (int, error)
- func (*Signatory) ProtoMessage()
- func (s *Signatory) RealisePublicKey(getter state.AccountGetter) error
- func (m *Signatory) Reset()
- func (m *Signatory) Size() (n int)
- func (m *Signatory) String() string
- func (m *Signatory) Unmarshal(dAtA []byte) error
- func (sig *Signatory) Validate() error
- func (*Signatory) XXX_MessageName() string
- type Tx
- func (tx *Tx) Enclose() *Envelope
- func (tx *Tx) GenerateReceipt() *Receipt
- func (tx *Tx) Hash() binary.HexBytes
- func (tx *Tx) Marshal() ([]byte, error)
- func (tx *Tx) MarshalJSON() ([]byte, error)
- func (tx *Tx) MarshalTo(data []byte) (int, error)
- func (tx *Tx) MustSignBytes() []byte
- func (tx *Tx) Rehash() []byte
- func (tx *Tx) Sign(signingAccounts ...acm.AddressableSigner) (*Envelope, error)
- func (tx *Tx) SignBytes() ([]byte, error)
- func (tx *Tx) Size() int
- func (tx *Tx) String() string
- func (tx *Tx) Tagged() query.Tagged
- func (tx *Tx) Type() payload.Type
- func (tx *Tx) Unmarshal(data []byte) error
- func (tx *Tx) UnmarshalJSON(data []byte) error
- func (tx *Tx) ValidateInputs(getter state.AccountGetter) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthTxs = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTxs = fmt.Errorf("proto: integer overflow") )
Functions ¶
func NewAminoCodec ¶ added in v0.19.0
func NewAminoCodec() *aminoCodec
func NewJSONCodec ¶ added in v0.19.0
func NewJSONCodec() *jsonCodec
Types ¶
type Envelope ¶ added in v0.19.0
type Envelope struct { Signatories []Signatory `protobuf:"bytes,1,rep,name=Signatories" json:"Signatories"` // Canonical bytes of the Tx ready to be signed Tx *Tx `protobuf:"bytes,2,opt,name=Tx,proto3,customtype=Tx" json:"Tx,omitempty"` }
An envelope contains both the signable Tx and the signatures for each input (in signatories)
func Enclose ¶ added in v0.19.0
Enclose a Payload in an Envelope so it is ready to be signed by first wrapping the Payload as a Tx (including ChainID) and writing it to the Tx field of the Envelope
func (*Envelope) Descriptor ¶ added in v0.20.0
func (*Envelope) GetSignatories ¶ added in v0.20.0
func (*Envelope) ProtoMessage ¶ added in v0.20.0
func (*Envelope) ProtoMessage()
func (*Envelope) Sign ¶ added in v0.19.0
func (txEnv *Envelope) Sign(signingAccounts ...acm.AddressableSigner) error
Sign the Tx Envelope by adding Signatories containing the signatures for each TxInput. signing accounts for each input must be provided (in any order).
func (*Envelope) Validate ¶ added in v0.19.0
Returns an error if Envelope has a nil transaction or zero signatures (and therefore could not possibly be valid)
func (*Envelope) Verify ¶ added in v0.19.0
func (txEnv *Envelope) Verify(getter state.AccountGetter, chainID string) error
Verifies the validity of the Signatories' Signatures in the Envelope. The Signatories must appear in the same order as the inputs as returned by Tx.GetInputs().
func (*Envelope) XXX_MessageName ¶ added in v0.20.0
type Receipt ¶
type Receipt struct { // Transaction type TxType github_com_hyperledger_burrow_txs_payload.Type `protobuf:"varint,1,opt,name=TxType,proto3,casttype=github.com/hyperledger/burrow/txs/payload.Type" json:"TxType,omitempty"` // The hash of the transaction that caused this event to be generated TxHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=TxHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"TxHash"` // Whether the transaction creates a contract CreatesContract bool `protobuf:"varint,3,opt,name=CreatesContract,proto3" json:"CreatesContract,omitempty"` // The address of the contract being called ContractAddress github_com_hyperledger_burrow_crypto.Address `` /* 129-byte string literal not displayed */ }
BroadcastTx or Transaction receipt
func DecodeReceipt ¶ added in v0.20.0
func (*Receipt) Descriptor ¶ added in v0.20.0
func (*Receipt) GetCreatesContract ¶ added in v0.20.0
func (*Receipt) GetTxType ¶ added in v0.20.0
func (m *Receipt) GetTxType() github_com_hyperledger_burrow_txs_payload.Type
func (*Receipt) ProtoMessage ¶ added in v0.20.0
func (*Receipt) ProtoMessage()
func (*Receipt) XXX_MessageName ¶ added in v0.20.0
type Signatory ¶ added in v0.19.0
type Signatory struct { Address *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,1,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Address,omitempty"` PublicKey *crypto.PublicKey `protobuf:"bytes,2,opt,name=PublicKey" json:"PublicKey,omitempty"` Signature github_com_hyperledger_burrow_crypto.Signature `protobuf:"bytes,3,opt,name=Signature,proto3,customtype=github.com/hyperledger/burrow/crypto.Signature" json:"Signature"` }
Signatory contains signature and one or both of Address and PublicKey to identify the signer
func (*Signatory) Descriptor ¶ added in v0.20.0
func (*Signatory) GetPublicKey ¶ added in v0.20.0
func (*Signatory) ProtoMessage ¶ added in v0.20.0
func (*Signatory) ProtoMessage()
func (*Signatory) RealisePublicKey ¶ added in v0.19.0
func (s *Signatory) RealisePublicKey(getter state.AccountGetter) error
Attempts to 'realise' the PublicKey and Address of a Signatory possibly referring to state in the case where the Signatory contains an Address by no PublicKey. Checks consistency in other cases, possibly generating the Address from the PublicKey
func (*Signatory) XXX_MessageName ¶ added in v0.20.0
type Tx ¶
Tx is the canonical object that we serialise to produce the SignBytes that we sign
func (*Tx) GenerateReceipt ¶ added in v0.19.0
Generate a transaction Receipt containing the Tx hash and other information if the Tx is call. Returned by ABCI methods.
func (*Tx) Hash ¶ added in v0.18.0
Generate a Hash for this transaction based on the SignBytes. The hash is memoized over the lifetime of the Tx so repeated calls to Hash() are effectively free
func (*Tx) MarshalJSON ¶ added in v0.19.0
func (*Tx) MustSignBytes ¶ added in v0.19.0
Generate SignBytes, panicking on any failure
func (*Tx) Rehash ¶ added in v0.19.0
Regenerate the Tx hash if it has been mutated or as called by Hash() in first instance
func (*Tx) Sign ¶ added in v0.18.0
func (tx *Tx) Sign(signingAccounts ...acm.AddressableSigner) (*Envelope, error)
Encloses in Envelope and signs envelope
func (*Tx) SignBytes ¶ added in v0.19.0
Produces the canonical SignBytes (the Tx message that will be signed) for a Tx
func (*Tx) UnmarshalJSON ¶ added in v0.19.0
func (*Tx) ValidateInputs ¶ added in v0.20.1
func (tx *Tx) ValidateInputs(getter state.AccountGetter) error