atlas.js-protos 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/filetree/index.d.ts +2 -0
- package/dist/filetree/index.js +8 -0
- package/dist/filetree/index.mjs +3 -0
- package/dist/filetree/query.d.ts +1 -0
- package/dist/filetree/query.js +13 -0
- package/dist/filetree/query.mjs +2 -0
- package/dist/filetree/tx.d.ts +1 -0
- package/dist/filetree/tx.js +11 -0
- package/dist/filetree/tx.mjs +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/dist/index.mjs +1 -0
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/index.js +16 -0
- package/dist/storage/index.mjs +6 -0
- package/dist/storage/query.d.ts +1 -0
- package/dist/storage/query.js +27 -0
- package/dist/storage/query.mjs +2 -0
- package/dist/storage/tx.d.ts +1 -0
- package/dist/storage/tx.js +21 -0
- package/dist/storage/tx.mjs +2 -0
- package/dist/types/amino/amino.d.ts +1 -0
- package/dist/types/amino/amino.js +2 -0
- package/dist/types/amino/amino.mjs +1 -0
- package/dist/types/amino/bundle.d.ts +1 -0
- package/dist/types/amino/bundle.js +41 -0
- package/dist/types/amino/bundle.mjs +5 -0
- package/dist/types/atlas/bundle.d.ts +905 -0
- package/dist/types/atlas/bundle.js +98 -0
- package/dist/types/atlas/bundle.mjs +62 -0
- package/dist/types/atlas/filetree/v1/genesis.d.ts +45 -0
- package/dist/types/atlas/filetree/v1/genesis.js +107 -0
- package/dist/types/atlas/filetree/v1/genesis.mjs +71 -0
- package/dist/types/atlas/filetree/v1/params.d.ts +40 -0
- package/dist/types/atlas/filetree/v1/params.js +94 -0
- package/dist/types/atlas/filetree/v1/params.mjs +58 -0
- package/dist/types/atlas/filetree/v1/query.d.ts +330 -0
- package/dist/types/atlas/filetree/v1/query.js +567 -0
- package/dist/types/atlas/filetree/v1/query.mjs +531 -0
- package/dist/types/atlas/filetree/v1/query.rpc.Query.d.ts +28 -0
- package/dist/types/atlas/filetree/v1/query.rpc.Query.js +89 -0
- package/dist/types/atlas/filetree/v1/query.rpc.Query.mjs +51 -0
- package/dist/types/atlas/filetree/v1/query.rpc.func.d.ts +29 -0
- package/dist/types/atlas/filetree/v1/query.rpc.func.js +58 -0
- package/dist/types/atlas/filetree/v1/query.rpc.func.mjs +55 -0
- package/dist/types/atlas/filetree/v1/tree.d.ts +44 -0
- package/dist/types/atlas/filetree/v1/tree.js +124 -0
- package/dist/types/atlas/filetree/v1/tree.mjs +88 -0
- package/dist/types/atlas/filetree/v1/tx.d.ts +260 -0
- package/dist/types/atlas/filetree/v1/tx.js +449 -0
- package/dist/types/atlas/filetree/v1/tx.mjs +413 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.func.d.ts +23 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.func.js +34 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.func.mjs +31 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.msg.d.ts +22 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.msg.js +67 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.msg.mjs +29 -0
- package/dist/types/atlas/rpc.query.d.ts +49 -0
- package/dist/types/atlas/rpc.query.js +59 -0
- package/dist/types/atlas/rpc.query.mjs +22 -0
- package/dist/types/atlas/rpc.tx.d.ts +18 -0
- package/dist/types/atlas/rpc.tx.js +52 -0
- package/dist/types/atlas/rpc.tx.mjs +15 -0
- package/dist/types/atlas/storage/v1/file.d.ts +59 -0
- package/dist/types/atlas/storage/v1/file.js +173 -0
- package/dist/types/atlas/storage/v1/file.mjs +137 -0
- package/dist/types/atlas/storage/v1/genesis.d.ts +45 -0
- package/dist/types/atlas/storage/v1/genesis.js +107 -0
- package/dist/types/atlas/storage/v1/genesis.mjs +71 -0
- package/dist/types/atlas/storage/v1/params.d.ts +48 -0
- package/dist/types/atlas/storage/v1/params.js +127 -0
- package/dist/types/atlas/storage/v1/params.mjs +91 -0
- package/dist/types/atlas/storage/v1/proof.d.ts +145 -0
- package/dist/types/atlas/storage/v1/proof.js +318 -0
- package/dist/types/atlas/storage/v1/proof.mjs +282 -0
- package/dist/types/atlas/storage/v1/provider.d.ts +51 -0
- package/dist/types/atlas/storage/v1/provider.js +141 -0
- package/dist/types/atlas/storage/v1/provider.mjs +105 -0
- package/dist/types/atlas/storage/v1/query.d.ts +914 -0
- package/dist/types/atlas/storage/v1/query.js +1570 -0
- package/dist/types/atlas/storage/v1/query.mjs +1534 -0
- package/dist/types/atlas/storage/v1/query.rpc.Query.d.ts +56 -0
- package/dist/types/atlas/storage/v1/query.rpc.Query.js +154 -0
- package/dist/types/atlas/storage/v1/query.rpc.Query.mjs +116 -0
- package/dist/types/atlas/storage/v1/query.rpc.func.d.ts +78 -0
- package/dist/types/atlas/storage/v1/query.rpc.func.js +149 -0
- package/dist/types/atlas/storage/v1/query.rpc.func.mjs +146 -0
- package/dist/types/atlas/storage/v1/subscription.d.ts +55 -0
- package/dist/types/atlas/storage/v1/subscription.js +159 -0
- package/dist/types/atlas/storage/v1/subscription.mjs +123 -0
- package/dist/types/atlas/storage/v1/tx.d.ts +694 -0
- package/dist/types/atlas/storage/v1/tx.js +1203 -0
- package/dist/types/atlas/storage/v1/tx.mjs +1167 -0
- package/dist/types/atlas/storage/v1/tx.rpc.func.d.ts +56 -0
- package/dist/types/atlas/storage/v1/tx.rpc.func.js +77 -0
- package/dist/types/atlas/storage/v1/tx.rpc.func.mjs +74 -0
- package/dist/types/atlas/storage/v1/tx.rpc.msg.d.ts +35 -0
- package/dist/types/atlas/storage/v1/tx.rpc.msg.js +97 -0
- package/dist/types/atlas/storage/v1/tx.rpc.msg.mjs +59 -0
- package/dist/types/cosmos/bank/v1beta1/authz.d.ts +62 -0
- package/dist/types/cosmos/bank/v1beta1/authz.js +123 -0
- package/dist/types/cosmos/bank/v1beta1/authz.mjs +87 -0
- package/dist/types/cosmos/bank/v1beta1/bank.d.ts +391 -0
- package/dist/types/cosmos/bank/v1beta1/bank.js +626 -0
- package/dist/types/cosmos/bank/v1beta1/bank.mjs +590 -0
- package/dist/types/cosmos/bank/v1beta1/genesis.d.ts +122 -0
- package/dist/types/cosmos/bank/v1beta1/genesis.js +224 -0
- package/dist/types/cosmos/bank/v1beta1/genesis.mjs +188 -0
- package/dist/types/cosmos/bank/v1beta1/query.d.ts +1377 -0
- package/dist/types/cosmos/bank/v1beta1/query.js +2038 -0
- package/dist/types/cosmos/bank/v1beta1/query.mjs +2002 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.d.ts +119 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.js +174 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.mjs +136 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.func.d.ts +129 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.func.js +212 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.func.mjs +209 -0
- package/dist/types/cosmos/bank/v1beta1/tx.d.ts +398 -0
- package/dist/types/cosmos/bank/v1beta1/tx.js +599 -0
- package/dist/types/cosmos/bank/v1beta1/tx.mjs +563 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.d.ts +37 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.js +50 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.mjs +47 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.d.ts +34 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.js +73 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.mjs +35 -0
- package/dist/types/cosmos/base/query/v1beta1/pagination.d.ts +163 -0
- package/dist/types/cosmos/base/query/v1beta1/pagination.js +219 -0
- package/dist/types/cosmos/base/query/v1beta1/pagination.mjs +183 -0
- package/dist/types/cosmos/base/v1beta1/coin.d.ts +193 -0
- package/dist/types/cosmos/base/v1beta1/coin.js +320 -0
- package/dist/types/cosmos/base/v1beta1/coin.mjs +284 -0
- package/dist/types/cosmos/bundle.d.ts +761 -0
- package/dist/types/cosmos/bundle.js +97 -0
- package/dist/types/cosmos/bundle.mjs +61 -0
- package/dist/types/cosmos/msg/v1/msg.d.ts +1 -0
- package/dist/types/cosmos/msg/v1/msg.js +2 -0
- package/dist/types/cosmos/msg/v1/msg.mjs +1 -0
- package/dist/types/cosmos/query/v1/query.d.ts +1 -0
- package/dist/types/cosmos/query/v1/query.js +2 -0
- package/dist/types/cosmos/query/v1/query.mjs +1 -0
- package/dist/types/cosmos/rpc.query.d.ts +24 -0
- package/dist/types/cosmos/rpc.query.js +51 -0
- package/dist/types/cosmos/rpc.query.mjs +14 -0
- package/dist/types/cosmos/rpc.tx.d.ts +10 -0
- package/dist/types/cosmos/rpc.tx.js +44 -0
- package/dist/types/cosmos/rpc.tx.mjs +7 -0
- package/dist/types/cosmos_proto/bundle.d.ts +31 -0
- package/dist/types/cosmos_proto/bundle.js +41 -0
- package/dist/types/cosmos_proto/bundle.mjs +5 -0
- package/dist/types/cosmos_proto/cosmos.d.ts +144 -0
- package/dist/types/cosmos_proto/cosmos.js +244 -0
- package/dist/types/cosmos_proto/cosmos.mjs +206 -0
- package/dist/types/extern.d.ts +11 -0
- package/dist/types/extern.js +47 -0
- package/dist/types/extern.mjs +41 -0
- package/dist/types/gogoproto/bundle.d.ts +1 -0
- package/dist/types/gogoproto/bundle.js +41 -0
- package/dist/types/gogoproto/bundle.mjs +5 -0
- package/dist/types/gogoproto/gogo.d.ts +1 -0
- package/dist/types/gogoproto/gogo.js +2 -0
- package/dist/types/gogoproto/gogo.mjs +1 -0
- package/dist/types/google/api/annotations.d.ts +1 -0
- package/dist/types/google/api/annotations.js +2 -0
- package/dist/types/google/api/annotations.mjs +1 -0
- package/dist/types/google/api/http.d.ts +1006 -0
- package/dist/types/google/api/http.js +589 -0
- package/dist/types/google/api/http.mjs +553 -0
- package/dist/types/google/bundle.d.ts +545 -0
- package/dist/types/google/bundle.js +52 -0
- package/dist/types/google/bundle.mjs +16 -0
- package/dist/types/google/protobuf/descriptor.d.ts +2755 -0
- package/dist/types/google/protobuf/descriptor.js +4612 -0
- package/dist/types/google/protobuf/descriptor.mjs +4535 -0
- package/dist/types/google/protobuf/timestamp.d.ts +319 -0
- package/dist/types/google/protobuf/timestamp.js +197 -0
- package/dist/types/google/protobuf/timestamp.mjs +161 -0
- package/dist/types/helper-func-types.d.ts +40 -0
- package/dist/types/helper-func-types.js +57 -0
- package/dist/types/helper-func-types.mjs +53 -0
- package/dist/types/helpers.d.ts +56 -0
- package/dist/types/helpers.js +161 -0
- package/dist/types/helpers.mjs +110 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +32 -0
- package/dist/types/index.mjs +16 -0
- package/dist/types/registry.d.ts +35 -0
- package/dist/types/registry.js +200 -0
- package/dist/types/registry.mjs +163 -0
- package/dist/types/types.d.ts +74 -0
- package/dist/types/types.js +8 -0
- package/dist/types/types.mjs +7 -0
- package/package.json +97 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import * as _m0 from "protobufjs/minimal";
|
|
3
|
+
import { GlobalDecoderRegistry } from "../../../../registry";
|
|
4
|
+
function createBasePageRequest() {
|
|
5
|
+
return {
|
|
6
|
+
key: new Uint8Array(),
|
|
7
|
+
offset: 0,
|
|
8
|
+
limit: 0,
|
|
9
|
+
countTotal: false,
|
|
10
|
+
reverse: false
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* PageRequest is to be embedded in gRPC request messages for efficient
|
|
15
|
+
* pagination. Ex:
|
|
16
|
+
*
|
|
17
|
+
* message SomeRequest {
|
|
18
|
+
* Foo some_parameter = 1;
|
|
19
|
+
* PageRequest pagination = 2;
|
|
20
|
+
* }
|
|
21
|
+
* @name PageRequest
|
|
22
|
+
* @package cosmos.base.query.v1beta1
|
|
23
|
+
* @see proto type: cosmos.base.query.v1beta1.PageRequest
|
|
24
|
+
*/
|
|
25
|
+
export const PageRequest = {
|
|
26
|
+
typeUrl: "/cosmos.base.query.v1beta1.PageRequest",
|
|
27
|
+
aminoType: "cosmos-sdk/PageRequest",
|
|
28
|
+
is(o) {
|
|
29
|
+
return o && (o.$typeUrl === PageRequest.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && typeof o.offset === "bigint" && typeof o.limit === "bigint" && typeof o.countTotal === "boolean" && typeof o.reverse === "boolean");
|
|
30
|
+
},
|
|
31
|
+
isSDK(o) {
|
|
32
|
+
return o && (o.$typeUrl === PageRequest.typeUrl || (o.key instanceof Uint8Array || typeof o.key === "string") && typeof o.offset === "bigint" && typeof o.limit === "bigint" && typeof o.count_total === "boolean" && typeof o.reverse === "boolean");
|
|
33
|
+
},
|
|
34
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
35
|
+
if (message.key.length !== 0) {
|
|
36
|
+
writer.uint32(10).bytes(message.key);
|
|
37
|
+
}
|
|
38
|
+
if (message.offset !== 0) {
|
|
39
|
+
writer.uint32(16).uint64(message.offset);
|
|
40
|
+
}
|
|
41
|
+
if (message.limit !== 0) {
|
|
42
|
+
writer.uint32(24).uint64(message.limit);
|
|
43
|
+
}
|
|
44
|
+
if (message.countTotal === true) {
|
|
45
|
+
writer.uint32(32).bool(message.countTotal);
|
|
46
|
+
}
|
|
47
|
+
if (message.reverse === true) {
|
|
48
|
+
writer.uint32(40).bool(message.reverse);
|
|
49
|
+
}
|
|
50
|
+
return writer;
|
|
51
|
+
},
|
|
52
|
+
decode(input, length) {
|
|
53
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
54
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
55
|
+
const message = createBasePageRequest();
|
|
56
|
+
while (reader.pos < end) {
|
|
57
|
+
const tag = reader.uint32();
|
|
58
|
+
switch (tag >>> 3) {
|
|
59
|
+
case 1:
|
|
60
|
+
message.key = reader.bytes();
|
|
61
|
+
break;
|
|
62
|
+
case 2:
|
|
63
|
+
message.offset = Number(reader.uint64().toString());
|
|
64
|
+
break;
|
|
65
|
+
case 3:
|
|
66
|
+
message.limit = Number(reader.uint64().toString());
|
|
67
|
+
break;
|
|
68
|
+
case 4:
|
|
69
|
+
message.countTotal = reader.bool();
|
|
70
|
+
break;
|
|
71
|
+
case 5:
|
|
72
|
+
message.reverse = reader.bool();
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
reader.skipType(tag & 7);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return message;
|
|
80
|
+
},
|
|
81
|
+
fromPartial(object) {
|
|
82
|
+
const message = createBasePageRequest();
|
|
83
|
+
message.key = object.key ?? new Uint8Array();
|
|
84
|
+
message.offset = object.offset !== undefined && object.offset !== null ? Number(object.offset.toString()) : 0;
|
|
85
|
+
message.limit = object.limit !== undefined && object.limit !== null ? Number(object.limit.toString()) : 0;
|
|
86
|
+
message.countTotal = object.countTotal ?? false;
|
|
87
|
+
message.reverse = object.reverse ?? false;
|
|
88
|
+
return message;
|
|
89
|
+
},
|
|
90
|
+
fromProtoMsg(message) {
|
|
91
|
+
return PageRequest.decode(message.value);
|
|
92
|
+
},
|
|
93
|
+
toProto(message) {
|
|
94
|
+
return PageRequest.encode(message).finish();
|
|
95
|
+
},
|
|
96
|
+
toProtoMsg(message) {
|
|
97
|
+
return {
|
|
98
|
+
typeUrl: "/cosmos.base.query.v1beta1.PageRequest",
|
|
99
|
+
value: PageRequest.encode(message).finish()
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
registerTypeUrl() { }
|
|
103
|
+
};
|
|
104
|
+
GlobalDecoderRegistry.register(PageRequest.typeUrl, PageRequest);
|
|
105
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PageRequest.aminoType, PageRequest.typeUrl);
|
|
106
|
+
function createBasePageResponse() {
|
|
107
|
+
return {
|
|
108
|
+
nextKey: new Uint8Array(),
|
|
109
|
+
total: 0
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* PageResponse is to be embedded in gRPC response messages where the
|
|
114
|
+
* corresponding request message has used PageRequest.
|
|
115
|
+
*
|
|
116
|
+
* message SomeResponse {
|
|
117
|
+
* repeated Bar results = 1;
|
|
118
|
+
* PageResponse page = 2;
|
|
119
|
+
* }
|
|
120
|
+
* @name PageResponse
|
|
121
|
+
* @package cosmos.base.query.v1beta1
|
|
122
|
+
* @see proto type: cosmos.base.query.v1beta1.PageResponse
|
|
123
|
+
*/
|
|
124
|
+
export const PageResponse = {
|
|
125
|
+
typeUrl: "/cosmos.base.query.v1beta1.PageResponse",
|
|
126
|
+
aminoType: "cosmos-sdk/PageResponse",
|
|
127
|
+
is(o) {
|
|
128
|
+
return o && (o.$typeUrl === PageResponse.typeUrl || (o.nextKey instanceof Uint8Array || typeof o.nextKey === "string") && typeof o.total === "bigint");
|
|
129
|
+
},
|
|
130
|
+
isSDK(o) {
|
|
131
|
+
return o && (o.$typeUrl === PageResponse.typeUrl || (o.next_key instanceof Uint8Array || typeof o.next_key === "string") && typeof o.total === "bigint");
|
|
132
|
+
},
|
|
133
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
134
|
+
if (message.nextKey.length !== 0) {
|
|
135
|
+
writer.uint32(10).bytes(message.nextKey);
|
|
136
|
+
}
|
|
137
|
+
if (message.total !== 0) {
|
|
138
|
+
writer.uint32(16).uint64(message.total);
|
|
139
|
+
}
|
|
140
|
+
return writer;
|
|
141
|
+
},
|
|
142
|
+
decode(input, length) {
|
|
143
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
144
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
145
|
+
const message = createBasePageResponse();
|
|
146
|
+
while (reader.pos < end) {
|
|
147
|
+
const tag = reader.uint32();
|
|
148
|
+
switch (tag >>> 3) {
|
|
149
|
+
case 1:
|
|
150
|
+
message.nextKey = reader.bytes();
|
|
151
|
+
break;
|
|
152
|
+
case 2:
|
|
153
|
+
message.total = Number(reader.uint64().toString());
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
reader.skipType(tag & 7);
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return message;
|
|
161
|
+
},
|
|
162
|
+
fromPartial(object) {
|
|
163
|
+
const message = createBasePageResponse();
|
|
164
|
+
message.nextKey = object.nextKey ?? new Uint8Array();
|
|
165
|
+
message.total = object.total !== undefined && object.total !== null ? Number(object.total.toString()) : 0;
|
|
166
|
+
return message;
|
|
167
|
+
},
|
|
168
|
+
fromProtoMsg(message) {
|
|
169
|
+
return PageResponse.decode(message.value);
|
|
170
|
+
},
|
|
171
|
+
toProto(message) {
|
|
172
|
+
return PageResponse.encode(message).finish();
|
|
173
|
+
},
|
|
174
|
+
toProtoMsg(message) {
|
|
175
|
+
return {
|
|
176
|
+
typeUrl: "/cosmos.base.query.v1beta1.PageResponse",
|
|
177
|
+
value: PageResponse.encode(message).finish()
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
registerTypeUrl() { }
|
|
181
|
+
};
|
|
182
|
+
GlobalDecoderRegistry.register(PageResponse.typeUrl, PageResponse);
|
|
183
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(PageResponse.aminoType, PageResponse.typeUrl);
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import * as _m0 from "protobufjs/minimal";
|
|
2
|
+
/**
|
|
3
|
+
* Coin defines a token with a denomination and an amount.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: The amount field is an Int which implements the custom method
|
|
6
|
+
* signatures required by gogoproto.
|
|
7
|
+
* @name Coin
|
|
8
|
+
* @package cosmos.base.v1beta1
|
|
9
|
+
* @see proto type: cosmos.base.v1beta1.Coin
|
|
10
|
+
*/
|
|
11
|
+
export interface Coin {
|
|
12
|
+
denom: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CoinProtoMsg {
|
|
16
|
+
typeUrl: "/cosmos.base.v1beta1.Coin";
|
|
17
|
+
value: Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Coin defines a token with a denomination and an amount.
|
|
21
|
+
*
|
|
22
|
+
* NOTE: The amount field is an Int which implements the custom method
|
|
23
|
+
* signatures required by gogoproto.
|
|
24
|
+
* @name CoinSDKType
|
|
25
|
+
* @package cosmos.base.v1beta1
|
|
26
|
+
* @see proto type: cosmos.base.v1beta1.Coin
|
|
27
|
+
*/
|
|
28
|
+
export interface CoinSDKType {
|
|
29
|
+
denom: string;
|
|
30
|
+
amount: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* DecCoin defines a token with a denomination and a decimal amount.
|
|
34
|
+
*
|
|
35
|
+
* NOTE: The amount field is an Dec which implements the custom method
|
|
36
|
+
* signatures required by gogoproto.
|
|
37
|
+
* @name DecCoin
|
|
38
|
+
* @package cosmos.base.v1beta1
|
|
39
|
+
* @see proto type: cosmos.base.v1beta1.DecCoin
|
|
40
|
+
*/
|
|
41
|
+
export interface DecCoin {
|
|
42
|
+
denom: string;
|
|
43
|
+
amount: string;
|
|
44
|
+
}
|
|
45
|
+
export interface DecCoinProtoMsg {
|
|
46
|
+
typeUrl: "/cosmos.base.v1beta1.DecCoin";
|
|
47
|
+
value: Uint8Array;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* DecCoin defines a token with a denomination and a decimal amount.
|
|
51
|
+
*
|
|
52
|
+
* NOTE: The amount field is an Dec which implements the custom method
|
|
53
|
+
* signatures required by gogoproto.
|
|
54
|
+
* @name DecCoinSDKType
|
|
55
|
+
* @package cosmos.base.v1beta1
|
|
56
|
+
* @see proto type: cosmos.base.v1beta1.DecCoin
|
|
57
|
+
*/
|
|
58
|
+
export interface DecCoinSDKType {
|
|
59
|
+
denom: string;
|
|
60
|
+
amount: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* IntProto defines a Protobuf wrapper around an Int object.
|
|
64
|
+
* Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
|
|
65
|
+
* @name IntProto
|
|
66
|
+
* @package cosmos.base.v1beta1
|
|
67
|
+
* @see proto type: cosmos.base.v1beta1.IntProto
|
|
68
|
+
*/
|
|
69
|
+
export interface IntProto {
|
|
70
|
+
int: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IntProtoProtoMsg {
|
|
73
|
+
typeUrl: "/cosmos.base.v1beta1.IntProto";
|
|
74
|
+
value: Uint8Array;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* IntProto defines a Protobuf wrapper around an Int object.
|
|
78
|
+
* Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
|
|
79
|
+
* @name IntProtoSDKType
|
|
80
|
+
* @package cosmos.base.v1beta1
|
|
81
|
+
* @see proto type: cosmos.base.v1beta1.IntProto
|
|
82
|
+
*/
|
|
83
|
+
export interface IntProtoSDKType {
|
|
84
|
+
int: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* DecProto defines a Protobuf wrapper around a Dec object.
|
|
88
|
+
* Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
|
|
89
|
+
* @name DecProto
|
|
90
|
+
* @package cosmos.base.v1beta1
|
|
91
|
+
* @see proto type: cosmos.base.v1beta1.DecProto
|
|
92
|
+
*/
|
|
93
|
+
export interface DecProto {
|
|
94
|
+
dec: string;
|
|
95
|
+
}
|
|
96
|
+
export interface DecProtoProtoMsg {
|
|
97
|
+
typeUrl: "/cosmos.base.v1beta1.DecProto";
|
|
98
|
+
value: Uint8Array;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* DecProto defines a Protobuf wrapper around a Dec object.
|
|
102
|
+
* Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
|
|
103
|
+
* @name DecProtoSDKType
|
|
104
|
+
* @package cosmos.base.v1beta1
|
|
105
|
+
* @see proto type: cosmos.base.v1beta1.DecProto
|
|
106
|
+
*/
|
|
107
|
+
export interface DecProtoSDKType {
|
|
108
|
+
dec: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Coin defines a token with a denomination and an amount.
|
|
112
|
+
*
|
|
113
|
+
* NOTE: The amount field is an Int which implements the custom method
|
|
114
|
+
* signatures required by gogoproto.
|
|
115
|
+
* @name Coin
|
|
116
|
+
* @package cosmos.base.v1beta1
|
|
117
|
+
* @see proto type: cosmos.base.v1beta1.Coin
|
|
118
|
+
*/
|
|
119
|
+
export declare const Coin: {
|
|
120
|
+
typeUrl: string;
|
|
121
|
+
aminoType: string;
|
|
122
|
+
is(o: any): o is Coin;
|
|
123
|
+
isSDK(o: any): o is CoinSDKType;
|
|
124
|
+
encode(message: Coin, writer?: _m0.Writer): _m0.Writer;
|
|
125
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Coin;
|
|
126
|
+
fromPartial(object: Partial<Coin>): Coin;
|
|
127
|
+
fromProtoMsg(message: CoinProtoMsg): Coin;
|
|
128
|
+
toProto(message: Coin): Uint8Array;
|
|
129
|
+
toProtoMsg(message: Coin): CoinProtoMsg;
|
|
130
|
+
registerTypeUrl(): void;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* DecCoin defines a token with a denomination and a decimal amount.
|
|
134
|
+
*
|
|
135
|
+
* NOTE: The amount field is an Dec which implements the custom method
|
|
136
|
+
* signatures required by gogoproto.
|
|
137
|
+
* @name DecCoin
|
|
138
|
+
* @package cosmos.base.v1beta1
|
|
139
|
+
* @see proto type: cosmos.base.v1beta1.DecCoin
|
|
140
|
+
*/
|
|
141
|
+
export declare const DecCoin: {
|
|
142
|
+
typeUrl: string;
|
|
143
|
+
aminoType: string;
|
|
144
|
+
is(o: any): o is DecCoin;
|
|
145
|
+
isSDK(o: any): o is DecCoinSDKType;
|
|
146
|
+
encode(message: DecCoin, writer?: _m0.Writer): _m0.Writer;
|
|
147
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin;
|
|
148
|
+
fromPartial(object: Partial<DecCoin>): DecCoin;
|
|
149
|
+
fromProtoMsg(message: DecCoinProtoMsg): DecCoin;
|
|
150
|
+
toProto(message: DecCoin): Uint8Array;
|
|
151
|
+
toProtoMsg(message: DecCoin): DecCoinProtoMsg;
|
|
152
|
+
registerTypeUrl(): void;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* IntProto defines a Protobuf wrapper around an Int object.
|
|
156
|
+
* Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
|
|
157
|
+
* @name IntProto
|
|
158
|
+
* @package cosmos.base.v1beta1
|
|
159
|
+
* @see proto type: cosmos.base.v1beta1.IntProto
|
|
160
|
+
*/
|
|
161
|
+
export declare const IntProto: {
|
|
162
|
+
typeUrl: string;
|
|
163
|
+
aminoType: string;
|
|
164
|
+
is(o: any): o is IntProto;
|
|
165
|
+
isSDK(o: any): o is IntProtoSDKType;
|
|
166
|
+
encode(message: IntProto, writer?: _m0.Writer): _m0.Writer;
|
|
167
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): IntProto;
|
|
168
|
+
fromPartial(object: Partial<IntProto>): IntProto;
|
|
169
|
+
fromProtoMsg(message: IntProtoProtoMsg): IntProto;
|
|
170
|
+
toProto(message: IntProto): Uint8Array;
|
|
171
|
+
toProtoMsg(message: IntProto): IntProtoProtoMsg;
|
|
172
|
+
registerTypeUrl(): void;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* DecProto defines a Protobuf wrapper around a Dec object.
|
|
176
|
+
* Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
|
|
177
|
+
* @name DecProto
|
|
178
|
+
* @package cosmos.base.v1beta1
|
|
179
|
+
* @see proto type: cosmos.base.v1beta1.DecProto
|
|
180
|
+
*/
|
|
181
|
+
export declare const DecProto: {
|
|
182
|
+
typeUrl: string;
|
|
183
|
+
aminoType: string;
|
|
184
|
+
is(o: any): o is DecProto;
|
|
185
|
+
isSDK(o: any): o is DecProtoSDKType;
|
|
186
|
+
encode(message: DecProto, writer?: _m0.Writer): _m0.Writer;
|
|
187
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DecProto;
|
|
188
|
+
fromPartial(object: Partial<DecProto>): DecProto;
|
|
189
|
+
fromProtoMsg(message: DecProtoProtoMsg): DecProto;
|
|
190
|
+
toProto(message: DecProto): Uint8Array;
|
|
191
|
+
toProtoMsg(message: DecProto): DecProtoProtoMsg;
|
|
192
|
+
registerTypeUrl(): void;
|
|
193
|
+
};
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DecProto = exports.IntProto = exports.DecCoin = exports.Coin = void 0;
|
|
37
|
+
//@ts-nocheck
|
|
38
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
39
|
+
const registry_1 = require("../../../registry");
|
|
40
|
+
const math_1 = require("@interchainjs/math");
|
|
41
|
+
function createBaseCoin() {
|
|
42
|
+
return {
|
|
43
|
+
denom: "",
|
|
44
|
+
amount: ""
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Coin defines a token with a denomination and an amount.
|
|
49
|
+
*
|
|
50
|
+
* NOTE: The amount field is an Int which implements the custom method
|
|
51
|
+
* signatures required by gogoproto.
|
|
52
|
+
* @name Coin
|
|
53
|
+
* @package cosmos.base.v1beta1
|
|
54
|
+
* @see proto type: cosmos.base.v1beta1.Coin
|
|
55
|
+
*/
|
|
56
|
+
exports.Coin = {
|
|
57
|
+
typeUrl: "/cosmos.base.v1beta1.Coin",
|
|
58
|
+
aminoType: "cosmos-sdk/Coin",
|
|
59
|
+
is(o) {
|
|
60
|
+
return o && (o.$typeUrl === exports.Coin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string");
|
|
61
|
+
},
|
|
62
|
+
isSDK(o) {
|
|
63
|
+
return o && (o.$typeUrl === exports.Coin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string");
|
|
64
|
+
},
|
|
65
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
66
|
+
if (message.denom !== "") {
|
|
67
|
+
writer.uint32(10).string(message.denom);
|
|
68
|
+
}
|
|
69
|
+
if (message.amount !== "") {
|
|
70
|
+
writer.uint32(18).string(message.amount);
|
|
71
|
+
}
|
|
72
|
+
return writer;
|
|
73
|
+
},
|
|
74
|
+
decode(input, length) {
|
|
75
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
76
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
77
|
+
const message = createBaseCoin();
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
const tag = reader.uint32();
|
|
80
|
+
switch (tag >>> 3) {
|
|
81
|
+
case 1:
|
|
82
|
+
message.denom = reader.string();
|
|
83
|
+
break;
|
|
84
|
+
case 2:
|
|
85
|
+
message.amount = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
default:
|
|
88
|
+
reader.skipType(tag & 7);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return message;
|
|
93
|
+
},
|
|
94
|
+
fromPartial(object) {
|
|
95
|
+
const message = createBaseCoin();
|
|
96
|
+
message.denom = object.denom ?? "";
|
|
97
|
+
message.amount = object.amount ?? "";
|
|
98
|
+
return message;
|
|
99
|
+
},
|
|
100
|
+
fromProtoMsg(message) {
|
|
101
|
+
return exports.Coin.decode(message.value);
|
|
102
|
+
},
|
|
103
|
+
toProto(message) {
|
|
104
|
+
return exports.Coin.encode(message).finish();
|
|
105
|
+
},
|
|
106
|
+
toProtoMsg(message) {
|
|
107
|
+
return {
|
|
108
|
+
typeUrl: "/cosmos.base.v1beta1.Coin",
|
|
109
|
+
value: exports.Coin.encode(message).finish()
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
registerTypeUrl() { }
|
|
113
|
+
};
|
|
114
|
+
registry_1.GlobalDecoderRegistry.register(exports.Coin.typeUrl, exports.Coin);
|
|
115
|
+
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.Coin.aminoType, exports.Coin.typeUrl);
|
|
116
|
+
function createBaseDecCoin() {
|
|
117
|
+
return {
|
|
118
|
+
denom: "",
|
|
119
|
+
amount: ""
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* DecCoin defines a token with a denomination and a decimal amount.
|
|
124
|
+
*
|
|
125
|
+
* NOTE: The amount field is an Dec which implements the custom method
|
|
126
|
+
* signatures required by gogoproto.
|
|
127
|
+
* @name DecCoin
|
|
128
|
+
* @package cosmos.base.v1beta1
|
|
129
|
+
* @see proto type: cosmos.base.v1beta1.DecCoin
|
|
130
|
+
*/
|
|
131
|
+
exports.DecCoin = {
|
|
132
|
+
typeUrl: "/cosmos.base.v1beta1.DecCoin",
|
|
133
|
+
aminoType: "cosmos-sdk/DecCoin",
|
|
134
|
+
is(o) {
|
|
135
|
+
return o && (o.$typeUrl === exports.DecCoin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string");
|
|
136
|
+
},
|
|
137
|
+
isSDK(o) {
|
|
138
|
+
return o && (o.$typeUrl === exports.DecCoin.typeUrl || typeof o.denom === "string" && typeof o.amount === "string");
|
|
139
|
+
},
|
|
140
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
141
|
+
if (message.denom !== "") {
|
|
142
|
+
writer.uint32(10).string(message.denom);
|
|
143
|
+
}
|
|
144
|
+
if (message.amount !== "") {
|
|
145
|
+
writer.uint32(18).string(math_1.Decimal.fromUserInput(message.amount, 18).atomics);
|
|
146
|
+
}
|
|
147
|
+
return writer;
|
|
148
|
+
},
|
|
149
|
+
decode(input, length) {
|
|
150
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
151
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
152
|
+
const message = createBaseDecCoin();
|
|
153
|
+
while (reader.pos < end) {
|
|
154
|
+
const tag = reader.uint32();
|
|
155
|
+
switch (tag >>> 3) {
|
|
156
|
+
case 1:
|
|
157
|
+
message.denom = reader.string();
|
|
158
|
+
break;
|
|
159
|
+
case 2:
|
|
160
|
+
message.amount = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
161
|
+
break;
|
|
162
|
+
default:
|
|
163
|
+
reader.skipType(tag & 7);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return message;
|
|
168
|
+
},
|
|
169
|
+
fromPartial(object) {
|
|
170
|
+
const message = createBaseDecCoin();
|
|
171
|
+
message.denom = object.denom ?? "";
|
|
172
|
+
message.amount = object.amount ?? "";
|
|
173
|
+
return message;
|
|
174
|
+
},
|
|
175
|
+
fromProtoMsg(message) {
|
|
176
|
+
return exports.DecCoin.decode(message.value);
|
|
177
|
+
},
|
|
178
|
+
toProto(message) {
|
|
179
|
+
return exports.DecCoin.encode(message).finish();
|
|
180
|
+
},
|
|
181
|
+
toProtoMsg(message) {
|
|
182
|
+
return {
|
|
183
|
+
typeUrl: "/cosmos.base.v1beta1.DecCoin",
|
|
184
|
+
value: exports.DecCoin.encode(message).finish()
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
registerTypeUrl() { }
|
|
188
|
+
};
|
|
189
|
+
registry_1.GlobalDecoderRegistry.register(exports.DecCoin.typeUrl, exports.DecCoin);
|
|
190
|
+
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.DecCoin.aminoType, exports.DecCoin.typeUrl);
|
|
191
|
+
function createBaseIntProto() {
|
|
192
|
+
return {
|
|
193
|
+
int: ""
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* IntProto defines a Protobuf wrapper around an Int object.
|
|
198
|
+
* Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
|
|
199
|
+
* @name IntProto
|
|
200
|
+
* @package cosmos.base.v1beta1
|
|
201
|
+
* @see proto type: cosmos.base.v1beta1.IntProto
|
|
202
|
+
*/
|
|
203
|
+
exports.IntProto = {
|
|
204
|
+
typeUrl: "/cosmos.base.v1beta1.IntProto",
|
|
205
|
+
aminoType: "cosmos-sdk/IntProto",
|
|
206
|
+
is(o) {
|
|
207
|
+
return o && (o.$typeUrl === exports.IntProto.typeUrl || typeof o.int === "string");
|
|
208
|
+
},
|
|
209
|
+
isSDK(o) {
|
|
210
|
+
return o && (o.$typeUrl === exports.IntProto.typeUrl || typeof o.int === "string");
|
|
211
|
+
},
|
|
212
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
213
|
+
if (message.int !== "") {
|
|
214
|
+
writer.uint32(10).string(message.int);
|
|
215
|
+
}
|
|
216
|
+
return writer;
|
|
217
|
+
},
|
|
218
|
+
decode(input, length) {
|
|
219
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
220
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
221
|
+
const message = createBaseIntProto();
|
|
222
|
+
while (reader.pos < end) {
|
|
223
|
+
const tag = reader.uint32();
|
|
224
|
+
switch (tag >>> 3) {
|
|
225
|
+
case 1:
|
|
226
|
+
message.int = reader.string();
|
|
227
|
+
break;
|
|
228
|
+
default:
|
|
229
|
+
reader.skipType(tag & 7);
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return message;
|
|
234
|
+
},
|
|
235
|
+
fromPartial(object) {
|
|
236
|
+
const message = createBaseIntProto();
|
|
237
|
+
message.int = object.int ?? "";
|
|
238
|
+
return message;
|
|
239
|
+
},
|
|
240
|
+
fromProtoMsg(message) {
|
|
241
|
+
return exports.IntProto.decode(message.value);
|
|
242
|
+
},
|
|
243
|
+
toProto(message) {
|
|
244
|
+
return exports.IntProto.encode(message).finish();
|
|
245
|
+
},
|
|
246
|
+
toProtoMsg(message) {
|
|
247
|
+
return {
|
|
248
|
+
typeUrl: "/cosmos.base.v1beta1.IntProto",
|
|
249
|
+
value: exports.IntProto.encode(message).finish()
|
|
250
|
+
};
|
|
251
|
+
},
|
|
252
|
+
registerTypeUrl() { }
|
|
253
|
+
};
|
|
254
|
+
registry_1.GlobalDecoderRegistry.register(exports.IntProto.typeUrl, exports.IntProto);
|
|
255
|
+
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.IntProto.aminoType, exports.IntProto.typeUrl);
|
|
256
|
+
function createBaseDecProto() {
|
|
257
|
+
return {
|
|
258
|
+
dec: ""
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* DecProto defines a Protobuf wrapper around a Dec object.
|
|
263
|
+
* Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
|
|
264
|
+
* @name DecProto
|
|
265
|
+
* @package cosmos.base.v1beta1
|
|
266
|
+
* @see proto type: cosmos.base.v1beta1.DecProto
|
|
267
|
+
*/
|
|
268
|
+
exports.DecProto = {
|
|
269
|
+
typeUrl: "/cosmos.base.v1beta1.DecProto",
|
|
270
|
+
aminoType: "cosmos-sdk/DecProto",
|
|
271
|
+
is(o) {
|
|
272
|
+
return o && (o.$typeUrl === exports.DecProto.typeUrl || typeof o.dec === "string");
|
|
273
|
+
},
|
|
274
|
+
isSDK(o) {
|
|
275
|
+
return o && (o.$typeUrl === exports.DecProto.typeUrl || typeof o.dec === "string");
|
|
276
|
+
},
|
|
277
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
278
|
+
if (message.dec !== "") {
|
|
279
|
+
writer.uint32(10).string(math_1.Decimal.fromUserInput(message.dec, 18).atomics);
|
|
280
|
+
}
|
|
281
|
+
return writer;
|
|
282
|
+
},
|
|
283
|
+
decode(input, length) {
|
|
284
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
285
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
286
|
+
const message = createBaseDecProto();
|
|
287
|
+
while (reader.pos < end) {
|
|
288
|
+
const tag = reader.uint32();
|
|
289
|
+
switch (tag >>> 3) {
|
|
290
|
+
case 1:
|
|
291
|
+
message.dec = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
292
|
+
break;
|
|
293
|
+
default:
|
|
294
|
+
reader.skipType(tag & 7);
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return message;
|
|
299
|
+
},
|
|
300
|
+
fromPartial(object) {
|
|
301
|
+
const message = createBaseDecProto();
|
|
302
|
+
message.dec = object.dec ?? "";
|
|
303
|
+
return message;
|
|
304
|
+
},
|
|
305
|
+
fromProtoMsg(message) {
|
|
306
|
+
return exports.DecProto.decode(message.value);
|
|
307
|
+
},
|
|
308
|
+
toProto(message) {
|
|
309
|
+
return exports.DecProto.encode(message).finish();
|
|
310
|
+
},
|
|
311
|
+
toProtoMsg(message) {
|
|
312
|
+
return {
|
|
313
|
+
typeUrl: "/cosmos.base.v1beta1.DecProto",
|
|
314
|
+
value: exports.DecProto.encode(message).finish()
|
|
315
|
+
};
|
|
316
|
+
},
|
|
317
|
+
registerTypeUrl() { }
|
|
318
|
+
};
|
|
319
|
+
registry_1.GlobalDecoderRegistry.register(exports.DecProto.typeUrl, exports.DecProto);
|
|
320
|
+
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.DecProto.aminoType, exports.DecProto.typeUrl);
|