carbon-js-sdk 0.2.13 → 0.2.14-dev.1
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/NEOClient.js +1 -1
- package/lib/clients/TokenClient.d.ts +5 -0
- package/lib/clients/TokenClient.js +29 -7
- package/lib/codec/book/genesis.d.ts +1 -1
- package/lib/codec/book/genesis.js +1 -1
- package/lib/codec/book/query.d.ts +1 -1
- package/lib/codec/book/query.js +1 -1
- package/lib/codec/broker/genesis.d.ts +1 -1
- package/lib/codec/broker/genesis.js +1 -1
- package/lib/codec/broker/query.d.ts +3 -3
- package/lib/codec/broker/query.js +3 -3
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +1 -1
- package/lib/codec/btcx/denom_cross_chain_info.js +1 -1
- package/lib/codec/btcx/query.d.ts +1 -1
- package/lib/codec/btcx/query.js +1 -1
- package/lib/codec/ccm/genesis.d.ts +1 -1
- package/lib/codec/ccm/genesis.js +1 -1
- package/lib/codec/cdp/asset_params.d.ts +1 -12
- package/lib/codec/cdp/asset_params.js +14 -81
- package/lib/codec/cdp/debt_info.d.ts +1 -1
- package/lib/codec/cdp/debt_info.js +11 -13
- package/lib/codec/cdp/event.d.ts +321 -22
- package/lib/codec/cdp/event.js +2005 -82
- package/lib/codec/cdp/genesis.d.ts +80 -4
- package/lib/codec/cdp/genesis.js +531 -22
- package/lib/codec/cdp/params.d.ts +35 -0
- package/lib/codec/cdp/params.js +47 -1
- package/lib/codec/cdp/query.d.ts +437 -89
- package/lib/codec/cdp/query.js +1966 -177
- package/lib/codec/cdp/reward_scheme.d.ts +85 -0
- package/lib/codec/cdp/reward_scheme.js +656 -0
- package/lib/codec/cdp/stablecoin_debt_info.d.ts +1 -1
- package/lib/codec/cdp/stablecoin_debt_info.js +11 -13
- package/lib/codec/cdp/tx.d.ts +667 -96
- package/lib/codec/cdp/tx.js +3196 -243
- package/lib/codec/coin/event.d.ts +1 -1
- package/lib/codec/coin/event.js +1 -1
- package/lib/codec/coin/genesis.d.ts +2 -2
- package/lib/codec/coin/genesis.js +2 -2
- package/lib/codec/coin/proposal.d.ts +1 -1
- package/lib/codec/coin/proposal.js +1 -1
- package/lib/codec/coin/query.d.ts +2 -5
- package/lib/codec/coin/query.js +2 -8
- package/lib/codec/coin/token.d.ts +11 -0
- package/lib/codec/coin/token.js +65 -1
- package/lib/codec/coin/tx.d.ts +1 -1
- package/lib/codec/coin/tx.js +1 -1
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/auth/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/auth/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +19 -0
- package/lib/codec/cosmos/authz/v1beta1/authz.js +89 -1
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +1 -15
- package/lib/codec/cosmos/authz/v1beta1/genesis.js +7 -120
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +70 -2
- package/lib/codec/cosmos/authz/v1beta1/query.js +275 -3
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/authz/v1beta1/tx.js +1 -1
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/authz.js +1 -1
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/bank.js +1 -1
- package/lib/codec/cosmos/bank/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/export.js +3 -1
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +2 -2
- package/lib/codec/cosmos/bank/v1beta1/genesis.js +2 -2
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +43 -3
- package/lib/codec/cosmos/bank/v1beta1/query.js +140 -4
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/bank/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +64 -0
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.js +343 -1
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/capability/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/crisis/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/distribution.js +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +2 -2
- package/lib/codec/cosmos/distribution/v1beta1/genesis.js +2 -2
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +3 -3
- package/lib/codec/cosmos/distribution/v1beta1/query.js +3 -3
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/tx.js +1 -1
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/evidence/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.js +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +35 -2
- package/lib/codec/cosmos/feegrant/v1beta1/query.js +139 -3
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/gov/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +1 -1
- package/lib/codec/cosmos/gov/v1beta1/gov.js +1 -1
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/mint/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/mint/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/params/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/slashing/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/authz.js +1 -1
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/staking/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/staking.js +1 -1
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/staking/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +14 -1
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +19 -1
- package/lib/codec/cosmos/tx/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/tx/v1beta1/export.js +3 -1
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +53 -5
- package/lib/codec/cosmos/tx/v1beta1/service.js +179 -4
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +3 -3
- package/lib/codec/cosmos/tx/v1beta1/tx.js +3 -3
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/upgrade/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/tx.js +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +2 -2
- package/lib/codec/cosmos/vesting/v1beta1/vesting.js +2 -2
- package/lib/codec/fee/genesis.d.ts +1 -1
- package/lib/codec/fee/genesis.js +1 -1
- package/lib/codec/fee/proposal.d.ts +1 -1
- package/lib/codec/fee/proposal.js +1 -1
- package/lib/codec/fee/query.d.ts +1 -1
- package/lib/codec/fee/query.js +1 -1
- package/lib/codec/fee/tx.d.ts +1 -1
- package/lib/codec/fee/tx.js +1 -1
- package/lib/codec/headersync/genesis.d.ts +1 -1
- package/lib/codec/headersync/genesis.js +1 -1
- package/lib/codec/headersync/query.d.ts +1 -1
- package/lib/codec/headersync/query.js +1 -1
- package/lib/codec/index.d.ts +71 -23
- package/lib/codec/index.js +590 -384
- package/lib/codec/inflation/genesis.d.ts +1 -1
- package/lib/codec/inflation/genesis.js +1 -1
- package/lib/codec/inflation/query.d.ts +1 -1
- package/lib/codec/inflation/query.js +1 -1
- package/lib/codec/insurance/genesis.d.ts +1 -1
- package/lib/codec/insurance/genesis.js +1 -1
- package/lib/codec/leverage/genesis.d.ts +1 -1
- package/lib/codec/leverage/genesis.js +1 -1
- package/lib/codec/leverage/query.d.ts +1 -1
- package/lib/codec/leverage/query.js +1 -1
- package/lib/codec/liquidation/genesis.d.ts +1 -1
- package/lib/codec/liquidation/genesis.js +1 -1
- package/lib/codec/liquidation/query.d.ts +1 -1
- package/lib/codec/liquidation/query.js +1 -1
- package/lib/codec/liquidation/quote_changes.d.ts +1 -1
- package/lib/codec/liquidation/quote_changes.js +1 -1
- package/lib/codec/liquiditypool/event.d.ts +2 -2
- package/lib/codec/liquiditypool/event.js +2 -2
- package/lib/codec/liquiditypool/genesis.d.ts +2 -2
- package/lib/codec/liquiditypool/genesis.js +2 -2
- package/lib/codec/liquiditypool/proposal.d.ts +1 -1
- package/lib/codec/liquiditypool/proposal.js +1 -1
- package/lib/codec/liquiditypool/query.d.ts +2 -2
- package/lib/codec/liquiditypool/query.js +2 -2
- package/lib/codec/liquiditypool/tx.d.ts +1 -1
- package/lib/codec/liquiditypool/tx.js +1 -1
- package/lib/codec/lockproxy/genesis.d.ts +1 -1
- package/lib/codec/lockproxy/genesis.js +1 -1
- package/lib/codec/lockproxy/query.d.ts +1 -1
- package/lib/codec/lockproxy/query.js +1 -1
- package/lib/codec/market/event.d.ts +1 -1
- package/lib/codec/market/event.js +1 -1
- package/lib/codec/market/genesis.d.ts +2 -1
- package/lib/codec/market/genesis.js +20 -2
- package/lib/codec/market/proposal.d.ts +1 -1
- package/lib/codec/market/proposal.js +1 -1
- package/lib/codec/market/query.d.ts +1 -1
- package/lib/codec/market/query.js +1 -1
- package/lib/codec/market/tx.d.ts +1 -1
- package/lib/codec/market/tx.js +1 -1
- package/lib/codec/marketstats/genesis.d.ts +1 -1
- package/lib/codec/marketstats/genesis.js +1 -1
- package/lib/codec/marketstats/query.d.ts +2 -2
- package/lib/codec/marketstats/query.js +2 -2
- package/lib/codec/misc/message.d.ts +1 -1
- package/lib/codec/misc/message.js +1 -1
- package/lib/codec/misc/query.d.ts +3 -3
- package/lib/codec/misc/query.js +3 -3
- package/lib/codec/misc/trade.d.ts +1 -0
- package/lib/codec/misc/trade.js +17 -0
- package/lib/codec/misc/transaction.d.ts +1 -1
- package/lib/codec/misc/transaction.js +1 -1
- package/lib/codec/oracle/event.d.ts +1 -1
- package/lib/codec/oracle/event.js +1 -1
- package/lib/codec/oracle/genesis.d.ts +1 -1
- package/lib/codec/oracle/genesis.js +1 -1
- package/lib/codec/oracle/proposal.d.ts +1 -1
- package/lib/codec/oracle/proposal.js +1 -1
- package/lib/codec/oracle/query.d.ts +2 -2
- package/lib/codec/oracle/query.js +2 -2
- package/lib/codec/order/event.d.ts +1 -1
- package/lib/codec/order/event.js +1 -1
- package/lib/codec/order/genesis.d.ts +1 -1
- package/lib/codec/order/genesis.js +1 -1
- package/lib/codec/order/query.d.ts +1 -1
- package/lib/codec/order/query.js +1 -1
- package/lib/codec/position/event.d.ts +1 -1
- package/lib/codec/position/event.js +1 -1
- package/lib/codec/position/genesis.d.ts +1 -1
- package/lib/codec/position/genesis.js +1 -1
- package/lib/codec/position/query.d.ts +1 -1
- package/lib/codec/position/query.js +1 -1
- package/lib/codec/pricing/event.d.ts +11 -1
- package/lib/codec/pricing/event.js +52 -2
- package/lib/codec/pricing/genesis.d.ts +2 -1
- package/lib/codec/pricing/genesis.js +20 -5
- package/lib/codec/pricing/pricing.d.ts +13 -0
- package/lib/codec/pricing/pricing.js +83 -1
- package/lib/codec/pricing/query.d.ts +68 -1
- package/lib/codec/pricing/query.js +321 -2
- package/lib/codec/profile/event.d.ts +1 -1
- package/lib/codec/profile/event.js +1 -1
- package/lib/codec/profile/genesis.d.ts +1 -1
- package/lib/codec/profile/genesis.js +1 -1
- package/lib/codec/profile/query.d.ts +1 -1
- package/lib/codec/profile/query.js +1 -1
- package/lib/codec/subaccount/genesis.d.ts +1 -1
- package/lib/codec/subaccount/genesis.js +1 -1
- package/lib/codec/subaccount/query.d.ts +1 -1
- package/lib/codec/subaccount/query.js +1 -1
- package/lib/codec/tendermint/abci/types.d.ts +4 -4
- package/lib/codec/tendermint/abci/types.js +4 -4
- package/lib/codec/tendermint/types/block.d.ts +2 -2
- package/lib/codec/tendermint/types/block.js +2 -2
- package/lib/codec/tendermint/types/evidence.d.ts +2 -2
- package/lib/codec/tendermint/types/evidence.js +2 -2
- package/lib/codec/tendermint/types/types.d.ts +3 -3
- package/lib/codec/tendermint/types/types.js +3 -3
- package/lib/codec/tendermint/types/validator.d.ts +1 -1
- package/lib/codec/tendermint/types/validator.js +1 -1
- package/lib/modules/admin.d.ts +53 -1
- package/lib/modules/admin.js +175 -43
- package/lib/modules/cdp.d.ts +104 -13
- package/lib/modules/cdp.js +618 -20
- package/lib/provider/amino/types/admin.js +48 -7
- package/lib/provider/amino/types/cdp.js +72 -32
- package/lib/util/number.d.ts +1 -0
- package/lib/util/number.js +2 -1
- package/lib/util/tx.d.ts +58 -14
- package/lib/wallet/CarbonSigningClient.js +27 -2
- package/lib/wallet/CarbonWallet.js +0 -1
- package/lib/websocket/channel.js +60 -0
- package/lib/websocket/models.d.ts +179 -21
- package/lib/websocket/types.d.ts +69 -3
- package/lib/websocket/types.js +27 -0
- package/package.json +1 -1
|
@@ -3,18 +3,17 @@ 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.
|
|
6
|
+
exports.GenesisState = 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
|
-
const
|
|
11
|
-
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
10
|
+
const authz_1 = require("./authz");
|
|
12
11
|
exports.protobufPackage = "cosmos.authz.v1beta1";
|
|
13
12
|
const baseGenesisState = {};
|
|
14
13
|
exports.GenesisState = {
|
|
15
14
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
16
15
|
for (const v of message.authorization) {
|
|
17
|
-
|
|
16
|
+
authz_1.GrantAuthorization.encode(v, writer.uint32(10).fork()).ldelim();
|
|
18
17
|
}
|
|
19
18
|
return writer;
|
|
20
19
|
},
|
|
@@ -27,7 +26,7 @@ exports.GenesisState = {
|
|
|
27
26
|
const tag = reader.uint32();
|
|
28
27
|
switch (tag >>> 3) {
|
|
29
28
|
case 1:
|
|
30
|
-
message.authorization.push(
|
|
29
|
+
message.authorization.push(authz_1.GrantAuthorization.decode(reader, reader.uint32()));
|
|
31
30
|
break;
|
|
32
31
|
default:
|
|
33
32
|
reader.skipType(tag & 7);
|
|
@@ -39,13 +38,13 @@ exports.GenesisState = {
|
|
|
39
38
|
fromJSON(object) {
|
|
40
39
|
var _a;
|
|
41
40
|
const message = Object.assign({}, baseGenesisState);
|
|
42
|
-
message.authorization = ((_a = object.authorization) !== null && _a !== void 0 ? _a : []).map((e) =>
|
|
41
|
+
message.authorization = ((_a = object.authorization) !== null && _a !== void 0 ? _a : []).map((e) => authz_1.GrantAuthorization.fromJSON(e));
|
|
43
42
|
return message;
|
|
44
43
|
},
|
|
45
44
|
toJSON(message) {
|
|
46
45
|
const obj = {};
|
|
47
46
|
if (message.authorization) {
|
|
48
|
-
obj.authorization = message.authorization.map((e) => e ?
|
|
47
|
+
obj.authorization = message.authorization.map((e) => e ? authz_1.GrantAuthorization.toJSON(e) : undefined);
|
|
49
48
|
}
|
|
50
49
|
else {
|
|
51
50
|
obj.authorization = [];
|
|
@@ -55,122 +54,10 @@ exports.GenesisState = {
|
|
|
55
54
|
fromPartial(object) {
|
|
56
55
|
var _a;
|
|
57
56
|
const message = Object.assign({}, baseGenesisState);
|
|
58
|
-
message.authorization = ((_a = object.authorization) !== null && _a !== void 0 ? _a : []).map((e) =>
|
|
57
|
+
message.authorization = ((_a = object.authorization) !== null && _a !== void 0 ? _a : []).map((e) => authz_1.GrantAuthorization.fromPartial(e));
|
|
59
58
|
return message;
|
|
60
59
|
},
|
|
61
60
|
};
|
|
62
|
-
const baseGrantAuthorization = { granter: "", grantee: "" };
|
|
63
|
-
exports.GrantAuthorization = {
|
|
64
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
65
|
-
if (message.granter !== "") {
|
|
66
|
-
writer.uint32(10).string(message.granter);
|
|
67
|
-
}
|
|
68
|
-
if (message.grantee !== "") {
|
|
69
|
-
writer.uint32(18).string(message.grantee);
|
|
70
|
-
}
|
|
71
|
-
if (message.authorization !== undefined) {
|
|
72
|
-
any_1.Any.encode(message.authorization, writer.uint32(26).fork()).ldelim();
|
|
73
|
-
}
|
|
74
|
-
if (message.expiration !== undefined) {
|
|
75
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim();
|
|
76
|
-
}
|
|
77
|
-
return writer;
|
|
78
|
-
},
|
|
79
|
-
decode(input, length) {
|
|
80
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
81
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
82
|
-
const message = Object.assign({}, baseGrantAuthorization);
|
|
83
|
-
while (reader.pos < end) {
|
|
84
|
-
const tag = reader.uint32();
|
|
85
|
-
switch (tag >>> 3) {
|
|
86
|
-
case 1:
|
|
87
|
-
message.granter = reader.string();
|
|
88
|
-
break;
|
|
89
|
-
case 2:
|
|
90
|
-
message.grantee = reader.string();
|
|
91
|
-
break;
|
|
92
|
-
case 3:
|
|
93
|
-
message.authorization = any_1.Any.decode(reader, reader.uint32());
|
|
94
|
-
break;
|
|
95
|
-
case 4:
|
|
96
|
-
message.expiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
97
|
-
break;
|
|
98
|
-
default:
|
|
99
|
-
reader.skipType(tag & 7);
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return message;
|
|
104
|
-
},
|
|
105
|
-
fromJSON(object) {
|
|
106
|
-
const message = Object.assign({}, baseGrantAuthorization);
|
|
107
|
-
message.granter =
|
|
108
|
-
object.granter !== undefined && object.granter !== null
|
|
109
|
-
? String(object.granter)
|
|
110
|
-
: "";
|
|
111
|
-
message.grantee =
|
|
112
|
-
object.grantee !== undefined && object.grantee !== null
|
|
113
|
-
? String(object.grantee)
|
|
114
|
-
: "";
|
|
115
|
-
message.authorization =
|
|
116
|
-
object.authorization !== undefined && object.authorization !== null
|
|
117
|
-
? any_1.Any.fromJSON(object.authorization)
|
|
118
|
-
: undefined;
|
|
119
|
-
message.expiration =
|
|
120
|
-
object.expiration !== undefined && object.expiration !== null
|
|
121
|
-
? fromJsonTimestamp(object.expiration)
|
|
122
|
-
: undefined;
|
|
123
|
-
return message;
|
|
124
|
-
},
|
|
125
|
-
toJSON(message) {
|
|
126
|
-
const obj = {};
|
|
127
|
-
message.granter !== undefined && (obj.granter = message.granter);
|
|
128
|
-
message.grantee !== undefined && (obj.grantee = message.grantee);
|
|
129
|
-
message.authorization !== undefined &&
|
|
130
|
-
(obj.authorization = message.authorization
|
|
131
|
-
? any_1.Any.toJSON(message.authorization)
|
|
132
|
-
: undefined);
|
|
133
|
-
message.expiration !== undefined &&
|
|
134
|
-
(obj.expiration = message.expiration.toISOString());
|
|
135
|
-
return obj;
|
|
136
|
-
},
|
|
137
|
-
fromPartial(object) {
|
|
138
|
-
var _a, _b, _c;
|
|
139
|
-
const message = Object.assign({}, baseGrantAuthorization);
|
|
140
|
-
message.granter = (_a = object.granter) !== null && _a !== void 0 ? _a : "";
|
|
141
|
-
message.grantee = (_b = object.grantee) !== null && _b !== void 0 ? _b : "";
|
|
142
|
-
message.authorization =
|
|
143
|
-
object.authorization !== undefined && object.authorization !== null
|
|
144
|
-
? any_1.Any.fromPartial(object.authorization)
|
|
145
|
-
: undefined;
|
|
146
|
-
message.expiration = (_c = object.expiration) !== null && _c !== void 0 ? _c : undefined;
|
|
147
|
-
return message;
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
function toTimestamp(date) {
|
|
151
|
-
const seconds = numberToLong(date.getTime() / 1000);
|
|
152
|
-
const nanos = (date.getTime() % 1000) * 1000000;
|
|
153
|
-
return { seconds, nanos };
|
|
154
|
-
}
|
|
155
|
-
function fromTimestamp(t) {
|
|
156
|
-
let millis = t.seconds.toNumber() * 1000;
|
|
157
|
-
millis += t.nanos / 1000000;
|
|
158
|
-
return new Date(millis);
|
|
159
|
-
}
|
|
160
|
-
function fromJsonTimestamp(o) {
|
|
161
|
-
if (o instanceof Date) {
|
|
162
|
-
return o;
|
|
163
|
-
}
|
|
164
|
-
else if (typeof o === "string") {
|
|
165
|
-
return new Date(o);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
function numberToLong(number) {
|
|
172
|
-
return long_1.default.fromNumber(number);
|
|
173
|
-
}
|
|
174
61
|
if (minimal_1.default.util.Long !== long_1.default) {
|
|
175
62
|
minimal_1.default.util.Long = long_1.default;
|
|
176
63
|
minimal_1.default.configure();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { PageRequest, PageResponse } from "
|
|
4
|
-
import { Grant } from "
|
|
3
|
+
import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
|
|
4
|
+
import { Grant, GrantAuthorization } from "./authz";
|
|
5
5
|
export declare const protobufPackage = "cosmos.authz.v1beta1";
|
|
6
6
|
/** Since: cosmos-sdk 0.43 */
|
|
7
7
|
/** QueryGrantsRequest is the request type for the Query/Grants RPC method. */
|
|
@@ -20,6 +20,32 @@ export interface QueryGrantsResponse {
|
|
|
20
20
|
/** pagination defines an pagination for the response. */
|
|
21
21
|
pagination?: PageResponse;
|
|
22
22
|
}
|
|
23
|
+
/** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */
|
|
24
|
+
export interface QueryGranterGrantsRequest {
|
|
25
|
+
granter: string;
|
|
26
|
+
/** pagination defines an pagination for the request. */
|
|
27
|
+
pagination?: PageRequest;
|
|
28
|
+
}
|
|
29
|
+
/** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */
|
|
30
|
+
export interface QueryGranterGrantsResponse {
|
|
31
|
+
/** grants is a list of grants granted by the granter. */
|
|
32
|
+
grants: GrantAuthorization[];
|
|
33
|
+
/** pagination defines an pagination for the response. */
|
|
34
|
+
pagination?: PageResponse;
|
|
35
|
+
}
|
|
36
|
+
/** QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. */
|
|
37
|
+
export interface QueryGranteeGrantsRequest {
|
|
38
|
+
grantee: string;
|
|
39
|
+
/** pagination defines an pagination for the request. */
|
|
40
|
+
pagination?: PageRequest;
|
|
41
|
+
}
|
|
42
|
+
/** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */
|
|
43
|
+
export interface QueryGranteeGrantsResponse {
|
|
44
|
+
/** grants is a list of grants granted to the grantee. */
|
|
45
|
+
grants: GrantAuthorization[];
|
|
46
|
+
/** pagination defines an pagination for the response. */
|
|
47
|
+
pagination?: PageResponse;
|
|
48
|
+
}
|
|
23
49
|
export declare const QueryGrantsRequest: {
|
|
24
50
|
encode(message: QueryGrantsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
25
51
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGrantsRequest;
|
|
@@ -34,15 +60,57 @@ export declare const QueryGrantsResponse: {
|
|
|
34
60
|
toJSON(message: QueryGrantsResponse): unknown;
|
|
35
61
|
fromPartial(object: DeepPartial<QueryGrantsResponse>): QueryGrantsResponse;
|
|
36
62
|
};
|
|
63
|
+
export declare const QueryGranterGrantsRequest: {
|
|
64
|
+
encode(message: QueryGranterGrantsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
65
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGranterGrantsRequest;
|
|
66
|
+
fromJSON(object: any): QueryGranterGrantsRequest;
|
|
67
|
+
toJSON(message: QueryGranterGrantsRequest): unknown;
|
|
68
|
+
fromPartial(object: DeepPartial<QueryGranterGrantsRequest>): QueryGranterGrantsRequest;
|
|
69
|
+
};
|
|
70
|
+
export declare const QueryGranterGrantsResponse: {
|
|
71
|
+
encode(message: QueryGranterGrantsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
72
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGranterGrantsResponse;
|
|
73
|
+
fromJSON(object: any): QueryGranterGrantsResponse;
|
|
74
|
+
toJSON(message: QueryGranterGrantsResponse): unknown;
|
|
75
|
+
fromPartial(object: DeepPartial<QueryGranterGrantsResponse>): QueryGranterGrantsResponse;
|
|
76
|
+
};
|
|
77
|
+
export declare const QueryGranteeGrantsRequest: {
|
|
78
|
+
encode(message: QueryGranteeGrantsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
79
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGranteeGrantsRequest;
|
|
80
|
+
fromJSON(object: any): QueryGranteeGrantsRequest;
|
|
81
|
+
toJSON(message: QueryGranteeGrantsRequest): unknown;
|
|
82
|
+
fromPartial(object: DeepPartial<QueryGranteeGrantsRequest>): QueryGranteeGrantsRequest;
|
|
83
|
+
};
|
|
84
|
+
export declare const QueryGranteeGrantsResponse: {
|
|
85
|
+
encode(message: QueryGranteeGrantsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
86
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryGranteeGrantsResponse;
|
|
87
|
+
fromJSON(object: any): QueryGranteeGrantsResponse;
|
|
88
|
+
toJSON(message: QueryGranteeGrantsResponse): unknown;
|
|
89
|
+
fromPartial(object: DeepPartial<QueryGranteeGrantsResponse>): QueryGranteeGrantsResponse;
|
|
90
|
+
};
|
|
37
91
|
/** Query defines the gRPC querier service. */
|
|
38
92
|
export interface Query {
|
|
39
93
|
/** Returns list of `Authorization`, granted to the grantee by the granter. */
|
|
40
94
|
Grants(request: QueryGrantsRequest): Promise<QueryGrantsResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* GranterGrants returns list of `GrantAuthorization`, granted by granter.
|
|
97
|
+
*
|
|
98
|
+
* Since: cosmos-sdk 0.45.2
|
|
99
|
+
*/
|
|
100
|
+
GranterGrants(request: QueryGranterGrantsRequest): Promise<QueryGranterGrantsResponse>;
|
|
101
|
+
/**
|
|
102
|
+
* GranteeGrants returns a list of `GrantAuthorization` by grantee.
|
|
103
|
+
*
|
|
104
|
+
* Since: cosmos-sdk 0.45.2
|
|
105
|
+
*/
|
|
106
|
+
GranteeGrants(request: QueryGranteeGrantsRequest): Promise<QueryGranteeGrantsResponse>;
|
|
41
107
|
}
|
|
42
108
|
export declare class QueryClientImpl implements Query {
|
|
43
109
|
private readonly rpc;
|
|
44
110
|
constructor(rpc: Rpc);
|
|
45
111
|
Grants(request: QueryGrantsRequest): Promise<QueryGrantsResponse>;
|
|
112
|
+
GranterGrants(request: QueryGranterGrantsRequest): Promise<QueryGranterGrantsResponse>;
|
|
113
|
+
GranteeGrants(request: QueryGranteeGrantsRequest): Promise<QueryGranteeGrantsResponse>;
|
|
46
114
|
}
|
|
47
115
|
interface Rpc {
|
|
48
116
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
@@ -3,12 +3,12 @@ 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.QueryGrantsResponse = exports.QueryGrantsRequest = exports.protobufPackage = void 0;
|
|
6
|
+
exports.QueryClientImpl = exports.QueryGranteeGrantsResponse = exports.QueryGranteeGrantsRequest = exports.QueryGranterGrantsResponse = exports.QueryGranterGrantsRequest = exports.QueryGrantsResponse = exports.QueryGrantsRequest = 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
|
-
const pagination_1 = require("
|
|
11
|
-
const authz_1 = require("
|
|
10
|
+
const pagination_1 = require("../../base/query/v1beta1/pagination");
|
|
11
|
+
const authz_1 = require("./authz");
|
|
12
12
|
exports.protobufPackage = "cosmos.authz.v1beta1";
|
|
13
13
|
const baseQueryGrantsRequest = {
|
|
14
14
|
granter: "",
|
|
@@ -168,16 +168,288 @@ exports.QueryGrantsResponse = {
|
|
|
168
168
|
return message;
|
|
169
169
|
},
|
|
170
170
|
};
|
|
171
|
+
const baseQueryGranterGrantsRequest = { granter: "" };
|
|
172
|
+
exports.QueryGranterGrantsRequest = {
|
|
173
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
174
|
+
if (message.granter !== "") {
|
|
175
|
+
writer.uint32(10).string(message.granter);
|
|
176
|
+
}
|
|
177
|
+
if (message.pagination !== undefined) {
|
|
178
|
+
pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
179
|
+
}
|
|
180
|
+
return writer;
|
|
181
|
+
},
|
|
182
|
+
decode(input, length) {
|
|
183
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
184
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
185
|
+
const message = Object.assign({}, baseQueryGranterGrantsRequest);
|
|
186
|
+
while (reader.pos < end) {
|
|
187
|
+
const tag = reader.uint32();
|
|
188
|
+
switch (tag >>> 3) {
|
|
189
|
+
case 1:
|
|
190
|
+
message.granter = reader.string();
|
|
191
|
+
break;
|
|
192
|
+
case 2:
|
|
193
|
+
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
194
|
+
break;
|
|
195
|
+
default:
|
|
196
|
+
reader.skipType(tag & 7);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return message;
|
|
201
|
+
},
|
|
202
|
+
fromJSON(object) {
|
|
203
|
+
const message = Object.assign({}, baseQueryGranterGrantsRequest);
|
|
204
|
+
message.granter =
|
|
205
|
+
object.granter !== undefined && object.granter !== null
|
|
206
|
+
? String(object.granter)
|
|
207
|
+
: "";
|
|
208
|
+
message.pagination =
|
|
209
|
+
object.pagination !== undefined && object.pagination !== null
|
|
210
|
+
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
211
|
+
: undefined;
|
|
212
|
+
return message;
|
|
213
|
+
},
|
|
214
|
+
toJSON(message) {
|
|
215
|
+
const obj = {};
|
|
216
|
+
message.granter !== undefined && (obj.granter = message.granter);
|
|
217
|
+
message.pagination !== undefined &&
|
|
218
|
+
(obj.pagination = message.pagination
|
|
219
|
+
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
220
|
+
: undefined);
|
|
221
|
+
return obj;
|
|
222
|
+
},
|
|
223
|
+
fromPartial(object) {
|
|
224
|
+
var _a;
|
|
225
|
+
const message = Object.assign({}, baseQueryGranterGrantsRequest);
|
|
226
|
+
message.granter = (_a = object.granter) !== null && _a !== void 0 ? _a : "";
|
|
227
|
+
message.pagination =
|
|
228
|
+
object.pagination !== undefined && object.pagination !== null
|
|
229
|
+
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
230
|
+
: undefined;
|
|
231
|
+
return message;
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
const baseQueryGranterGrantsResponse = {};
|
|
235
|
+
exports.QueryGranterGrantsResponse = {
|
|
236
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
237
|
+
for (const v of message.grants) {
|
|
238
|
+
authz_1.GrantAuthorization.encode(v, writer.uint32(10).fork()).ldelim();
|
|
239
|
+
}
|
|
240
|
+
if (message.pagination !== undefined) {
|
|
241
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
242
|
+
}
|
|
243
|
+
return writer;
|
|
244
|
+
},
|
|
245
|
+
decode(input, length) {
|
|
246
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
247
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
248
|
+
const message = Object.assign({}, baseQueryGranterGrantsResponse);
|
|
249
|
+
message.grants = [];
|
|
250
|
+
while (reader.pos < end) {
|
|
251
|
+
const tag = reader.uint32();
|
|
252
|
+
switch (tag >>> 3) {
|
|
253
|
+
case 1:
|
|
254
|
+
message.grants.push(authz_1.GrantAuthorization.decode(reader, reader.uint32()));
|
|
255
|
+
break;
|
|
256
|
+
case 2:
|
|
257
|
+
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
reader.skipType(tag & 7);
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return message;
|
|
265
|
+
},
|
|
266
|
+
fromJSON(object) {
|
|
267
|
+
var _a;
|
|
268
|
+
const message = Object.assign({}, baseQueryGranterGrantsResponse);
|
|
269
|
+
message.grants = ((_a = object.grants) !== null && _a !== void 0 ? _a : []).map((e) => authz_1.GrantAuthorization.fromJSON(e));
|
|
270
|
+
message.pagination =
|
|
271
|
+
object.pagination !== undefined && object.pagination !== null
|
|
272
|
+
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
273
|
+
: undefined;
|
|
274
|
+
return message;
|
|
275
|
+
},
|
|
276
|
+
toJSON(message) {
|
|
277
|
+
const obj = {};
|
|
278
|
+
if (message.grants) {
|
|
279
|
+
obj.grants = message.grants.map((e) => e ? authz_1.GrantAuthorization.toJSON(e) : undefined);
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
obj.grants = [];
|
|
283
|
+
}
|
|
284
|
+
message.pagination !== undefined &&
|
|
285
|
+
(obj.pagination = message.pagination
|
|
286
|
+
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
287
|
+
: undefined);
|
|
288
|
+
return obj;
|
|
289
|
+
},
|
|
290
|
+
fromPartial(object) {
|
|
291
|
+
var _a;
|
|
292
|
+
const message = Object.assign({}, baseQueryGranterGrantsResponse);
|
|
293
|
+
message.grants = ((_a = object.grants) !== null && _a !== void 0 ? _a : []).map((e) => authz_1.GrantAuthorization.fromPartial(e));
|
|
294
|
+
message.pagination =
|
|
295
|
+
object.pagination !== undefined && object.pagination !== null
|
|
296
|
+
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
297
|
+
: undefined;
|
|
298
|
+
return message;
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
const baseQueryGranteeGrantsRequest = { grantee: "" };
|
|
302
|
+
exports.QueryGranteeGrantsRequest = {
|
|
303
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
304
|
+
if (message.grantee !== "") {
|
|
305
|
+
writer.uint32(10).string(message.grantee);
|
|
306
|
+
}
|
|
307
|
+
if (message.pagination !== undefined) {
|
|
308
|
+
pagination_1.PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
309
|
+
}
|
|
310
|
+
return writer;
|
|
311
|
+
},
|
|
312
|
+
decode(input, length) {
|
|
313
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
314
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
315
|
+
const message = Object.assign({}, baseQueryGranteeGrantsRequest);
|
|
316
|
+
while (reader.pos < end) {
|
|
317
|
+
const tag = reader.uint32();
|
|
318
|
+
switch (tag >>> 3) {
|
|
319
|
+
case 1:
|
|
320
|
+
message.grantee = reader.string();
|
|
321
|
+
break;
|
|
322
|
+
case 2:
|
|
323
|
+
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
324
|
+
break;
|
|
325
|
+
default:
|
|
326
|
+
reader.skipType(tag & 7);
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return message;
|
|
331
|
+
},
|
|
332
|
+
fromJSON(object) {
|
|
333
|
+
const message = Object.assign({}, baseQueryGranteeGrantsRequest);
|
|
334
|
+
message.grantee =
|
|
335
|
+
object.grantee !== undefined && object.grantee !== null
|
|
336
|
+
? String(object.grantee)
|
|
337
|
+
: "";
|
|
338
|
+
message.pagination =
|
|
339
|
+
object.pagination !== undefined && object.pagination !== null
|
|
340
|
+
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
341
|
+
: undefined;
|
|
342
|
+
return message;
|
|
343
|
+
},
|
|
344
|
+
toJSON(message) {
|
|
345
|
+
const obj = {};
|
|
346
|
+
message.grantee !== undefined && (obj.grantee = message.grantee);
|
|
347
|
+
message.pagination !== undefined &&
|
|
348
|
+
(obj.pagination = message.pagination
|
|
349
|
+
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
350
|
+
: undefined);
|
|
351
|
+
return obj;
|
|
352
|
+
},
|
|
353
|
+
fromPartial(object) {
|
|
354
|
+
var _a;
|
|
355
|
+
const message = Object.assign({}, baseQueryGranteeGrantsRequest);
|
|
356
|
+
message.grantee = (_a = object.grantee) !== null && _a !== void 0 ? _a : "";
|
|
357
|
+
message.pagination =
|
|
358
|
+
object.pagination !== undefined && object.pagination !== null
|
|
359
|
+
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
360
|
+
: undefined;
|
|
361
|
+
return message;
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
const baseQueryGranteeGrantsResponse = {};
|
|
365
|
+
exports.QueryGranteeGrantsResponse = {
|
|
366
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
367
|
+
for (const v of message.grants) {
|
|
368
|
+
authz_1.GrantAuthorization.encode(v, writer.uint32(10).fork()).ldelim();
|
|
369
|
+
}
|
|
370
|
+
if (message.pagination !== undefined) {
|
|
371
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
372
|
+
}
|
|
373
|
+
return writer;
|
|
374
|
+
},
|
|
375
|
+
decode(input, length) {
|
|
376
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
377
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
378
|
+
const message = Object.assign({}, baseQueryGranteeGrantsResponse);
|
|
379
|
+
message.grants = [];
|
|
380
|
+
while (reader.pos < end) {
|
|
381
|
+
const tag = reader.uint32();
|
|
382
|
+
switch (tag >>> 3) {
|
|
383
|
+
case 1:
|
|
384
|
+
message.grants.push(authz_1.GrantAuthorization.decode(reader, reader.uint32()));
|
|
385
|
+
break;
|
|
386
|
+
case 2:
|
|
387
|
+
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
388
|
+
break;
|
|
389
|
+
default:
|
|
390
|
+
reader.skipType(tag & 7);
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return message;
|
|
395
|
+
},
|
|
396
|
+
fromJSON(object) {
|
|
397
|
+
var _a;
|
|
398
|
+
const message = Object.assign({}, baseQueryGranteeGrantsResponse);
|
|
399
|
+
message.grants = ((_a = object.grants) !== null && _a !== void 0 ? _a : []).map((e) => authz_1.GrantAuthorization.fromJSON(e));
|
|
400
|
+
message.pagination =
|
|
401
|
+
object.pagination !== undefined && object.pagination !== null
|
|
402
|
+
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
403
|
+
: undefined;
|
|
404
|
+
return message;
|
|
405
|
+
},
|
|
406
|
+
toJSON(message) {
|
|
407
|
+
const obj = {};
|
|
408
|
+
if (message.grants) {
|
|
409
|
+
obj.grants = message.grants.map((e) => e ? authz_1.GrantAuthorization.toJSON(e) : undefined);
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
obj.grants = [];
|
|
413
|
+
}
|
|
414
|
+
message.pagination !== undefined &&
|
|
415
|
+
(obj.pagination = message.pagination
|
|
416
|
+
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
417
|
+
: undefined);
|
|
418
|
+
return obj;
|
|
419
|
+
},
|
|
420
|
+
fromPartial(object) {
|
|
421
|
+
var _a;
|
|
422
|
+
const message = Object.assign({}, baseQueryGranteeGrantsResponse);
|
|
423
|
+
message.grants = ((_a = object.grants) !== null && _a !== void 0 ? _a : []).map((e) => authz_1.GrantAuthorization.fromPartial(e));
|
|
424
|
+
message.pagination =
|
|
425
|
+
object.pagination !== undefined && object.pagination !== null
|
|
426
|
+
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
427
|
+
: undefined;
|
|
428
|
+
return message;
|
|
429
|
+
},
|
|
430
|
+
};
|
|
171
431
|
class QueryClientImpl {
|
|
172
432
|
constructor(rpc) {
|
|
173
433
|
this.rpc = rpc;
|
|
174
434
|
this.Grants = this.Grants.bind(this);
|
|
435
|
+
this.GranterGrants = this.GranterGrants.bind(this);
|
|
436
|
+
this.GranteeGrants = this.GranteeGrants.bind(this);
|
|
175
437
|
}
|
|
176
438
|
Grants(request) {
|
|
177
439
|
const data = exports.QueryGrantsRequest.encode(request).finish();
|
|
178
440
|
const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "Grants", data);
|
|
179
441
|
return promise.then((data) => exports.QueryGrantsResponse.decode(new minimal_1.default.Reader(data)));
|
|
180
442
|
}
|
|
443
|
+
GranterGrants(request) {
|
|
444
|
+
const data = exports.QueryGranterGrantsRequest.encode(request).finish();
|
|
445
|
+
const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranterGrants", data);
|
|
446
|
+
return promise.then((data) => exports.QueryGranterGrantsResponse.decode(new minimal_1.default.Reader(data)));
|
|
447
|
+
}
|
|
448
|
+
GranteeGrants(request) {
|
|
449
|
+
const data = exports.QueryGranteeGrantsRequest.encode(request).finish();
|
|
450
|
+
const promise = this.rpc.request("cosmos.authz.v1beta1.Query", "GranteeGrants", data);
|
|
451
|
+
return promise.then((data) => exports.QueryGranteeGrantsResponse.decode(new minimal_1.default.Reader(data)));
|
|
452
|
+
}
|
|
181
453
|
}
|
|
182
454
|
exports.QueryClientImpl = QueryClientImpl;
|
|
183
455
|
if (minimal_1.default.util.Long !== long_1.default) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Grant } from "
|
|
3
|
+
import { Grant } from "./authz";
|
|
4
4
|
import { Any } from "../../../google/protobuf/any";
|
|
5
5
|
export declare const protobufPackage = "cosmos.authz.v1beta1";
|
|
6
6
|
/** Since: cosmos-sdk 0.43 */
|
|
@@ -7,7 +7,7 @@ exports.MsgClientImpl = exports.MsgRevokeResponse = exports.MsgRevoke = exports.
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const authz_1 = require("
|
|
10
|
+
const authz_1 = require("./authz");
|
|
11
11
|
const any_1 = require("../../../google/protobuf/any");
|
|
12
12
|
exports.protobufPackage = "cosmos.authz.v1beta1";
|
|
13
13
|
const baseMsgGrant = { granter: "", grantee: "" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Coin } from "
|
|
3
|
+
import { Coin } from "../../base/v1beta1/coin";
|
|
4
4
|
export declare const protobufPackage = "cosmos.bank.v1beta1";
|
|
5
5
|
/**
|
|
6
6
|
* SendAuthorization allows the grantee to spend up to spend_limit coins from
|
|
@@ -7,7 +7,7 @@ exports.SendAuthorization = 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
|
-
const coin_1 = require("
|
|
10
|
+
const coin_1 = require("../../base/v1beta1/coin");
|
|
11
11
|
exports.protobufPackage = "cosmos.bank.v1beta1";
|
|
12
12
|
const baseSendAuthorization = {};
|
|
13
13
|
exports.SendAuthorization = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Coin } from "
|
|
3
|
+
import { Coin } from "../../base/v1beta1/coin";
|
|
4
4
|
export declare const protobufPackage = "cosmos.bank.v1beta1";
|
|
5
5
|
/** Params defines the parameters for the bank module. */
|
|
6
6
|
export interface Params {
|
|
@@ -7,7 +7,7 @@ exports.Metadata = exports.DenomUnit = exports.Supply = exports.Output = exports
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const coin_1 = require("
|
|
10
|
+
const coin_1 = require("../../base/v1beta1/coin");
|
|
11
11
|
exports.protobufPackage = "cosmos.bank.v1beta1";
|
|
12
12
|
const baseParams = { defaultSendEnabled: false };
|
|
13
13
|
exports.Params = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SendAuthorization } from "./authz";
|
|
2
2
|
export { Params, SendEnabled, Input, Output, Supply, DenomUnit, Metadata } from "./bank";
|
|
3
3
|
export { Balance } from "./genesis";
|
|
4
|
-
export { QueryBalanceRequest, QueryBalanceResponse, QueryAllBalancesRequest, QueryAllBalancesResponse, QueryTotalSupplyRequest, QueryTotalSupplyResponse, QuerySupplyOfRequest, QuerySupplyOfResponse, QueryParamsRequest, QueryParamsResponse, QueryDenomsMetadataRequest, QueryDenomsMetadataResponse, QueryDenomMetadataRequest, QueryDenomMetadataResponse } from "./query";
|
|
4
|
+
export { QueryBalanceRequest, QueryBalanceResponse, QueryAllBalancesRequest, QueryAllBalancesResponse, QuerySpendableBalancesRequest, QuerySpendableBalancesResponse, QueryTotalSupplyRequest, QueryTotalSupplyResponse, QuerySupplyOfRequest, QuerySupplyOfResponse, QueryParamsRequest, QueryParamsResponse, QueryDenomsMetadataRequest, QueryDenomsMetadataResponse, QueryDenomMetadataRequest, QueryDenomMetadataResponse } from "./query";
|
|
5
5
|
export { MsgSend, MsgSendResponse, MsgMultiSend, MsgMultiSendResponse } from "./tx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MsgMultiSendResponse = exports.MsgMultiSend = exports.MsgSendResponse = exports.MsgSend = exports.QueryDenomMetadataResponse = exports.QueryDenomMetadataRequest = exports.QueryDenomsMetadataResponse = exports.QueryDenomsMetadataRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.QuerySupplyOfResponse = exports.QuerySupplyOfRequest = exports.QueryTotalSupplyResponse = exports.QueryTotalSupplyRequest = exports.QueryAllBalancesResponse = exports.QueryAllBalancesRequest = exports.QueryBalanceResponse = exports.QueryBalanceRequest = exports.Balance = exports.Metadata = exports.DenomUnit = exports.Supply = exports.Output = exports.Input = exports.SendEnabled = exports.Params = exports.SendAuthorization = void 0;
|
|
3
|
+
exports.MsgMultiSendResponse = exports.MsgMultiSend = exports.MsgSendResponse = exports.MsgSend = exports.QueryDenomMetadataResponse = exports.QueryDenomMetadataRequest = exports.QueryDenomsMetadataResponse = exports.QueryDenomsMetadataRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.QuerySupplyOfResponse = exports.QuerySupplyOfRequest = exports.QueryTotalSupplyResponse = exports.QueryTotalSupplyRequest = exports.QuerySpendableBalancesResponse = exports.QuerySpendableBalancesRequest = exports.QueryAllBalancesResponse = exports.QueryAllBalancesRequest = exports.QueryBalanceResponse = exports.QueryBalanceRequest = exports.Balance = exports.Metadata = exports.DenomUnit = exports.Supply = exports.Output = exports.Input = exports.SendEnabled = exports.Params = exports.SendAuthorization = void 0;
|
|
4
4
|
var authz_1 = require("./authz");
|
|
5
5
|
Object.defineProperty(exports, "SendAuthorization", { enumerable: true, get: function () { return authz_1.SendAuthorization; } });
|
|
6
6
|
var bank_1 = require("./bank");
|
|
@@ -18,6 +18,8 @@ Object.defineProperty(exports, "QueryBalanceRequest", { enumerable: true, get: f
|
|
|
18
18
|
Object.defineProperty(exports, "QueryBalanceResponse", { enumerable: true, get: function () { return query_1.QueryBalanceResponse; } });
|
|
19
19
|
Object.defineProperty(exports, "QueryAllBalancesRequest", { enumerable: true, get: function () { return query_1.QueryAllBalancesRequest; } });
|
|
20
20
|
Object.defineProperty(exports, "QueryAllBalancesResponse", { enumerable: true, get: function () { return query_1.QueryAllBalancesResponse; } });
|
|
21
|
+
Object.defineProperty(exports, "QuerySpendableBalancesRequest", { enumerable: true, get: function () { return query_1.QuerySpendableBalancesRequest; } });
|
|
22
|
+
Object.defineProperty(exports, "QuerySpendableBalancesResponse", { enumerable: true, get: function () { return query_1.QuerySpendableBalancesResponse; } });
|
|
21
23
|
Object.defineProperty(exports, "QueryTotalSupplyRequest", { enumerable: true, get: function () { return query_1.QueryTotalSupplyRequest; } });
|
|
22
24
|
Object.defineProperty(exports, "QueryTotalSupplyResponse", { enumerable: true, get: function () { return query_1.QueryTotalSupplyResponse; } });
|
|
23
25
|
Object.defineProperty(exports, "QuerySupplyOfRequest", { enumerable: true, get: function () { return query_1.QuerySupplyOfRequest; } });
|