carbon-js-sdk 0.9.1-rc5 → 0.9.2

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.
Files changed (36) hide show
  1. package/lib/clients/InsightsQueryClient.d.ts +4 -0
  2. package/lib/clients/InsightsQueryClient.js +34 -1
  3. package/lib/codec/cosmos/circuit/module/v1/module.d.ts +20 -0
  4. package/lib/codec/cosmos/circuit/module/v1/module.js +59 -0
  5. package/lib/codec/cosmos/circuit/v1/query.d.ts +97 -0
  6. package/lib/codec/cosmos/circuit/v1/query.js +333 -0
  7. package/lib/codec/cosmos/circuit/v1/tx.d.ts +128 -0
  8. package/lib/codec/cosmos/circuit/v1/tx.js +371 -0
  9. package/lib/codec/cosmos/circuit/v1/types.d.ts +81 -0
  10. package/lib/codec/cosmos/circuit/v1/types.js +266 -0
  11. package/lib/codec/cosmos/msg/textual/v1/textual.d.ts +1 -0
  12. package/lib/codec/cosmos/msg/textual/v1/textual.js +14 -0
  13. package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.d.ts +31 -0
  14. package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.js +154 -0
  15. package/lib/codec/cosmos/store/snapshots/v1/snapshot.d.ts +119 -0
  16. package/lib/codec/cosmos/store/snapshots/v1/snapshot.js +540 -0
  17. package/lib/codec/cosmos/store/streaming/abci/grpc.d.ts +72 -0
  18. package/lib/codec/cosmos/store/streaming/abci/grpc.js +247 -0
  19. package/lib/codec/cosmos/store/v1beta1/commit_info.d.ts +54 -0
  20. package/lib/codec/cosmos/store/v1beta1/commit_info.js +273 -0
  21. package/lib/codec/cosmos/store/v1beta1/listening.d.ts +48 -0
  22. package/lib/codec/cosmos/store/v1beta1/listening.js +220 -0
  23. package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.d.ts +50 -0
  24. package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.js +120 -0
  25. package/lib/insights/common.d.ts +4 -0
  26. package/lib/insights/common.js +4 -0
  27. package/lib/insights/pool.d.ts +14 -0
  28. package/lib/insights/user.d.ts +36 -0
  29. package/lib/modules/alliance.js +4 -22
  30. package/lib/util/alliance.d.ts +2 -0
  31. package/lib/util/alliance.js +27 -0
  32. package/lib/util/index.d.ts +1 -0
  33. package/lib/util/index.js +2 -1
  34. package/lib/wallet/CarbonWallet.d.ts +1 -0
  35. package/lib/wallet/CarbonWallet.js +5 -1
  36. package/package.json +1 -1
