carbon-js-sdk 0.3.37-dev.1 → 0.3.38
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/lib/clients/ETHClient.js +4 -5
- package/lib/clients/TokenClient.js +1 -1
- package/lib/clients/ZILClient.js +3 -4
- package/lib/codec/cdp/asset_params.d.ts +0 -1
- package/lib/codec/cdp/tx.d.ts +1 -23
- package/lib/codec/cdp/tx.js +1 -100
- package/lib/codec/coin/event.d.ts +0 -81
- package/lib/codec/coin/event.js +1 -486
- package/lib/codec/coin/genesis.d.ts +1 -3
- package/lib/codec/coin/genesis.js +2 -18
- package/lib/codec/coin/query.d.ts +0 -85
- package/lib/codec/coin/query.js +1 -422
- package/lib/codec/coin/tx.d.ts +2 -196
- package/lib/codec/coin/tx.js +17 -1028
- package/lib/codec/index.d.ts +5 -24
- package/lib/codec/index.js +11 -86
- package/lib/codec/pricing/pricing.d.ts +0 -1
- package/lib/codec/pricing/pricing.js +2 -14
- package/lib/codec/pricing/tx.d.ts +0 -23
- package/lib/codec/pricing/tx.js +1 -112
- package/lib/constant/network.js +1 -1
- package/lib/modules/coin.d.ts +0 -11
- package/lib/modules/coin.js +0 -48
- package/lib/util/blockchain.d.ts +1 -2
- package/lib/util/blockchain.js +62 -95
- package/lib/util/tx.d.ts +0 -18
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
import { Token, LockedCoins, TokenBalance } from "./token";
|
|
4
4
|
import { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/pagination";
|
|
5
5
|
import { Bridge } from "./bridge";
|
|
6
|
-
import { TokenGroupDetails } from "./group";
|
|
7
6
|
export declare const protobufPackage = "Switcheo.carbon.coin";
|
|
8
7
|
/** this line is used by starport scaffolding # 3 */
|
|
9
8
|
export interface QueryGetTokenRequest {
|
|
@@ -66,32 +65,6 @@ export interface QueryAllBridgeResponse {
|
|
|
66
65
|
bridges: Bridge[];
|
|
67
66
|
pagination?: PageResponse;
|
|
68
67
|
}
|
|
69
|
-
export interface QueryGetTokenGroupRequest {
|
|
70
|
-
groupId: string;
|
|
71
|
-
}
|
|
72
|
-
export interface QueryGetTokenGroupResponse {
|
|
73
|
-
tokenGroup?: TokenGroupDetails;
|
|
74
|
-
}
|
|
75
|
-
export interface QueryAllTokenGroupsRequest {
|
|
76
|
-
pagination?: PageRequest;
|
|
77
|
-
}
|
|
78
|
-
export interface QueryAllTokenGroupsResponse {
|
|
79
|
-
tokenGroups: TokenGroupDetails[];
|
|
80
|
-
pagination?: PageResponse;
|
|
81
|
-
}
|
|
82
|
-
export interface QueryTokenGroupMappingsRequest {
|
|
83
|
-
pagination?: PageRequest;
|
|
84
|
-
}
|
|
85
|
-
export interface QueryTokenGroupMappingsResponse {
|
|
86
|
-
tokenGroupMappings: {
|
|
87
|
-
[key: string]: Long;
|
|
88
|
-
};
|
|
89
|
-
pagination?: PageResponse;
|
|
90
|
-
}
|
|
91
|
-
export interface QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry {
|
|
92
|
-
key: string;
|
|
93
|
-
value: Long;
|
|
94
|
-
}
|
|
95
68
|
export declare const QueryGetTokenRequest: {
|
|
96
69
|
encode(message: QueryGetTokenRequest, writer?: _m0.Writer): _m0.Writer;
|
|
97
70
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGetTokenRequest;
|
|
@@ -211,55 +184,6 @@ export declare const QueryAllBridgeResponse: {
|
|
|
211
184
|
toJSON(message: QueryAllBridgeResponse): unknown;
|
|
212
185
|
fromPartial(object: DeepPartial<QueryAllBridgeResponse>): QueryAllBridgeResponse;
|
|
213
186
|
};
|
|
214
|
-
export declare const QueryGetTokenGroupRequest: {
|
|
215
|
-
encode(message: QueryGetTokenGroupRequest, writer?: _m0.Writer): _m0.Writer;
|
|
216
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGetTokenGroupRequest;
|
|
217
|
-
fromJSON(object: any): QueryGetTokenGroupRequest;
|
|
218
|
-
toJSON(message: QueryGetTokenGroupRequest): unknown;
|
|
219
|
-
fromPartial(object: DeepPartial<QueryGetTokenGroupRequest>): QueryGetTokenGroupRequest;
|
|
220
|
-
};
|
|
221
|
-
export declare const QueryGetTokenGroupResponse: {
|
|
222
|
-
encode(message: QueryGetTokenGroupResponse, writer?: _m0.Writer): _m0.Writer;
|
|
223
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGetTokenGroupResponse;
|
|
224
|
-
fromJSON(object: any): QueryGetTokenGroupResponse;
|
|
225
|
-
toJSON(message: QueryGetTokenGroupResponse): unknown;
|
|
226
|
-
fromPartial(object: DeepPartial<QueryGetTokenGroupResponse>): QueryGetTokenGroupResponse;
|
|
227
|
-
};
|
|
228
|
-
export declare const QueryAllTokenGroupsRequest: {
|
|
229
|
-
encode(message: QueryAllTokenGroupsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
230
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAllTokenGroupsRequest;
|
|
231
|
-
fromJSON(object: any): QueryAllTokenGroupsRequest;
|
|
232
|
-
toJSON(message: QueryAllTokenGroupsRequest): unknown;
|
|
233
|
-
fromPartial(object: DeepPartial<QueryAllTokenGroupsRequest>): QueryAllTokenGroupsRequest;
|
|
234
|
-
};
|
|
235
|
-
export declare const QueryAllTokenGroupsResponse: {
|
|
236
|
-
encode(message: QueryAllTokenGroupsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
237
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAllTokenGroupsResponse;
|
|
238
|
-
fromJSON(object: any): QueryAllTokenGroupsResponse;
|
|
239
|
-
toJSON(message: QueryAllTokenGroupsResponse): unknown;
|
|
240
|
-
fromPartial(object: DeepPartial<QueryAllTokenGroupsResponse>): QueryAllTokenGroupsResponse;
|
|
241
|
-
};
|
|
242
|
-
export declare const QueryTokenGroupMappingsRequest: {
|
|
243
|
-
encode(message: QueryTokenGroupMappingsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
244
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryTokenGroupMappingsRequest;
|
|
245
|
-
fromJSON(object: any): QueryTokenGroupMappingsRequest;
|
|
246
|
-
toJSON(message: QueryTokenGroupMappingsRequest): unknown;
|
|
247
|
-
fromPartial(object: DeepPartial<QueryTokenGroupMappingsRequest>): QueryTokenGroupMappingsRequest;
|
|
248
|
-
};
|
|
249
|
-
export declare const QueryTokenGroupMappingsResponse: {
|
|
250
|
-
encode(message: QueryTokenGroupMappingsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
251
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryTokenGroupMappingsResponse;
|
|
252
|
-
fromJSON(object: any): QueryTokenGroupMappingsResponse;
|
|
253
|
-
toJSON(message: QueryTokenGroupMappingsResponse): unknown;
|
|
254
|
-
fromPartial(object: DeepPartial<QueryTokenGroupMappingsResponse>): QueryTokenGroupMappingsResponse;
|
|
255
|
-
};
|
|
256
|
-
export declare const QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry: {
|
|
257
|
-
encode(message: QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry, writer?: _m0.Writer): _m0.Writer;
|
|
258
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry;
|
|
259
|
-
fromJSON(object: any): QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry;
|
|
260
|
-
toJSON(message: QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry): unknown;
|
|
261
|
-
fromPartial(object: DeepPartial<QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry>): QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry;
|
|
262
|
-
};
|
|
263
187
|
/** Query defines the gRPC querier service. */
|
|
264
188
|
export interface Query {
|
|
265
189
|
/** Get token details for a denom */
|
|
@@ -278,12 +202,6 @@ export interface Query {
|
|
|
278
202
|
Bridge(request: QueryGetBridgeRequest): Promise<QueryGetBridgeResponse>;
|
|
279
203
|
/** Get details for all cross-chain bridges */
|
|
280
204
|
BridgeAll(request: QueryAllBridgeRequest): Promise<QueryAllBridgeResponse>;
|
|
281
|
-
/** Get TokenGroup details for a particular id */
|
|
282
|
-
TokenGroup(request: QueryGetTokenGroupRequest): Promise<QueryGetTokenGroupResponse>;
|
|
283
|
-
/** Get all TokenGroup details */
|
|
284
|
-
TokenGroupAll(request: QueryAllTokenGroupsRequest): Promise<QueryAllTokenGroupsResponse>;
|
|
285
|
-
/** Get denom => group_id mappings */
|
|
286
|
-
TokenGroupMappings(request: QueryTokenGroupMappingsRequest): Promise<QueryTokenGroupMappingsResponse>;
|
|
287
205
|
}
|
|
288
206
|
export declare class QueryClientImpl implements Query {
|
|
289
207
|
private readonly rpc;
|
|
@@ -296,9 +214,6 @@ export declare class QueryClientImpl implements Query {
|
|
|
296
214
|
BalancesTotal(request: QueryTotalBalancesRequest): Promise<QueryTotalBalancesResponse>;
|
|
297
215
|
Bridge(request: QueryGetBridgeRequest): Promise<QueryGetBridgeResponse>;
|
|
298
216
|
BridgeAll(request: QueryAllBridgeRequest): Promise<QueryAllBridgeResponse>;
|
|
299
|
-
TokenGroup(request: QueryGetTokenGroupRequest): Promise<QueryGetTokenGroupResponse>;
|
|
300
|
-
TokenGroupAll(request: QueryAllTokenGroupsRequest): Promise<QueryAllTokenGroupsResponse>;
|
|
301
|
-
TokenGroupMappings(request: QueryTokenGroupMappingsRequest): Promise<QueryTokenGroupMappingsResponse>;
|
|
302
217
|
}
|
|
303
218
|
interface Rpc {
|
|
304
219
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
package/lib/codec/coin/query.js
CHANGED
|
@@ -3,14 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.QueryClientImpl = exports.
|
|
6
|
+
exports.QueryClientImpl = exports.QueryAllBridgeResponse = exports.QueryAllBridgeRequest = exports.QueryGetBridgeResponse = exports.QueryGetBridgeRequest = exports.QueryTotalBalancesResponse = exports.QueryTotalBalancesRequest = exports.QueryGetBalancesResponse = exports.QueryGetBalancesRequest = exports.QueryAllWrapperMappingsResponse_WrapperMappingsEntry = exports.QueryAllWrapperMappingsResponse = exports.QueryAllWrapperMappingsRequest = exports.QueryGetLockedCoinsResponse = exports.QueryGetLockedCoinsRequest = exports.QueryAllTokenResponse = exports.QueryAllTokenRequest = exports.QueryGetTokenResponse = exports.QueryGetTokenRequest = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
const token_1 = require("./token");
|
|
11
11
|
const pagination_1 = require("../cosmos/base/query/v1beta1/pagination");
|
|
12
12
|
const bridge_1 = require("./bridge");
|
|
13
|
-
const group_1 = require("./group");
|
|
14
13
|
exports.protobufPackage = "Switcheo.carbon.coin";
|
|
15
14
|
const baseQueryGetTokenRequest = { denom: "" };
|
|
16
15
|
exports.QueryGetTokenRequest = {
|
|
@@ -959,408 +958,6 @@ exports.QueryAllBridgeResponse = {
|
|
|
959
958
|
return message;
|
|
960
959
|
},
|
|
961
960
|
};
|
|
962
|
-
const baseQueryGetTokenGroupRequest = { groupId: "" };
|
|
963
|
-
exports.QueryGetTokenGroupRequest = {
|
|
964
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
965
|
-
if (message.groupId !== "") {
|
|
966
|
-
writer.uint32(10).string(message.groupId);
|
|
967
|
-
}
|
|
968
|
-
return writer;
|
|
969
|
-
},
|
|
970
|
-
decode(input, length) {
|
|
971
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
972
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
973
|
-
const message = Object.assign({}, baseQueryGetTokenGroupRequest);
|
|
974
|
-
while (reader.pos < end) {
|
|
975
|
-
const tag = reader.uint32();
|
|
976
|
-
switch (tag >>> 3) {
|
|
977
|
-
case 1:
|
|
978
|
-
message.groupId = reader.string();
|
|
979
|
-
break;
|
|
980
|
-
default:
|
|
981
|
-
reader.skipType(tag & 7);
|
|
982
|
-
break;
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
return message;
|
|
986
|
-
},
|
|
987
|
-
fromJSON(object) {
|
|
988
|
-
const message = Object.assign({}, baseQueryGetTokenGroupRequest);
|
|
989
|
-
message.groupId =
|
|
990
|
-
object.groupId !== undefined && object.groupId !== null
|
|
991
|
-
? String(object.groupId)
|
|
992
|
-
: "";
|
|
993
|
-
return message;
|
|
994
|
-
},
|
|
995
|
-
toJSON(message) {
|
|
996
|
-
const obj = {};
|
|
997
|
-
message.groupId !== undefined && (obj.groupId = message.groupId);
|
|
998
|
-
return obj;
|
|
999
|
-
},
|
|
1000
|
-
fromPartial(object) {
|
|
1001
|
-
var _a;
|
|
1002
|
-
const message = Object.assign({}, baseQueryGetTokenGroupRequest);
|
|
1003
|
-
message.groupId = (_a = object.groupId) !== null && _a !== void 0 ? _a : "";
|
|
1004
|
-
return message;
|
|
1005
|
-
},
|
|
1006
|
-
};
|
|
1007
|
-
const baseQueryGetTokenGroupResponse = {};
|
|
1008
|
-
exports.QueryGetTokenGroupResponse = {
|
|
1009
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1010
|
-
if (message.tokenGroup !== undefined) {
|
|
1011
|
-
group_1.TokenGroupDetails.encode(message.tokenGroup, writer.uint32(10).fork()).ldelim();
|
|
1012
|
-
}
|
|
1013
|
-
return writer;
|
|
1014
|
-
},
|
|
1015
|
-
decode(input, length) {
|
|
1016
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1017
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1018
|
-
const message = Object.assign({}, baseQueryGetTokenGroupResponse);
|
|
1019
|
-
while (reader.pos < end) {
|
|
1020
|
-
const tag = reader.uint32();
|
|
1021
|
-
switch (tag >>> 3) {
|
|
1022
|
-
case 1:
|
|
1023
|
-
message.tokenGroup = group_1.TokenGroupDetails.decode(reader, reader.uint32());
|
|
1024
|
-
break;
|
|
1025
|
-
default:
|
|
1026
|
-
reader.skipType(tag & 7);
|
|
1027
|
-
break;
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
return message;
|
|
1031
|
-
},
|
|
1032
|
-
fromJSON(object) {
|
|
1033
|
-
const message = Object.assign({}, baseQueryGetTokenGroupResponse);
|
|
1034
|
-
message.tokenGroup =
|
|
1035
|
-
object.tokenGroup !== undefined && object.tokenGroup !== null
|
|
1036
|
-
? group_1.TokenGroupDetails.fromJSON(object.tokenGroup)
|
|
1037
|
-
: undefined;
|
|
1038
|
-
return message;
|
|
1039
|
-
},
|
|
1040
|
-
toJSON(message) {
|
|
1041
|
-
const obj = {};
|
|
1042
|
-
message.tokenGroup !== undefined &&
|
|
1043
|
-
(obj.tokenGroup = message.tokenGroup
|
|
1044
|
-
? group_1.TokenGroupDetails.toJSON(message.tokenGroup)
|
|
1045
|
-
: undefined);
|
|
1046
|
-
return obj;
|
|
1047
|
-
},
|
|
1048
|
-
fromPartial(object) {
|
|
1049
|
-
const message = Object.assign({}, baseQueryGetTokenGroupResponse);
|
|
1050
|
-
message.tokenGroup =
|
|
1051
|
-
object.tokenGroup !== undefined && object.tokenGroup !== null
|
|
1052
|
-
? group_1.TokenGroupDetails.fromPartial(object.tokenGroup)
|
|
1053
|
-
: undefined;
|
|
1054
|
-
return message;
|
|
1055
|
-
},
|
|
1056
|
-
};
|
|
1057
|
-
const baseQueryAllTokenGroupsRequest = {};
|
|
1058
|
-
exports.QueryAllTokenGroupsRequest = {
|
|
1059
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1060
|
-
if (message.pagination !== undefined) {
|
|
1061
|
-
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1062
|
-
}
|
|
1063
|
-
return writer;
|
|
1064
|
-
},
|
|
1065
|
-
decode(input, length) {
|
|
1066
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1067
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1068
|
-
const message = Object.assign({}, baseQueryAllTokenGroupsRequest);
|
|
1069
|
-
while (reader.pos < end) {
|
|
1070
|
-
const tag = reader.uint32();
|
|
1071
|
-
switch (tag >>> 3) {
|
|
1072
|
-
case 1:
|
|
1073
|
-
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
1074
|
-
break;
|
|
1075
|
-
default:
|
|
1076
|
-
reader.skipType(tag & 7);
|
|
1077
|
-
break;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
return message;
|
|
1081
|
-
},
|
|
1082
|
-
fromJSON(object) {
|
|
1083
|
-
const message = Object.assign({}, baseQueryAllTokenGroupsRequest);
|
|
1084
|
-
message.pagination =
|
|
1085
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1086
|
-
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
1087
|
-
: undefined;
|
|
1088
|
-
return message;
|
|
1089
|
-
},
|
|
1090
|
-
toJSON(message) {
|
|
1091
|
-
const obj = {};
|
|
1092
|
-
message.pagination !== undefined &&
|
|
1093
|
-
(obj.pagination = message.pagination
|
|
1094
|
-
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
1095
|
-
: undefined);
|
|
1096
|
-
return obj;
|
|
1097
|
-
},
|
|
1098
|
-
fromPartial(object) {
|
|
1099
|
-
const message = Object.assign({}, baseQueryAllTokenGroupsRequest);
|
|
1100
|
-
message.pagination =
|
|
1101
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1102
|
-
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
1103
|
-
: undefined;
|
|
1104
|
-
return message;
|
|
1105
|
-
},
|
|
1106
|
-
};
|
|
1107
|
-
const baseQueryAllTokenGroupsResponse = {};
|
|
1108
|
-
exports.QueryAllTokenGroupsResponse = {
|
|
1109
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1110
|
-
for (const v of message.tokenGroups) {
|
|
1111
|
-
group_1.TokenGroupDetails.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1112
|
-
}
|
|
1113
|
-
if (message.pagination !== undefined) {
|
|
1114
|
-
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1115
|
-
}
|
|
1116
|
-
return writer;
|
|
1117
|
-
},
|
|
1118
|
-
decode(input, length) {
|
|
1119
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1120
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1121
|
-
const message = Object.assign({}, baseQueryAllTokenGroupsResponse);
|
|
1122
|
-
message.tokenGroups = [];
|
|
1123
|
-
while (reader.pos < end) {
|
|
1124
|
-
const tag = reader.uint32();
|
|
1125
|
-
switch (tag >>> 3) {
|
|
1126
|
-
case 1:
|
|
1127
|
-
message.tokenGroups.push(group_1.TokenGroupDetails.decode(reader, reader.uint32()));
|
|
1128
|
-
break;
|
|
1129
|
-
case 2:
|
|
1130
|
-
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
1131
|
-
break;
|
|
1132
|
-
default:
|
|
1133
|
-
reader.skipType(tag & 7);
|
|
1134
|
-
break;
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
return message;
|
|
1138
|
-
},
|
|
1139
|
-
fromJSON(object) {
|
|
1140
|
-
var _a;
|
|
1141
|
-
const message = Object.assign({}, baseQueryAllTokenGroupsResponse);
|
|
1142
|
-
message.tokenGroups = ((_a = object.tokenGroups) !== null && _a !== void 0 ? _a : []).map((e) => group_1.TokenGroupDetails.fromJSON(e));
|
|
1143
|
-
message.pagination =
|
|
1144
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1145
|
-
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
1146
|
-
: undefined;
|
|
1147
|
-
return message;
|
|
1148
|
-
},
|
|
1149
|
-
toJSON(message) {
|
|
1150
|
-
const obj = {};
|
|
1151
|
-
if (message.tokenGroups) {
|
|
1152
|
-
obj.tokenGroups = message.tokenGroups.map((e) => e ? group_1.TokenGroupDetails.toJSON(e) : undefined);
|
|
1153
|
-
}
|
|
1154
|
-
else {
|
|
1155
|
-
obj.tokenGroups = [];
|
|
1156
|
-
}
|
|
1157
|
-
message.pagination !== undefined &&
|
|
1158
|
-
(obj.pagination = message.pagination
|
|
1159
|
-
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
1160
|
-
: undefined);
|
|
1161
|
-
return obj;
|
|
1162
|
-
},
|
|
1163
|
-
fromPartial(object) {
|
|
1164
|
-
var _a;
|
|
1165
|
-
const message = Object.assign({}, baseQueryAllTokenGroupsResponse);
|
|
1166
|
-
message.tokenGroups = ((_a = object.tokenGroups) !== null && _a !== void 0 ? _a : []).map((e) => group_1.TokenGroupDetails.fromPartial(e));
|
|
1167
|
-
message.pagination =
|
|
1168
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1169
|
-
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
1170
|
-
: undefined;
|
|
1171
|
-
return message;
|
|
1172
|
-
},
|
|
1173
|
-
};
|
|
1174
|
-
const baseQueryTokenGroupMappingsRequest = {};
|
|
1175
|
-
exports.QueryTokenGroupMappingsRequest = {
|
|
1176
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1177
|
-
if (message.pagination !== undefined) {
|
|
1178
|
-
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1179
|
-
}
|
|
1180
|
-
return writer;
|
|
1181
|
-
},
|
|
1182
|
-
decode(input, length) {
|
|
1183
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1184
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1185
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsRequest);
|
|
1186
|
-
while (reader.pos < end) {
|
|
1187
|
-
const tag = reader.uint32();
|
|
1188
|
-
switch (tag >>> 3) {
|
|
1189
|
-
case 1:
|
|
1190
|
-
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
1191
|
-
break;
|
|
1192
|
-
default:
|
|
1193
|
-
reader.skipType(tag & 7);
|
|
1194
|
-
break;
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
return message;
|
|
1198
|
-
},
|
|
1199
|
-
fromJSON(object) {
|
|
1200
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsRequest);
|
|
1201
|
-
message.pagination =
|
|
1202
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1203
|
-
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
1204
|
-
: undefined;
|
|
1205
|
-
return message;
|
|
1206
|
-
},
|
|
1207
|
-
toJSON(message) {
|
|
1208
|
-
const obj = {};
|
|
1209
|
-
message.pagination !== undefined &&
|
|
1210
|
-
(obj.pagination = message.pagination
|
|
1211
|
-
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
1212
|
-
: undefined);
|
|
1213
|
-
return obj;
|
|
1214
|
-
},
|
|
1215
|
-
fromPartial(object) {
|
|
1216
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsRequest);
|
|
1217
|
-
message.pagination =
|
|
1218
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1219
|
-
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
1220
|
-
: undefined;
|
|
1221
|
-
return message;
|
|
1222
|
-
},
|
|
1223
|
-
};
|
|
1224
|
-
const baseQueryTokenGroupMappingsResponse = {};
|
|
1225
|
-
exports.QueryTokenGroupMappingsResponse = {
|
|
1226
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1227
|
-
Object.entries(message.tokenGroupMappings).forEach(([key, value]) => {
|
|
1228
|
-
exports.QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
|
1229
|
-
});
|
|
1230
|
-
if (message.pagination !== undefined) {
|
|
1231
|
-
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1232
|
-
}
|
|
1233
|
-
return writer;
|
|
1234
|
-
},
|
|
1235
|
-
decode(input, length) {
|
|
1236
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1237
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1238
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsResponse);
|
|
1239
|
-
message.tokenGroupMappings = {};
|
|
1240
|
-
while (reader.pos < end) {
|
|
1241
|
-
const tag = reader.uint32();
|
|
1242
|
-
switch (tag >>> 3) {
|
|
1243
|
-
case 1:
|
|
1244
|
-
const entry1 = exports.QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry.decode(reader, reader.uint32());
|
|
1245
|
-
if (entry1.value !== undefined) {
|
|
1246
|
-
message.tokenGroupMappings[entry1.key] = entry1.value;
|
|
1247
|
-
}
|
|
1248
|
-
break;
|
|
1249
|
-
case 2:
|
|
1250
|
-
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
1251
|
-
break;
|
|
1252
|
-
default:
|
|
1253
|
-
reader.skipType(tag & 7);
|
|
1254
|
-
break;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
return message;
|
|
1258
|
-
},
|
|
1259
|
-
fromJSON(object) {
|
|
1260
|
-
var _a;
|
|
1261
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsResponse);
|
|
1262
|
-
message.tokenGroupMappings = Object.entries((_a = object.tokenGroupMappings) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
1263
|
-
acc[key] = long_1.default.fromString(value);
|
|
1264
|
-
return acc;
|
|
1265
|
-
}, {});
|
|
1266
|
-
message.pagination =
|
|
1267
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1268
|
-
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
1269
|
-
: undefined;
|
|
1270
|
-
return message;
|
|
1271
|
-
},
|
|
1272
|
-
toJSON(message) {
|
|
1273
|
-
const obj = {};
|
|
1274
|
-
obj.tokenGroupMappings = {};
|
|
1275
|
-
if (message.tokenGroupMappings) {
|
|
1276
|
-
Object.entries(message.tokenGroupMappings).forEach(([k, v]) => {
|
|
1277
|
-
obj.tokenGroupMappings[k] = v.toString();
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
message.pagination !== undefined &&
|
|
1281
|
-
(obj.pagination = message.pagination
|
|
1282
|
-
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
1283
|
-
: undefined);
|
|
1284
|
-
return obj;
|
|
1285
|
-
},
|
|
1286
|
-
fromPartial(object) {
|
|
1287
|
-
var _a;
|
|
1288
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsResponse);
|
|
1289
|
-
message.tokenGroupMappings = Object.entries((_a = object.tokenGroupMappings) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
1290
|
-
if (value !== undefined) {
|
|
1291
|
-
acc[key] = long_1.default.fromValue(value);
|
|
1292
|
-
}
|
|
1293
|
-
return acc;
|
|
1294
|
-
}, {});
|
|
1295
|
-
message.pagination =
|
|
1296
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1297
|
-
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
1298
|
-
: undefined;
|
|
1299
|
-
return message;
|
|
1300
|
-
},
|
|
1301
|
-
};
|
|
1302
|
-
const baseQueryTokenGroupMappingsResponse_TokenGroupMappingsEntry = {
|
|
1303
|
-
key: "",
|
|
1304
|
-
value: long_1.default.UZERO,
|
|
1305
|
-
};
|
|
1306
|
-
exports.QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry = {
|
|
1307
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1308
|
-
if (message.key !== "") {
|
|
1309
|
-
writer.uint32(10).string(message.key);
|
|
1310
|
-
}
|
|
1311
|
-
if (!message.value.isZero()) {
|
|
1312
|
-
writer.uint32(16).uint64(message.value);
|
|
1313
|
-
}
|
|
1314
|
-
return writer;
|
|
1315
|
-
},
|
|
1316
|
-
decode(input, length) {
|
|
1317
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1318
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1319
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsResponse_TokenGroupMappingsEntry);
|
|
1320
|
-
while (reader.pos < end) {
|
|
1321
|
-
const tag = reader.uint32();
|
|
1322
|
-
switch (tag >>> 3) {
|
|
1323
|
-
case 1:
|
|
1324
|
-
message.key = reader.string();
|
|
1325
|
-
break;
|
|
1326
|
-
case 2:
|
|
1327
|
-
message.value = reader.uint64();
|
|
1328
|
-
break;
|
|
1329
|
-
default:
|
|
1330
|
-
reader.skipType(tag & 7);
|
|
1331
|
-
break;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
return message;
|
|
1335
|
-
},
|
|
1336
|
-
fromJSON(object) {
|
|
1337
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsResponse_TokenGroupMappingsEntry);
|
|
1338
|
-
message.key =
|
|
1339
|
-
object.key !== undefined && object.key !== null ? String(object.key) : "";
|
|
1340
|
-
message.value =
|
|
1341
|
-
object.value !== undefined && object.value !== null
|
|
1342
|
-
? long_1.default.fromString(object.value)
|
|
1343
|
-
: long_1.default.UZERO;
|
|
1344
|
-
return message;
|
|
1345
|
-
},
|
|
1346
|
-
toJSON(message) {
|
|
1347
|
-
const obj = {};
|
|
1348
|
-
message.key !== undefined && (obj.key = message.key);
|
|
1349
|
-
message.value !== undefined &&
|
|
1350
|
-
(obj.value = (message.value || long_1.default.UZERO).toString());
|
|
1351
|
-
return obj;
|
|
1352
|
-
},
|
|
1353
|
-
fromPartial(object) {
|
|
1354
|
-
var _a;
|
|
1355
|
-
const message = Object.assign({}, baseQueryTokenGroupMappingsResponse_TokenGroupMappingsEntry);
|
|
1356
|
-
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
1357
|
-
message.value =
|
|
1358
|
-
object.value !== undefined && object.value !== null
|
|
1359
|
-
? long_1.default.fromValue(object.value)
|
|
1360
|
-
: long_1.default.UZERO;
|
|
1361
|
-
return message;
|
|
1362
|
-
},
|
|
1363
|
-
};
|
|
1364
961
|
class QueryClientImpl {
|
|
1365
962
|
constructor(rpc) {
|
|
1366
963
|
this.rpc = rpc;
|
|
@@ -1372,9 +969,6 @@ class QueryClientImpl {
|
|
|
1372
969
|
this.BalancesTotal = this.BalancesTotal.bind(this);
|
|
1373
970
|
this.Bridge = this.Bridge.bind(this);
|
|
1374
971
|
this.BridgeAll = this.BridgeAll.bind(this);
|
|
1375
|
-
this.TokenGroup = this.TokenGroup.bind(this);
|
|
1376
|
-
this.TokenGroupAll = this.TokenGroupAll.bind(this);
|
|
1377
|
-
this.TokenGroupMappings = this.TokenGroupMappings.bind(this);
|
|
1378
972
|
}
|
|
1379
973
|
Token(request) {
|
|
1380
974
|
const data = exports.QueryGetTokenRequest.encode(request).finish();
|
|
@@ -1416,21 +1010,6 @@ class QueryClientImpl {
|
|
|
1416
1010
|
const promise = this.rpc.request("Switcheo.carbon.coin.Query", "BridgeAll", data);
|
|
1417
1011
|
return promise.then((data) => exports.QueryAllBridgeResponse.decode(new minimal_1.default.Reader(data)));
|
|
1418
1012
|
}
|
|
1419
|
-
TokenGroup(request) {
|
|
1420
|
-
const data = exports.QueryGetTokenGroupRequest.encode(request).finish();
|
|
1421
|
-
const promise = this.rpc.request("Switcheo.carbon.coin.Query", "TokenGroup", data);
|
|
1422
|
-
return promise.then((data) => exports.QueryGetTokenGroupResponse.decode(new minimal_1.default.Reader(data)));
|
|
1423
|
-
}
|
|
1424
|
-
TokenGroupAll(request) {
|
|
1425
|
-
const data = exports.QueryAllTokenGroupsRequest.encode(request).finish();
|
|
1426
|
-
const promise = this.rpc.request("Switcheo.carbon.coin.Query", "TokenGroupAll", data);
|
|
1427
|
-
return promise.then((data) => exports.QueryAllTokenGroupsResponse.decode(new minimal_1.default.Reader(data)));
|
|
1428
|
-
}
|
|
1429
|
-
TokenGroupMappings(request) {
|
|
1430
|
-
const data = exports.QueryTokenGroupMappingsRequest.encode(request).finish();
|
|
1431
|
-
const promise = this.rpc.request("Switcheo.carbon.coin.Query", "TokenGroupMappings", data);
|
|
1432
|
-
return promise.then((data) => exports.QueryTokenGroupMappingsResponse.decode(new minimal_1.default.Reader(data)));
|
|
1433
|
-
}
|
|
1434
1013
|
}
|
|
1435
1014
|
exports.QueryClientImpl = QueryClientImpl;
|
|
1436
1015
|
if (minimal_1.default.util.Long !== long_1.default) {
|