carbon-js-sdk 0.7.12 → 0.7.13
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/CarbonQueryClient.d.ts +1 -1
- package/lib/clients/CarbonQueryClient.js +1 -1
- package/lib/codec/Switcheo/carbon/book/event.d.ts +1 -20
- package/lib/codec/Switcheo/carbon/book/event.js +19 -101
- package/lib/codec/Switcheo/carbon/book/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/book/export.js +1 -3
- package/lib/codec/Switcheo/carbon/book/query.d.ts +6 -12
- package/lib/codec/Switcheo/carbon/book/query.js +6 -18
- package/lib/codec/Switcheo/carbon/broker/amm.d.ts +0 -8
- package/lib/codec/Switcheo/carbon/ccm/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/ccm/export.js +1 -3
- package/lib/codec/Switcheo/carbon/ccm/tx.d.ts +0 -46
- package/lib/codec/Switcheo/carbon/ccm/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/cdp/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/cdp/export.js +1 -3
- package/lib/codec/Switcheo/carbon/cdp/tx.d.ts +1 -46
- package/lib/codec/Switcheo/carbon/cdp/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.d.ts +4 -10
- package/lib/codec/Switcheo/carbon/evmcontract/genesis.js +4 -54
- package/lib/codec/Switcheo/carbon/evmcontract/query.d.ts +0 -98
- package/lib/codec/Switcheo/carbon/evmcontract/query.js +1 -374
- package/lib/codec/Switcheo/carbon/evmcontract/tx.d.ts +0 -103
- package/lib/codec/Switcheo/carbon/evmcontract/tx.js +1 -425
- package/lib/codec/Switcheo/carbon/liquidation/export.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/liquidation/export.js +5 -1
- package/lib/codec/Switcheo/carbon/liquidation/query.d.ts +25 -0
- package/lib/codec/Switcheo/carbon/liquidation/query.js +88 -1
- package/lib/codec/Switcheo/carbon/liquiditypool/export.d.ts +2 -2
- package/lib/codec/Switcheo/carbon/liquiditypool/export.js +3 -6
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.d.ts +0 -20
- package/lib/codec/Switcheo/carbon/liquiditypool/liquiditypool.js +1 -191
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.d.ts +0 -46
- package/lib/codec/Switcheo/carbon/liquiditypool/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/market/export.d.ts +2 -2
- package/lib/codec/Switcheo/carbon/market/export.js +2 -6
- package/lib/codec/Switcheo/carbon/market/query.d.ts +0 -31
- package/lib/codec/Switcheo/carbon/market/query.js +1 -226
- package/lib/codec/Switcheo/carbon/market/tx.d.ts +2 -46
- package/lib/codec/Switcheo/carbon/market/tx.js +1 -100
- package/lib/codec/Switcheo/carbon/marketstats/export.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/marketstats/export.js +5 -1
- package/lib/codec/Switcheo/carbon/marketstats/genesis.d.ts +7 -4
- package/lib/codec/Switcheo/carbon/marketstats/genesis.js +21 -4
- package/lib/codec/Switcheo/carbon/marketstats/query.d.ts +26 -0
- package/lib/codec/Switcheo/carbon/marketstats/query.js +88 -1
- package/lib/codec/Switcheo/carbon/oracle/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/oracle/export.js +1 -4
- package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +0 -46
- package/lib/codec/Switcheo/carbon/oracle/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/order/export.d.ts +3 -4
- package/lib/codec/Switcheo/carbon/order/export.js +4 -11
- package/lib/codec/Switcheo/carbon/order/genesis.d.ts +10 -10
- package/lib/codec/Switcheo/carbon/order/genesis.js +16 -16
- package/lib/codec/Switcheo/carbon/order/order.d.ts +14 -14
- package/lib/codec/Switcheo/carbon/order/order.js +11 -11
- package/lib/codec/Switcheo/carbon/order/tx.d.ts +0 -46
- package/lib/codec/Switcheo/carbon/order/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/perpspool/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/perpspool/export.js +1 -3
- package/lib/codec/Switcheo/carbon/perpspool/tx.d.ts +1 -46
- package/lib/codec/Switcheo/carbon/perpspool/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/position/export.d.ts +0 -1
- package/lib/codec/Switcheo/carbon/position/export.js +1 -4
- package/lib/codec/Switcheo/carbon/pricing/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/pricing/export.js +1 -3
- package/lib/codec/Switcheo/carbon/pricing/tx.d.ts +0 -46
- package/lib/codec/Switcheo/carbon/pricing/tx.js +1 -101
- package/lib/codec/Switcheo/carbon/subaccount/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/subaccount/export.js +1 -3
- package/lib/codec/Switcheo/carbon/subaccount/tx.d.ts +0 -46
- package/lib/codec/Switcheo/carbon/subaccount/tx.js +1 -101
- package/lib/codec/carbon-models.d.ts +1 -2
- package/lib/codec/carbon-models.js +2 -3
- package/lib/codec/cosmos/app/v1alpha1/config.d.ts +0 -26
- package/lib/codec/cosmos/app/v1alpha1/config.js +4 -94
- package/lib/codec/cosmos/auth/v1beta1/auth.d.ts +0 -21
- package/lib/codec/cosmos/auth/v1beta1/auth.js +1 -92
- package/lib/codec/cosmos/auth/v1beta1/export.d.ts +2 -3
- package/lib/codec/cosmos/auth/v1beta1/export.js +1 -7
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +2 -54
- package/lib/codec/cosmos/auth/v1beta1/query.js +2 -120
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +0 -7
- package/lib/codec/cosmos/bank/v1beta1/authz.js +3 -18
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +0 -9
- package/lib/codec/cosmos/bank/v1beta1/export.d.ts +2 -2
- package/lib/codec/cosmos/bank/v1beta1/export.js +1 -9
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +3 -9
- package/lib/codec/cosmos/bank/v1beta1/genesis.js +2 -17
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +5 -125
- package/lib/codec/cosmos/bank/v1beta1/query.js +1 -257
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +1 -102
- package/lib/codec/cosmos/bank/v1beta1/tx.js +2 -215
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +0 -8
- package/lib/codec/cosmos/base/store/v1beta1/commit_info.d.ts +1 -2
- package/lib/codec/cosmos/base/store/v1beta1/commit_info.js +1 -39
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +46 -16
- package/lib/codec/cosmos/crisis/v1beta1/tx.d.ts +1 -46
- package/lib/codec/cosmos/crisis/v1beta1/tx.js +1 -103
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +1 -20
- package/lib/codec/cosmos/distribution/v1beta1/distribution.js +16 -16
- package/lib/codec/cosmos/distribution/v1beta1/export.d.ts +2 -2
- package/lib/codec/cosmos/distribution/v1beta1/export.js +1 -8
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +4 -4
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +1 -32
- package/lib/codec/cosmos/distribution/v1beta1/query.js +1 -134
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +3 -103
- package/lib/codec/cosmos/distribution/v1beta1/tx.js +1 -212
- package/lib/codec/cosmos/evidence/v1beta1/evidence.d.ts +0 -4
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +1 -12
- package/lib/codec/cosmos/evidence/v1beta1/query.js +2 -14
- package/lib/codec/cosmos/evidence/v1beta1/tx.d.ts +0 -2
- package/lib/codec/cosmos/gov/v1/genesis.d.ts +4 -25
- package/lib/codec/cosmos/gov/v1/genesis.js +0 -16
- package/lib/codec/cosmos/gov/v1/gov.d.ts +2 -83
- package/lib/codec/cosmos/gov/v1/gov.js +3 -231
- package/lib/codec/cosmos/gov/v1/query.d.ts +6 -30
- package/lib/codec/cosmos/gov/v1/query.js +0 -16
- package/lib/codec/cosmos/gov/v1/tx.d.ts +2 -74
- package/lib/codec/cosmos/gov/v1/tx.js +3 -131
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +3 -3
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +5 -30
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +2 -4
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +0 -13
- package/lib/codec/cosmos/group/v1/events.d.ts +1 -17
- package/lib/codec/cosmos/group/v1/events.js +1 -81
- package/lib/codec/cosmos/group/v1/query.d.ts +5 -5
- package/lib/codec/cosmos/group/v1/tx.d.ts +13 -25
- package/lib/codec/cosmos/group/v1/tx.js +34 -60
- package/lib/codec/cosmos/group/v1/types.d.ts +6 -26
- package/lib/codec/cosmos/group/v1/types.js +1 -27
- package/lib/codec/cosmos/mint/v1beta1/export.d.ts +0 -1
- package/lib/codec/cosmos/mint/v1beta1/export.js +1 -4
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/mint/v1beta1/mint.d.ts +1 -1
- package/lib/codec/cosmos/nft/v1beta1/event.d.ts +0 -10
- package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +0 -1
- package/lib/codec/cosmos/nft/v1beta1/query.d.ts +0 -20
- package/lib/codec/cosmos/slashing/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/export.js +1 -3
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/tx.d.ts +0 -46
- package/lib/codec/cosmos/slashing/v1beta1/tx.js +1 -101
- package/lib/codec/cosmos/staking/v1beta1/export.d.ts +2 -2
- package/lib/codec/cosmos/staking/v1beta1/export.js +2 -8
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +5 -36
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +1 -40
- package/lib/codec/cosmos/staking/v1beta1/staking.js +2 -212
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +1 -45
- package/lib/codec/cosmos/staking/v1beta1/tx.js +1 -100
- package/lib/codec/cosmos/tx/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/tx/v1beta1/export.js +1 -9
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +2 -164
- package/lib/codec/cosmos/tx/v1beta1/service.js +3 -407
- package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +3 -3
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +4 -6
- package/lib/codec/ethermint/evm/v1/export.d.ts +1 -2
- package/lib/codec/ethermint/evm/v1/export.js +1 -8
- package/lib/codec/ethermint/evm/v1/tx.d.ts +1 -37
- package/lib/codec/ethermint/evm/v1/tx.js +1 -100
- package/lib/codec/ethermint/feemarket/v1/export.d.ts +0 -2
- package/lib/codec/ethermint/feemarket/v1/export.js +1 -7
- package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +0 -10
- package/lib/codec/ethermint/feemarket/v1/feemarket.js +1 -28
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.d.ts +1 -2
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.js +1 -8
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +0 -26
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.js +1 -113
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.js +6 -1
- package/lib/codec/ibc/applications/transfer/v1/export.d.ts +1 -2
- package/lib/codec/ibc/applications/transfer/v1/export.js +1 -8
- package/lib/codec/ibc/applications/transfer/v1/genesis.d.ts +0 -6
- package/lib/codec/ibc/applications/transfer/v1/genesis.js +2 -18
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +1 -56
- package/lib/codec/ibc/applications/transfer/v1/query.js +1 -210
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +4 -8
- package/lib/codec/ibc/applications/transfer/v1/tx.js +6 -35
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +0 -2
- package/lib/codec/ibc/applications/transfer/v2/packet.js +1 -14
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +0 -20
- package/lib/codec/ibc/core/channel/v1/channel.js +1 -78
- package/lib/codec/ibc/core/channel/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/channel/v1/export.js +2 -3
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +12 -16
- package/lib/codec/ibc/core/channel/v1/tx.js +25 -62
- package/lib/codec/ibc/core/client/v1/client.d.ts +1 -5
- package/lib/codec/ibc/core/client/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/client/v1/export.js +1 -3
- package/lib/codec/ibc/core/client/v1/query.d.ts +1 -38
- package/lib/codec/ibc/core/client/v1/query.js +1 -137
- package/lib/codec/ibc/core/client/v1/tx.d.ts +6 -19
- package/lib/codec/ibc/core/client/v1/tx.js +11 -13
- package/lib/codec/ibc/core/commitment/v1/commitment.d.ts +1 -1
- package/lib/codec/ibc/core/commitment/v1/commitment.js +1 -1
- package/lib/codec/ibc/core/connection/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/connection/v1/export.js +1 -3
- package/lib/codec/ibc/core/connection/v1/query.d.ts +1 -26
- package/lib/codec/ibc/core/connection/v1/query.js +1 -87
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +2 -7
- package/lib/codec/ibc/core/connection/v1/tx.js +2 -38
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +5 -12
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.js +1 -1
- package/lib/codec/ibc-models.d.ts +2 -3
- package/lib/codec/ibc-models.js +3 -4
- package/lib/codec/index.d.ts +20 -99
- package/lib/codec/index.js +890 -3371
- package/lib/codec/proofs.d.ts +0 -1
- package/lib/codec/proofs.js +0 -6
- package/lib/codec/tendermint/abci/types.d.ts +84 -131
- package/lib/codec/tendermint/abci/types.js +351 -707
- package/lib/codec/tendermint/types/params.d.ts +8 -1
- package/lib/codec/tendermint/types/params.js +33 -13
- package/lib/modules/evm.js +1 -1
- package/lib/provider/amino/types/evm.js +1 -1
- package/lib/util/tx.d.ts +7 -89
- package/package.json +1 -1
|
@@ -3,387 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.QueryClientImpl = exports.
|
|
6
|
+
exports.QueryClientImpl = exports.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 evm_hooks_1 = require("./evm_hooks");
|
|
11
10
|
exports.protobufPackage = "Switcheo.carbon.evmcontract";
|
|
12
|
-
const baseQueryContractRequest = { contractAddress: "" };
|
|
13
|
-
exports.QueryContractRequest = {
|
|
14
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
15
|
-
if (message.contractAddress !== "") {
|
|
16
|
-
writer.uint32(10).string(message.contractAddress);
|
|
17
|
-
}
|
|
18
|
-
return writer;
|
|
19
|
-
},
|
|
20
|
-
decode(input, length) {
|
|
21
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
22
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
23
|
-
const message = Object.assign({}, baseQueryContractRequest);
|
|
24
|
-
while (reader.pos < end) {
|
|
25
|
-
const tag = reader.uint32();
|
|
26
|
-
switch (tag >>> 3) {
|
|
27
|
-
case 1:
|
|
28
|
-
message.contractAddress = reader.string();
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
reader.skipType(tag & 7);
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return message;
|
|
36
|
-
},
|
|
37
|
-
fromJSON(object) {
|
|
38
|
-
const message = Object.assign({}, baseQueryContractRequest);
|
|
39
|
-
message.contractAddress =
|
|
40
|
-
object.contractAddress !== undefined && object.contractAddress !== null
|
|
41
|
-
? String(object.contractAddress)
|
|
42
|
-
: "";
|
|
43
|
-
return message;
|
|
44
|
-
},
|
|
45
|
-
toJSON(message) {
|
|
46
|
-
const obj = {};
|
|
47
|
-
message.contractAddress !== undefined &&
|
|
48
|
-
(obj.contractAddress = message.contractAddress);
|
|
49
|
-
return obj;
|
|
50
|
-
},
|
|
51
|
-
fromPartial(object) {
|
|
52
|
-
var _a;
|
|
53
|
-
const message = Object.assign({}, baseQueryContractRequest);
|
|
54
|
-
message.contractAddress = (_a = object.contractAddress) !== null && _a !== void 0 ? _a : "";
|
|
55
|
-
return message;
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
const baseQueryContractResponse = {};
|
|
59
|
-
exports.QueryContractResponse = {
|
|
60
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
61
|
-
if (message.contract !== undefined) {
|
|
62
|
-
evm_hooks_1.EVMContract.encode(message.contract, 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({}, baseQueryContractResponse);
|
|
70
|
-
while (reader.pos < end) {
|
|
71
|
-
const tag = reader.uint32();
|
|
72
|
-
switch (tag >>> 3) {
|
|
73
|
-
case 1:
|
|
74
|
-
message.contract = evm_hooks_1.EVMContract.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({}, baseQueryContractResponse);
|
|
85
|
-
message.contract =
|
|
86
|
-
object.contract !== undefined && object.contract !== null
|
|
87
|
-
? evm_hooks_1.EVMContract.fromJSON(object.contract)
|
|
88
|
-
: undefined;
|
|
89
|
-
return message;
|
|
90
|
-
},
|
|
91
|
-
toJSON(message) {
|
|
92
|
-
const obj = {};
|
|
93
|
-
message.contract !== undefined &&
|
|
94
|
-
(obj.contract = message.contract
|
|
95
|
-
? evm_hooks_1.EVMContract.toJSON(message.contract)
|
|
96
|
-
: undefined);
|
|
97
|
-
return obj;
|
|
98
|
-
},
|
|
99
|
-
fromPartial(object) {
|
|
100
|
-
const message = Object.assign({}, baseQueryContractResponse);
|
|
101
|
-
message.contract =
|
|
102
|
-
object.contract !== undefined && object.contract !== null
|
|
103
|
-
? evm_hooks_1.EVMContract.fromPartial(object.contract)
|
|
104
|
-
: undefined;
|
|
105
|
-
return message;
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
const baseQueryContractAllRequest = {};
|
|
109
|
-
exports.QueryContractAllRequest = {
|
|
110
|
-
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
111
|
-
return writer;
|
|
112
|
-
},
|
|
113
|
-
decode(input, length) {
|
|
114
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
115
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
116
|
-
const message = Object.assign({}, baseQueryContractAllRequest);
|
|
117
|
-
while (reader.pos < end) {
|
|
118
|
-
const tag = reader.uint32();
|
|
119
|
-
switch (tag >>> 3) {
|
|
120
|
-
default:
|
|
121
|
-
reader.skipType(tag & 7);
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return message;
|
|
126
|
-
},
|
|
127
|
-
fromJSON(_) {
|
|
128
|
-
const message = Object.assign({}, baseQueryContractAllRequest);
|
|
129
|
-
return message;
|
|
130
|
-
},
|
|
131
|
-
toJSON(_) {
|
|
132
|
-
const obj = {};
|
|
133
|
-
return obj;
|
|
134
|
-
},
|
|
135
|
-
fromPartial(_) {
|
|
136
|
-
const message = Object.assign({}, baseQueryContractAllRequest);
|
|
137
|
-
return message;
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
const baseQueryContractAllResponse = {};
|
|
141
|
-
exports.QueryContractAllResponse = {
|
|
142
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
143
|
-
for (const v of message.contracts) {
|
|
144
|
-
evm_hooks_1.EVMContract.encode(v, writer.uint32(10).fork()).ldelim();
|
|
145
|
-
}
|
|
146
|
-
return writer;
|
|
147
|
-
},
|
|
148
|
-
decode(input, length) {
|
|
149
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
150
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
151
|
-
const message = Object.assign({}, baseQueryContractAllResponse);
|
|
152
|
-
message.contracts = [];
|
|
153
|
-
while (reader.pos < end) {
|
|
154
|
-
const tag = reader.uint32();
|
|
155
|
-
switch (tag >>> 3) {
|
|
156
|
-
case 1:
|
|
157
|
-
message.contracts.push(evm_hooks_1.EVMContract.decode(reader, reader.uint32()));
|
|
158
|
-
break;
|
|
159
|
-
default:
|
|
160
|
-
reader.skipType(tag & 7);
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return message;
|
|
165
|
-
},
|
|
166
|
-
fromJSON(object) {
|
|
167
|
-
var _a;
|
|
168
|
-
const message = Object.assign({}, baseQueryContractAllResponse);
|
|
169
|
-
message.contracts = ((_a = object.contracts) !== null && _a !== void 0 ? _a : []).map((e) => evm_hooks_1.EVMContract.fromJSON(e));
|
|
170
|
-
return message;
|
|
171
|
-
},
|
|
172
|
-
toJSON(message) {
|
|
173
|
-
const obj = {};
|
|
174
|
-
if (message.contracts) {
|
|
175
|
-
obj.contracts = message.contracts.map((e) => e ? evm_hooks_1.EVMContract.toJSON(e) : undefined);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
obj.contracts = [];
|
|
179
|
-
}
|
|
180
|
-
return obj;
|
|
181
|
-
},
|
|
182
|
-
fromPartial(object) {
|
|
183
|
-
var _a;
|
|
184
|
-
const message = Object.assign({}, baseQueryContractAllResponse);
|
|
185
|
-
message.contracts = ((_a = object.contracts) !== null && _a !== void 0 ? _a : []).map((e) => evm_hooks_1.EVMContract.fromPartial(e));
|
|
186
|
-
return message;
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
const baseQueryAllAddressEVMRequest = {};
|
|
190
|
-
exports.QueryAllAddressEVMRequest = {
|
|
191
|
-
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
192
|
-
return writer;
|
|
193
|
-
},
|
|
194
|
-
decode(input, length) {
|
|
195
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
196
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
197
|
-
const message = Object.assign({}, baseQueryAllAddressEVMRequest);
|
|
198
|
-
while (reader.pos < end) {
|
|
199
|
-
const tag = reader.uint32();
|
|
200
|
-
switch (tag >>> 3) {
|
|
201
|
-
default:
|
|
202
|
-
reader.skipType(tag & 7);
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return message;
|
|
207
|
-
},
|
|
208
|
-
fromJSON(_) {
|
|
209
|
-
const message = Object.assign({}, baseQueryAllAddressEVMRequest);
|
|
210
|
-
return message;
|
|
211
|
-
},
|
|
212
|
-
toJSON(_) {
|
|
213
|
-
const obj = {};
|
|
214
|
-
return obj;
|
|
215
|
-
},
|
|
216
|
-
fromPartial(_) {
|
|
217
|
-
const message = Object.assign({}, baseQueryAllAddressEVMRequest);
|
|
218
|
-
return message;
|
|
219
|
-
},
|
|
220
|
-
};
|
|
221
|
-
const baseQueryAllAddressEVMResponse = {};
|
|
222
|
-
exports.QueryAllAddressEVMResponse = {
|
|
223
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
224
|
-
for (const v of message.modules) {
|
|
225
|
-
evm_hooks_1.ModuleEVMAddress.encode(v, writer.uint32(10).fork()).ldelim();
|
|
226
|
-
}
|
|
227
|
-
return writer;
|
|
228
|
-
},
|
|
229
|
-
decode(input, length) {
|
|
230
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
231
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
232
|
-
const message = Object.assign({}, baseQueryAllAddressEVMResponse);
|
|
233
|
-
message.modules = [];
|
|
234
|
-
while (reader.pos < end) {
|
|
235
|
-
const tag = reader.uint32();
|
|
236
|
-
switch (tag >>> 3) {
|
|
237
|
-
case 1:
|
|
238
|
-
message.modules.push(evm_hooks_1.ModuleEVMAddress.decode(reader, reader.uint32()));
|
|
239
|
-
break;
|
|
240
|
-
default:
|
|
241
|
-
reader.skipType(tag & 7);
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return message;
|
|
246
|
-
},
|
|
247
|
-
fromJSON(object) {
|
|
248
|
-
var _a;
|
|
249
|
-
const message = Object.assign({}, baseQueryAllAddressEVMResponse);
|
|
250
|
-
message.modules = ((_a = object.modules) !== null && _a !== void 0 ? _a : []).map((e) => evm_hooks_1.ModuleEVMAddress.fromJSON(e));
|
|
251
|
-
return message;
|
|
252
|
-
},
|
|
253
|
-
toJSON(message) {
|
|
254
|
-
const obj = {};
|
|
255
|
-
if (message.modules) {
|
|
256
|
-
obj.modules = message.modules.map((e) => e ? evm_hooks_1.ModuleEVMAddress.toJSON(e) : undefined);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
obj.modules = [];
|
|
260
|
-
}
|
|
261
|
-
return obj;
|
|
262
|
-
},
|
|
263
|
-
fromPartial(object) {
|
|
264
|
-
var _a;
|
|
265
|
-
const message = Object.assign({}, baseQueryAllAddressEVMResponse);
|
|
266
|
-
message.modules = ((_a = object.modules) !== null && _a !== void 0 ? _a : []).map((e) => evm_hooks_1.ModuleEVMAddress.fromPartial(e));
|
|
267
|
-
return message;
|
|
268
|
-
},
|
|
269
|
-
};
|
|
270
|
-
const baseQueryAddressEVMRequest = { name: "" };
|
|
271
|
-
exports.QueryAddressEVMRequest = {
|
|
272
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
273
|
-
if (message.name !== "") {
|
|
274
|
-
writer.uint32(10).string(message.name);
|
|
275
|
-
}
|
|
276
|
-
return writer;
|
|
277
|
-
},
|
|
278
|
-
decode(input, length) {
|
|
279
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
280
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
281
|
-
const message = Object.assign({}, baseQueryAddressEVMRequest);
|
|
282
|
-
while (reader.pos < end) {
|
|
283
|
-
const tag = reader.uint32();
|
|
284
|
-
switch (tag >>> 3) {
|
|
285
|
-
case 1:
|
|
286
|
-
message.name = reader.string();
|
|
287
|
-
break;
|
|
288
|
-
default:
|
|
289
|
-
reader.skipType(tag & 7);
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return message;
|
|
294
|
-
},
|
|
295
|
-
fromJSON(object) {
|
|
296
|
-
const message = Object.assign({}, baseQueryAddressEVMRequest);
|
|
297
|
-
message.name =
|
|
298
|
-
object.name !== undefined && object.name !== null
|
|
299
|
-
? String(object.name)
|
|
300
|
-
: "";
|
|
301
|
-
return message;
|
|
302
|
-
},
|
|
303
|
-
toJSON(message) {
|
|
304
|
-
const obj = {};
|
|
305
|
-
message.name !== undefined && (obj.name = message.name);
|
|
306
|
-
return obj;
|
|
307
|
-
},
|
|
308
|
-
fromPartial(object) {
|
|
309
|
-
var _a;
|
|
310
|
-
const message = Object.assign({}, baseQueryAddressEVMRequest);
|
|
311
|
-
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
312
|
-
return message;
|
|
313
|
-
},
|
|
314
|
-
};
|
|
315
|
-
const baseQueryAddressEVMResponse = { address: "" };
|
|
316
|
-
exports.QueryAddressEVMResponse = {
|
|
317
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
318
|
-
if (message.address !== "") {
|
|
319
|
-
writer.uint32(10).string(message.address);
|
|
320
|
-
}
|
|
321
|
-
return writer;
|
|
322
|
-
},
|
|
323
|
-
decode(input, length) {
|
|
324
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
325
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
326
|
-
const message = Object.assign({}, baseQueryAddressEVMResponse);
|
|
327
|
-
while (reader.pos < end) {
|
|
328
|
-
const tag = reader.uint32();
|
|
329
|
-
switch (tag >>> 3) {
|
|
330
|
-
case 1:
|
|
331
|
-
message.address = reader.string();
|
|
332
|
-
break;
|
|
333
|
-
default:
|
|
334
|
-
reader.skipType(tag & 7);
|
|
335
|
-
break;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
return message;
|
|
339
|
-
},
|
|
340
|
-
fromJSON(object) {
|
|
341
|
-
const message = Object.assign({}, baseQueryAddressEVMResponse);
|
|
342
|
-
message.address =
|
|
343
|
-
object.address !== undefined && object.address !== null
|
|
344
|
-
? String(object.address)
|
|
345
|
-
: "";
|
|
346
|
-
return message;
|
|
347
|
-
},
|
|
348
|
-
toJSON(message) {
|
|
349
|
-
const obj = {};
|
|
350
|
-
message.address !== undefined && (obj.address = message.address);
|
|
351
|
-
return obj;
|
|
352
|
-
},
|
|
353
|
-
fromPartial(object) {
|
|
354
|
-
var _a;
|
|
355
|
-
const message = Object.assign({}, baseQueryAddressEVMResponse);
|
|
356
|
-
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
|
|
357
|
-
return message;
|
|
358
|
-
},
|
|
359
|
-
};
|
|
360
11
|
class QueryClientImpl {
|
|
361
12
|
constructor(rpc) {
|
|
362
13
|
this.rpc = rpc;
|
|
363
|
-
this.Contract = this.Contract.bind(this);
|
|
364
|
-
this.ContractAll = this.ContractAll.bind(this);
|
|
365
|
-
this.ModuleEVMAddress = this.ModuleEVMAddress.bind(this);
|
|
366
|
-
this.AllModuleEVMAddress = this.AllModuleEVMAddress.bind(this);
|
|
367
|
-
}
|
|
368
|
-
Contract(request) {
|
|
369
|
-
const data = exports.QueryContractRequest.encode(request).finish();
|
|
370
|
-
const promise = this.rpc.request("Switcheo.carbon.evmcontract.Query", "Contract", data);
|
|
371
|
-
return promise.then((data) => exports.QueryContractResponse.decode(new minimal_1.default.Reader(data)));
|
|
372
|
-
}
|
|
373
|
-
ContractAll(request) {
|
|
374
|
-
const data = exports.QueryContractAllRequest.encode(request).finish();
|
|
375
|
-
const promise = this.rpc.request("Switcheo.carbon.evmcontract.Query", "ContractAll", data);
|
|
376
|
-
return promise.then((data) => exports.QueryContractAllResponse.decode(new minimal_1.default.Reader(data)));
|
|
377
|
-
}
|
|
378
|
-
ModuleEVMAddress(request) {
|
|
379
|
-
const data = exports.QueryAddressEVMRequest.encode(request).finish();
|
|
380
|
-
const promise = this.rpc.request("Switcheo.carbon.evmcontract.Query", "ModuleEVMAddress", data);
|
|
381
|
-
return promise.then((data) => exports.QueryAddressEVMResponse.decode(new minimal_1.default.Reader(data)));
|
|
382
|
-
}
|
|
383
|
-
AllModuleEVMAddress(request) {
|
|
384
|
-
const data = exports.QueryAllAddressEVMRequest.encode(request).finish();
|
|
385
|
-
const promise = this.rpc.request("Switcheo.carbon.evmcontract.Query", "AllModuleEVMAddress", data);
|
|
386
|
-
return promise.then((data) => exports.QueryAllAddressEVMResponse.decode(new minimal_1.default.Reader(data)));
|
|
387
14
|
}
|
|
388
15
|
}
|
|
389
16
|
exports.QueryClientImpl = QueryClientImpl;
|
|
@@ -1,115 +1,12 @@
|
|
|
1
|
-
import Long from "long";
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Params } from "./params";
|
|
4
1
|
export declare const protobufPackage = "Switcheo.carbon.evmcontract";
|
|
5
|
-
export interface MsgDeactivateContract {
|
|
6
|
-
creator: string;
|
|
7
|
-
moduleName: string;
|
|
8
|
-
contractAddress: string;
|
|
9
|
-
}
|
|
10
|
-
export interface MsgDeactivateContractResponse {
|
|
11
|
-
}
|
|
12
|
-
export interface MsgActivateContract {
|
|
13
|
-
creator: string;
|
|
14
|
-
moduleName: string;
|
|
15
|
-
contractAddress: string;
|
|
16
|
-
}
|
|
17
|
-
export interface MsgActivateContractResponse {
|
|
18
|
-
}
|
|
19
|
-
export interface MsgSetParams {
|
|
20
|
-
creator: string;
|
|
21
|
-
responseGasCap?: Long;
|
|
22
|
-
}
|
|
23
|
-
export interface MsgSetParamsResponse {
|
|
24
|
-
}
|
|
25
|
-
export interface MsgUpdateParams {
|
|
26
|
-
/** authority is the address of the governance account. */
|
|
27
|
-
authority: string;
|
|
28
|
-
/**
|
|
29
|
-
* params defines the parameters to update.
|
|
30
|
-
*
|
|
31
|
-
* NOTE: All parameters must be supplied.
|
|
32
|
-
*/
|
|
33
|
-
params?: Params;
|
|
34
|
-
}
|
|
35
|
-
export interface MsgUpdateParamsResponse {
|
|
36
|
-
}
|
|
37
|
-
export declare const MsgDeactivateContract: {
|
|
38
|
-
encode(message: MsgDeactivateContract, writer?: _m0.Writer): _m0.Writer;
|
|
39
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgDeactivateContract;
|
|
40
|
-
fromJSON(object: any): MsgDeactivateContract;
|
|
41
|
-
toJSON(message: MsgDeactivateContract): unknown;
|
|
42
|
-
fromPartial(object: DeepPartial<MsgDeactivateContract>): MsgDeactivateContract;
|
|
43
|
-
};
|
|
44
|
-
export declare const MsgDeactivateContractResponse: {
|
|
45
|
-
encode(_: MsgDeactivateContractResponse, writer?: _m0.Writer): _m0.Writer;
|
|
46
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgDeactivateContractResponse;
|
|
47
|
-
fromJSON(_: any): MsgDeactivateContractResponse;
|
|
48
|
-
toJSON(_: MsgDeactivateContractResponse): unknown;
|
|
49
|
-
fromPartial(_: DeepPartial<MsgDeactivateContractResponse>): MsgDeactivateContractResponse;
|
|
50
|
-
};
|
|
51
|
-
export declare const MsgActivateContract: {
|
|
52
|
-
encode(message: MsgActivateContract, writer?: _m0.Writer): _m0.Writer;
|
|
53
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgActivateContract;
|
|
54
|
-
fromJSON(object: any): MsgActivateContract;
|
|
55
|
-
toJSON(message: MsgActivateContract): unknown;
|
|
56
|
-
fromPartial(object: DeepPartial<MsgActivateContract>): MsgActivateContract;
|
|
57
|
-
};
|
|
58
|
-
export declare const MsgActivateContractResponse: {
|
|
59
|
-
encode(_: MsgActivateContractResponse, writer?: _m0.Writer): _m0.Writer;
|
|
60
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgActivateContractResponse;
|
|
61
|
-
fromJSON(_: any): MsgActivateContractResponse;
|
|
62
|
-
toJSON(_: MsgActivateContractResponse): unknown;
|
|
63
|
-
fromPartial(_: DeepPartial<MsgActivateContractResponse>): MsgActivateContractResponse;
|
|
64
|
-
};
|
|
65
|
-
export declare const MsgSetParams: {
|
|
66
|
-
encode(message: MsgSetParams, writer?: _m0.Writer): _m0.Writer;
|
|
67
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetParams;
|
|
68
|
-
fromJSON(object: any): MsgSetParams;
|
|
69
|
-
toJSON(message: MsgSetParams): unknown;
|
|
70
|
-
fromPartial(object: DeepPartial<MsgSetParams>): MsgSetParams;
|
|
71
|
-
};
|
|
72
|
-
export declare const MsgSetParamsResponse: {
|
|
73
|
-
encode(_: MsgSetParamsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
74
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetParamsResponse;
|
|
75
|
-
fromJSON(_: any): MsgSetParamsResponse;
|
|
76
|
-
toJSON(_: MsgSetParamsResponse): unknown;
|
|
77
|
-
fromPartial(_: DeepPartial<MsgSetParamsResponse>): MsgSetParamsResponse;
|
|
78
|
-
};
|
|
79
|
-
export declare const MsgUpdateParams: {
|
|
80
|
-
encode(message: MsgUpdateParams, writer?: _m0.Writer): _m0.Writer;
|
|
81
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgUpdateParams;
|
|
82
|
-
fromJSON(object: any): MsgUpdateParams;
|
|
83
|
-
toJSON(message: MsgUpdateParams): unknown;
|
|
84
|
-
fromPartial(object: DeepPartial<MsgUpdateParams>): MsgUpdateParams;
|
|
85
|
-
};
|
|
86
|
-
export declare const MsgUpdateParamsResponse: {
|
|
87
|
-
encode(_: MsgUpdateParamsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
88
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgUpdateParamsResponse;
|
|
89
|
-
fromJSON(_: any): MsgUpdateParamsResponse;
|
|
90
|
-
toJSON(_: MsgUpdateParamsResponse): unknown;
|
|
91
|
-
fromPartial(_: DeepPartial<MsgUpdateParamsResponse>): MsgUpdateParamsResponse;
|
|
92
|
-
};
|
|
93
2
|
/** Msg defines the Msg service. */
|
|
94
3
|
export interface Msg {
|
|
95
|
-
DeactivateContract(request: MsgDeactivateContract): Promise<MsgDeactivateContractResponse>;
|
|
96
|
-
ActivateContract(request: MsgActivateContract): Promise<MsgActivateContractResponse>;
|
|
97
|
-
SetParams(request: MsgSetParams): Promise<MsgSetParamsResponse>;
|
|
98
|
-
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
|
|
99
4
|
}
|
|
100
5
|
export declare class MsgClientImpl implements Msg {
|
|
101
6
|
private readonly rpc;
|
|
102
7
|
constructor(rpc: Rpc);
|
|
103
|
-
DeactivateContract(request: MsgDeactivateContract): Promise<MsgDeactivateContractResponse>;
|
|
104
|
-
ActivateContract(request: MsgActivateContract): Promise<MsgActivateContractResponse>;
|
|
105
|
-
SetParams(request: MsgSetParams): Promise<MsgSetParamsResponse>;
|
|
106
|
-
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
|
|
107
8
|
}
|
|
108
9
|
interface Rpc {
|
|
109
10
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
110
11
|
}
|
|
111
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
112
|
-
export declare 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 {} ? {
|
|
113
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
114
|
-
} : Partial<T>;
|
|
115
12
|
export {};
|