1178 lines
28 KiB
Go
1178 lines
28 KiB
Go
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||
|
// source: x/bank/types/types.proto
|
||
|
|
||
|
package types
|
||
|
|
||
|
import (
|
||
|
fmt "fmt"
|
||
|
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||
|
types "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
|
||
|
|
||
|
// MsgSend - high level transaction of the coin module
|
||
|
type MsgSend struct {
|
||
|
FromAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"from_address,omitempty" yaml:"from_address"`
|
||
|
ToAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"to_address,omitempty" yaml:"to_address"`
|
||
|
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
|
||
|
}
|
||
|
|
||
|
func (m *MsgSend) Reset() { *m = MsgSend{} }
|
||
|
func (m *MsgSend) String() string { return proto.CompactTextString(m) }
|
||
|
func (*MsgSend) ProtoMessage() {}
|
||
|
func (*MsgSend) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_934ff6b24d3432e2, []int{0}
|
||
|
}
|
||
|
func (m *MsgSend) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_MsgSend.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 *MsgSend) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_MsgSend.Merge(m, src)
|
||
|
}
|
||
|
func (m *MsgSend) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *MsgSend) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_MsgSend.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_MsgSend proto.InternalMessageInfo
|
||
|
|
||
|
func (m *MsgSend) GetFromAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
|
||
|
if m != nil {
|
||
|
return m.FromAddress
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *MsgSend) GetToAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
|
||
|
if m != nil {
|
||
|
return m.ToAddress
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *MsgSend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
|
||
|
if m != nil {
|
||
|
return m.Amount
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// Input models transaction input
|
||
|
type Input struct {
|
||
|
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
|
||
|
Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
|
||
|
}
|
||
|
|
||
|
func (m *Input) Reset() { *m = Input{} }
|
||
|
func (m *Input) String() string { return proto.CompactTextString(m) }
|
||
|
func (*Input) ProtoMessage() {}
|
||
|
func (*Input) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_934ff6b24d3432e2, []int{1}
|
||
|
}
|
||
|
func (m *Input) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *Input) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_Input.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 *Input) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_Input.Merge(m, src)
|
||
|
}
|
||
|
func (m *Input) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *Input) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_Input.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_Input proto.InternalMessageInfo
|
||
|
|
||
|
func (m *Input) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
|
||
|
if m != nil {
|
||
|
return m.Address
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Input) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins {
|
||
|
if m != nil {
|
||
|
return m.Coins
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// Output models transaction outputs
|
||
|
type Output struct {
|
||
|
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
|
||
|
Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
|
||
|
}
|
||
|
|
||
|
func (m *Output) Reset() { *m = Output{} }
|
||
|
func (m *Output) String() string { return proto.CompactTextString(m) }
|
||
|
func (*Output) ProtoMessage() {}
|
||
|
func (*Output) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_934ff6b24d3432e2, []int{2}
|
||
|
}
|
||
|
func (m *Output) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_Output.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 *Output) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_Output.Merge(m, src)
|
||
|
}
|
||
|
func (m *Output) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *Output) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_Output.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_Output proto.InternalMessageInfo
|
||
|
|
||
|
func (m *Output) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
|
||
|
if m != nil {
|
||
|
return m.Address
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *Output) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins {
|
||
|
if m != nil {
|
||
|
return m.Coins
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// MsgMultiSend - high level transaction of the coin module
|
||
|
type MsgMultiSend struct {
|
||
|
Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"`
|
||
|
Outputs []Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs"`
|
||
|
}
|
||
|
|
||
|
func (m *MsgMultiSend) Reset() { *m = MsgMultiSend{} }
|
||
|
func (m *MsgMultiSend) String() string { return proto.CompactTextString(m) }
|
||
|
func (*MsgMultiSend) ProtoMessage() {}
|
||
|
func (*MsgMultiSend) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_934ff6b24d3432e2, []int{3}
|
||
|
}
|
||
|
func (m *MsgMultiSend) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *MsgMultiSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_MsgMultiSend.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 *MsgMultiSend) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_MsgMultiSend.Merge(m, src)
|
||
|
}
|
||
|
func (m *MsgMultiSend) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *MsgMultiSend) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_MsgMultiSend.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_MsgMultiSend proto.InternalMessageInfo
|
||
|
|
||
|
func (m *MsgMultiSend) GetInputs() []Input {
|
||
|
if m != nil {
|
||
|
return m.Inputs
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *MsgMultiSend) GetOutputs() []Output {
|
||
|
if m != nil {
|
||
|
return m.Outputs
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend")
|
||
|
proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input")
|
||
|
proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output")
|
||
|
proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend")
|
||
|
}
|
||
|
|
||
|
func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) }
|
||
|
|
||
|
var fileDescriptor_934ff6b24d3432e2 = []byte{
|
||
|
// 403 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xa8, 0xd0, 0x4f, 0x4a,
|
||
|
0xcc, 0xcb, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9,
|
||
|
0x42, 0x22, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, 0x20,
|
||
|
0x45, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, 0x45, 0x25,
|
||
|
0x95, 0xfa, 0x60, 0x85, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xb7, 0x94, 0x20, 0x86,
|
||
|
0x81, 0x4a, 0x7b, 0x98, 0xb8, 0xd8, 0x7d, 0x8b, 0xd3, 0x83, 0x53, 0xf3, 0x52, 0x84, 0xb2, 0xb9,
|
||
|
0x78, 0xd2, 0x8a, 0xf2, 0x73, 0xe3, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15,
|
||
|
0x18, 0x35, 0x78, 0x9c, 0x3c, 0x3e, 0xdd, 0x93, 0x17, 0xae, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42,
|
||
|
0x96, 0x55, 0xfa, 0x75, 0x4f, 0x5e, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f,
|
||
|
0x57, 0x1f, 0xe2, 0x30, 0x28, 0xa5, 0x5b, 0x9c, 0x02, 0x75, 0xbd, 0x9e, 0x63, 0x72, 0xb2, 0x23,
|
||
|
0x44, 0x47, 0x10, 0x37, 0x48, 0x3f, 0x94, 0x23, 0x94, 0xca, 0xc5, 0x55, 0x92, 0x0f, 0xb7, 0x8a,
|
||
|
0x09, 0x6c, 0x95, 0xdb, 0xa7, 0x7b, 0xf2, 0x82, 0x10, 0xab, 0x10, 0x72, 0x64, 0x58, 0xc4, 0x59,
|
||
|
0x92, 0x0f, 0xb3, 0x26, 0x96, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x59, 0x81,
|
||
|
0x59, 0x83, 0xdb, 0x48, 0x58, 0x0f, 0x29, 0x04, 0xcb, 0x0c, 0xf5, 0x9c, 0xf3, 0x33, 0xf3, 0x9c,
|
||
|
0x0c, 0x4e, 0xdc, 0x93, 0x67, 0x58, 0x75, 0x5f, 0x5e, 0x83, 0x08, 0x6b, 0x40, 0x1a, 0x8a, 0x83,
|
||
|
0xa0, 0x86, 0x2a, 0x6d, 0x64, 0xe4, 0x62, 0xf5, 0xcc, 0x2b, 0x28, 0x2d, 0x11, 0xf2, 0xe6, 0x62,
|
||
|
0x47, 0x0d, 0x37, 0x43, 0xd2, 0xdd, 0x0d, 0x33, 0x41, 0x28, 0x9a, 0x8b, 0x35, 0x19, 0x64, 0x8f,
|
||
|
0x04, 0x13, 0x35, 0x1d, 0x0d, 0x31, 0x53, 0x69, 0x13, 0x23, 0x17, 0x9b, 0x7f, 0x69, 0xc9, 0xd0,
|
||
|
0x72, 0x74, 0x3b, 0x23, 0x17, 0x8f, 0x6f, 0x71, 0xba, 0x6f, 0x69, 0x4e, 0x49, 0x26, 0x38, 0xb1,
|
||
|
0x5a, 0x72, 0xb1, 0x65, 0x82, 0x02, 0x1e, 0xe4, 0x72, 0x90, 0x75, 0xd2, 0x7a, 0xd8, 0xb2, 0x86,
|
||
|
0x1e, 0x38, 0x72, 0x9c, 0x58, 0x40, 0xd6, 0x06, 0x41, 0x35, 0x08, 0xd9, 0x70, 0xb1, 0xe7, 0x83,
|
||
|
0xfd, 0x0f, 0x73, 0xaa, 0x0c, 0x76, 0xbd, 0x90, 0x40, 0x82, 0x6a, 0x86, 0x69, 0x71, 0x72, 0x3e,
|
||
|
0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63,
|
||
|
0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x4d, 0xbc, 0x9e, 0x42, 0xce, 0xd3,
|
||
|
0x49, 0x6c, 0xe0, 0xdc, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x64, 0xad, 0xc1, 0x15, 0xea,
|
||
|
0x03, 0x00, 0x00,
|
||
|
}
|
||
|
|
||
|
func (m *MsgSend) 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 *MsgSend) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||
|
i := len(dAtA)
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
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] = 0x1a
|
||
|
}
|
||
|
}
|
||
|
if len(m.ToAddress) > 0 {
|
||
|
i -= len(m.ToAddress)
|
||
|
copy(dAtA[i:], m.ToAddress)
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.ToAddress)))
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if len(m.FromAddress) > 0 {
|
||
|
i -= len(m.FromAddress)
|
||
|
copy(dAtA[i:], m.FromAddress)
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.FromAddress)))
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *Input) 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 *Input) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *Input) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||
|
i := len(dAtA)
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Coins) > 0 {
|
||
|
for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- {
|
||
|
{
|
||
|
size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
}
|
||
|
if len(m.Address) > 0 {
|
||
|
i -= len(m.Address)
|
||
|
copy(dAtA[i:], m.Address)
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *Output) 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 *Output) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||
|
i := len(dAtA)
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Coins) > 0 {
|
||
|
for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- {
|
||
|
{
|
||
|
size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
}
|
||
|
if len(m.Address) > 0 {
|
||
|
i -= len(m.Address)
|
||
|
copy(dAtA[i:], m.Address)
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *MsgMultiSend) 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 *MsgMultiSend) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||
|
i := len(dAtA)
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Outputs) > 0 {
|
||
|
for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- {
|
||
|
{
|
||
|
size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
}
|
||
|
if len(m.Inputs) > 0 {
|
||
|
for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- {
|
||
|
{
|
||
|
size, err := m.Inputs[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 *MsgSend) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.FromAddress)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
l = len(m.ToAddress)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
if len(m.Amount) > 0 {
|
||
|
for _, e := range m.Amount {
|
||
|
l = e.Size()
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *Input) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Address)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
if len(m.Coins) > 0 {
|
||
|
for _, e := range m.Coins {
|
||
|
l = e.Size()
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *Output) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Address)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
if len(m.Coins) > 0 {
|
||
|
for _, e := range m.Coins {
|
||
|
l = e.Size()
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *MsgMultiSend) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Inputs) > 0 {
|
||
|
for _, e := range m.Inputs {
|
||
|
l = e.Size()
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
}
|
||
|
if len(m.Outputs) > 0 {
|
||
|
for _, e := range m.Outputs {
|
||
|
l = e.Size()
|
||
|
n += 1 + l + sovTypes(uint64(l))
|
||
|
}
|
||
|
}
|
||
|
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 *MsgSend) 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: MsgSend: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", 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.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.FromAddress == nil {
|
||
|
m.FromAddress = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", 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.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.ToAddress == nil {
|
||
|
m.ToAddress = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
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, types.Coin{})
|
||
|
if err := m.Amount[len(m.Amount)-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 *Input) 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: Input: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.Address == nil {
|
||
|
m.Address = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Coins", 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.Coins = append(m.Coins, types.Coin{})
|
||
|
if err := m.Coins[len(m.Coins)-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 *Output) 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: Output: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.Address == nil {
|
||
|
m.Address = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Coins", 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.Coins = append(m.Coins, types.Coin{})
|
||
|
if err := m.Coins[len(m.Coins)-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 *MsgMultiSend) 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: MsgMultiSend: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Inputs", 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.Inputs = append(m.Inputs, Input{})
|
||
|
if err := m.Inputs[len(m.Inputs)-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 Outputs", 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.Outputs = append(m.Outputs, Output{})
|
||
|
if err := m.Outputs[len(m.Outputs)-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 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")
|
||
|
)
|