@@ -15,9 +15,13 @@ declare class InsightsQueryClient {
15
15
  UserGrowth(req?: Insights.QueryGetUserGrowthRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserGrowthResponse>>;
16
16
  UserVolume(req: Insights.QueryGetUserVolumePathParams, query: Insights.QueryGetUserVolumeQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserVolumeResponse>>;
17
17
  TotalUsers(req?: Insights.QueryGetTotalUsersRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetTotalUsersResponse>>;
18
+ UserPnl(req: Insights.QueryGetUserPnlPathParams, query: Insights.QueryGetUserPnlGraphQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserPnlResponse>>;
19
+ UserBalanceGraph(req: Insights.QueryGetUserBalanceGraphPathParams, query: Insights.QueryGetUserBalanceGraphQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserBalanceGraphResponse>>;
20
+ UserPnlGraph(req: Insights.QueryGetUserPnlGraphPathParams, query: Insights.QueryGetUserPnlGraphQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetUserPnlGraphResponse>>;
18
21
  Pools(req?: Insights.QueryGetPoolsRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsResponse>>;
19
22
  PoolHistory(query: Insights.QueryGetPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolHistoryResponse>>;
20
23
  PerpPoolHistory(query: Insights.QueryGetPerpPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPerpPoolHistoryResponse>>;
24
+ PerpPool7DApy(query: Insights.QueryPerpPool7DaysAPY): Promise<Insights.InsightsQueryResponse<Insights.QueryPerpPool7DaysAPYResponse>>;
21
25
  PoolVolume(req: Insights.QueryGetPoolVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolVolumeResponse>>;
22
26
  PoolsVolume(req?: Insights.QueryGetPoolsVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsVolumeResponse>>;
23
27
  UserRewardsClaimHistory(req: Insights.QueryGetUserRewardsClaimHistoryRequest): Promise<InsightsQueryResponse<Insights.QueryGetUserRewardsClaimHistoryResponse>>;
@@ -114,7 +114,28 @@ class InsightsQueryClient {
114
114
  }
115
115
  TotalUsers(req = {}) {
116
116
  return __awaiter(this, void 0, void 0, function* () {
117
- const request = this.apiManager.path("user/total", {}, req);
117
+ const request = this.apiManager.path("user/total", req, {});
118
+ const response = yield request.get();
119
+ return response.data;
120
+ });
121
+ }
122
+ UserPnl(req, query) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ const request = this.apiManager.path("user/pnl", req, query);
125
+ const response = yield request.get();
126
+ return response.data;
127
+ });
128
+ }
129
+ UserBalanceGraph(req, query) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ const request = this.apiManager.path("user/balance/graph", req, query);
132
+ const response = yield request.get();
133
+ return response.data;
134
+ });
135
+ }
136
+ UserPnlGraph(req, query) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const request = this.apiManager.path("user/pnl/graph", req, query);
118
139
  const response = yield request.get();
119
140
  return response.data;
120
141
  });
@@ -152,6 +173,18 @@ class InsightsQueryClient {
152
173
  return response.data;
153
174
  });
154
175
  }
176
+ PerpPool7DApy(query) {
177
+ var _a, _b;
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ const routeParams = { id: query.id };
180
+ const request = this.apiManager.path("pool/perp/apy", routeParams, {
181
+ limit: (_a = query.limit) !== null && _a !== void 0 ? _a : 10,
182
+ offset: (_b = query.offset) !== null && _b !== void 0 ? _b : 0,
183
+ });
184
+ const response = yield request.get();
185
+ return response.data;
186
+ });
187
+ }
155
188
  PoolVolume(req) {
156
189
  return __awaiter(this, void 0, void 0, function* () {
157
190
  const routeParams = { poolId: req.poolId };
@@ -0,0 +1,20 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ export declare const protobufPackage = "cosmos.circuit.module.v1";
4
+ /** Module is the config object of the circuit module. */
5
+ export interface Module {
6
+ /** authority defines the custom module authority. If not set, defaults to the governance module. */
7
+ authority: string;
8
+ }
9
+ export declare const Module: {
10
+ encode(message: Module, writer?: _m0.Writer): _m0.Writer;
11
+ decode(input: _m0.Reader | Uint8Array, length?: number): Module;
12
+ fromJSON(object: any): Module;
13
+ toJSON(message: Module): unknown;
14
+ fromPartial(object: DeepPartial<Module>): Module;
15
+ };
16
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
17
+ export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
18
+ [K in keyof T]?: DeepPartial<T[K]>;
19
+ } : Partial<T>;
20
+ export {};
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Module = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "cosmos.circuit.module.v1";
11
+ const baseModule = { authority: "" };
12
+ exports.Module = {
13
+ encode(message, writer = minimal_1.default.Writer.create()) {
14
+ if (message.authority !== "") {
15
+ writer.uint32(10).string(message.authority);
16
+ }
17
+ return writer;
18
+ },
19
+ decode(input, length) {
20
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
21
+ let end = length === undefined ? reader.len : reader.pos + length;
22
+ const message = Object.assign({}, baseModule);
23
+ while (reader.pos < end) {
24
+ const tag = reader.uint32();
25
+ switch (tag >>> 3) {
26
+ case 1:
27
+ message.authority = reader.string();
28
+ break;
29
+ default:
30
+ reader.skipType(tag & 7);
31
+ break;
32
+ }
33
+ }
34
+ return message;
35
+ },
36
+ fromJSON(object) {
37
+ const message = Object.assign({}, baseModule);
38
+ message.authority =
39
+ object.authority !== undefined && object.authority !== null
40
+ ? String(object.authority)
41
+ : "";
42
+ return message;
43
+ },
44
+ toJSON(message) {
45
+ const obj = {};
46
+ message.authority !== undefined && (obj.authority = message.authority);
47
+ return obj;
48
+ },
49
+ fromPartial(object) {
50
+ var _a;
51
+ const message = Object.assign({}, baseModule);
52
+ message.authority = (_a = object.authority) !== null && _a !== void 0 ? _a : "";
53
+ return message;
54
+ },
55
+ };
56
+ if (minimal_1.default.util.Long !== long_1.default) {
57
+ minimal_1.default.util.Long = long_1.default;
58
+ minimal_1.default.configure();
59
+ }
@@ -0,0 +1,97 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ import { Permissions, GenesisAccountPermissions } from "./types";
4
+ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
5
+ export declare const protobufPackage = "cosmos.circuit.v1";
6
+ /** QueryAccountRequest is the request type for the Query/Account RPC method. */
7
+ export interface QueryAccountRequest {
8
+ address: string;
9
+ }
10
+ /** AccountResponse is the response type for the Query/Account RPC method. */
11
+ export interface AccountResponse {
12
+ permission?: Permissions;
13
+ }
14
+ /** QueryAccountsRequest is the request type for the Query/Accounts RPC method. */
15
+ export interface QueryAccountsRequest {
16
+ /** pagination defines an optional pagination for the request. */
17
+ pagination?: PageRequest;
18
+ }
19
+ /** AccountsResponse is the response type for the Query/Accounts RPC method. */
20
+ export interface AccountsResponse {
21
+ accounts: GenesisAccountPermissions[];
22
+ /** pagination defines the pagination in the response. */
23
+ pagination?: PageResponse;
24
+ }
25
+ /** QueryDisableListRequest is the request type for the Query/DisabledList RPC method. */
26
+ export interface QueryDisabledListRequest {
27
+ }
28
+ /** DisabledListResponse is the response type for the Query/DisabledList RPC method. */
29
+ export interface DisabledListResponse {
30
+ disabledList: string[];
31
+ }
32
+ export declare const QueryAccountRequest: {
33
+ encode(message: QueryAccountRequest, writer?: _m0.Writer): _m0.Writer;
34
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountRequest;
35
+ fromJSON(object: any): QueryAccountRequest;
36
+ toJSON(message: QueryAccountRequest): unknown;
37
+ fromPartial(object: DeepPartial<QueryAccountRequest>): QueryAccountRequest;
38
+ };
39
+ export declare const AccountResponse: {
40
+ encode(message: AccountResponse, writer?: _m0.Writer): _m0.Writer;
41
+ decode(input: _m0.Reader | Uint8Array, length?: number): AccountResponse;
42
+ fromJSON(object: any): AccountResponse;
43
+ toJSON(message: AccountResponse): unknown;
44
+ fromPartial(object: DeepPartial<AccountResponse>): AccountResponse;
45
+ };
46
+ export declare const QueryAccountsRequest: {
47
+ encode(message: QueryAccountsRequest, writer?: _m0.Writer): _m0.Writer;
48
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest;
49
+ fromJSON(object: any): QueryAccountsRequest;
50
+ toJSON(message: QueryAccountsRequest): unknown;
51
+ fromPartial(object: DeepPartial<QueryAccountsRequest>): QueryAccountsRequest;
52
+ };
53
+ export declare const AccountsResponse: {
54
+ encode(message: AccountsResponse, writer?: _m0.Writer): _m0.Writer;
55
+ decode(input: _m0.Reader | Uint8Array, length?: number): AccountsResponse;
56
+ fromJSON(object: any): AccountsResponse;
57
+ toJSON(message: AccountsResponse): unknown;
58
+ fromPartial(object: DeepPartial<AccountsResponse>): AccountsResponse;
59
+ };
60
+ export declare const QueryDisabledListRequest: {
61
+ encode(_: QueryDisabledListRequest, writer?: _m0.Writer): _m0.Writer;
62
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDisabledListRequest;
63
+ fromJSON(_: any): QueryDisabledListRequest;
64
+ toJSON(_: QueryDisabledListRequest): unknown;
65
+ fromPartial(_: DeepPartial<QueryDisabledListRequest>): QueryDisabledListRequest;
66
+ };
67
+ export declare const DisabledListResponse: {
68
+ encode(message: DisabledListResponse, writer?: _m0.Writer): _m0.Writer;
69
+ decode(input: _m0.Reader | Uint8Array, length?: number): DisabledListResponse;
70
+ fromJSON(object: any): DisabledListResponse;
71
+ toJSON(message: DisabledListResponse): unknown;
72
+ fromPartial(object: DeepPartial<DisabledListResponse>): DisabledListResponse;
73
+ };
74
+ /** Query defines the circuit gRPC querier service. */
75
+ export interface Query {
76
+ /** Account returns account permissions. */
77
+ Account(request: QueryAccountRequest): Promise<AccountResponse>;
78
+ /** Account returns account permissions. */
79
+ Accounts(request: QueryAccountsRequest): Promise<AccountsResponse>;
80
+ /** DisabledList returns a list of disabled message urls */
81
+ DisabledList(request: QueryDisabledListRequest): Promise<DisabledListResponse>;
82
+ }
83
+ export declare class QueryClientImpl implements Query {
84
+ private readonly rpc;
85
+ constructor(rpc: Rpc);
86
+ Account(request: QueryAccountRequest): Promise<AccountResponse>;
87
+ Accounts(request: QueryAccountsRequest): Promise<AccountsResponse>;
88
+ DisabledList(request: QueryDisabledListRequest): Promise<DisabledListResponse>;
89
+ }
90
+ interface Rpc {
91
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
92
+ }
93
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
94
+ export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
95
+ [K in keyof T]?: DeepPartial<T[K]>;
96
+ } : Partial<T>;
97
+ export {};
@@ -0,0 +1,333 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.QueryClientImpl = exports.DisabledListResponse = exports.QueryDisabledListRequest = exports.AccountsResponse = exports.QueryAccountsRequest = exports.AccountResponse = exports.QueryAccountRequest = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ const types_1 = require("./types");
11
+ const pagination_1 = require("../../base/query/v1beta1/pagination");
12
+ exports.protobufPackage = "cosmos.circuit.v1";
13
+ const baseQueryAccountRequest = { address: "" };
14
+ exports.QueryAccountRequest = {
15
+ encode(message, writer = minimal_1.default.Writer.create()) {
16
+ if (message.address !== "") {
17
+ writer.uint32(10).string(message.address);
18
+ }
19
+ return writer;
20
+ },
21
+ decode(input, length) {
22
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
23
+ let end = length === undefined ? reader.len : reader.pos + length;
24
+ const message = Object.assign({}, baseQueryAccountRequest);
25
+ while (reader.pos < end) {
26
+ const tag = reader.uint32();
27
+ switch (tag >>> 3) {
28
+ case 1:
29
+ message.address = reader.string();
30
+ break;
31
+ default:
32
+ reader.skipType(tag & 7);
33
+ break;
34
+ }
35
+ }
36
+ return message;
37
+ },
38
+ fromJSON(object) {
39
+ const message = Object.assign({}, baseQueryAccountRequest);
40
+ message.address =
41
+ object.address !== undefined && object.address !== null
42
+ ? String(object.address)
43
+ : "";
44
+ return message;
45
+ },
46
+ toJSON(message) {
47
+ const obj = {};
48
+ message.address !== undefined && (obj.address = message.address);
49
+ return obj;
50
+ },
51
+ fromPartial(object) {
52
+ var _a;
53
+ const message = Object.assign({}, baseQueryAccountRequest);
54
+ message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
55
+ return message;
56
+ },
57
+ };
58
+ const baseAccountResponse = {};
59
+ exports.AccountResponse = {
60
+ encode(message, writer = minimal_1.default.Writer.create()) {
61
+ if (message.permission !== undefined) {
62
+ types_1.Permissions.encode(message.permission, writer.uint32(10).fork()).ldelim();
63
+ }
64
+ return writer;
65
+ },
66
+ decode(input, length) {
67
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
68
+ let end = length === undefined ? reader.len : reader.pos + length;
69
+ const message = Object.assign({}, baseAccountResponse);
70
+ while (reader.pos < end) {
71
+ const tag = reader.uint32();
72
+ switch (tag >>> 3) {
73
+ case 1:
74
+ message.permission = types_1.Permissions.decode(reader, reader.uint32());
75
+ break;
76
+ default:
77
+ reader.skipType(tag & 7);
78
+ break;
79
+ }
80
+ }
81
+ return message;
82
+ },
83
+ fromJSON(object) {
84
+ const message = Object.assign({}, baseAccountResponse);
85
+ message.permission =
86
+ object.permission !== undefined && object.permission !== null
87
+ ? types_1.Permissions.fromJSON(object.permission)
88
+ : undefined;
89
+ return message;
90
+ },
91
+ toJSON(message) {
92
+ const obj = {};
93
+ message.permission !== undefined &&
94
+ (obj.permission = message.permission
95
+ ? types_1.Permissions.toJSON(message.permission)
96
+ : undefined);
97
+ return obj;
98
+ },
99
+ fromPartial(object) {
100
+ const message = Object.assign({}, baseAccountResponse);
101
+ message.permission =
102
+ object.permission !== undefined && object.permission !== null
103
+ ? types_1.Permissions.fromPartial(object.permission)
104
+ : undefined;
105
+ return message;
106
+ },
107
+ };
108
+ const baseQueryAccountsRequest = {};
109
+ exports.QueryAccountsRequest = {
110
+ encode(message, writer = minimal_1.default.Writer.create()) {
111
+ if (message.pagination !== undefined) {
112
+ pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
113
+ }
114
+ return writer;
115
+ },
116
+ decode(input, length) {
117
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
118
+ let end = length === undefined ? reader.len : reader.pos + length;
119
+ const message = Object.assign({}, baseQueryAccountsRequest);
120
+ while (reader.pos < end) {
121
+ const tag = reader.uint32();
122
+ switch (tag >>> 3) {
123
+ case 1:
124
+ message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
125
+ break;
126
+ default:
127
+ reader.skipType(tag & 7);
128
+ break;
129
+ }
130
+ }
131
+ return message;
132
+ },
133
+ fromJSON(object) {
134
+ const message = Object.assign({}, baseQueryAccountsRequest);
135
+ message.pagination =
136
+ object.pagination !== undefined && object.pagination !== null
137
+ ? pagination_1.PageRequest.fromJSON(object.pagination)
138
+ : undefined;
139
+ return message;
140
+ },
141
+ toJSON(message) {
142
+ const obj = {};
143
+ message.pagination !== undefined &&
144
+ (obj.pagination = message.pagination
145
+ ? pagination_1.PageRequest.toJSON(message.pagination)
146
+ : undefined);
147
+ return obj;
148
+ },
149
+ fromPartial(object) {
150
+ const message = Object.assign({}, baseQueryAccountsRequest);
151
+ message.pagination =
152
+ object.pagination !== undefined && object.pagination !== null
153
+ ? pagination_1.PageRequest.fromPartial(object.pagination)
154
+ : undefined;
155
+ return message;
156
+ },
157
+ };
158
+ const baseAccountsResponse = {};
159
+ exports.AccountsResponse = {
160
+ encode(message, writer = minimal_1.default.Writer.create()) {
161
+ for (const v of message.accounts) {
162
+ types_1.GenesisAccountPermissions.encode(v, writer.uint32(10).fork()).ldelim();
163
+ }
164
+ if (message.pagination !== undefined) {
165
+ pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
166
+ }
167
+ return writer;
168
+ },
169
+ decode(input, length) {
170
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
171
+ let end = length === undefined ? reader.len : reader.pos + length;
172
+ const message = Object.assign({}, baseAccountsResponse);
173
+ message.accounts = [];
174
+ while (reader.pos < end) {
175
+ const tag = reader.uint32();
176
+ switch (tag >>> 3) {
177
+ case 1:
178
+ message.accounts.push(types_1.GenesisAccountPermissions.decode(reader, reader.uint32()));
179
+ break;
180
+ case 2:
181
+ message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
182
+ break;
183
+ default:
184
+ reader.skipType(tag & 7);
185
+ break;
186
+ }
187
+ }
188
+ return message;
189
+ },
190
+ fromJSON(object) {
191
+ var _a;
192
+ const message = Object.assign({}, baseAccountsResponse);
193
+ message.accounts = ((_a = object.accounts) !== null && _a !== void 0 ? _a : []).map((e) => types_1.GenesisAccountPermissions.fromJSON(e));
194
+ message.pagination =
195
+ object.pagination !== undefined && object.pagination !== null
196
+ ? pagination_1.PageResponse.fromJSON(object.pagination)
197
+ : undefined;
198
+ return message;
199
+ },
200
+ toJSON(message) {
201
+ const obj = {};
202
+ if (message.accounts) {
203
+ obj.accounts = message.accounts.map((e) => e ? types_1.GenesisAccountPermissions.toJSON(e) : undefined);
204
+ }
205
+ else {
206
+ obj.accounts = [];
207
+ }
208
+ message.pagination !== undefined &&
209
+ (obj.pagination = message.pagination
210
+ ? pagination_1.PageResponse.toJSON(message.pagination)
211
+ : undefined);
212
+ return obj;
213
+ },
214
+ fromPartial(object) {
215
+ var _a;
216
+ const message = Object.assign({}, baseAccountsResponse);
217
+ message.accounts = ((_a = object.accounts) !== null && _a !== void 0 ? _a : []).map((e) => types_1.GenesisAccountPermissions.fromPartial(e));
218
+ message.pagination =
219
+ object.pagination !== undefined && object.pagination !== null
220
+ ? pagination_1.PageResponse.fromPartial(object.pagination)
221
+ : undefined;
222
+ return message;
223
+ },
224
+ };
225
+ const baseQueryDisabledListRequest = {};
226
+ exports.QueryDisabledListRequest = {
227
+ encode(_, writer = minimal_1.default.Writer.create()) {
228
+ return writer;
229
+ },
230
+ decode(input, length) {
231
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
232
+ let end = length === undefined ? reader.len : reader.pos + length;
233
+ const message = Object.assign({}, baseQueryDisabledListRequest);
234
+ while (reader.pos < end) {
235
+ const tag = reader.uint32();
236
+ switch (tag >>> 3) {
237
+ default:
238
+ reader.skipType(tag & 7);
239
+ break;
240
+ }
241
+ }
242
+ return message;
243
+ },
244
+ fromJSON(_) {
245
+ const message = Object.assign({}, baseQueryDisabledListRequest);
246
+ return message;
247
+ },
248
+ toJSON(_) {
249
+ const obj = {};
250
+ return obj;
251
+ },
252
+ fromPartial(_) {
253
+ const message = Object.assign({}, baseQueryDisabledListRequest);
254
+ return message;
255
+ },
256
+ };
257
+ const baseDisabledListResponse = { disabledList: "" };
258
+ exports.DisabledListResponse = {
259
+ encode(message, writer = minimal_1.default.Writer.create()) {
260
+ for (const v of message.disabledList) {
261
+ writer.uint32(10).string(v);
262
+ }
263
+ return writer;
264
+ },
265
+ decode(input, length) {
266
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
267
+ let end = length === undefined ? reader.len : reader.pos + length;
268
+ const message = Object.assign({}, baseDisabledListResponse);
269
+ message.disabledList = [];
270
+ while (reader.pos < end) {
271
+ const tag = reader.uint32();
272
+ switch (tag >>> 3) {
273
+ case 1:
274
+ message.disabledList.push(reader.string());
275
+ break;
276
+ default:
277
+ reader.skipType(tag & 7);
278
+ break;
279
+ }
280
+ }
281
+ return message;
282
+ },
283
+ fromJSON(object) {
284
+ var _a;
285
+ const message = Object.assign({}, baseDisabledListResponse);
286
+ message.disabledList = ((_a = object.disabledList) !== null && _a !== void 0 ? _a : []).map((e) => String(e));
287
+ return message;
288
+ },
289
+ toJSON(message) {
290
+ const obj = {};
291
+ if (message.disabledList) {
292
+ obj.disabledList = message.disabledList.map((e) => e);
293
+ }
294
+ else {
295
+ obj.disabledList = [];
296
+ }
297
+ return obj;
298
+ },
299
+ fromPartial(object) {
300
+ var _a;
301
+ const message = Object.assign({}, baseDisabledListResponse);
302
+ message.disabledList = ((_a = object.disabledList) !== null && _a !== void 0 ? _a : []).map((e) => e);
303
+ return message;
304
+ },
305
+ };
306
+ class QueryClientImpl {
307
+ constructor(rpc) {
308
+ this.rpc = rpc;
309
+ this.Account = this.Account.bind(this);
310
+ this.Accounts = this.Accounts.bind(this);
311
+ this.DisabledList = this.DisabledList.bind(this);
312
+ }
313
+ Account(request) {
314
+ const data = exports.QueryAccountRequest.encode(request).finish();
315
+ const promise = this.rpc.request("cosmos.circuit.v1.Query", "Account", data);
316
+ return promise.then((data) => exports.AccountResponse.decode(new minimal_1.default.Reader(data)));
317
+ }
318
+ Accounts(request) {
319
+ const data = exports.QueryAccountsRequest.encode(request).finish();
320
+ const promise = this.rpc.request("cosmos.circuit.v1.Query", "Accounts", data);
321
+ return promise.then((data) => exports.AccountsResponse.decode(new minimal_1.default.Reader(data)));
322
+ }
323
+ DisabledList(request) {
324
+ const data = exports.QueryDisabledListRequest.encode(request).finish();
325
+ const promise = this.rpc.request("cosmos.circuit.v1.Query", "DisabledList", data);
326
+ return promise.then((data) => exports.DisabledListResponse.decode(new minimal_1.default.Reader(data)));
327
+ }
328
+ }
329
+ exports.QueryClientImpl = QueryClientImpl;
330
+ if (minimal_1.default.util.Long !== long_1.default) {
331
+ minimal_1.default.util.Long = long_1.default;
332
+ minimal_1.default.configure();
333
+ }