carbon-js-sdk 0.6.2 → 0.6.3
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/CarbonSDK.d.ts +1 -0
- package/lib/CarbonSDK.js +8 -6
- package/lib/clients/BatchQueryClient.js +4 -4
- package/lib/clients/CarbonQueryClient.js +1 -1
- package/lib/clients/ETHClient.d.ts +1 -0
- package/lib/clients/ETHClient.js +17 -17
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/InsightsQueryClient.js +3 -3
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/TokenClient.js +2 -2
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/book/book.d.ts +14 -2
- package/lib/codec/book/book.js +80 -13
- package/lib/codec/book/legacy.d.ts +22 -0
- package/lib/codec/book/legacy.js +120 -0
- package/lib/codec/book/query.d.ts +48 -1
- package/lib/codec/book/query.js +224 -1
- package/lib/codec/cdp/event.d.ts +12 -6
- package/lib/codec/cdp/event.js +146 -68
- package/lib/codec/cdp/params.d.ts +0 -2
- package/lib/codec/cdp/params.js +8 -23
- package/lib/codec/cdp/query.d.ts +22 -1
- package/lib/codec/cdp/query.js +104 -17
- package/lib/codec/cosmos/gov/v1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1/tx.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/group/v1/events.js +2 -2
- package/lib/codec/cosmos/group/v1/tx.js +4 -4
- package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
- package/lib/codec/index.d.ts +11 -9
- package/lib/codec/index.js +405 -133
- package/lib/codec/liquiditypool/event.d.ts +25 -1
- package/lib/codec/liquiditypool/event.js +147 -1
- package/lib/codec/liquiditypool/genesis.d.ts +4 -5
- package/lib/codec/liquiditypool/genesis.js +34 -49
- package/lib/codec/liquiditypool/query.d.ts +2 -51
- package/lib/codec/liquiditypool/query.js +18 -265
- package/lib/codec/liquiditypool/reward.d.ts +21 -21
- package/lib/codec/liquiditypool/reward.js +97 -111
- package/lib/codec/oracle/query.d.ts +37 -34
- package/lib/codec/oracle/query.js +37 -31
- package/lib/codec/position/position.d.ts +2 -0
- package/lib/codec/position/position.js +34 -0
- package/lib/codec/subaccount/genesis.d.ts +5 -1
- package/lib/codec/subaccount/genesis.js +48 -2
- package/lib/codec/subaccount/query.d.ts +110 -21
- package/lib/codec/subaccount/query.js +503 -47
- package/lib/codec/subaccount/subaccount.d.ts +29 -3
- package/lib/codec/subaccount/subaccount.js +234 -31
- package/lib/codec/subaccount/tx.d.ts +7 -1
- package/lib/codec/subaccount/tx.js +101 -16
- package/lib/constant/generic.js +1 -1
- package/lib/modules/cdp.js +45 -45
- package/lib/modules/cosmwasm.js +2 -2
- package/lib/modules/evm.js +5 -5
- package/lib/modules/gov.js +12 -12
- package/lib/modules/liquiditypool.js +1 -1
- package/lib/modules/order.js +2 -2
- package/lib/modules/subaccount.js +1 -1
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/amino/types/admin.js +27 -27
- package/lib/provider/amino/types/bank.js +1 -1
- package/lib/provider/amino/types/broker.js +1 -1
- package/lib/provider/amino/types/cdp.js +25 -25
- package/lib/provider/amino/types/coin.js +4 -4
- package/lib/provider/amino/types/evm.js +2 -2
- package/lib/provider/amino/types/evmmerge.js +1 -1
- package/lib/provider/amino/types/feemarket.js +1 -1
- package/lib/provider/amino/types/gov.js +5 -5
- package/lib/provider/amino/types/ibc.js +1 -1
- package/lib/provider/amino/types/leverage.js +1 -1
- package/lib/provider/amino/types/liquidityPool.js +7 -7
- package/lib/provider/amino/types/market.js +6 -6
- package/lib/provider/amino/types/oracle.js +2 -2
- package/lib/provider/amino/types/order.js +4 -4
- package/lib/provider/amino/types/position.js +1 -1
- package/lib/provider/amino/types/profile.js +1 -1
- package/lib/provider/amino/types/staking.js +4 -4
- package/lib/provider/amino/types/subaccount.js +3 -3
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/keplr/KeplrAccount.js +2 -2
- package/lib/provider/ledger/ledger.js +2 -2
- package/lib/provider/metamask/MetaMask.js +13 -13
- package/lib/provider/o3/O3Wallet.js +2 -2
- package/lib/util/address.js +14 -14
- package/lib/util/api.js +4 -4
- package/lib/util/blockchain.d.ts +1 -1
- package/lib/util/blockchain.js +4 -4
- package/lib/util/eip712.js +3 -3
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +3 -3
- package/lib/util/legacyEIP712.js +2 -2
- package/lib/util/network.js +3 -3
- package/lib/util/number.js +5 -5
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +15 -15
- package/lib/wallet/CarbonWallet.js +9 -9
- package/lib/websocket/connector.js +3 -3
- package/package.json +1 -1
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.d.ts +0 -76
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.js +0 -424
|
@@ -212,6 +212,8 @@ const baseAPIPosition = {
|
|
|
212
212
|
avgExitPrice: "",
|
|
213
213
|
allocatedMargin: "",
|
|
214
214
|
lots: "",
|
|
215
|
+
updateCount: long_1.default.UZERO,
|
|
216
|
+
exitCount: long_1.default.UZERO,
|
|
215
217
|
};
|
|
216
218
|
exports.APIPosition = {
|
|
217
219
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -266,6 +268,12 @@ exports.APIPosition = {
|
|
|
266
268
|
if (message.closedAt !== undefined) {
|
|
267
269
|
timestamp_1.Timestamp.encode(toTimestamp(message.closedAt), writer.uint32(138).fork()).ldelim();
|
|
268
270
|
}
|
|
271
|
+
if (!message.updateCount.isZero()) {
|
|
272
|
+
writer.uint32(144).uint64(message.updateCount);
|
|
273
|
+
}
|
|
274
|
+
if (!message.exitCount.isZero()) {
|
|
275
|
+
writer.uint32(152).uint64(message.exitCount);
|
|
276
|
+
}
|
|
269
277
|
return writer;
|
|
270
278
|
},
|
|
271
279
|
decode(input, length) {
|
|
@@ -326,6 +334,12 @@ exports.APIPosition = {
|
|
|
326
334
|
case 17:
|
|
327
335
|
message.closedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
328
336
|
break;
|
|
337
|
+
case 18:
|
|
338
|
+
message.updateCount = reader.uint64();
|
|
339
|
+
break;
|
|
340
|
+
case 19:
|
|
341
|
+
message.exitCount = reader.uint64();
|
|
342
|
+
break;
|
|
329
343
|
default:
|
|
330
344
|
reader.skipType(tag & 7);
|
|
331
345
|
break;
|
|
@@ -407,6 +421,14 @@ exports.APIPosition = {
|
|
|
407
421
|
object.closedAt !== undefined && object.closedAt !== null
|
|
408
422
|
? fromJsonTimestamp(object.closedAt)
|
|
409
423
|
: undefined;
|
|
424
|
+
message.updateCount =
|
|
425
|
+
object.updateCount !== undefined && object.updateCount !== null
|
|
426
|
+
? long_1.default.fromString(object.updateCount)
|
|
427
|
+
: long_1.default.UZERO;
|
|
428
|
+
message.exitCount =
|
|
429
|
+
object.exitCount !== undefined && object.exitCount !== null
|
|
430
|
+
? long_1.default.fromString(object.exitCount)
|
|
431
|
+
: long_1.default.UZERO;
|
|
410
432
|
return message;
|
|
411
433
|
},
|
|
412
434
|
toJSON(message) {
|
|
@@ -440,6 +462,10 @@ exports.APIPosition = {
|
|
|
440
462
|
(obj.openedAt = message.openedAt.toISOString());
|
|
441
463
|
message.closedAt !== undefined &&
|
|
442
464
|
(obj.closedAt = message.closedAt.toISOString());
|
|
465
|
+
message.updateCount !== undefined &&
|
|
466
|
+
(obj.updateCount = (message.updateCount || long_1.default.UZERO).toString());
|
|
467
|
+
message.exitCount !== undefined &&
|
|
468
|
+
(obj.exitCount = (message.exitCount || long_1.default.UZERO).toString());
|
|
443
469
|
return obj;
|
|
444
470
|
},
|
|
445
471
|
fromPartial(object) {
|
|
@@ -477,6 +503,14 @@ exports.APIPosition = {
|
|
|
477
503
|
message.lots = (_l = object.lots) !== null && _l !== void 0 ? _l : "";
|
|
478
504
|
message.openedAt = (_m = object.openedAt) !== null && _m !== void 0 ? _m : undefined;
|
|
479
505
|
message.closedAt = (_o = object.closedAt) !== null && _o !== void 0 ? _o : undefined;
|
|
506
|
+
message.updateCount =
|
|
507
|
+
object.updateCount !== undefined && object.updateCount !== null
|
|
508
|
+
? long_1.default.fromValue(object.updateCount)
|
|
509
|
+
: long_1.default.UZERO;
|
|
510
|
+
message.exitCount =
|
|
511
|
+
object.exitCount !== undefined && object.exitCount !== null
|
|
512
|
+
? long_1.default.fromValue(object.exitCount)
|
|
513
|
+
: long_1.default.UZERO;
|
|
480
514
|
return message;
|
|
481
515
|
},
|
|
482
516
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { GenesisSubAccount } from "./subaccount";
|
|
3
|
+
import { Params, GenesisSubAccount, SubAccount, MainAccount } from "./subaccount";
|
|
4
4
|
export declare const protobufPackage = "Switcheo.carbon.subaccount";
|
|
5
5
|
/** GenesisState defines the subaccount module's genesis state. */
|
|
6
6
|
export interface GenesisState {
|
|
@@ -9,6 +9,10 @@ export interface GenesisState {
|
|
|
9
9
|
* this line is used by starport scaffolding # ibc/genesis/proto
|
|
10
10
|
*/
|
|
11
11
|
subAccounts: GenesisSubAccount[];
|
|
12
|
+
/** params defines all the paramaters of the module. */
|
|
13
|
+
params?: Params;
|
|
14
|
+
pendingSubAccounts: SubAccount[];
|
|
15
|
+
mainAccounts: MainAccount[];
|
|
12
16
|
}
|
|
13
17
|
export declare const GenesisState: {
|
|
14
18
|
encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -15,6 +15,15 @@ exports.GenesisState = {
|
|
|
15
15
|
for (const v of message.subAccounts) {
|
|
16
16
|
subaccount_1.GenesisSubAccount.encode(v, writer.uint32(10).fork()).ldelim();
|
|
17
17
|
}
|
|
18
|
+
if (message.params !== undefined) {
|
|
19
|
+
subaccount_1.Params.encode(message.params, writer.uint32(18).fork()).ldelim();
|
|
20
|
+
}
|
|
21
|
+
for (const v of message.pendingSubAccounts) {
|
|
22
|
+
subaccount_1.SubAccount.encode(v, writer.uint32(26).fork()).ldelim();
|
|
23
|
+
}
|
|
24
|
+
for (const v of message.mainAccounts) {
|
|
25
|
+
subaccount_1.MainAccount.encode(v, writer.uint32(34).fork()).ldelim();
|
|
26
|
+
}
|
|
18
27
|
return writer;
|
|
19
28
|
},
|
|
20
29
|
decode(input, length) {
|
|
@@ -22,12 +31,23 @@ exports.GenesisState = {
|
|
|
22
31
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
23
32
|
const message = Object.assign({}, baseGenesisState);
|
|
24
33
|
message.subAccounts = [];
|
|
34
|
+
message.pendingSubAccounts = [];
|
|
35
|
+
message.mainAccounts = [];
|
|
25
36
|
while (reader.pos < end) {
|
|
26
37
|
const tag = reader.uint32();
|
|
27
38
|
switch (tag >>> 3) {
|
|
28
39
|
case 1:
|
|
29
40
|
message.subAccounts.push(subaccount_1.GenesisSubAccount.decode(reader, reader.uint32()));
|
|
30
41
|
break;
|
|
42
|
+
case 2:
|
|
43
|
+
message.params = subaccount_1.Params.decode(reader, reader.uint32());
|
|
44
|
+
break;
|
|
45
|
+
case 3:
|
|
46
|
+
message.pendingSubAccounts.push(subaccount_1.SubAccount.decode(reader, reader.uint32()));
|
|
47
|
+
break;
|
|
48
|
+
case 4:
|
|
49
|
+
message.mainAccounts.push(subaccount_1.MainAccount.decode(reader, reader.uint32()));
|
|
50
|
+
break;
|
|
31
51
|
default:
|
|
32
52
|
reader.skipType(tag & 7);
|
|
33
53
|
break;
|
|
@@ -36,9 +56,15 @@ exports.GenesisState = {
|
|
|
36
56
|
return message;
|
|
37
57
|
},
|
|
38
58
|
fromJSON(object) {
|
|
39
|
-
var _a;
|
|
59
|
+
var _a, _b, _c;
|
|
40
60
|
const message = Object.assign({}, baseGenesisState);
|
|
41
61
|
message.subAccounts = ((_a = object.subAccounts) !== null && _a !== void 0 ? _a : []).map((e) => subaccount_1.GenesisSubAccount.fromJSON(e));
|
|
62
|
+
message.params =
|
|
63
|
+
object.params !== undefined && object.params !== null
|
|
64
|
+
? subaccount_1.Params.fromJSON(object.params)
|
|
65
|
+
: undefined;
|
|
66
|
+
message.pendingSubAccounts = ((_b = object.pendingSubAccounts) !== null && _b !== void 0 ? _b : []).map((e) => subaccount_1.SubAccount.fromJSON(e));
|
|
67
|
+
message.mainAccounts = ((_c = object.mainAccounts) !== null && _c !== void 0 ? _c : []).map((e) => subaccount_1.MainAccount.fromJSON(e));
|
|
42
68
|
return message;
|
|
43
69
|
},
|
|
44
70
|
toJSON(message) {
|
|
@@ -49,12 +75,32 @@ exports.GenesisState = {
|
|
|
49
75
|
else {
|
|
50
76
|
obj.subAccounts = [];
|
|
51
77
|
}
|
|
78
|
+
message.params !== undefined &&
|
|
79
|
+
(obj.params = message.params ? subaccount_1.Params.toJSON(message.params) : undefined);
|
|
80
|
+
if (message.pendingSubAccounts) {
|
|
81
|
+
obj.pendingSubAccounts = message.pendingSubAccounts.map((e) => e ? subaccount_1.SubAccount.toJSON(e) : undefined);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
obj.pendingSubAccounts = [];
|
|
85
|
+
}
|
|
86
|
+
if (message.mainAccounts) {
|
|
87
|
+
obj.mainAccounts = message.mainAccounts.map((e) => e ? subaccount_1.MainAccount.toJSON(e) : undefined);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
obj.mainAccounts = [];
|
|
91
|
+
}
|
|
52
92
|
return obj;
|
|
53
93
|
},
|
|
54
94
|
fromPartial(object) {
|
|
55
|
-
var _a;
|
|
95
|
+
var _a, _b, _c;
|
|
56
96
|
const message = Object.assign({}, baseGenesisState);
|
|
57
97
|
message.subAccounts = ((_a = object.subAccounts) !== null && _a !== void 0 ? _a : []).map((e) => subaccount_1.GenesisSubAccount.fromPartial(e));
|
|
98
|
+
message.params =
|
|
99
|
+
object.params !== undefined && object.params !== null
|
|
100
|
+
? subaccount_1.Params.fromPartial(object.params)
|
|
101
|
+
: undefined;
|
|
102
|
+
message.pendingSubAccounts = ((_b = object.pendingSubAccounts) !== null && _b !== void 0 ? _b : []).map((e) => subaccount_1.SubAccount.fromPartial(e));
|
|
103
|
+
message.mainAccounts = ((_c = object.mainAccounts) !== null && _c !== void 0 ? _c : []).map((e) => subaccount_1.MainAccount.fromPartial(e));
|
|
58
104
|
return message;
|
|
59
105
|
},
|
|
60
106
|
};
|
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { SubAccount,
|
|
3
|
+
import { SubAccount, MainAccount, Params } from "./subaccount";
|
|
4
4
|
import { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/pagination";
|
|
5
5
|
export declare const protobufPackage = "Switcheo.carbon.subaccount";
|
|
6
6
|
/** this line is used by starport scaffolding # 3 */
|
|
7
7
|
export interface QueryGetSubAccountRequest {
|
|
8
8
|
address: string;
|
|
9
|
+
role: string;
|
|
10
|
+
}
|
|
11
|
+
export interface QueryGetPendingSubAccountRequest {
|
|
12
|
+
mainAddress: string;
|
|
13
|
+
subAddress: string;
|
|
14
|
+
role: string;
|
|
9
15
|
}
|
|
10
16
|
export interface QueryGetSubAccountResponse {
|
|
11
17
|
subaccount?: SubAccount;
|
|
12
18
|
}
|
|
13
19
|
export interface QueryAllSubAccountRequest {
|
|
14
20
|
pagination?: PageRequest;
|
|
21
|
+
mainAddress: string;
|
|
15
22
|
}
|
|
16
23
|
export interface QueryAllSubAccountResponse {
|
|
17
|
-
subaccounts:
|
|
24
|
+
subaccounts: SubAccount[];
|
|
18
25
|
pagination?: PageResponse;
|
|
19
26
|
}
|
|
20
|
-
export interface
|
|
27
|
+
export interface QueryAllPendingSubAccountRequest {
|
|
28
|
+
pagination?: PageRequest;
|
|
21
29
|
mainAddress: string;
|
|
22
|
-
|
|
30
|
+
role: string;
|
|
31
|
+
subAddress: string;
|
|
23
32
|
}
|
|
24
|
-
export interface
|
|
25
|
-
|
|
33
|
+
export interface QueryAllPendingSubAccountResponse {
|
|
34
|
+
subaccounts: SubAccount[];
|
|
35
|
+
pagination?: PageResponse;
|
|
26
36
|
}
|
|
27
37
|
export interface QuerySubAccountPowerRequest {
|
|
28
38
|
address: string;
|
|
@@ -30,6 +40,24 @@ export interface QuerySubAccountPowerRequest {
|
|
|
30
40
|
export interface QuerySubAccountPowerResponse {
|
|
31
41
|
power: string;
|
|
32
42
|
}
|
|
43
|
+
export interface QueryMainAccountAllRequest {
|
|
44
|
+
subAddress: string;
|
|
45
|
+
}
|
|
46
|
+
export interface QueryMainAccountAllResponse {
|
|
47
|
+
mainAccounts: MainAccount[];
|
|
48
|
+
}
|
|
49
|
+
export interface QueryMainAccountRequest {
|
|
50
|
+
subAddress: string;
|
|
51
|
+
role: string;
|
|
52
|
+
}
|
|
53
|
+
export interface QueryMainAccountResponse {
|
|
54
|
+
mainAccount?: MainAccount;
|
|
55
|
+
}
|
|
56
|
+
export interface QueryParamsRequest {
|
|
57
|
+
}
|
|
58
|
+
export interface QueryParamsResponse {
|
|
59
|
+
params?: Params;
|
|
60
|
+
}
|
|
33
61
|
export declare const QueryGetSubAccountRequest: {
|
|
34
62
|
encode(message: QueryGetSubAccountRequest, writer?: _m0.Writer): _m0.Writer;
|
|
35
63
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGetSubAccountRequest;
|
|
@@ -37,6 +65,13 @@ export declare const QueryGetSubAccountRequest: {
|
|
|
37
65
|
toJSON(message: QueryGetSubAccountRequest): unknown;
|
|
38
66
|
fromPartial(object: DeepPartial<QueryGetSubAccountRequest>): QueryGetSubAccountRequest;
|
|
39
67
|
};
|
|
68
|
+
export declare const QueryGetPendingSubAccountRequest: {
|
|
69
|
+
encode(message: QueryGetPendingSubAccountRequest, writer?: _m0.Writer): _m0.Writer;
|
|
70
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGetPendingSubAccountRequest;
|
|
71
|
+
fromJSON(object: any): QueryGetPendingSubAccountRequest;
|
|
72
|
+
toJSON(message: QueryGetPendingSubAccountRequest): unknown;
|
|
73
|
+
fromPartial(object: DeepPartial<QueryGetPendingSubAccountRequest>): QueryGetPendingSubAccountRequest;
|
|
74
|
+
};
|
|
40
75
|
export declare const QueryGetSubAccountResponse: {
|
|
41
76
|
encode(message: QueryGetSubAccountResponse, writer?: _m0.Writer): _m0.Writer;
|
|
42
77
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGetSubAccountResponse;
|
|
@@ -58,19 +93,19 @@ export declare const QueryAllSubAccountResponse: {
|
|
|
58
93
|
toJSON(message: QueryAllSubAccountResponse): unknown;
|
|
59
94
|
fromPartial(object: DeepPartial<QueryAllSubAccountResponse>): QueryAllSubAccountResponse;
|
|
60
95
|
};
|
|
61
|
-
export declare const
|
|
62
|
-
encode(message:
|
|
63
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined):
|
|
64
|
-
fromJSON(object: any):
|
|
65
|
-
toJSON(message:
|
|
66
|
-
fromPartial(object: DeepPartial<
|
|
96
|
+
export declare const QueryAllPendingSubAccountRequest: {
|
|
97
|
+
encode(message: QueryAllPendingSubAccountRequest, writer?: _m0.Writer): _m0.Writer;
|
|
98
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAllPendingSubAccountRequest;
|
|
99
|
+
fromJSON(object: any): QueryAllPendingSubAccountRequest;
|
|
100
|
+
toJSON(message: QueryAllPendingSubAccountRequest): unknown;
|
|
101
|
+
fromPartial(object: DeepPartial<QueryAllPendingSubAccountRequest>): QueryAllPendingSubAccountRequest;
|
|
67
102
|
};
|
|
68
|
-
export declare const
|
|
69
|
-
encode(message:
|
|
70
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined):
|
|
71
|
-
fromJSON(object: any):
|
|
72
|
-
toJSON(message:
|
|
73
|
-
fromPartial(object: DeepPartial<
|
|
103
|
+
export declare const QueryAllPendingSubAccountResponse: {
|
|
104
|
+
encode(message: QueryAllPendingSubAccountResponse, writer?: _m0.Writer): _m0.Writer;
|
|
105
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAllPendingSubAccountResponse;
|
|
106
|
+
fromJSON(object: any): QueryAllPendingSubAccountResponse;
|
|
107
|
+
toJSON(message: QueryAllPendingSubAccountResponse): unknown;
|
|
108
|
+
fromPartial(object: DeepPartial<QueryAllPendingSubAccountResponse>): QueryAllPendingSubAccountResponse;
|
|
74
109
|
};
|
|
75
110
|
export declare const QuerySubAccountPowerRequest: {
|
|
76
111
|
encode(message: QuerySubAccountPowerRequest, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -86,24 +121,78 @@ export declare const QuerySubAccountPowerResponse: {
|
|
|
86
121
|
toJSON(message: QuerySubAccountPowerResponse): unknown;
|
|
87
122
|
fromPartial(object: DeepPartial<QuerySubAccountPowerResponse>): QuerySubAccountPowerResponse;
|
|
88
123
|
};
|
|
124
|
+
export declare const QueryMainAccountAllRequest: {
|
|
125
|
+
encode(message: QueryMainAccountAllRequest, writer?: _m0.Writer): _m0.Writer;
|
|
126
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryMainAccountAllRequest;
|
|
127
|
+
fromJSON(object: any): QueryMainAccountAllRequest;
|
|
128
|
+
toJSON(message: QueryMainAccountAllRequest): unknown;
|
|
129
|
+
fromPartial(object: DeepPartial<QueryMainAccountAllRequest>): QueryMainAccountAllRequest;
|
|
130
|
+
};
|
|
131
|
+
export declare const QueryMainAccountAllResponse: {
|
|
132
|
+
encode(message: QueryMainAccountAllResponse, writer?: _m0.Writer): _m0.Writer;
|
|
133
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryMainAccountAllResponse;
|
|
134
|
+
fromJSON(object: any): QueryMainAccountAllResponse;
|
|
135
|
+
toJSON(message: QueryMainAccountAllResponse): unknown;
|
|
136
|
+
fromPartial(object: DeepPartial<QueryMainAccountAllResponse>): QueryMainAccountAllResponse;
|
|
137
|
+
};
|
|
138
|
+
export declare const QueryMainAccountRequest: {
|
|
139
|
+
encode(message: QueryMainAccountRequest, writer?: _m0.Writer): _m0.Writer;
|
|
140
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryMainAccountRequest;
|
|
141
|
+
fromJSON(object: any): QueryMainAccountRequest;
|
|
142
|
+
toJSON(message: QueryMainAccountRequest): unknown;
|
|
143
|
+
fromPartial(object: DeepPartial<QueryMainAccountRequest>): QueryMainAccountRequest;
|
|
144
|
+
};
|
|
145
|
+
export declare const QueryMainAccountResponse: {
|
|
146
|
+
encode(message: QueryMainAccountResponse, writer?: _m0.Writer): _m0.Writer;
|
|
147
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryMainAccountResponse;
|
|
148
|
+
fromJSON(object: any): QueryMainAccountResponse;
|
|
149
|
+
toJSON(message: QueryMainAccountResponse): unknown;
|
|
150
|
+
fromPartial(object: DeepPartial<QueryMainAccountResponse>): QueryMainAccountResponse;
|
|
151
|
+
};
|
|
152
|
+
export declare const QueryParamsRequest: {
|
|
153
|
+
encode(_: QueryParamsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
154
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryParamsRequest;
|
|
155
|
+
fromJSON(_: any): QueryParamsRequest;
|
|
156
|
+
toJSON(_: QueryParamsRequest): unknown;
|
|
157
|
+
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest;
|
|
158
|
+
};
|
|
159
|
+
export declare const QueryParamsResponse: {
|
|
160
|
+
encode(message: QueryParamsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
161
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryParamsResponse;
|
|
162
|
+
fromJSON(object: any): QueryParamsResponse;
|
|
163
|
+
toJSON(message: QueryParamsResponse): unknown;
|
|
164
|
+
fromPartial(object: DeepPartial<QueryParamsResponse>): QueryParamsResponse;
|
|
165
|
+
};
|
|
89
166
|
/** Query defines the gRPC querier service. */
|
|
90
167
|
export interface Query {
|
|
91
168
|
/** Get subaccount details */
|
|
92
169
|
SubAccount(request: QueryGetSubAccountRequest): Promise<QueryGetSubAccountResponse>;
|
|
170
|
+
/** Get pending subaccount details */
|
|
171
|
+
PendingSubAccount(request: QueryGetPendingSubAccountRequest): Promise<QueryGetSubAccountResponse>;
|
|
93
172
|
/** Get all subaccount details */
|
|
94
173
|
SubAccountAll(request: QueryAllSubAccountRequest): Promise<QueryAllSubAccountResponse>;
|
|
95
|
-
/** Get
|
|
96
|
-
|
|
174
|
+
/** Get pending subaccounts */
|
|
175
|
+
PendingSubAccountAll(request: QueryAllPendingSubAccountRequest): Promise<QueryAllPendingSubAccountResponse>;
|
|
97
176
|
/** Get voting power for a subaccount address */
|
|
98
177
|
SubAccountPower(request: QuerySubAccountPowerRequest): Promise<QuerySubAccountPowerResponse>;
|
|
178
|
+
/** Get all main accounts based on sub account */
|
|
179
|
+
MainAccountAll(request: QueryMainAccountAllRequest): Promise<QueryMainAccountAllResponse>;
|
|
180
|
+
/** Get main account based on sub account and role */
|
|
181
|
+
MainAccount(request: QueryMainAccountRequest): Promise<QueryMainAccountResponse>;
|
|
182
|
+
/** Parameters queries the subaccount parameters. */
|
|
183
|
+
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
99
184
|
}
|
|
100
185
|
export declare class QueryClientImpl implements Query {
|
|
101
186
|
private readonly rpc;
|
|
102
187
|
constructor(rpc: Rpc);
|
|
103
188
|
SubAccount(request: QueryGetSubAccountRequest): Promise<QueryGetSubAccountResponse>;
|
|
189
|
+
PendingSubAccount(request: QueryGetPendingSubAccountRequest): Promise<QueryGetSubAccountResponse>;
|
|
104
190
|
SubAccountAll(request: QueryAllSubAccountRequest): Promise<QueryAllSubAccountResponse>;
|
|
105
|
-
|
|
191
|
+
PendingSubAccountAll(request: QueryAllPendingSubAccountRequest): Promise<QueryAllPendingSubAccountResponse>;
|
|
106
192
|
SubAccountPower(request: QuerySubAccountPowerRequest): Promise<QuerySubAccountPowerResponse>;
|
|
193
|
+
MainAccountAll(request: QueryMainAccountAllRequest): Promise<QueryMainAccountAllResponse>;
|
|
194
|
+
MainAccount(request: QueryMainAccountRequest): Promise<QueryMainAccountResponse>;
|
|
195
|
+
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
107
196
|
}
|
|
108
197
|
interface Rpc {
|
|
109
198
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|