@firmachain/firma-js 0.3.4 → 0.3.6-beta1
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/dist/index.js +5 -1
- package/dist/sdk/FirmaAuthzService.d.ts +8 -7
- package/dist/sdk/FirmaAuthzService.js +12 -22
- package/dist/sdk/FirmaBankService.js +2 -2
- package/dist/sdk/FirmaChainService.js +1 -1
- package/dist/sdk/FirmaContractService.d.ts +1 -1
- package/dist/sdk/FirmaContractService.js +6 -6
- package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
- package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
- package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
- package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
- package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
- package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
- package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
- package/dist/sdk/FirmaCosmWasmService.js +13 -13
- package/dist/sdk/FirmaDistributionService.d.ts +1 -1
- package/dist/sdk/FirmaDistributionService.js +6 -6
- package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
- package/dist/sdk/FirmaFeeGrantService.js +9 -26
- package/dist/sdk/FirmaGovService.d.ts +1 -1
- package/dist/sdk/FirmaGovService.js +14 -14
- package/dist/sdk/FirmaIbcService.d.ts +3 -3
- package/dist/sdk/FirmaIbcService.js +11 -8
- package/dist/sdk/FirmaIpfsService.js +1 -1
- package/dist/sdk/FirmaMintService.js +1 -1
- package/dist/sdk/FirmaNftService.d.ts +1 -1
- package/dist/sdk/FirmaNftService.js +6 -6
- package/dist/sdk/FirmaSlashingService.js +1 -1
- package/dist/sdk/FirmaStakingService.d.ts +3 -3
- package/dist/sdk/FirmaStakingService.js +6 -6
- package/dist/sdk/FirmaTokenService.d.ts +1 -1
- package/dist/sdk/FirmaTokenService.js +5 -5
- package/dist/sdk/FirmaUtil.d.ts +26 -23
- package/dist/sdk/FirmaUtil.js +157 -137
- package/dist/sdk/FirmaWalletService.d.ts +5 -9
- package/dist/sdk/FirmaWalletService.js +86 -52
- package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
- package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
- package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
- package/dist/sdk/firmachain/authz/index.js +5 -1
- package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
- package/dist/sdk/firmachain/bank/index.js +5 -1
- package/dist/sdk/firmachain/common/ITxClient.d.ts +3 -3
- package/dist/sdk/firmachain/common/ITxClient.js +25 -83
- package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
- package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
- package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
- package/dist/sdk/firmachain/common/TxCommon.d.ts +14 -30
- package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
- package/dist/sdk/firmachain/common/accounts.js +7 -7
- package/dist/sdk/firmachain/common/events.js +2 -2
- package/dist/sdk/firmachain/common/fee.d.ts +2 -2
- package/dist/sdk/firmachain/common/fee.js +4 -2
- package/dist/sdk/firmachain/common/index.d.ts +0 -1
- package/dist/sdk/firmachain/common/index.js +5 -4
- package/dist/sdk/firmachain/common/signing.d.ts +13 -9
- package/dist/sdk/firmachain/common/signing.js +81 -36
- package/dist/sdk/firmachain/common/signingprotobufstargateclient.d.ts +34 -0
- package/dist/sdk/firmachain/common/signingprotobufstargateclient.js +319 -0
- package/dist/sdk/firmachain/common/signingstargateclient.d.ts +21 -105
- package/dist/sdk/firmachain/common/signingstargateclient.js +120 -472
- package/dist/sdk/firmachain/common/{stargateclient.d.ts → stargateClient.d.ts} +11 -60
- package/dist/sdk/firmachain/common/{stargateclient.js → stargateClient.js} +109 -203
- package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
- package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
- package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
- package/dist/sdk/firmachain/contract/index.js +5 -1
- package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
- package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
- package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
- package/dist/sdk/firmachain/distribution/index.js +5 -1
- package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
- package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
- package/dist/sdk/firmachain/feegrant/index.js +5 -1
- package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
- package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
- package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
- package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
- package/dist/sdk/firmachain/gov/index.js +5 -1
- package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
- package/dist/sdk/firmachain/ibc/index.js +5 -1
- package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
- package/dist/sdk/firmachain/mint/index.js +5 -1
- package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
- package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
- package/dist/sdk/firmachain/nft/index.js +5 -1
- package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
- package/dist/sdk/firmachain/slashing/index.js +5 -1
- package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
- package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
- package/dist/sdk/firmachain/staking/index.js +5 -1
- package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
- package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
- package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
- package/dist/sdk/firmachain/token/index.js +5 -1
- package/dist/test/00.wallet.test.js +4 -4
- package/dist/test/01.contract_tx.test.js +5 -5
- package/dist/test/02.contract_query.test.js +15 -15
- package/dist/test/03.contract_scenario.test.js +28 -28
- package/dist/test/04.bank_tx.test.js +4 -4
- package/dist/test/05.bank_query.test.js +9 -9
- package/dist/test/06.feegrant_tx.test.js +59 -35
- package/dist/test/07.feegrant_query.test.js +18 -15
- package/dist/test/08.gas_estimate.test.js +110 -70
- package/dist/test/09.ipfs.test.js +4 -4
- package/dist/test/10.nft_tx.test.js +7 -7
- package/dist/test/11.nft_query.test.js +9 -9
- package/dist/test/12.staking_tx.test.js +27 -15
- package/dist/test/13.staking_query.test.js +20 -20
- package/dist/test/14.distribution_tx.test.js +8 -8
- package/dist/test/15.distribution_query.test.js +15 -15
- package/dist/test/16.gov_tx.test.js +17 -17
- package/dist/test/17.gov_query.test.js +19 -19
- package/dist/test/18.util.test.js +105 -63
- package/dist/test/19.chain.test.js +38 -38
- package/dist/test/20.slashing_query.test.js +25 -25
- package/dist/test/21.token_tx.test.js +6 -6
- package/dist/test/22.token_query.test.js +4 -4
- package/dist/test/23.authz_tx.test.js +77 -47
- package/dist/test/24.authz_query.test.js +66 -67
- package/dist/test/25.cosmwasm_tx.test.js +7 -7
- package/dist/test/26.cosmwasm_query.test.js +127 -59
- package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +41 -40
- package/dist/test/28.ibc_tx.test.js +8 -8
- package/dist/test/29.mint_query.test.js +2 -2
- package/dist/test/30.cw20_tx.test.js +20 -20
- package/dist/test/31.cw20_query.test.js +24 -24
- package/dist/test/32.cw721_tx.test.js +19 -19
- package/dist/test/33.cw721_query.test.js +32 -32
- package/dist/test/34.cw_bridge_tx.test.js +19 -19
- package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
- package/dist/test/36.cw_bridge_query.test.js +20 -20
- package/dist/test/37.cw_marketplace_tx.test.js +32 -32
- package/dist/test/38.cw_marketplace_query.test.js +2 -2
- package/dist/test/config_test.d.ts +2 -2
- package/dist/test/config_test.js +22 -5
- package/package.json +9 -10
- package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
- package/dist/sdk/firmachain/amino/addresses.js +0 -46
- package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
- package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
- package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
- package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
- package/dist/sdk/firmachain/amino/coins.d.ts +0 -42
- package/dist/sdk/firmachain/amino/coins.js +0 -90
- package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
- package/dist/sdk/firmachain/amino/encoding.js +0 -252
- package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
- package/dist/sdk/firmachain/amino/multisig.js +0 -42
- package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
- package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
- package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
- package/dist/sdk/firmachain/amino/signature.js +0 -36
- package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
- package/dist/sdk/firmachain/amino/signdoc.js +0 -68
- package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
- package/dist/sdk/firmachain/amino/signer.js +0 -2
- package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
- package/dist/sdk/firmachain/amino/stdtx.js +0 -17
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
- package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
- package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
- package/dist/sdk/firmachain/common/aminotypes.js +0 -74
- package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
- package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
- package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
- package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
- package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
- package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
- package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
- package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
- package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
- package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
- package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
- package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
- package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
- package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
- package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
- package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
- package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
- package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
- package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
- package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
- package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
- package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
- package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
- package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
- package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
- package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
- package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
- package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
- package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
- package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
- package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
- package/dist/sdk/firmachain/common/modules/index.js +0 -101
- package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
- package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
- package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
- package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
- package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
- package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
- package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
- package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
- package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
- package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
- package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
- package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
- package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
- package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
- package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
- package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
- package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
- package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
- package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
- package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
- package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
- package/dist/sdk/firmachain/common/search.d.ts +0 -10
- package/dist/sdk/firmachain/common/search.js +0 -7
- package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
- package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
- /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
- /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
- /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
- /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -51,10 +51,14 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
51
51
|
}
|
|
52
52
|
return ar;
|
|
53
53
|
};
|
|
54
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
55
|
-
for (var i = 0,
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
+
if (ar || !(i in from)) {
|
|
57
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
+
ar[i] = from[i];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
58
62
|
};
|
|
59
63
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
64
|
exports.decrypt = exports.encrypt = exports.supportedAlgorithms = exports.executeKdf = exports.cosmjsSalt = void 0;
|
|
@@ -65,7 +69,7 @@ var encoding_1 = require("@cosmjs/encoding");
|
|
|
65
69
|
* This reduces the scope of a potential rainbow attack to all CosmJS users.
|
|
66
70
|
* Must be 16 bytes due to implementation limitations.
|
|
67
71
|
*/
|
|
68
|
-
exports.cosmjsSalt = encoding_1.toAscii("The CosmJS salt.");
|
|
72
|
+
exports.cosmjsSalt = (0, encoding_1.toAscii)("The CosmJS salt.");
|
|
69
73
|
function executeKdf(password, configuration) {
|
|
70
74
|
return __awaiter(this, void 0, void 0, function () {
|
|
71
75
|
var options;
|
|
@@ -73,7 +77,7 @@ function executeKdf(password, configuration) {
|
|
|
73
77
|
switch (configuration.algorithm) {
|
|
74
78
|
case "argon2id": {
|
|
75
79
|
options = configuration.params;
|
|
76
|
-
if (!crypto_1.isArgon2idOptions(options))
|
|
80
|
+
if (!(0, crypto_1.isArgon2idOptions)(options))
|
|
77
81
|
throw new Error("Invalid format of argon2id params");
|
|
78
82
|
return [2 /*return*/, crypto_1.Argon2id.execute(password, exports.cosmjsSalt, options)];
|
|
79
83
|
}
|
|
@@ -102,12 +106,12 @@ function encrypt(plaintext, encryptionKey, config) {
|
|
|
102
106
|
case 1:
|
|
103
107
|
nonce = crypto_1.Random.getBytes(crypto_1.xchacha20NonceLength);
|
|
104
108
|
_b = Uint8Array.bind;
|
|
105
|
-
_c = [__spreadArray([], __read(nonce))];
|
|
109
|
+
_c = [__spreadArray([], __read(nonce), false)];
|
|
106
110
|
return [4 /*yield*/, crypto_1.Xchacha20poly1305Ietf.encrypt(plaintext, encryptionKey, nonce)];
|
|
107
111
|
case 2:
|
|
108
112
|
// Prepend fixed-length nonce to ciphertext as suggested in the example from https://github.com/jedisct1/libsodium.js#api
|
|
109
|
-
return [2 /*return*/, new (_b.apply(Uint8Array, [void 0, __spreadArray.apply(void 0, _c.concat([__read.apply(void 0, [(_d.sent())])]))]))()];
|
|
110
|
-
case 3: throw new Error("Unsupported encryption algorithm: '"
|
|
113
|
+
return [2 /*return*/, new (_b.apply(Uint8Array, [void 0, __spreadArray.apply(void 0, _c.concat([__read.apply(void 0, [(_d.sent())]), false]))]))()];
|
|
114
|
+
case 3: throw new Error("Unsupported encryption algorithm: '".concat(config.algorithm, "'"));
|
|
111
115
|
}
|
|
112
116
|
});
|
|
113
117
|
});
|
|
@@ -123,7 +127,7 @@ function decrypt(ciphertext, encryptionKey, config) {
|
|
|
123
127
|
return [2 /*return*/, crypto_1.Xchacha20poly1305Ietf.decrypt(ciphertext.slice(crypto_1.xchacha20NonceLength), encryptionKey, nonce)];
|
|
124
128
|
}
|
|
125
129
|
default:
|
|
126
|
-
throw new Error("Unsupported encryption algorithm: '"
|
|
130
|
+
throw new Error("Unsupported encryption algorithm: '".concat(config.algorithm, "'"));
|
|
127
131
|
}
|
|
128
132
|
return [2 /*return*/];
|
|
129
133
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -87,7 +87,7 @@ var ContractQueryClient = /** @class */ (function () {
|
|
|
87
87
|
return __generator(this, function (_a) {
|
|
88
88
|
switch (_a.label) {
|
|
89
89
|
case 0:
|
|
90
|
-
path = "/firmachain/firmachain/contract/contractFile/"
|
|
90
|
+
path = "/firmachain/firmachain/contract/contractFile/".concat(fileHash);
|
|
91
91
|
return [4 /*yield*/, this.axios.get(path)];
|
|
92
92
|
case 1:
|
|
93
93
|
result = _a.sent();
|
|
@@ -122,7 +122,7 @@ var ContractQueryClient = /** @class */ (function () {
|
|
|
122
122
|
return __generator(this, function (_a) {
|
|
123
123
|
switch (_a.label) {
|
|
124
124
|
case 0:
|
|
125
|
-
path = "/firmachain/firmachain/contract/contractLog/"
|
|
125
|
+
path = "/firmachain/firmachain/contract/contractLog/".concat(logId);
|
|
126
126
|
return [4 /*yield*/, this.axios.get(path)];
|
|
127
127
|
case 1:
|
|
128
128
|
result = _a.sent();
|
|
@@ -22,28 +22,28 @@ export interface MsgAddContractLogResponse {
|
|
|
22
22
|
}
|
|
23
23
|
export declare const MsgCreateContractFile: {
|
|
24
24
|
encode(message: MsgCreateContractFile, writer?: Writer): Writer;
|
|
25
|
-
decode(input: Reader | Uint8Array, length?: number
|
|
25
|
+
decode(input: Reader | Uint8Array, length?: number): MsgCreateContractFile;
|
|
26
26
|
fromJSON(object: any): MsgCreateContractFile;
|
|
27
27
|
toJSON(message: MsgCreateContractFile): unknown;
|
|
28
28
|
fromPartial(object: DeepPartial<MsgCreateContractFile>): MsgCreateContractFile;
|
|
29
29
|
};
|
|
30
30
|
export declare const MsgCreateContractFileResponse: {
|
|
31
31
|
encode(_: MsgCreateContractFileResponse, writer?: Writer): Writer;
|
|
32
|
-
decode(input: Reader | Uint8Array, length?: number
|
|
32
|
+
decode(input: Reader | Uint8Array, length?: number): MsgCreateContractFileResponse;
|
|
33
33
|
fromJSON(_: any): MsgCreateContractFileResponse;
|
|
34
34
|
toJSON(_: MsgCreateContractFileResponse): unknown;
|
|
35
35
|
fromPartial(_: DeepPartial<MsgCreateContractFileResponse>): MsgCreateContractFileResponse;
|
|
36
36
|
};
|
|
37
37
|
export declare const MsgAddContractLog: {
|
|
38
38
|
encode(message: MsgAddContractLog, writer?: Writer): Writer;
|
|
39
|
-
decode(input: Reader | Uint8Array, length?: number
|
|
39
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddContractLog;
|
|
40
40
|
fromJSON(object: any): MsgAddContractLog;
|
|
41
41
|
toJSON(message: MsgAddContractLog): unknown;
|
|
42
42
|
fromPartial(object: DeepPartial<MsgAddContractLog>): MsgAddContractLog;
|
|
43
43
|
};
|
|
44
44
|
export declare const MsgAddContractLogResponse: {
|
|
45
45
|
encode(message: MsgAddContractLogResponse, writer?: Writer): Writer;
|
|
46
|
-
decode(input: Reader | Uint8Array, length?: number
|
|
46
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddContractLogResponse;
|
|
47
47
|
fromJSON(object: any): MsgAddContractLogResponse;
|
|
48
48
|
toJSON(message: MsgAddContractLogResponse): unknown;
|
|
49
49
|
fromPartial(object: DeepPartial<MsgAddContractLogResponse>): MsgAddContractLogResponse;
|
|
@@ -62,8 +62,8 @@ export declare class MsgClientImpl implements Msg {
|
|
|
62
62
|
interface Rpc {
|
|
63
63
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
export
|
|
65
|
+
type Builtin = Date | Function | Uint8Array | string | number | undefined;
|
|
66
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
67
67
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
68
68
|
} : Partial<T>;
|
|
69
69
|
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -72,7 +72,7 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
72
72
|
return __generator(this, function (_a) {
|
|
73
73
|
switch (_a.label) {
|
|
74
74
|
case 0:
|
|
75
|
-
path = "/cosmwasm/wasm/v1/code/"
|
|
75
|
+
path = "/cosmwasm/wasm/v1/code/".concat(codeId);
|
|
76
76
|
return [4 /*yield*/, this.axios.get(path)];
|
|
77
77
|
case 1:
|
|
78
78
|
result = _a.sent();
|
|
@@ -87,7 +87,7 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
87
87
|
return __generator(this, function (_a) {
|
|
88
88
|
switch (_a.label) {
|
|
89
89
|
case 0:
|
|
90
|
-
path = "/cosmwasm/wasm/v1/code/"
|
|
90
|
+
path = "/cosmwasm/wasm/v1/code/".concat(codeId, "/contracts");
|
|
91
91
|
return [4 /*yield*/, this.axios.get(path, { params: { "pagination.key": paginationKey } })];
|
|
92
92
|
case 1:
|
|
93
93
|
result = _a.sent();
|
|
@@ -106,7 +106,7 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
106
106
|
return __generator(this, function (_a) {
|
|
107
107
|
switch (_a.label) {
|
|
108
108
|
case 0:
|
|
109
|
-
path = "/cosmwasm/wasm/v1/contract/"
|
|
109
|
+
path = "/cosmwasm/wasm/v1/contract/".concat(contractAddress);
|
|
110
110
|
return [4 /*yield*/, this.axios.get(path)];
|
|
111
111
|
case 1:
|
|
112
112
|
result = _a.sent();
|
|
@@ -121,7 +121,7 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
121
121
|
return __generator(this, function (_a) {
|
|
122
122
|
switch (_a.label) {
|
|
123
123
|
case 0:
|
|
124
|
-
path = "/cosmwasm/wasm/v1/contract/"
|
|
124
|
+
path = "/cosmwasm/wasm/v1/contract/".concat(contractAddress, "/history");
|
|
125
125
|
return [4 /*yield*/, this.axios.get(path)];
|
|
126
126
|
case 1:
|
|
127
127
|
result = _a.sent();
|
|
@@ -137,11 +137,11 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
137
137
|
switch (_a.label) {
|
|
138
138
|
case 0:
|
|
139
139
|
hexStringBase64 = Buffer.from(hexString, 'hex').toString('base64');
|
|
140
|
-
path = "/cosmwasm/wasm/v1/contract/"
|
|
140
|
+
path = "/cosmwasm/wasm/v1/contract/".concat(contractAddress, "/raw/").concat(hexStringBase64);
|
|
141
141
|
return [4 /*yield*/, this.axios.get(path)];
|
|
142
142
|
case 1:
|
|
143
143
|
result = _a.sent();
|
|
144
|
-
return [2 /*return*/, result.data.data];
|
|
144
|
+
return [2 /*return*/, JSON.stringify(result.data.data)];
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
});
|
|
@@ -153,7 +153,7 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
153
153
|
switch (_a.label) {
|
|
154
154
|
case 0:
|
|
155
155
|
queryBase64 = Buffer.from(query, 'binary').toString('base64');
|
|
156
|
-
path = "/cosmwasm/wasm/v1/contract/"
|
|
156
|
+
path = "/cosmwasm/wasm/v1/contract/".concat(contractAddress, "/smart/").concat(queryBase64);
|
|
157
157
|
return [4 /*yield*/, this.axios.get(path)];
|
|
158
158
|
case 1:
|
|
159
159
|
result = _a.sent();
|
|
@@ -168,7 +168,7 @@ var CosmWasmQueryClient = /** @class */ (function () {
|
|
|
168
168
|
return __generator(this, function (_a) {
|
|
169
169
|
switch (_a.label) {
|
|
170
170
|
case 0:
|
|
171
|
-
path = "/cosmwasm/wasm/v1/contract/"
|
|
171
|
+
path = "/cosmwasm/wasm/v1/contract/".concat(contractAddress, "/state");
|
|
172
172
|
return [4 /*yield*/, this.axios.get(path)];
|
|
173
173
|
case 1:
|
|
174
174
|
result = _a.sent();
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -57,7 +57,7 @@ var DistributionQueryClient = /** @class */ (function () {
|
|
|
57
57
|
return __generator(this, function (_a) {
|
|
58
58
|
switch (_a.label) {
|
|
59
59
|
case 0:
|
|
60
|
-
path = "/cosmos/distribution/v1beta1/delegators/"
|
|
60
|
+
path = "/cosmos/distribution/v1beta1/delegators/".concat(address, "/rewards/").concat(validatorAddress);
|
|
61
61
|
return [4 /*yield*/, this.axios.get(path)];
|
|
62
62
|
case 1:
|
|
63
63
|
result = _a.sent();
|
|
@@ -76,7 +76,7 @@ var DistributionQueryClient = /** @class */ (function () {
|
|
|
76
76
|
return __generator(this, function (_a) {
|
|
77
77
|
switch (_a.label) {
|
|
78
78
|
case 0:
|
|
79
|
-
path = "/cosmos/distribution/v1beta1/validators/"
|
|
79
|
+
path = "/cosmos/distribution/v1beta1/validators/".concat(address, "/outstanding_rewards");
|
|
80
80
|
return [4 /*yield*/, this.axios.get(path)];
|
|
81
81
|
case 1:
|
|
82
82
|
result = _a.sent();
|
|
@@ -91,7 +91,7 @@ var DistributionQueryClient = /** @class */ (function () {
|
|
|
91
91
|
return __generator(this, function (_a) {
|
|
92
92
|
switch (_a.label) {
|
|
93
93
|
case 0:
|
|
94
|
-
path = "/cosmos/distribution/v1beta1/validators/"
|
|
94
|
+
path = "/cosmos/distribution/v1beta1/validators/".concat(address, "/commission");
|
|
95
95
|
return [4 /*yield*/, this.axios.get(path)];
|
|
96
96
|
case 1:
|
|
97
97
|
result = _a.sent();
|
|
@@ -106,7 +106,7 @@ var DistributionQueryClient = /** @class */ (function () {
|
|
|
106
106
|
return __generator(this, function (_a) {
|
|
107
107
|
switch (_a.label) {
|
|
108
108
|
case 0:
|
|
109
|
-
path = "/cosmos/distribution/v1beta1/delegators/"
|
|
109
|
+
path = "/cosmos/distribution/v1beta1/delegators/".concat(address, "/rewards");
|
|
110
110
|
return [4 /*yield*/, this.axios.get(path)];
|
|
111
111
|
case 1:
|
|
112
112
|
result = _a.sent();
|
|
@@ -153,7 +153,7 @@ var DistributionQueryClient = /** @class */ (function () {
|
|
|
153
153
|
return __generator(this, function (_a) {
|
|
154
154
|
switch (_a.label) {
|
|
155
155
|
case 0:
|
|
156
|
-
path = "/cosmos/distribution/v1beta1/delegators/"
|
|
156
|
+
path = "/cosmos/distribution/v1beta1/delegators/".concat(address, "/withdraw_address");
|
|
157
157
|
return [4 /*yield*/, this.axios.get(path)];
|
|
158
158
|
case 1:
|
|
159
159
|
result = _a.sent();
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -57,7 +57,7 @@ var FeeGrantQueryClient = /** @class */ (function () {
|
|
|
57
57
|
return __generator(this, function (_a) {
|
|
58
58
|
switch (_a.label) {
|
|
59
59
|
case 0:
|
|
60
|
-
path = "/cosmos/feegrant/v1beta1/allowance/"
|
|
60
|
+
path = "/cosmos/feegrant/v1beta1/allowance/".concat(granterAddress, "/").concat(granteeAddress);
|
|
61
61
|
return [4 /*yield*/, this.axios.get(path)];
|
|
62
62
|
case 1:
|
|
63
63
|
result = _a.sent();
|
|
@@ -72,7 +72,7 @@ var FeeGrantQueryClient = /** @class */ (function () {
|
|
|
72
72
|
return __generator(this, function (_a) {
|
|
73
73
|
switch (_a.label) {
|
|
74
74
|
case 0:
|
|
75
|
-
path = "/cosmos/feegrant/v1beta1/allowances/"
|
|
75
|
+
path = "/cosmos/feegrant/v1beta1/allowances/".concat(granteeAddress);
|
|
76
76
|
return [4 /*yield*/, this.axios.get(path)];
|
|
77
77
|
case 1:
|
|
78
78
|
result = _a.sent();
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="long" />
|
|
2
|
-
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
|
3
|
-
import _m0 from "protobufjs/minimal";
|
|
4
|
-
import { BinaryWriter } from "cosmjs-types/binary";
|
|
5
2
|
import { Any } from "../google/protobuf/any";
|
|
6
|
-
import {
|
|
3
|
+
import { BinaryWriter } from "cosmjs-types/binary";
|
|
7
4
|
export interface MsgGrantAllowance {
|
|
8
5
|
granter: string;
|
|
9
6
|
grantee: string;
|
|
@@ -18,41 +15,9 @@ export declare const MsgGrantAllowance: {
|
|
|
18
15
|
fromPartial(object: DeepPartial<MsgGrantAllowance>): MsgGrantAllowance;
|
|
19
16
|
};
|
|
20
17
|
export declare const MsgRevokeAllowance: {
|
|
21
|
-
encode(message: MsgRevokeAllowance, writer?:
|
|
18
|
+
encode(message: MsgRevokeAllowance, writer?: BinaryWriter): BinaryWriter;
|
|
22
19
|
fromPartial(object: DeepPartial<MsgRevokeAllowance>): MsgRevokeAllowance;
|
|
23
20
|
};
|
|
24
|
-
export interface BasicAllowance {
|
|
25
|
-
/**
|
|
26
|
-
* spend_limit specifies the maximum amount of tokens that can be spent
|
|
27
|
-
* by this allowance and will be updated as tokens are spent. If it is
|
|
28
|
-
* empty, there is no spend limit and any amount of coins can be spent.
|
|
29
|
-
*/
|
|
30
|
-
spendLimit: Coin[];
|
|
31
|
-
/** expiration specifies an optional time when this allowance expires */
|
|
32
|
-
expiration: Date | undefined;
|
|
33
|
-
}
|
|
34
|
-
export interface PeriodicAllowance {
|
|
35
|
-
/** basic specifies a struct of `BasicAllowance` */
|
|
36
|
-
basic: BasicAllowance | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* period specifies the time duration in which period_spend_limit coins can
|
|
39
|
-
* be spent before that allowance is reset
|
|
40
|
-
*/
|
|
41
|
-
period: Duration | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* period_spend_limit specifies the maximum number of coins that can be spent
|
|
44
|
-
* in the period
|
|
45
|
-
*/
|
|
46
|
-
periodSpendLimit: Coin[];
|
|
47
|
-
/** period_can_spend is the number of coins left to be spent before the period_reset time */
|
|
48
|
-
periodCanSpend: Coin[];
|
|
49
|
-
/**
|
|
50
|
-
* period_reset is the time at which this period resets and a new one begins,
|
|
51
|
-
* it is calculated from the start time of the first transaction after the
|
|
52
|
-
* last period ended
|
|
53
|
-
*/
|
|
54
|
-
periodReset: Date | undefined;
|
|
55
|
-
}
|
|
56
21
|
/** AllowedMsgAllowance creates allowance only for specified message types. */
|
|
57
22
|
export interface AllowedMsgAllowance {
|
|
58
23
|
/** allowance can be any of basic and filtered fee allowance. */
|
|
@@ -63,14 +28,8 @@ export interface AllowedMsgAllowance {
|
|
|
63
28
|
export declare const AllowedMsgAllowance: {
|
|
64
29
|
encode(message: AllowedMsgAllowance, writer?: BinaryWriter): BinaryWriter;
|
|
65
30
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
export declare const BasicAllowance: {
|
|
70
|
-
encode(message: BasicAllowance, writer?: BinaryWriter): BinaryWriter;
|
|
71
|
-
};
|
|
72
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long;
|
|
73
|
-
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
31
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long;
|
|
32
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
74
33
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
75
34
|
} : Partial<T>;
|
|
76
35
|
export {};
|
|
@@ -21,17 +21,10 @@ var __values = (this && this.__values) || function(o) {
|
|
|
21
21
|
};
|
|
22
22
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
23
23
|
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
29
|
-
var coin_1 = require("cosmjs-types/cosmos/base/v1beta1/coin");
|
|
30
|
-
var minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
31
|
-
var binary_1 = require("cosmjs-types/binary");
|
|
32
|
-
var timestamp_1 = require("../google/protobuf/timestamp");
|
|
25
|
+
exports.AllowedMsgAllowance = exports.MsgRevokeAllowance = exports.MsgGrantAllowance = void 0;
|
|
33
26
|
var any_1 = require("../google/protobuf/any");
|
|
34
|
-
var
|
|
27
|
+
var binary_1 = require("cosmjs-types/binary");
|
|
35
28
|
var baseMsgGrantAllowance = { granter: "", grantee: "" };
|
|
36
29
|
var baseMsgRevokeAllowance = { granter: "", grantee: "" };
|
|
37
30
|
exports.MsgGrantAllowance = {
|
|
@@ -73,7 +66,7 @@ exports.MsgGrantAllowance = {
|
|
|
73
66
|
};
|
|
74
67
|
exports.MsgRevokeAllowance = {
|
|
75
68
|
encode: function (message, writer) {
|
|
76
|
-
if (writer === void 0) { writer =
|
|
69
|
+
if (writer === void 0) { writer = binary_1.BinaryWriter.create(); }
|
|
77
70
|
if (message.granter !== "") {
|
|
78
71
|
writer.uint32(10).string(message.granter);
|
|
79
72
|
}
|
|
@@ -122,75 +115,3 @@ exports.AllowedMsgAllowance = {
|
|
|
122
115
|
return writer;
|
|
123
116
|
},
|
|
124
117
|
};
|
|
125
|
-
exports.PeriodicAllowance = {
|
|
126
|
-
encode: function (message, writer) {
|
|
127
|
-
var e_2, _a, e_3, _b;
|
|
128
|
-
if (writer === void 0) { writer = binary_1.BinaryWriter.create(); }
|
|
129
|
-
if (message.basic !== undefined) {
|
|
130
|
-
exports.BasicAllowance.encode(message.basic, writer.uint32(10).fork()).ldelim();
|
|
131
|
-
}
|
|
132
|
-
if (message.period !== undefined) {
|
|
133
|
-
duration_1.Duration.encode(message.period, writer.uint32(18).fork()).ldelim();
|
|
134
|
-
}
|
|
135
|
-
try {
|
|
136
|
-
for (var _c = __values(message.periodSpendLimit), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
137
|
-
var v = _d.value;
|
|
138
|
-
coin_1.Coin.encode(v, writer.uint32(26).fork()).ldelim();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
142
|
-
finally {
|
|
143
|
-
try {
|
|
144
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
145
|
-
}
|
|
146
|
-
finally { if (e_2) throw e_2.error; }
|
|
147
|
-
}
|
|
148
|
-
try {
|
|
149
|
-
for (var _e = __values(message.periodCanSpend), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
150
|
-
var v = _f.value;
|
|
151
|
-
coin_1.Coin.encode(v, writer.uint32(34).fork()).ldelim();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
155
|
-
finally {
|
|
156
|
-
try {
|
|
157
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
158
|
-
}
|
|
159
|
-
finally { if (e_3) throw e_3.error; }
|
|
160
|
-
}
|
|
161
|
-
if (message.periodReset !== undefined) {
|
|
162
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.periodReset), writer.uint32(42).fork()).ldelim();
|
|
163
|
-
}
|
|
164
|
-
return writer;
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
exports.BasicAllowance = {
|
|
168
|
-
encode: function (message, writer) {
|
|
169
|
-
var e_4, _a;
|
|
170
|
-
if (writer === void 0) { writer = binary_1.BinaryWriter.create(); }
|
|
171
|
-
try {
|
|
172
|
-
for (var _b = __values(message.spendLimit), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
173
|
-
var v = _c.value;
|
|
174
|
-
coin_1.Coin.encode(v, writer.uint32(10).fork()).ldelim();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
178
|
-
finally {
|
|
179
|
-
try {
|
|
180
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
181
|
-
}
|
|
182
|
-
finally { if (e_4) throw e_4.error; }
|
|
183
|
-
}
|
|
184
|
-
if (message.expiration !== undefined) {
|
|
185
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim();
|
|
186
|
-
}
|
|
187
|
-
return writer;
|
|
188
|
-
},
|
|
189
|
-
};
|
|
190
|
-
function toTimestamp(date) {
|
|
191
|
-
var millis = date.getTime();
|
|
192
|
-
return {
|
|
193
|
-
seconds: Math.floor(millis / 1000),
|
|
194
|
-
nanos: (millis % 1000) * 1000000,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -118,12 +118,12 @@ export interface Any {
|
|
|
118
118
|
}
|
|
119
119
|
export declare const Any: {
|
|
120
120
|
encode(message: Any, writer?: BinaryWriter): BinaryWriter;
|
|
121
|
-
decode(input: Reader | Uint8Array, length?: number
|
|
121
|
+
decode(input: Reader | Uint8Array, length?: number): Any;
|
|
122
122
|
fromJSON(object: any): Any;
|
|
123
123
|
fromPartial(object: DeepPartial<Any>): Any;
|
|
124
124
|
};
|
|
125
|
-
|
|
126
|
-
export
|
|
125
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
126
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
127
127
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
128
128
|
} : Partial<T>;
|
|
129
129
|
export {};
|