Documentation ¶
Index ¶
- Variables
- type Codec
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (this *Message) GetMsg() github_com_bianjieai_irita_sdk_go_types.Msg
- func (m *Message) GetMsgSend() *bank.MsgSend
- func (m *Message) GetSum() isMessage_Sum
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (this *Message) SetMsg(value github_com_bianjieai_irita_sdk_go_types.Msg) error
- func (m *Message) Size() (n int)
- func (m *Message) String() string
- func (m *Message) Unmarshal(dAtA []byte) error
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (*Message) XXX_OneofWrappers() []interface{}
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type Message_MsgSend
- type SignDoc
- func (sd *SignDoc) CanonicalSignBytes() ([]byte, error)
- func (*SignDoc) Descriptor() ([]byte, []int)
- func (m *SignDoc) GetMsgs() []Message
- func (m *SignDoc) Marshal() (dAtA []byte, err error)
- func (m *SignDoc) MarshalTo(dAtA []byte) (int, error)
- func (m *SignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignDoc) ProtoMessage()
- func (m *SignDoc) Reset()
- func (m *SignDoc) Size() (n int)
- func (m *SignDoc) String() string
- func (m *SignDoc) Unmarshal(dAtA []byte) error
- func (m *SignDoc) XXX_DiscardUnknown()
- func (m *SignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignDoc) XXX_Merge(src proto.Message)
- func (m *SignDoc) XXX_Size() int
- func (m *SignDoc) XXX_Unmarshal(b []byte) error
- type StdFee
- func (*StdFee) Descriptor() ([]byte, []int)
- func (this *StdFee) Equal(that interface{}) bool
- func (m StdFee) GetAmount() sdk.Coins
- func (m StdFee) GetGas() uint64
- func (m *StdFee) Marshal() (dAtA []byte, err error)
- func (m *StdFee) MarshalTo(dAtA []byte) (int, error)
- func (m *StdFee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StdFee) ProtoMessage()
- func (m *StdFee) Reset()
- func (m *StdFee) SetAmount(amount sdk.Coins)
- func (m *StdFee) SetGas(gas uint64)
- func (m *StdFee) Size() (n int)
- func (m *StdFee) String() string
- func (m *StdFee) Unmarshal(dAtA []byte) error
- func (m *StdFee) XXX_DiscardUnknown()
- func (m *StdFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StdFee) XXX_Merge(src proto.Message)
- func (m *StdFee) XXX_Size() int
- func (m *StdFee) XXX_Unmarshal(b []byte) error
- type StdSignDocBase
- func (*StdSignDocBase) Descriptor() ([]byte, []int)
- func (m *StdSignDocBase) GetAccountNumber() uint64
- func (m *StdSignDocBase) GetChainID() string
- func (m *StdSignDocBase) GetFee() StdFee
- func (m *StdSignDocBase) GetMemo() string
- func (m *StdSignDocBase) GetSequence() uint64
- func (m *StdSignDocBase) Marshal() (dAtA []byte, err error)
- func (m *StdSignDocBase) MarshalTo(dAtA []byte) (int, error)
- func (m *StdSignDocBase) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StdSignDocBase) ProtoMessage()
- func (m *StdSignDocBase) Reset()
- func (m *StdSignDocBase) Size() (n int)
- func (m *StdSignDocBase) String() string
- func (m *StdSignDocBase) Unmarshal(dAtA []byte) error
- func (m *StdSignDocBase) XXX_DiscardUnknown()
- func (m *StdSignDocBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StdSignDocBase) XXX_Merge(src proto.Message)
- func (m *StdSignDocBase) XXX_Size() int
- func (m *StdSignDocBase) XXX_Unmarshal(b []byte) error
- type StdSignature
- func (*StdSignature) Descriptor() ([]byte, []int)
- func (m StdSignature) GetPubKey() crypto.PubKey
- func (m StdSignature) GetSignature() []byte
- func (m *StdSignature) Marshal() (dAtA []byte, err error)
- func (m *StdSignature) MarshalTo(dAtA []byte) (int, error)
- func (m *StdSignature) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StdSignature) ProtoMessage()
- func (m *StdSignature) Reset()
- func (m *StdSignature) SetPubKey(pk crypto.PubKey) error
- func (m *StdSignature) SetSignature(signature []byte)
- func (m *StdSignature) Size() (n int)
- func (m *StdSignature) String() string
- func (m *StdSignature) Unmarshal(dAtA []byte) error
- func (m *StdSignature) XXX_DiscardUnknown()
- func (m *StdSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StdSignature) XXX_Merge(src proto.Message)
- func (m *StdSignature) XXX_Size() int
- func (m *StdSignature) XXX_Unmarshal(b []byte) error
- type StdTxBase
- func (*StdTxBase) Descriptor() ([]byte, []int)
- func (m *StdTxBase) GetFee() StdFee
- func (m *StdTxBase) GetMemo() string
- func (m *StdTxBase) GetSignatures() []StdSignature
- func (m *StdTxBase) Marshal() (dAtA []byte, err error)
- func (m *StdTxBase) MarshalTo(dAtA []byte) (int, error)
- func (m *StdTxBase) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StdTxBase) ProtoMessage()
- func (m *StdTxBase) Reset()
- func (m *StdTxBase) Size() (n int)
- func (m *StdTxBase) String() string
- func (m *StdTxBase) Unmarshal(dAtA []byte) error
- func (m *StdTxBase) XXX_DiscardUnknown()
- func (m *StdTxBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StdTxBase) XXX_Merge(src proto.Message)
- func (m *StdTxBase) XXX_Size() int
- func (m *StdTxBase) XXX_Unmarshal(b []byte) error
- type Transaction
- func (tx Transaction) CanonicalSignBytes(cid string, num, seq uint64) ([]byte, error)
- func (*Transaction) Descriptor() ([]byte, []int)
- func (tx Transaction) GetFee() sdk.Fee
- func (tx Transaction) GetMemo() string
- func (tx Transaction) GetMsgs() []sdk.Msg
- func (tx Transaction) GetSignatures() []sdk.Signature
- func (tx Transaction) GetSigners() []sdk.AccAddress
- func (m *Transaction) Marshal() (dAtA []byte, err error)
- func (m *Transaction) MarshalTo(dAtA []byte) (int, error)
- func (m *Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (tx *Transaction) SetFee(fee clientx.ClientFee) error
- func (tx *Transaction) SetMemo(memo string)
- func (tx *Transaction) SetMsgs(sdkMsgs ...sdk.Msg) error
- func (tx *Transaction) SetSignatures(sdkSigs ...clientx.ClientSignature) error
- func (m *Transaction) Size() (n int)
- func (m *Transaction) String() string
- func (m *Transaction) Unmarshal(dAtA []byte) error
- func (tx Transaction) ValidateBasic() error
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
- type TxGenerator
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct { codec.Marshaler // Keep reference to the amino codec to allow backwards compatibility along // with type, and interface registration. Amino *codec.Codec // contains filtered or unexported fields }
Codec defines the application-level codec. This codec contains all the required module-specific codecs that are to be provided upon initialization.
func NewAppCodec ¶
func NewAppCodec(amino *codec.Codec, anyUnpacker types.AnyUnpacker) *Codec
type Message ¶
type Message struct { // sum defines the set of all allowed valid messages defined in modules. // // Types that are valid to be assigned to Sum: // *Message_MsgSend Sum isMessage_Sum `protobuf_oneof:"sum"` }
Message defines the set of valid concrete message types that can be used to construct a transaction.
func (*Message) Descriptor ¶
func (*Message) GetMsg ¶
func (this *Message) GetMsg() github_com_bianjieai_irita_sdk_go_types.Msg
func (*Message) GetMsgSend ¶
func (*Message) MarshalToSizedBuffer ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) SetMsg ¶
func (this *Message) SetMsg(value github_com_bianjieai_irita_sdk_go_types.Msg) error
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_OneofWrappers ¶
func (*Message) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Message) XXX_Unmarshal ¶
type Message_MsgSend ¶
type Message_MsgSend struct {
MsgSend *bank.MsgSend `protobuf:"bytes,1,opt,name=msg_send,json=msgSend,proto3,oneof" json:"msg_send,omitempty"`
}
func (*Message_MsgSend) MarshalToSizedBuffer ¶
func (m *Message_MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Message_MsgSend) Size ¶
func (m *Message_MsgSend) Size() (n int)
type SignDoc ¶
type SignDoc struct { StdSignDocBase `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:""` Msgs []Message `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs"` }
SignDoc defines a standard application-level signing document to compose signatures for a Transaction.
func NewSignDoc ¶
func (*SignDoc) CanonicalSignBytes ¶
CanonicalSignBytes returns the canonical JSON bytes to sign over, where the SignDoc is derived from a Transaction. The JSON encoding ensures all field names adhere to their proto definition, default values are omitted, and follows the JSON Canonical Form.
func (*SignDoc) Descriptor ¶
func (*SignDoc) MarshalToSizedBuffer ¶
func (*SignDoc) ProtoMessage ¶
func (*SignDoc) ProtoMessage()
func (*SignDoc) XXX_DiscardUnknown ¶
func (m *SignDoc) XXX_DiscardUnknown()
func (*SignDoc) XXX_Marshal ¶
func (*SignDoc) XXX_Unmarshal ¶
type StdFee ¶
type StdFee struct { Amount github_com_bianjieai_irita_sdk_go_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/bianjieai/irita-sdk-go/types.Coins" json:"amount"` Gas uint64 `protobuf:"varint,2,opt,name=gas,proto3" json:"gas,omitempty"` }
StdFee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some miminum to be accepted into the mempool.
func (*StdFee) Descriptor ¶
func (*StdFee) MarshalToSizedBuffer ¶
func (*StdFee) ProtoMessage ¶
func (*StdFee) ProtoMessage()
func (*StdFee) XXX_DiscardUnknown ¶
func (m *StdFee) XXX_DiscardUnknown()
func (*StdFee) XXX_Marshal ¶
func (*StdFee) XXX_Unmarshal ¶
type StdSignDocBase ¶
type StdSignDocBase struct { ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` AccountNumber uint64 `protobuf:"varint,2,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty" yaml:"account_number"` Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` Fee StdFee `protobuf:"bytes,5,opt,name=fee,proto3" json:"fee"` }
StdSignDocBase defines the base structure for which applications can extend to define the concrete structure that signers sign over.
func NewStdSignDocBase ¶
func NewStdSignDocBase(num, seq uint64, cid, memo string, fee StdFee) StdSignDocBase
func (*StdSignDocBase) Descriptor ¶
func (*StdSignDocBase) Descriptor() ([]byte, []int)
func (*StdSignDocBase) GetAccountNumber ¶
func (m *StdSignDocBase) GetAccountNumber() uint64
func (*StdSignDocBase) GetChainID ¶
func (m *StdSignDocBase) GetChainID() string
func (*StdSignDocBase) GetFee ¶
func (m *StdSignDocBase) GetFee() StdFee
func (*StdSignDocBase) GetMemo ¶
func (m *StdSignDocBase) GetMemo() string
func (*StdSignDocBase) GetSequence ¶
func (m *StdSignDocBase) GetSequence() uint64
func (*StdSignDocBase) Marshal ¶
func (m *StdSignDocBase) Marshal() (dAtA []byte, err error)
func (*StdSignDocBase) MarshalToSizedBuffer ¶
func (m *StdSignDocBase) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StdSignDocBase) ProtoMessage ¶
func (*StdSignDocBase) ProtoMessage()
func (*StdSignDocBase) Reset ¶
func (m *StdSignDocBase) Reset()
func (*StdSignDocBase) Size ¶
func (m *StdSignDocBase) Size() (n int)
func (*StdSignDocBase) String ¶
func (m *StdSignDocBase) String() string
func (*StdSignDocBase) Unmarshal ¶
func (m *StdSignDocBase) Unmarshal(dAtA []byte) error
func (*StdSignDocBase) XXX_DiscardUnknown ¶
func (m *StdSignDocBase) XXX_DiscardUnknown()
func (*StdSignDocBase) XXX_Marshal ¶
func (m *StdSignDocBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StdSignDocBase) XXX_Merge ¶
func (m *StdSignDocBase) XXX_Merge(src proto.Message)
func (*StdSignDocBase) XXX_Size ¶
func (m *StdSignDocBase) XXX_Size() int
func (*StdSignDocBase) XXX_Unmarshal ¶
func (m *StdSignDocBase) XXX_Unmarshal(b []byte) error
type StdSignature ¶
type StdSignature struct { PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"public_key,omitempty" yaml:"public_key"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
StdSignature defines a signature structure that contains the signature of a transaction and an optional public key.
func NewStdSignature ¶
func NewStdSignature(pk crypto.PubKey, sig []byte) StdSignature
func (*StdSignature) Descriptor ¶
func (*StdSignature) Descriptor() ([]byte, []int)
func (StdSignature) GetPubKey ¶
func (m StdSignature) GetPubKey() crypto.PubKey
func (StdSignature) GetSignature ¶
func (m StdSignature) GetSignature() []byte
func (*StdSignature) Marshal ¶
func (m *StdSignature) Marshal() (dAtA []byte, err error)
func (*StdSignature) MarshalToSizedBuffer ¶
func (m *StdSignature) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StdSignature) ProtoMessage ¶
func (*StdSignature) ProtoMessage()
func (*StdSignature) Reset ¶
func (m *StdSignature) Reset()
func (*StdSignature) SetSignature ¶
func (m *StdSignature) SetSignature(signature []byte)
func (*StdSignature) Size ¶
func (m *StdSignature) Size() (n int)
func (*StdSignature) String ¶
func (m *StdSignature) String() string
func (*StdSignature) Unmarshal ¶
func (m *StdSignature) Unmarshal(dAtA []byte) error
func (*StdSignature) XXX_DiscardUnknown ¶
func (m *StdSignature) XXX_DiscardUnknown()
func (*StdSignature) XXX_Marshal ¶
func (m *StdSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StdSignature) XXX_Merge ¶
func (m *StdSignature) XXX_Merge(src proto.Message)
func (*StdSignature) XXX_Size ¶
func (m *StdSignature) XXX_Size() int
func (*StdSignature) XXX_Unmarshal ¶
func (m *StdSignature) XXX_Unmarshal(b []byte) error
type StdTxBase ¶
type StdTxBase struct { Fee StdFee `protobuf:"bytes,1,opt,name=fee,proto3" json:"fee"` Signatures []StdSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures"` Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` }
StdTxBase defines a transaction base which application-level concrete transaction types can extend.
func NewStdTxBase ¶
func NewStdTxBase(fee StdFee, sigs []StdSignature, memo string) StdTxBase
func (*StdTxBase) Descriptor ¶
func (*StdTxBase) GetSignatures ¶
func (m *StdTxBase) GetSignatures() []StdSignature
func (*StdTxBase) MarshalToSizedBuffer ¶
func (*StdTxBase) ProtoMessage ¶
func (*StdTxBase) ProtoMessage()
func (*StdTxBase) XXX_DiscardUnknown ¶
func (m *StdTxBase) XXX_DiscardUnknown()
func (*StdTxBase) XXX_Marshal ¶
func (*StdTxBase) XXX_Unmarshal ¶
type Transaction ¶
type Transaction struct { StdTxBase `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:""` Msgs []Message `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs"` }
Transaction defines the application-level transaction that can be signed and processed by the state-machine. It contains a base of common fields and repeated set of Message types.
func NewTransaction ¶
func (Transaction) CanonicalSignBytes ¶
func (tx Transaction) CanonicalSignBytes(cid string, num, seq uint64) ([]byte, error)
CanonicalSignBytes returns the canonical JSON bytes to sign over for the Transaction given a chain ID, account sequence and account number. The JSON encoding ensures all field names adhere to their proto definition, default values are omitted, and follows the JSON Canonical Form.
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (Transaction) GetFee ¶
func (tx Transaction) GetFee() sdk.Fee
GetFee returns the transaction's fee.
func (Transaction) GetMemo ¶
func (tx Transaction) GetMemo() string
GetMemo returns the transaction's memo.
func (Transaction) GetMsgs ¶
func (tx Transaction) GetMsgs() []sdk.Msg
GetMsgs returns all the messages in a Transaction as a slice of sdk.Msg.
func (Transaction) GetSignatures ¶
func (tx Transaction) GetSignatures() []sdk.Signature
GetSignatures returns all the transaction's signatures.
func (Transaction) GetSigners ¶
func (tx Transaction) GetSigners() []sdk.AccAddress
GetSigners returns the addresses that must sign the transaction. Addresses are returned in a deterministic order. They are accumulated from the GetSigners method for each Msg in the order they appear in tx.GetMsgs(). Duplicate addresses will be omitted.
func (*Transaction) Marshal ¶
func (m *Transaction) Marshal() (dAtA []byte, err error)
func (*Transaction) MarshalToSizedBuffer ¶
func (m *Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) SetFee ¶
func (tx *Transaction) SetFee(fee clientx.ClientFee) error
SetFee sets the transaction's fee. It will overwrite any existing fee set.
func (*Transaction) SetMemo ¶
func (tx *Transaction) SetMemo(memo string)
SetMemo sets the transaction's memo. It will overwrite any existing memo set.
func (*Transaction) SetMsgs ¶
func (tx *Transaction) SetMsgs(sdkMsgs ...sdk.Msg) error
SetMsgs sets the messages for a Transaction. It will overwrite any existing messages set.
func (*Transaction) SetSignatures ¶
func (tx *Transaction) SetSignatures(sdkSigs ...clientx.ClientSignature) error
SetSignatures sets the transaction's signatures. It will overwrite any existing signatures set.
func (*Transaction) Size ¶
func (m *Transaction) Size() (n int)
func (*Transaction) String ¶
func (m *Transaction) String() string
func (*Transaction) Unmarshal ¶
func (m *Transaction) Unmarshal(dAtA []byte) error
func (Transaction) ValidateBasic ¶
func (tx Transaction) ValidateBasic() error
ValidateBasic does a simple and lightweight validation check that doesn't require access to any other information.
func (*Transaction) XXX_DiscardUnknown ¶
func (m *Transaction) XXX_DiscardUnknown()
func (*Transaction) XXX_Marshal ¶
func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Transaction) XXX_Merge ¶
func (m *Transaction) XXX_Merge(src proto.Message)
func (*Transaction) XXX_Size ¶
func (m *Transaction) XXX_Size() int
func (*Transaction) XXX_Unmarshal ¶
func (m *Transaction) XXX_Unmarshal(b []byte) error
type TxGenerator ¶
type TxGenerator struct{}
TxGenerator defines a transaction generator that allows clients to construct transactions.
func (TxGenerator) NewFee ¶
func (g TxGenerator) NewFee() clientx.ClientFee
func (TxGenerator) NewSignature ¶
func (g TxGenerator) NewSignature() clientx.ClientSignature
func (TxGenerator) NewTx ¶
func (TxGenerator) NewTx() clientx.ClientTx
NewTx returns a reference to an empty Transaction type.