Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultJSONTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
- func DefaultJSONTxEncoder() sdk.TxEncoder
- func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
- func DefaultTxEncoder() sdk.TxEncoder
- func DirectSignBytes(bodyBytes, authInfoBytes []byte, chainID string, accnum uint64) ([]byte, error)
- func MakeSignModeHandler(modes []signingtypes.SignMode) types.SignModeHandler
- func ModeInfoAndSigToSignatureData(modeInfo *ModeInfo, sig []byte) (signing.SignatureData, error)
- func NewTxConfig(protoCodec *codec.ProtoCodec, enabledSignModes []signingtypes.SignMode) sdk.TxConfig
- func PubKeyToAny(key crypto.PubKey) (*codectypes.Any, error)
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func Unwrap(anyUnpacker codectypes.AnyUnpacker, tx sdk.Tx) (*sdk.UnwrappedTx, error)
- type AuthInfo
- func (*AuthInfo) Descriptor() ([]byte, []int)
- func (m *AuthInfo) GetFee() *Fee
- func (m *AuthInfo) GetSignerInfos() []*SignerInfo
- func (m *AuthInfo) Marshal() (dAtA []byte, err error)
- func (m *AuthInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *AuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AuthInfo) ProtoMessage()
- func (m *AuthInfo) Reset()
- func (m *AuthInfo) Size() (n int)
- func (m *AuthInfo) String() string
- func (m *AuthInfo) Unmarshal(dAtA []byte) error
- func (m *AuthInfo) XXX_DiscardUnknown()
- func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthInfo) XXX_Merge(src proto.Message)
- func (m *AuthInfo) XXX_Size() int
- func (m *AuthInfo) XXX_Unmarshal(b []byte) error
- type ExtensionOptionsTxBuilder
- type Fee
- func (*Fee) Descriptor() ([]byte, []int)
- func (m *Fee) GetAmount() github_com_irisnet_core_sdk_go_types.Coins
- func (m *Fee) GetGasLimit() uint64
- func (m *Fee) GetGranter() string
- func (m *Fee) GetPayer() string
- func (m *Fee) Marshal() (dAtA []byte, err error)
- func (m *Fee) MarshalTo(dAtA []byte) (int, error)
- func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Fee) ProtoMessage()
- func (m *Fee) Reset()
- func (m *Fee) Size() (n int)
- func (m *Fee) String() string
- func (m *Fee) Unmarshal(dAtA []byte) error
- func (m *Fee) XXX_DiscardUnknown()
- func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fee) XXX_Merge(src proto.Message)
- func (m *Fee) XXX_Size() int
- func (m *Fee) XXX_Unmarshal(b []byte) error
- type ModeInfo
- func (*ModeInfo) Descriptor() ([]byte, []int)
- func (m *ModeInfo) GetMulti() *ModeInfo_Multi
- func (m *ModeInfo) GetSingle() *ModeInfo_Single
- func (m *ModeInfo) GetSum() isModeInfo_Sum
- func (m *ModeInfo) Marshal() (dAtA []byte, err error)
- func (m *ModeInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ModeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModeInfo) ProtoMessage()
- func (m *ModeInfo) Reset()
- func (m *ModeInfo) Size() (n int)
- func (m *ModeInfo) String() string
- func (m *ModeInfo) Unmarshal(dAtA []byte) error
- func (m *ModeInfo) XXX_DiscardUnknown()
- func (m *ModeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModeInfo) XXX_Merge(src proto.Message)
- func (*ModeInfo) XXX_OneofWrappers() []interface{}
- func (m *ModeInfo) XXX_Size() int
- func (m *ModeInfo) XXX_Unmarshal(b []byte) error
- type ModeInfo_Multi
- func (*ModeInfo_Multi) Descriptor() ([]byte, []int)
- func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray
- func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo
- func (m *ModeInfo_Multi) Marshal() (dAtA []byte, err error)
- func (m *ModeInfo_Multi) MarshalTo(dAtA []byte) (int, error)
- func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModeInfo_Multi) ProtoMessage()
- func (m *ModeInfo_Multi) Reset()
- func (m *ModeInfo_Multi) Size() (n int)
- func (m *ModeInfo_Multi) String() string
- func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error
- func (m *ModeInfo_Multi) XXX_DiscardUnknown()
- func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModeInfo_Multi) XXX_Merge(src proto.Message)
- func (m *ModeInfo_Multi) XXX_Size() int
- func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error
- type ModeInfo_Multi_
- type ModeInfo_Single
- func (*ModeInfo_Single) Descriptor() ([]byte, []int)
- func (m *ModeInfo_Single) GetMode() signing.SignMode
- func (m *ModeInfo_Single) Marshal() (dAtA []byte, err error)
- func (m *ModeInfo_Single) MarshalTo(dAtA []byte) (int, error)
- func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ModeInfo_Single) ProtoMessage()
- func (m *ModeInfo_Single) Reset()
- func (m *ModeInfo_Single) Size() (n int)
- func (m *ModeInfo_Single) String() string
- func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error
- func (m *ModeInfo_Single) XXX_DiscardUnknown()
- func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ModeInfo_Single) XXX_Merge(src proto.Message)
- func (m *ModeInfo_Single) XXX_Size() int
- func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error
- type ModeInfo_Single_
- type SignDoc
- func (*SignDoc) Descriptor() ([]byte, []int)
- func (m *SignDoc) GetAccountNumber() uint64
- func (m *SignDoc) GetAuthInfoBytes() []byte
- func (m *SignDoc) GetBodyBytes() []byte
- func (m *SignDoc) GetChainId() string
- 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 SignerInfo
- func (*SignerInfo) Descriptor() ([]byte, []int)
- func (m *SignerInfo) GetModeInfo() *ModeInfo
- func (m *SignerInfo) GetPublicKey() *types.Any
- func (m *SignerInfo) GetSequence() uint64
- func (m *SignerInfo) Marshal() (dAtA []byte, err error)
- func (m *SignerInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignerInfo) ProtoMessage()
- func (m *SignerInfo) Reset()
- func (m *SignerInfo) Size() (n int)
- func (m *SignerInfo) String() string
- func (m *SignerInfo) Unmarshal(dAtA []byte) error
- func (m *SignerInfo) XXX_DiscardUnknown()
- func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignerInfo) XXX_Merge(src proto.Message)
- func (m *SignerInfo) XXX_Size() int
- func (m *SignerInfo) XXX_Unmarshal(b []byte) error
- type Tx
- func (*Tx) Descriptor() ([]byte, []int)
- func (m *Tx) GetAuthInfo() *AuthInfo
- func (m *Tx) GetBody() *TxBody
- func (t *Tx) GetMsgs() []sdk.Msg
- func (m *Tx) GetSignatures() [][]byte
- func (t *Tx) GetSigners() []sdk.AccAddress
- func (m *Tx) Marshal() (dAtA []byte, err error)
- func (m *Tx) MarshalTo(dAtA []byte) (int, error)
- func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Tx) ProtoMessage()
- func (m *Tx) Reset()
- func (m *Tx) Size() (n int)
- func (m *Tx) String() string
- func (m *Tx) Unmarshal(dAtA []byte) error
- func (t *Tx) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (t *Tx) ValidateBasic() error
- func (m *Tx) XXX_DiscardUnknown()
- func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tx) XXX_Merge(src proto.Message)
- func (m *Tx) XXX_Size() int
- func (m *Tx) XXX_Unmarshal(b []byte) error
- type TxBody
- func (*TxBody) Descriptor() ([]byte, []int)
- func (m *TxBody) GetExtensionOptions() []*types.Any
- func (m *TxBody) GetMemo() string
- func (m *TxBody) GetMessages() []*types.Any
- func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any
- func (m *TxBody) GetTimeoutHeight() uint64
- func (m *TxBody) Marshal() (dAtA []byte, err error)
- func (m *TxBody) MarshalTo(dAtA []byte) (int, error)
- func (m *TxBody) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxBody) ProtoMessage()
- func (m *TxBody) Reset()
- func (m *TxBody) Size() (n int)
- func (m *TxBody) String() string
- func (m *TxBody) Unmarshal(dAtA []byte) error
- func (m *TxBody) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (m *TxBody) XXX_DiscardUnknown()
- func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxBody) XXX_Merge(src proto.Message)
- func (m *TxBody) XXX_Size() int
- func (m *TxBody) XXX_Unmarshal(b []byte) error
- type TxRaw
- func (*TxRaw) Descriptor() ([]byte, []int)
- func (m *TxRaw) GetAuthInfoBytes() []byte
- func (m *TxRaw) GetBodyBytes() []byte
- func (m *TxRaw) GetSignatures() [][]byte
- func (m *TxRaw) Marshal() (dAtA []byte, err error)
- func (m *TxRaw) MarshalTo(dAtA []byte) (int, error)
- func (m *TxRaw) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxRaw) ProtoMessage()
- func (m *TxRaw) Reset()
- func (m *TxRaw) Size() (n int)
- func (m *TxRaw) String() string
- func (m *TxRaw) Unmarshal(dAtA []byte) error
- func (m *TxRaw) XXX_DiscardUnknown()
- func (m *TxRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxRaw) XXX_Merge(src proto.Message)
- func (m *TxRaw) XXX_Size() int
- func (m *TxRaw) XXX_Unmarshal(b []byte) error
Constants ¶
const MaxGasWanted = uint64((1 << 63) - 1)
MaxGasWanted defines the max gas allowed.
Variables ¶
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var DefaultSignModes = []signingtypes.SignMode{ signingtypes.SignMode_SIGN_MODE_DIRECT, }
DefaultSignModes are the default sign modes enabled for protobuf transactions.
Functions ¶
func DefaultJSONTxDecoder ¶
func DefaultJSONTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
DefaultJSONTxDecoder returns a default protobuf JSON TxDecoder using the provided Marshaler.
func DefaultJSONTxEncoder ¶
DefaultJSONTxEncoder returns a default protobuf JSON TxEncoder using the provided Marshaler.
func DefaultTxDecoder ¶
func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder
DefaultTxDecoder returns a default protobuf TxDecoder using the provided Marshaler.
func DefaultTxEncoder ¶
DefaultTxEncoder returns a default protobuf TxEncoder using the provided Marshaler
func DirectSignBytes ¶
func DirectSignBytes(bodyBytes, authInfoBytes []byte, chainID string, accnum uint64) ([]byte, error)
DirectSignBytes returns the SIGN_MODE_DIRECT sign bytes for the provided TxBody bytes, AuthInfo bytes, chain ID, account number and sequence.
func MakeSignModeHandler ¶
func MakeSignModeHandler(modes []signingtypes.SignMode) types.SignModeHandler
makeSignModeHandler returns the default protobuf SignModeHandler supporting SIGN_MODE_DIRECT and SIGN_MODE_LEGACY_AMINO_JSON.
func ModeInfoAndSigToSignatureData ¶
func ModeInfoAndSigToSignatureData(modeInfo *ModeInfo, sig []byte) (signing.SignatureData, error)
ModeInfoAndSigToSignatureData converts a ModeInfo and raw bytes signature to a SignatureData or returns an error
func NewTxConfig ¶
func NewTxConfig(protoCodec *codec.ProtoCodec, enabledSignModes []signingtypes.SignMode) sdk.TxConfig
NewTxConfig returns a new protobuf TxConfig using the provided ProtoCodec and sign modes. The first enabled sign mode will become the default sign mode.
func PubKeyToAny ¶
func PubKeyToAny(key crypto.PubKey) (*codectypes.Any, error)
PubKeyToAny converts a crypto.PubKey to a proto Any.
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the sdk.Tx interface.
func Unwrap ¶
func Unwrap(anyUnpacker codectypes.AnyUnpacker, tx sdk.Tx) (*sdk.UnwrappedTx, error)
Types ¶
type AuthInfo ¶
type AuthInfo struct { // signer_infos defines the signing modes for the required signers. The number // and order of elements must match the required signers from TxBody's // messages. The first element is the primary signer and the one which pays // the fee. SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` // Fee is the fee and gas limit for the transaction. The first signer is the // primary signer and the one which pays the fee. The fee can be calculated // based on the cost of evaluating the body and doing signature verification // of the signers. This can be estimated via simulation. Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` }
AuthInfo describes the fee and signer modes that are used to sign a transaction.
func (*AuthInfo) Descriptor ¶
func (*AuthInfo) GetSignerInfos ¶
func (m *AuthInfo) GetSignerInfos() []*SignerInfo
func (*AuthInfo) MarshalToSizedBuffer ¶
func (*AuthInfo) ProtoMessage ¶
func (*AuthInfo) ProtoMessage()
func (*AuthInfo) XXX_DiscardUnknown ¶
func (m *AuthInfo) XXX_DiscardUnknown()
func (*AuthInfo) XXX_Marshal ¶
func (*AuthInfo) XXX_Unmarshal ¶
type ExtensionOptionsTxBuilder ¶
type ExtensionOptionsTxBuilder interface { SetExtensionOptions(...*codectypes.Any) SetNonCriticalExtensionOptions(...*codectypes.Any) }
ExtensionOptionsTxBuilder defines a Factory that can also set extensions.
type Fee ¶
type Fee struct { // amount is the amount of coins to be paid as a fee Amount github_com_irisnet_core_sdk_go_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/irisnet/core-sdk-go/types.Coins" json:"amount"` // gas_limit is the maximum gas that can be used in transaction processing // before an out of gas error occurs GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. // the payer must be a tx signer (and thus have signed this field in AuthInfo). // setting this field does *not* change the ordering of required signers for the transaction. Payer string `protobuf:"bytes,3,opt,name=payer,proto3" json:"payer,omitempty"` // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does // not support fee grants, this will fail Granter string `protobuf:"bytes,4,opt,name=granter,proto3" json:"granter,omitempty"` }
Fee 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 (*Fee) Descriptor ¶
func (*Fee) GetAmount ¶
func (m *Fee) GetAmount() github_com_irisnet_core_sdk_go_types.Coins
func (*Fee) GetGasLimit ¶
func (*Fee) GetGranter ¶
func (*Fee) ProtoMessage ¶
func (*Fee) ProtoMessage()
func (*Fee) XXX_DiscardUnknown ¶
func (m *Fee) XXX_DiscardUnknown()
func (*Fee) XXX_Unmarshal ¶
type ModeInfo ¶
type ModeInfo struct { // sum is the oneof that specifies whether this represents a single or nested // multisig signer // // Types that are valid to be assigned to Sum: // // *ModeInfo_Single_ // *ModeInfo_Multi_ Sum isModeInfo_Sum `protobuf_oneof:"sum"` }
ModeInfo describes the signing mode of a single or nested multisig signer.
func SignatureDataToModeInfoAndSig ¶
func SignatureDataToModeInfoAndSig(data signing.SignatureData) (*ModeInfo, []byte)
SignatureDataToModeInfoAndSig converts a SignatureData to a ModeInfo and raw bytes signature
func (*ModeInfo) Descriptor ¶
func (*ModeInfo) GetMulti ¶
func (m *ModeInfo) GetMulti() *ModeInfo_Multi
func (*ModeInfo) GetSingle ¶
func (m *ModeInfo) GetSingle() *ModeInfo_Single
func (*ModeInfo) MarshalToSizedBuffer ¶
func (*ModeInfo) ProtoMessage ¶
func (*ModeInfo) ProtoMessage()
func (*ModeInfo) XXX_DiscardUnknown ¶
func (m *ModeInfo) XXX_DiscardUnknown()
func (*ModeInfo) XXX_Marshal ¶
func (*ModeInfo) XXX_OneofWrappers ¶
func (*ModeInfo) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ModeInfo) XXX_Unmarshal ¶
type ModeInfo_Multi ¶
type ModeInfo_Multi struct { // bitarray specifies which keys within the multisig are signing Bitarray *types1.CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"` // mode_infos is the corresponding modes of the signers of the multisig // which could include nested multisig public keys ModeInfos []*ModeInfo `protobuf:"bytes,2,rep,name=mode_infos,json=modeInfos,proto3" json:"mode_infos,omitempty"` }
Multi is the mode info for a multisig public key
func (*ModeInfo_Multi) Descriptor ¶
func (*ModeInfo_Multi) Descriptor() ([]byte, []int)
func (*ModeInfo_Multi) GetBitarray ¶
func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray
func (*ModeInfo_Multi) GetModeInfos ¶
func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo
func (*ModeInfo_Multi) Marshal ¶
func (m *ModeInfo_Multi) Marshal() (dAtA []byte, err error)
func (*ModeInfo_Multi) MarshalToSizedBuffer ¶
func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Multi) ProtoMessage ¶
func (*ModeInfo_Multi) ProtoMessage()
func (*ModeInfo_Multi) Reset ¶
func (m *ModeInfo_Multi) Reset()
func (*ModeInfo_Multi) Size ¶
func (m *ModeInfo_Multi) Size() (n int)
func (*ModeInfo_Multi) String ¶
func (m *ModeInfo_Multi) String() string
func (*ModeInfo_Multi) Unmarshal ¶
func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error
func (*ModeInfo_Multi) XXX_DiscardUnknown ¶
func (m *ModeInfo_Multi) XXX_DiscardUnknown()
func (*ModeInfo_Multi) XXX_Marshal ¶
func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ModeInfo_Multi) XXX_Merge ¶
func (m *ModeInfo_Multi) XXX_Merge(src proto.Message)
func (*ModeInfo_Multi) XXX_Size ¶
func (m *ModeInfo_Multi) XXX_Size() int
func (*ModeInfo_Multi) XXX_Unmarshal ¶
func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error
type ModeInfo_Multi_ ¶
type ModeInfo_Multi_ struct {
Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"`
}
func (*ModeInfo_Multi_) MarshalToSizedBuffer ¶
func (m *ModeInfo_Multi_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Multi_) Size ¶
func (m *ModeInfo_Multi_) Size() (n int)
type ModeInfo_Single ¶
type ModeInfo_Single struct { // mode is the signing mode of the single signer Mode signing.SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` }
Single is the mode info for a single signer. It is structured as a message to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future
func (*ModeInfo_Single) Descriptor ¶
func (*ModeInfo_Single) Descriptor() ([]byte, []int)
func (*ModeInfo_Single) GetMode ¶
func (m *ModeInfo_Single) GetMode() signing.SignMode
func (*ModeInfo_Single) Marshal ¶
func (m *ModeInfo_Single) Marshal() (dAtA []byte, err error)
func (*ModeInfo_Single) MarshalToSizedBuffer ¶
func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Single) ProtoMessage ¶
func (*ModeInfo_Single) ProtoMessage()
func (*ModeInfo_Single) Reset ¶
func (m *ModeInfo_Single) Reset()
func (*ModeInfo_Single) Size ¶
func (m *ModeInfo_Single) Size() (n int)
func (*ModeInfo_Single) String ¶
func (m *ModeInfo_Single) String() string
func (*ModeInfo_Single) Unmarshal ¶
func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error
func (*ModeInfo_Single) XXX_DiscardUnknown ¶
func (m *ModeInfo_Single) XXX_DiscardUnknown()
func (*ModeInfo_Single) XXX_Marshal ¶
func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ModeInfo_Single) XXX_Merge ¶
func (m *ModeInfo_Single) XXX_Merge(src proto.Message)
func (*ModeInfo_Single) XXX_Size ¶
func (m *ModeInfo_Single) XXX_Size() int
func (*ModeInfo_Single) XXX_Unmarshal ¶
func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error
type ModeInfo_Single_ ¶
type ModeInfo_Single_ struct {
Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"`
}
func (*ModeInfo_Single_) MarshalToSizedBuffer ¶
func (m *ModeInfo_Single_) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ModeInfo_Single_) Size ¶
func (m *ModeInfo_Single_) Size() (n int)
type SignDoc ¶
type SignDoc struct { // body_bytes is protobuf serialization of a TxBody that matches the // representation in TxRaw. BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the // representation in TxRaw. AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` // chain_id is the unique identifier of the chain this transaction targets. // It prevents signed transactions from being used on another chain by an // attacker ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // account_number is the account number of the account in state AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` }
SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT.
func (*SignDoc) Descriptor ¶
func (*SignDoc) GetAccountNumber ¶
func (*SignDoc) GetAuthInfoBytes ¶
func (*SignDoc) GetBodyBytes ¶
func (*SignDoc) GetChainId ¶
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 SignerInfo ¶
type SignerInfo struct { // public_key is the public key of the signer. It is optional for accounts // that already exist in state. If unset, the verifier can use the required \ // signer address for this position and lookup the public key. PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // mode_info describes the signing mode of the signer and is a nested // structure to support nested multisig pubkey's ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"` // sequence is the sequence of the account, which describes the // number of committed transactions signed by a given address. It is used to // prevent replay attacks. Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` }
SignerInfo describes the public key and signing mode of a single top-level signer.
func (*SignerInfo) Descriptor ¶
func (*SignerInfo) Descriptor() ([]byte, []int)
func (*SignerInfo) GetModeInfo ¶
func (m *SignerInfo) GetModeInfo() *ModeInfo
func (*SignerInfo) GetPublicKey ¶
func (m *SignerInfo) GetPublicKey() *types.Any
func (*SignerInfo) GetSequence ¶
func (m *SignerInfo) GetSequence() uint64
func (*SignerInfo) Marshal ¶
func (m *SignerInfo) Marshal() (dAtA []byte, err error)
func (*SignerInfo) MarshalToSizedBuffer ¶
func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignerInfo) ProtoMessage ¶
func (*SignerInfo) ProtoMessage()
func (*SignerInfo) Reset ¶
func (m *SignerInfo) Reset()
func (*SignerInfo) Size ¶
func (m *SignerInfo) Size() (n int)
func (*SignerInfo) String ¶
func (m *SignerInfo) String() string
func (*SignerInfo) Unmarshal ¶
func (m *SignerInfo) Unmarshal(dAtA []byte) error
func (*SignerInfo) XXX_DiscardUnknown ¶
func (m *SignerInfo) XXX_DiscardUnknown()
func (*SignerInfo) XXX_Marshal ¶
func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignerInfo) XXX_Merge ¶
func (m *SignerInfo) XXX_Merge(src proto.Message)
func (*SignerInfo) XXX_Size ¶
func (m *SignerInfo) XXX_Size() int
func (*SignerInfo) XXX_Unmarshal ¶
func (m *SignerInfo) XXX_Unmarshal(b []byte) error
type Tx ¶
type Tx struct { // body is the processable content of the transaction Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // auth_info is the authorization related content of the transaction, // specifically signers, signer modes and fee AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` // signatures is a list of signatures that matches the length and order of // AuthInfo's signer_infos to allow connecting signature meta information like // public key and signing mode by position. Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` }
Tx is the standard type used for broadcasting transactions.
func (*Tx) Descriptor ¶
func (*Tx) GetAuthInfo ¶
func (*Tx) GetSignatures ¶
func (*Tx) GetSigners ¶
func (t *Tx) GetSigners() []sdk.AccAddress
GetSigners retrieves all the signers of a tx.
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) UnpackInterfaces ¶
func (t *Tx) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method
func (*Tx) ValidateBasic ¶
ValidateBasic implements the ValidateBasic method on sdk.Tx.
func (*Tx) XXX_DiscardUnknown ¶
func (m *Tx) XXX_DiscardUnknown()
func (*Tx) XXX_Unmarshal ¶
type TxBody ¶
type TxBody struct { // messages is a list of messages to be executed. The required signers of // those messages define the number and order of elements in AuthInfo's // signer_infos and Tx's signatures. Each required signer address is added to // the list only the first time it occurs. // // By convention, the first required signer (usually from the first message) // is referred to as the primary signer and pays the fee for the whole // transaction. Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // memo is any arbitrary memo to be added to the transaction Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` // timeout is the block height after which this transaction will not // be processed by the chain TimeoutHeight uint64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` // extension_options are arbitrary options that can be added by chains // when the default options are not sufficient. If any of these are present // and can't be handled, the transaction will be rejected ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` // extension_options are arbitrary options that can be added by chains // when the default options are not sufficient. If any of these are present // and can't be handled, they will be ignored NonCriticalExtensionOptions []*types.Any `` /* 149-byte string literal not displayed */ }
TxBody is the body of a transaction that all signers sign over.
func (*TxBody) Descriptor ¶
func (*TxBody) GetExtensionOptions ¶
func (*TxBody) GetMessages ¶
func (*TxBody) GetNonCriticalExtensionOptions ¶
func (*TxBody) GetTimeoutHeight ¶
func (*TxBody) MarshalToSizedBuffer ¶
func (*TxBody) ProtoMessage ¶
func (*TxBody) ProtoMessage()
func (*TxBody) UnpackInterfaces ¶
func (m *TxBody) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method
func (*TxBody) XXX_DiscardUnknown ¶
func (m *TxBody) XXX_DiscardUnknown()
func (*TxBody) XXX_Marshal ¶
func (*TxBody) XXX_Unmarshal ¶
type TxRaw ¶
type TxRaw struct { // body_bytes is a protobuf serialization of a TxBody that matches the // representation in SignDoc. BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the // representation in SignDoc. AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` // signatures is a list of signatures that matches the length and order of // AuthInfo's signer_infos to allow connecting signature meta information like // public key and signing mode by position. Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` }
TxRaw is a variant of Tx that pins the signer's exact binary representation of body and auth_info. This is used for signing, broadcasting and verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used as the transaction ID.
func (*TxRaw) Descriptor ¶
func (*TxRaw) GetAuthInfoBytes ¶
func (*TxRaw) GetBodyBytes ¶
func (*TxRaw) GetSignatures ¶
func (*TxRaw) ProtoMessage ¶
func (*TxRaw) ProtoMessage()
func (*TxRaw) XXX_DiscardUnknown ¶
func (m *TxRaw) XXX_DiscardUnknown()