2769 lines
66 KiB
Go
2769 lines
66 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: types/tx/types.proto
|
|
|
|
package types
|
|
|
|
import (
|
|
fmt "fmt"
|
|
types "github.com/cosmos/cosmos-sdk/codec/types"
|
|
types1 "github.com/cosmos/cosmos-sdk/crypto/types"
|
|
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
|
types2 "github.com/cosmos/cosmos-sdk/types"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// SignMode represents a signing mode with its own security guarantees
|
|
type SignMode int32
|
|
|
|
const (
|
|
// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected
|
|
SignMode_SIGN_MODE_UNSPECIFIED SignMode = 0
|
|
// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified
|
|
// with raw bytes from Tx
|
|
SignMode_SIGN_MODE_DIRECT SignMode = 1
|
|
// SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable
|
|
// textual representation on top of the binary representation from SIGN_MODE_DIRECT
|
|
SignMode_SIGN_MODE_TEXTUAL SignMode = 2
|
|
// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
|
|
// Amino JSON and will be removed in the future
|
|
SignMode_SIGN_MODE_LEGACY_AMINO_JSON SignMode = 127
|
|
)
|
|
|
|
var SignMode_name = map[int32]string{
|
|
0: "SIGN_MODE_UNSPECIFIED",
|
|
1: "SIGN_MODE_DIRECT",
|
|
2: "SIGN_MODE_TEXTUAL",
|
|
127: "SIGN_MODE_LEGACY_AMINO_JSON",
|
|
}
|
|
|
|
var SignMode_value = map[string]int32{
|
|
"SIGN_MODE_UNSPECIFIED": 0,
|
|
"SIGN_MODE_DIRECT": 1,
|
|
"SIGN_MODE_TEXTUAL": 2,
|
|
"SIGN_MODE_LEGACY_AMINO_JSON": 127,
|
|
}
|
|
|
|
func (x SignMode) String() string {
|
|
return proto.EnumName(SignMode_name, int32(x))
|
|
}
|
|
|
|
func (SignMode) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{0}
|
|
}
|
|
|
|
// Tx is the standard type used for broadcasting transactions
|
|
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 are the raw binary signatures of signers specified by body and auth_info
|
|
Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
|
|
}
|
|
|
|
func (m *Tx) Reset() { *m = Tx{} }
|
|
func (m *Tx) String() string { return proto.CompactTextString(m) }
|
|
func (*Tx) ProtoMessage() {}
|
|
func (*Tx) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{0}
|
|
}
|
|
func (m *Tx) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Tx.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Tx) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Tx.Merge(m, src)
|
|
}
|
|
func (m *Tx) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Tx) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Tx.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Tx proto.InternalMessageInfo
|
|
|
|
func (m *Tx) GetBody() *TxBody {
|
|
if m != nil {
|
|
return m.Body
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Tx) GetAuthInfo() *AuthInfo {
|
|
if m != nil {
|
|
return m.AuthInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Tx) GetSignatures() [][]byte {
|
|
if m != nil {
|
|
return m.Signatures
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// SignDoc is the standard type used for signing transaction in SIGN_MODE_DIRECT
|
|
type SignDoc struct {
|
|
// body is the TxBody from Tx
|
|
Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
|
|
// auth_info is the AuthInfo from Tx
|
|
AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,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"`
|
|
// account_sequence starts at 1 rather than 0 to avoid the case where
|
|
// the default 0 value must be omitted in protobuf serialization
|
|
AccountSequence uint64 `protobuf:"varint,5,opt,name=account_sequence,json=accountSequence,proto3" json:"account_sequence,omitempty"`
|
|
}
|
|
|
|
func (m *SignDoc) Reset() { *m = SignDoc{} }
|
|
func (m *SignDoc) String() string { return proto.CompactTextString(m) }
|
|
func (*SignDoc) ProtoMessage() {}
|
|
func (*SignDoc) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{1}
|
|
}
|
|
func (m *SignDoc) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SignDoc.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SignDoc) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SignDoc.Merge(m, src)
|
|
}
|
|
func (m *SignDoc) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SignDoc) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SignDoc.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SignDoc proto.InternalMessageInfo
|
|
|
|
func (m *SignDoc) GetBody() *TxBody {
|
|
if m != nil {
|
|
return m.Body
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SignDoc) GetAuthInfo() *AuthInfo {
|
|
if m != nil {
|
|
return m.AuthInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SignDoc) GetChainId() string {
|
|
if m != nil {
|
|
return m.ChainId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SignDoc) GetAccountNumber() uint64 {
|
|
if m != nil {
|
|
return m.AccountNumber
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SignDoc) GetAccountSequence() uint64 {
|
|
if m != nil {
|
|
return m.AccountSequence
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// TxBody is the body of a transaction that all signers sign over
|
|
type TxBody struct {
|
|
// messages are the processable content of the 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 int64 `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 `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"`
|
|
}
|
|
|
|
func (m *TxBody) Reset() { *m = TxBody{} }
|
|
func (m *TxBody) String() string { return proto.CompactTextString(m) }
|
|
func (*TxBody) ProtoMessage() {}
|
|
func (*TxBody) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{2}
|
|
}
|
|
func (m *TxBody) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TxBody.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TxBody) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TxBody.Merge(m, src)
|
|
}
|
|
func (m *TxBody) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TxBody) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TxBody.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TxBody proto.InternalMessageInfo
|
|
|
|
func (m *TxBody) GetMessages() []*types.Any {
|
|
if m != nil {
|
|
return m.Messages
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TxBody) GetMemo() string {
|
|
if m != nil {
|
|
return m.Memo
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *TxBody) GetTimeoutHeight() int64 {
|
|
if m != nil {
|
|
return m.TimeoutHeight
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TxBody) GetExtensionOptions() []*types.Any {
|
|
if m != nil {
|
|
return m.ExtensionOptions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any {
|
|
if m != nil {
|
|
return m.NonCriticalExtensionOptions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// AuthInfo describes the fee and signer modes that are used to sign a transaction
|
|
type AuthInfo struct {
|
|
// signer_infos is the list of signer infos which corresponds with
|
|
// Tx.signatures and expected signers derived from TxBody.messages. All signers
|
|
// are expected to occur in the same order in each of these locations
|
|
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
|
|
Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"`
|
|
}
|
|
|
|
func (m *AuthInfo) Reset() { *m = AuthInfo{} }
|
|
func (m *AuthInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*AuthInfo) ProtoMessage() {}
|
|
func (*AuthInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{3}
|
|
}
|
|
func (m *AuthInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AuthInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AuthInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AuthInfo.Merge(m, src)
|
|
}
|
|
func (m *AuthInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AuthInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AuthInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AuthInfo proto.InternalMessageInfo
|
|
|
|
func (m *AuthInfo) GetSignerInfos() []*SignerInfo {
|
|
if m != nil {
|
|
return m.SignerInfos
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *AuthInfo) GetFee() *Fee {
|
|
if m != nil {
|
|
return m.Fee
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// SignerInfo describes the public key and signing mode of a single top-level signer
|
|
type SignerInfo struct {
|
|
// public_key is the public key of the signer. It is optional for accounts
|
|
// that already exist in state
|
|
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"`
|
|
}
|
|
|
|
func (m *SignerInfo) Reset() { *m = SignerInfo{} }
|
|
func (m *SignerInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*SignerInfo) ProtoMessage() {}
|
|
func (*SignerInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{4}
|
|
}
|
|
func (m *SignerInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SignerInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SignerInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SignerInfo.Merge(m, src)
|
|
}
|
|
func (m *SignerInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SignerInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SignerInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SignerInfo proto.InternalMessageInfo
|
|
|
|
func (m *SignerInfo) GetPublicKey() *types.Any {
|
|
if m != nil {
|
|
return m.PublicKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SignerInfo) GetModeInfo() *ModeInfo {
|
|
if m != nil {
|
|
return m.ModeInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ModeInfo describes the signing mode of a single or nested multisig signer
|
|
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"`
|
|
}
|
|
|
|
func (m *ModeInfo) Reset() { *m = ModeInfo{} }
|
|
func (m *ModeInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*ModeInfo) ProtoMessage() {}
|
|
func (*ModeInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{5}
|
|
}
|
|
func (m *ModeInfo) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ModeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ModeInfo.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ModeInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ModeInfo.Merge(m, src)
|
|
}
|
|
func (m *ModeInfo) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ModeInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ModeInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ModeInfo proto.InternalMessageInfo
|
|
|
|
type isModeInfo_Sum interface {
|
|
isModeInfo_Sum()
|
|
MarshalTo([]byte) (int, error)
|
|
Size() int
|
|
}
|
|
|
|
type ModeInfo_Single_ struct {
|
|
Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"`
|
|
}
|
|
type ModeInfo_Multi_ struct {
|
|
Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"`
|
|
}
|
|
|
|
func (*ModeInfo_Single_) isModeInfo_Sum() {}
|
|
func (*ModeInfo_Multi_) isModeInfo_Sum() {}
|
|
|
|
func (m *ModeInfo) GetSum() isModeInfo_Sum {
|
|
if m != nil {
|
|
return m.Sum
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ModeInfo) GetSingle() *ModeInfo_Single {
|
|
if x, ok := m.GetSum().(*ModeInfo_Single_); ok {
|
|
return x.Single
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ModeInfo) GetMulti() *ModeInfo_Multi {
|
|
if x, ok := m.GetSum().(*ModeInfo_Multi_); ok {
|
|
return x.Multi
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
func (*ModeInfo) XXX_OneofWrappers() []interface{} {
|
|
return []interface{}{
|
|
(*ModeInfo_Single_)(nil),
|
|
(*ModeInfo_Multi_)(nil),
|
|
}
|
|
}
|
|
|
|
// 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
|
|
type ModeInfo_Single struct {
|
|
// mode is the signing mode of the single signer
|
|
Mode SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos_sdk.tx.v1.SignMode" json:"mode,omitempty"`
|
|
}
|
|
|
|
func (m *ModeInfo_Single) Reset() { *m = ModeInfo_Single{} }
|
|
func (m *ModeInfo_Single) String() string { return proto.CompactTextString(m) }
|
|
func (*ModeInfo_Single) ProtoMessage() {}
|
|
func (*ModeInfo_Single) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{5, 0}
|
|
}
|
|
func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ModeInfo_Single.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ModeInfo_Single) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ModeInfo_Single.Merge(m, src)
|
|
}
|
|
func (m *ModeInfo_Single) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ModeInfo_Single) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ModeInfo_Single.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ModeInfo_Single proto.InternalMessageInfo
|
|
|
|
func (m *ModeInfo_Single) GetMode() SignMode {
|
|
if m != nil {
|
|
return m.Mode
|
|
}
|
|
return SignMode_SIGN_MODE_UNSPECIFIED
|
|
}
|
|
|
|
// Multi is the mode info for a multisig public key
|
|
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"`
|
|
}
|
|
|
|
func (m *ModeInfo_Multi) Reset() { *m = ModeInfo_Multi{} }
|
|
func (m *ModeInfo_Multi) String() string { return proto.CompactTextString(m) }
|
|
func (*ModeInfo_Multi) ProtoMessage() {}
|
|
func (*ModeInfo_Multi) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{5, 1}
|
|
}
|
|
func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ModeInfo_Multi.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ModeInfo_Multi) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ModeInfo_Multi.Merge(m, src)
|
|
}
|
|
func (m *ModeInfo_Multi) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ModeInfo_Multi) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ModeInfo_Multi.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ModeInfo_Multi proto.InternalMessageInfo
|
|
|
|
func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray {
|
|
if m != nil {
|
|
return m.Bitarray
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo {
|
|
if m != nil {
|
|
return m.ModeInfos
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 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.
|
|
type Fee struct {
|
|
// amount is the amount of coins to be paid as a fee
|
|
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/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"`
|
|
}
|
|
|
|
func (m *Fee) Reset() { *m = Fee{} }
|
|
func (m *Fee) String() string { return proto.CompactTextString(m) }
|
|
func (*Fee) ProtoMessage() {}
|
|
func (*Fee) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_1c6ac8fa65877134, []int{6}
|
|
}
|
|
func (m *Fee) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Fee.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Fee) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Fee.Merge(m, src)
|
|
}
|
|
func (m *Fee) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Fee) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Fee.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Fee proto.InternalMessageInfo
|
|
|
|
func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
|
|
if m != nil {
|
|
return m.Amount
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Fee) GetGasLimit() uint64 {
|
|
if m != nil {
|
|
return m.GasLimit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("cosmos_sdk.tx.v1.SignMode", SignMode_name, SignMode_value)
|
|
proto.RegisterType((*Tx)(nil), "cosmos_sdk.tx.v1.Tx")
|
|
proto.RegisterType((*SignDoc)(nil), "cosmos_sdk.tx.v1.SignDoc")
|
|
proto.RegisterType((*TxBody)(nil), "cosmos_sdk.tx.v1.TxBody")
|
|
proto.RegisterType((*AuthInfo)(nil), "cosmos_sdk.tx.v1.AuthInfo")
|
|
proto.RegisterType((*SignerInfo)(nil), "cosmos_sdk.tx.v1.SignerInfo")
|
|
proto.RegisterType((*ModeInfo)(nil), "cosmos_sdk.tx.v1.ModeInfo")
|
|
proto.RegisterType((*ModeInfo_Single)(nil), "cosmos_sdk.tx.v1.ModeInfo.Single")
|
|
proto.RegisterType((*ModeInfo_Multi)(nil), "cosmos_sdk.tx.v1.ModeInfo.Multi")
|
|
proto.RegisterType((*Fee)(nil), "cosmos_sdk.tx.v1.Fee")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("types/tx/types.proto", fileDescriptor_1c6ac8fa65877134) }
|
|
|
|
var fileDescriptor_1c6ac8fa65877134 = []byte{
|
|
// 842 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4d, 0x6f, 0xe3, 0x44,
|
|
0x18, 0x8e, 0x93, 0x34, 0x4d, 0xde, 0xee, 0x47, 0x3a, 0xb4, 0x92, 0x9b, 0xa2, 0x34, 0x44, 0x2a,
|
|
0x04, 0x04, 0xce, 0xb2, 0x7b, 0x60, 0x11, 0x87, 0x55, 0x92, 0xa6, 0xdb, 0x40, 0x9b, 0xa2, 0x49,
|
|
0x56, 0x82, 0x95, 0x90, 0xe5, 0xd8, 0x53, 0x67, 0xd4, 0x78, 0x26, 0x78, 0xc6, 0x28, 0xe1, 0x82,
|
|
0x38, 0x70, 0xe2, 0xc2, 0x85, 0x3f, 0xc1, 0x2f, 0x59, 0x71, 0xda, 0x23, 0x17, 0x3e, 0xd4, 0xfe,
|
|
0x10, 0x90, 0xc7, 0xe3, 0xa4, 0x6a, 0x4a, 0xb8, 0x71, 0xca, 0xeb, 0xc7, 0xcf, 0xf3, 0xcc, 0xfb,
|
|
0x95, 0x31, 0xec, 0xc8, 0xf9, 0x94, 0x88, 0xa6, 0x9c, 0x35, 0x55, 0x60, 0x4d, 0x43, 0x2e, 0x39,
|
|
0x2a, 0xbb, 0x5c, 0x04, 0x5c, 0xd8, 0xc2, 0xbb, 0xb4, 0xe4, 0xcc, 0xfa, 0xe6, 0xc3, 0xca, 0xdb,
|
|
0x72, 0x4c, 0x43, 0xcf, 0x9e, 0x3a, 0xa1, 0x9c, 0x37, 0x15, 0xa9, 0xe9, 0x73, 0x9f, 0x2f, 0xa3,
|
|
0x44, 0x59, 0x31, 0xdd, 0x70, 0x3e, 0x95, 0xbc, 0xa9, 0x6d, 0x97, 0x9e, 0x95, 0xed, 0x55, 0x68,
|
|
0xcf, 0xe7, 0xdc, 0x9f, 0x90, 0xc4, 0x6f, 0x14, 0x5d, 0x34, 0x1d, 0x36, 0x4f, 0x5e, 0xd5, 0x7f,
|
|
0x34, 0x20, 0x3b, 0x9c, 0xa1, 0xf7, 0x21, 0x3f, 0xe2, 0xde, 0xdc, 0x34, 0x6a, 0x46, 0x63, 0xeb,
|
|
0xb1, 0x69, 0xdd, 0xce, 0xcb, 0x1a, 0xce, 0xda, 0xdc, 0x9b, 0x63, 0xc5, 0x42, 0x1f, 0x41, 0xc9,
|
|
0x89, 0xe4, 0xd8, 0xa6, 0xec, 0x82, 0x9b, 0x59, 0x25, 0xa9, 0xac, 0x4a, 0x5a, 0x91, 0x1c, 0xf7,
|
|
0xd8, 0x05, 0xc7, 0x45, 0x47, 0x47, 0xa8, 0x0a, 0x20, 0xa8, 0xcf, 0x1c, 0x19, 0x85, 0x44, 0x98,
|
|
0xb9, 0x5a, 0xae, 0x71, 0x0f, 0xdf, 0x40, 0xea, 0xbf, 0x1b, 0xb0, 0x39, 0xa0, 0x3e, 0x3b, 0xe2,
|
|
0xee, 0xff, 0x95, 0xd2, 0x1e, 0x14, 0xdd, 0xb1, 0x43, 0x99, 0x4d, 0x3d, 0x33, 0x57, 0x33, 0x1a,
|
|
0x25, 0xbc, 0xa9, 0x9e, 0x7b, 0x1e, 0x3a, 0x84, 0x07, 0x8e, 0xeb, 0xf2, 0x88, 0x49, 0x9b, 0x45,
|
|
0xc1, 0x88, 0x84, 0x66, 0xbe, 0x66, 0x34, 0xf2, 0xf8, 0xbe, 0x46, 0xfb, 0x0a, 0x44, 0xef, 0x42,
|
|
0x39, 0xa5, 0x09, 0xf2, 0x75, 0x44, 0x98, 0x4b, 0xcc, 0x0d, 0x45, 0x7c, 0xa8, 0xf1, 0x81, 0x86,
|
|
0xeb, 0x3f, 0x67, 0xa1, 0x90, 0xa4, 0x8d, 0x1e, 0x41, 0x31, 0x20, 0x42, 0x38, 0x3e, 0x11, 0xa6,
|
|
0x51, 0xcb, 0x35, 0xb6, 0x1e, 0xef, 0x58, 0xc9, 0x98, 0xac, 0x74, 0x4c, 0x56, 0x8b, 0xcd, 0xf1,
|
|
0x82, 0x85, 0x10, 0xe4, 0x03, 0x12, 0x24, 0xd5, 0x95, 0xb0, 0x8a, 0xe3, 0x14, 0x25, 0x0d, 0x08,
|
|
0x8f, 0xa4, 0x3d, 0x26, 0xd4, 0x1f, 0x4b, 0x55, 0x43, 0x0e, 0xdf, 0xd7, 0xe8, 0x89, 0x02, 0x51,
|
|
0x1b, 0xb6, 0xc9, 0x4c, 0x12, 0x26, 0x28, 0x67, 0x36, 0x9f, 0x4a, 0xca, 0x99, 0x30, 0xff, 0xde,
|
|
0x5c, 0x73, 0x6c, 0x79, 0xc1, 0x3f, 0x4f, 0xe8, 0xe8, 0x25, 0x54, 0x19, 0x67, 0xb6, 0x1b, 0x52,
|
|
0x49, 0x5d, 0x67, 0x62, 0xdf, 0x61, 0xf8, 0x70, 0x8d, 0xe1, 0x3e, 0xe3, 0xac, 0xa3, 0xb5, 0xdd,
|
|
0x5b, 0xde, 0x75, 0x09, 0xc5, 0x74, 0x34, 0xe8, 0x19, 0xdc, 0x8b, 0x37, 0x82, 0x84, 0x6a, 0x96,
|
|
0x69, 0x73, 0xde, 0x5c, 0x1d, 0xe6, 0x40, 0xb1, 0xd4, 0x38, 0xb7, 0xc4, 0x22, 0x16, 0xe8, 0x1d,
|
|
0xc8, 0x5d, 0x10, 0xa2, 0x97, 0x60, 0x77, 0x55, 0x77, 0x4c, 0x08, 0x8e, 0x19, 0xf5, 0x6f, 0x01,
|
|
0x96, 0x1e, 0xe8, 0x09, 0xc0, 0x34, 0x1a, 0x4d, 0xa8, 0x6b, 0x5f, 0x92, 0x74, 0xeb, 0xee, 0x2e,
|
|
0xa5, 0x94, 0xf0, 0x3e, 0x23, 0x6a, 0xed, 0x02, 0xee, 0x91, 0xff, 0x58, 0xbb, 0x33, 0xee, 0x91,
|
|
0x64, 0xed, 0x02, 0x1d, 0xd5, 0x7f, 0xcd, 0x42, 0x31, 0x85, 0xd1, 0x27, 0x50, 0x10, 0x94, 0xf9,
|
|
0x13, 0xa2, 0x8f, 0x7d, 0xeb, 0xdf, 0x2d, 0xac, 0x81, 0x22, 0x9e, 0x64, 0xb0, 0x96, 0xa0, 0xa7,
|
|
0xb0, 0x11, 0x44, 0x13, 0x49, 0xf5, 0xf1, 0xb5, 0x35, 0xda, 0xb3, 0x98, 0x77, 0x92, 0xc1, 0x89,
|
|
0xa0, 0xf2, 0x14, 0x0a, 0x89, 0x1b, 0xb2, 0x20, 0x1f, 0x67, 0xa6, 0x8e, 0x7f, 0x70, 0x57, 0x05,
|
|
0x71, 0x9f, 0x62, 0x1b, 0xac, 0x78, 0x95, 0x1f, 0x0c, 0xd8, 0x50, 0x66, 0xa8, 0x05, 0xc5, 0x11,
|
|
0x95, 0x4e, 0x18, 0x3a, 0x69, 0xcf, 0x0e, 0x6f, 0xaa, 0x93, 0x5b, 0x2a, 0x76, 0xe8, 0xf0, 0x60,
|
|
0xea, 0xb8, 0xb2, 0x4d, 0x65, 0x2b, 0x26, 0xe3, 0x85, 0x0c, 0x7d, 0x0c, 0xb0, 0xe8, 0xa1, 0x30,
|
|
0xb3, 0x6a, 0xdc, 0xeb, 0x9a, 0x58, 0x4a, 0x9b, 0x28, 0xda, 0x1b, 0x90, 0x13, 0x51, 0x50, 0xff,
|
|
0xde, 0x80, 0xdc, 0x31, 0x21, 0xe8, 0x2b, 0x28, 0x38, 0x41, 0xfc, 0x87, 0xd3, 0x4b, 0xf3, 0xc6,
|
|
0x4d, 0x17, 0x95, 0x03, 0x65, 0xed, 0x47, 0xaf, 0xfe, 0x38, 0xc8, 0xfc, 0xf2, 0xe7, 0x41, 0xc3,
|
|
0xa7, 0x72, 0x1c, 0x8d, 0x2c, 0x97, 0x07, 0xcd, 0x84, 0xa6, 0x7f, 0x3e, 0x10, 0xde, 0xa5, 0xbe,
|
|
0x3e, 0x63, 0x81, 0xc0, 0xda, 0x14, 0xed, 0x43, 0xc9, 0x77, 0x84, 0x3d, 0xa1, 0x01, 0x95, 0xaa,
|
|
0xdb, 0x79, 0x5c, 0xf4, 0x1d, 0x71, 0x1a, 0x3f, 0xbf, 0x27, 0xa0, 0x98, 0x36, 0x09, 0xed, 0xc1,
|
|
0xee, 0xa0, 0xf7, 0xbc, 0x6f, 0x9f, 0x9d, 0x1f, 0x75, 0xed, 0x17, 0xfd, 0xc1, 0xe7, 0xdd, 0x4e,
|
|
0xef, 0xb8, 0xd7, 0x3d, 0x2a, 0x67, 0xd0, 0x0e, 0x94, 0x97, 0xaf, 0x8e, 0x7a, 0xb8, 0xdb, 0x19,
|
|
0x96, 0x0d, 0xb4, 0x0b, 0xdb, 0x4b, 0x74, 0xd8, 0xfd, 0x62, 0xf8, 0xa2, 0x75, 0x5a, 0xce, 0xa2,
|
|
0x03, 0xd8, 0x5f, 0xc2, 0xa7, 0xdd, 0xe7, 0xad, 0xce, 0x97, 0x76, 0xeb, 0xac, 0xd7, 0x3f, 0xb7,
|
|
0x3f, 0x1d, 0x9c, 0xf7, 0xcb, 0xdf, 0xb5, 0x9f, 0xbd, 0xba, 0xaa, 0x1a, 0xaf, 0xaf, 0xaa, 0xc6,
|
|
0x5f, 0x57, 0x55, 0xe3, 0xa7, 0xeb, 0x6a, 0xe6, 0xf5, 0x75, 0x35, 0xf3, 0xdb, 0x75, 0x35, 0xf3,
|
|
0xf2, 0x70, 0x7d, 0x75, 0xfa, 0x33, 0x34, 0x2a, 0xa8, 0xc5, 0x7e, 0xf2, 0x4f, 0x00, 0x00, 0x00,
|
|
0xff, 0xff, 0x28, 0x03, 0x76, 0x89, 0x9f, 0x06, 0x00, 0x00,
|
|
}
|
|
|
|
func (m *Tx) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Tx) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Signatures) > 0 {
|
|
for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Signatures[iNdEx])
|
|
copy(dAtA[i:], m.Signatures[iNdEx])
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Signatures[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if m.AuthInfo != nil {
|
|
{
|
|
size, err := m.AuthInfo.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Body != nil {
|
|
{
|
|
size, err := m.Body.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SignDoc) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SignDoc) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.AccountSequence != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.AccountSequence))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if m.AccountNumber != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.AccountNumber))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.ChainId) > 0 {
|
|
i -= len(m.ChainId)
|
|
copy(dAtA[i:], m.ChainId)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.AuthInfo != nil {
|
|
{
|
|
size, err := m.AuthInfo.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Body != nil {
|
|
{
|
|
size, err := m.Body.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TxBody) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TxBody) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.NonCriticalExtensionOptions) > 0 {
|
|
for iNdEx := len(m.NonCriticalExtensionOptions) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.NonCriticalExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x7f
|
|
i--
|
|
dAtA[i] = 0xfa
|
|
}
|
|
}
|
|
if len(m.ExtensionOptions) > 0 {
|
|
for iNdEx := len(m.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.ExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x3f
|
|
i--
|
|
dAtA[i] = 0xfa
|
|
}
|
|
}
|
|
if m.TimeoutHeight != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.TimeoutHeight))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.Memo) > 0 {
|
|
i -= len(m.Memo)
|
|
copy(dAtA[i:], m.Memo)
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Memo)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Messages) > 0 {
|
|
for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AuthInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AuthInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Fee != nil {
|
|
{
|
|
size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.SignerInfos) > 0 {
|
|
for iNdEx := len(m.SignerInfos) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.SignerInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SignerInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SignerInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.ModeInfo != nil {
|
|
{
|
|
size, err := m.ModeInfo.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.PublicKey != nil {
|
|
{
|
|
size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ModeInfo) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ModeInfo) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ModeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Sum != nil {
|
|
{
|
|
size := m.Sum.Size()
|
|
i -= size
|
|
if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ModeInfo_Single_) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ModeInfo_Single_) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.Single != nil {
|
|
{
|
|
size, err := m.Single.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *ModeInfo_Multi_) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ModeInfo_Multi_) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.Multi != nil {
|
|
{
|
|
size, err := m.Multi.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *ModeInfo_Single) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ModeInfo_Single) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Mode != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Mode))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ModeInfo_Multi) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ModeInfo_Multi) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.ModeInfos) > 0 {
|
|
for iNdEx := len(m.ModeInfos) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.ModeInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Bitarray != nil {
|
|
{
|
|
size, err := m.Bitarray.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Fee) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Fee) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.GasLimit != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.GasLimit))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Amount) > 0 {
|
|
for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovTypes(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *Tx) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Body != nil {
|
|
l = m.Body.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.AuthInfo != nil {
|
|
l = m.AuthInfo.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if len(m.Signatures) > 0 {
|
|
for _, b := range m.Signatures {
|
|
l = len(b)
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SignDoc) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Body != nil {
|
|
l = m.Body.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.AuthInfo != nil {
|
|
l = m.AuthInfo.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
l = len(m.ChainId)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.AccountNumber != 0 {
|
|
n += 1 + sovTypes(uint64(m.AccountNumber))
|
|
}
|
|
if m.AccountSequence != 0 {
|
|
n += 1 + sovTypes(uint64(m.AccountSequence))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TxBody) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Messages) > 0 {
|
|
for _, e := range m.Messages {
|
|
l = e.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
l = len(m.Memo)
|
|
if l > 0 {
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.TimeoutHeight != 0 {
|
|
n += 1 + sovTypes(uint64(m.TimeoutHeight))
|
|
}
|
|
if len(m.ExtensionOptions) > 0 {
|
|
for _, e := range m.ExtensionOptions {
|
|
l = e.Size()
|
|
n += 2 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
if len(m.NonCriticalExtensionOptions) > 0 {
|
|
for _, e := range m.NonCriticalExtensionOptions {
|
|
l = e.Size()
|
|
n += 2 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AuthInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.SignerInfos) > 0 {
|
|
for _, e := range m.SignerInfos {
|
|
l = e.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
if m.Fee != nil {
|
|
l = m.Fee.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SignerInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.PublicKey != nil {
|
|
l = m.PublicKey.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.ModeInfo != nil {
|
|
l = m.ModeInfo.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ModeInfo) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Sum != nil {
|
|
n += m.Sum.Size()
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ModeInfo_Single_) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Single != nil {
|
|
l = m.Single.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *ModeInfo_Multi_) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Multi != nil {
|
|
l = m.Multi.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *ModeInfo_Single) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Mode != 0 {
|
|
n += 1 + sovTypes(uint64(m.Mode))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ModeInfo_Multi) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Bitarray != nil {
|
|
l = m.Bitarray.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if len(m.ModeInfos) > 0 {
|
|
for _, e := range m.ModeInfos {
|
|
l = e.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Fee) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Amount) > 0 {
|
|
for _, e := range m.Amount {
|
|
l = e.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
}
|
|
if m.GasLimit != 0 {
|
|
n += 1 + sovTypes(uint64(m.GasLimit))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovTypes(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozTypes(x uint64) (n int) {
|
|
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Tx) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Tx: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Tx: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Body == nil {
|
|
m.Body = &TxBody{}
|
|
}
|
|
if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.AuthInfo == nil {
|
|
m.AuthInfo = &AuthInfo{}
|
|
}
|
|
if err := m.AuthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx))
|
|
copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SignDoc) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SignDoc: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SignDoc: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Body == nil {
|
|
m.Body = &TxBody{}
|
|
}
|
|
if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.AuthInfo == nil {
|
|
m.AuthInfo = &AuthInfo{}
|
|
}
|
|
if err := m.AuthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ChainId = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType)
|
|
}
|
|
m.AccountNumber = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.AccountNumber |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AccountSequence", wireType)
|
|
}
|
|
m.AccountSequence = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.AccountSequence |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TxBody) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: TxBody: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TxBody: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Messages = append(m.Messages, &types.Any{})
|
|
if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Memo = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType)
|
|
}
|
|
m.TimeoutHeight = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.TimeoutHeight |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1023:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExtensionOptions", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ExtensionOptions = append(m.ExtensionOptions, &types.Any{})
|
|
if err := m.ExtensionOptions[len(m.ExtensionOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2047:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NonCriticalExtensionOptions", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NonCriticalExtensionOptions = append(m.NonCriticalExtensionOptions, &types.Any{})
|
|
if err := m.NonCriticalExtensionOptions[len(m.NonCriticalExtensionOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AuthInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AuthInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AuthInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SignerInfos", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.SignerInfos = append(m.SignerInfos, &SignerInfo{})
|
|
if err := m.SignerInfos[len(m.SignerInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Fee == nil {
|
|
m.Fee = &Fee{}
|
|
}
|
|
if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SignerInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SignerInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SignerInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.PublicKey == nil {
|
|
m.PublicKey = &types.Any{}
|
|
}
|
|
if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ModeInfo", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ModeInfo == nil {
|
|
m.ModeInfo = &ModeInfo{}
|
|
}
|
|
if err := m.ModeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ModeInfo) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ModeInfo: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ModeInfo: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Single", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := &ModeInfo_Single{}
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
m.Sum = &ModeInfo_Single_{v}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Multi", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := &ModeInfo_Multi{}
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
m.Sum = &ModeInfo_Multi_{v}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Single: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Single: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
|
|
}
|
|
m.Mode = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Mode |= SignMode(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Multi: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Multi: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Bitarray", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Bitarray == nil {
|
|
m.Bitarray = &types1.CompactBitArray{}
|
|
}
|
|
if err := m.Bitarray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ModeInfos", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ModeInfos = append(m.ModeInfos, &ModeInfo{})
|
|
if err := m.ModeInfos[len(m.ModeInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Fee) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Fee: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Amount = append(m.Amount, types2.Coin{})
|
|
if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType)
|
|
}
|
|
m.GasLimit = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.GasLimit |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipTypes(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthTypes
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupTypes
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthTypes
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
|
|
)
|