github.com/Finschia/finschia-sdk@v0.48.1/x/bank/types/authz.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/bank/v1beta1/authz.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" 9 types "github.com/Finschia/finschia-sdk/types" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 12 _ "github.com/regen-network/cosmos-proto" 13 io "io" 14 math "math" 15 math_bits "math/bits" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 28 29 // SendAuthorization allows the grantee to spend up to spend_limit coins from 30 // the granter's account. 31 // 32 // Since: cosmos-sdk 0.43 33 type SendAuthorization struct { 34 SpendLimit github_com_Finschia_finschia_sdk_types.Coins `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coins" json:"spend_limit"` 35 } 36 37 func (m *SendAuthorization) Reset() { *m = SendAuthorization{} } 38 func (m *SendAuthorization) String() string { return proto.CompactTextString(m) } 39 func (*SendAuthorization) ProtoMessage() {} 40 func (*SendAuthorization) Descriptor() ([]byte, []int) { 41 return fileDescriptor_a4d2a37888ea779f, []int{0} 42 } 43 func (m *SendAuthorization) XXX_Unmarshal(b []byte) error { 44 return m.Unmarshal(b) 45 } 46 func (m *SendAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 if deterministic { 48 return xxx_messageInfo_SendAuthorization.Marshal(b, m, deterministic) 49 } else { 50 b = b[:cap(b)] 51 n, err := m.MarshalToSizedBuffer(b) 52 if err != nil { 53 return nil, err 54 } 55 return b[:n], nil 56 } 57 } 58 func (m *SendAuthorization) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_SendAuthorization.Merge(m, src) 60 } 61 func (m *SendAuthorization) XXX_Size() int { 62 return m.Size() 63 } 64 func (m *SendAuthorization) XXX_DiscardUnknown() { 65 xxx_messageInfo_SendAuthorization.DiscardUnknown(m) 66 } 67 68 var xxx_messageInfo_SendAuthorization proto.InternalMessageInfo 69 70 func (m *SendAuthorization) GetSpendLimit() github_com_Finschia_finschia_sdk_types.Coins { 71 if m != nil { 72 return m.SpendLimit 73 } 74 return nil 75 } 76 77 func init() { 78 proto.RegisterType((*SendAuthorization)(nil), "cosmos.bank.v1beta1.SendAuthorization") 79 } 80 81 func init() { proto.RegisterFile("cosmos/bank/v1beta1/authz.proto", fileDescriptor_a4d2a37888ea779f) } 82 83 var fileDescriptor_a4d2a37888ea779f = []byte{ 84 // 266 bytes of a gzipped FileDescriptorProto 85 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, 86 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0xcc, 0xcb, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 87 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0, 88 0x03, 0x29, 0xd0, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, 89 0x10, 0xa5, 0x52, 0x92, 0x10, 0xa5, 0xf1, 0x10, 0x09, 0xa8, 0x3e, 0x88, 0x94, 0x1c, 0xdc, 0x9a, 90 0xe2, 0x54, 0xb8, 0x35, 0xc9, 0xf9, 0x99, 0x79, 0x10, 0x79, 0xa5, 0x19, 0x8c, 0x5c, 0x82, 0xc1, 91 0xa9, 0x79, 0x29, 0x8e, 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x55, 0x89, 0x25, 0x99, 0xf9, 0x79, 92 0x42, 0x05, 0x5c, 0xdc, 0xc5, 0x05, 0xa9, 0x79, 0x29, 0xf1, 0x39, 0x99, 0xb9, 0x99, 0x25, 0x12, 93 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x92, 0x7a, 0x70, 0x17, 0x15, 0xa7, 0xc2, 0x5c, 0xa4, 0xe7, 94 0x9c, 0x9f, 0x99, 0xe7, 0x64, 0x72, 0xe2, 0x9e, 0x3c, 0xc3, 0xaa, 0xfb, 0xf2, 0x3a, 0xe9, 0x99, 95 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x6e, 0x99, 0x79, 0xc5, 0xc9, 0x19, 0x99, 96 0x89, 0xfa, 0x69, 0x50, 0x86, 0x6e, 0x71, 0x4a, 0xb6, 0x7e, 0x49, 0x65, 0x41, 0x6a, 0x31, 0x58, 97 0x53, 0x71, 0x10, 0x17, 0xd8, 0x0e, 0x1f, 0x90, 0x15, 0x56, 0x82, 0x97, 0xb6, 0xe8, 0xf2, 0xa2, 98 0x38, 0xc2, 0xc9, 0xfd, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 99 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x74, 0x09, 100 0x5a, 0x53, 0x01, 0x09, 0x57, 0xb0, 0x6d, 0x49, 0x6c, 0x60, 0xaf, 0x1a, 0x03, 0x02, 0x00, 0x00, 101 0xff, 0xff, 0x68, 0xab, 0x63, 0x2c, 0x73, 0x01, 0x00, 0x00, 102 } 103 104 func (m *SendAuthorization) Marshal() (dAtA []byte, err error) { 105 size := m.Size() 106 dAtA = make([]byte, size) 107 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 108 if err != nil { 109 return nil, err 110 } 111 return dAtA[:n], nil 112 } 113 114 func (m *SendAuthorization) MarshalTo(dAtA []byte) (int, error) { 115 size := m.Size() 116 return m.MarshalToSizedBuffer(dAtA[:size]) 117 } 118 119 func (m *SendAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { 120 i := len(dAtA) 121 _ = i 122 var l int 123 _ = l 124 if len(m.SpendLimit) > 0 { 125 for iNdEx := len(m.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { 126 { 127 size, err := m.SpendLimit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 128 if err != nil { 129 return 0, err 130 } 131 i -= size 132 i = encodeVarintAuthz(dAtA, i, uint64(size)) 133 } 134 i-- 135 dAtA[i] = 0xa 136 } 137 } 138 return len(dAtA) - i, nil 139 } 140 141 func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { 142 offset -= sovAuthz(v) 143 base := offset 144 for v >= 1<<7 { 145 dAtA[offset] = uint8(v&0x7f | 0x80) 146 v >>= 7 147 offset++ 148 } 149 dAtA[offset] = uint8(v) 150 return base 151 } 152 func (m *SendAuthorization) Size() (n int) { 153 if m == nil { 154 return 0 155 } 156 var l int 157 _ = l 158 if len(m.SpendLimit) > 0 { 159 for _, e := range m.SpendLimit { 160 l = e.Size() 161 n += 1 + l + sovAuthz(uint64(l)) 162 } 163 } 164 return n 165 } 166 167 func sovAuthz(x uint64) (n int) { 168 return (math_bits.Len64(x|1) + 6) / 7 169 } 170 func sozAuthz(x uint64) (n int) { 171 return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 172 } 173 func (m *SendAuthorization) Unmarshal(dAtA []byte) error { 174 l := len(dAtA) 175 iNdEx := 0 176 for iNdEx < l { 177 preIndex := iNdEx 178 var wire uint64 179 for shift := uint(0); ; shift += 7 { 180 if shift >= 64 { 181 return ErrIntOverflowAuthz 182 } 183 if iNdEx >= l { 184 return io.ErrUnexpectedEOF 185 } 186 b := dAtA[iNdEx] 187 iNdEx++ 188 wire |= uint64(b&0x7F) << shift 189 if b < 0x80 { 190 break 191 } 192 } 193 fieldNum := int32(wire >> 3) 194 wireType := int(wire & 0x7) 195 if wireType == 4 { 196 return fmt.Errorf("proto: SendAuthorization: wiretype end group for non-group") 197 } 198 if fieldNum <= 0 { 199 return fmt.Errorf("proto: SendAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) 200 } 201 switch fieldNum { 202 case 1: 203 if wireType != 2 { 204 return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) 205 } 206 var msglen int 207 for shift := uint(0); ; shift += 7 { 208 if shift >= 64 { 209 return ErrIntOverflowAuthz 210 } 211 if iNdEx >= l { 212 return io.ErrUnexpectedEOF 213 } 214 b := dAtA[iNdEx] 215 iNdEx++ 216 msglen |= int(b&0x7F) << shift 217 if b < 0x80 { 218 break 219 } 220 } 221 if msglen < 0 { 222 return ErrInvalidLengthAuthz 223 } 224 postIndex := iNdEx + msglen 225 if postIndex < 0 { 226 return ErrInvalidLengthAuthz 227 } 228 if postIndex > l { 229 return io.ErrUnexpectedEOF 230 } 231 m.SpendLimit = append(m.SpendLimit, types.Coin{}) 232 if err := m.SpendLimit[len(m.SpendLimit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 233 return err 234 } 235 iNdEx = postIndex 236 default: 237 iNdEx = preIndex 238 skippy, err := skipAuthz(dAtA[iNdEx:]) 239 if err != nil { 240 return err 241 } 242 if (skippy < 0) || (iNdEx+skippy) < 0 { 243 return ErrInvalidLengthAuthz 244 } 245 if (iNdEx + skippy) > l { 246 return io.ErrUnexpectedEOF 247 } 248 iNdEx += skippy 249 } 250 } 251 252 if iNdEx > l { 253 return io.ErrUnexpectedEOF 254 } 255 return nil 256 } 257 func skipAuthz(dAtA []byte) (n int, err error) { 258 l := len(dAtA) 259 iNdEx := 0 260 depth := 0 261 for iNdEx < l { 262 var wire uint64 263 for shift := uint(0); ; shift += 7 { 264 if shift >= 64 { 265 return 0, ErrIntOverflowAuthz 266 } 267 if iNdEx >= l { 268 return 0, io.ErrUnexpectedEOF 269 } 270 b := dAtA[iNdEx] 271 iNdEx++ 272 wire |= (uint64(b) & 0x7F) << shift 273 if b < 0x80 { 274 break 275 } 276 } 277 wireType := int(wire & 0x7) 278 switch wireType { 279 case 0: 280 for shift := uint(0); ; shift += 7 { 281 if shift >= 64 { 282 return 0, ErrIntOverflowAuthz 283 } 284 if iNdEx >= l { 285 return 0, io.ErrUnexpectedEOF 286 } 287 iNdEx++ 288 if dAtA[iNdEx-1] < 0x80 { 289 break 290 } 291 } 292 case 1: 293 iNdEx += 8 294 case 2: 295 var length int 296 for shift := uint(0); ; shift += 7 { 297 if shift >= 64 { 298 return 0, ErrIntOverflowAuthz 299 } 300 if iNdEx >= l { 301 return 0, io.ErrUnexpectedEOF 302 } 303 b := dAtA[iNdEx] 304 iNdEx++ 305 length |= (int(b) & 0x7F) << shift 306 if b < 0x80 { 307 break 308 } 309 } 310 if length < 0 { 311 return 0, ErrInvalidLengthAuthz 312 } 313 iNdEx += length 314 case 3: 315 depth++ 316 case 4: 317 if depth == 0 { 318 return 0, ErrUnexpectedEndOfGroupAuthz 319 } 320 depth-- 321 case 5: 322 iNdEx += 4 323 default: 324 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 325 } 326 if iNdEx < 0 { 327 return 0, ErrInvalidLengthAuthz 328 } 329 if depth == 0 { 330 return iNdEx, nil 331 } 332 } 333 return 0, io.ErrUnexpectedEOF 334 } 335 336 var ( 337 ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") 338 ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") 339 ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") 340 )