@taquito/taquito 17.3.2 → 17.4.0-beta-RC.0
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/README.md +1 -1
- package/dist/lib/batch/rpc-batch-provider.js +18 -19
- package/dist/lib/constants.js +27 -31
- package/dist/lib/context.js +0 -1
- package/dist/lib/contract/big-map.js +0 -1
- package/dist/lib/contract/compose.js +0 -1
- package/dist/lib/contract/contract-methods/contract-method-factory.js +0 -1
- package/dist/lib/contract/contract-methods/contract-method-flat-param.js +0 -1
- package/dist/lib/contract/contract-methods/contract-method-interface.js +0 -1
- package/dist/lib/contract/contract-methods/contract-method-object-param.js +0 -1
- package/dist/lib/contract/contract-methods/contract-on-chain-view.js +3 -4
- package/dist/lib/contract/contract.js +3 -4
- package/dist/lib/contract/errors.js +0 -1
- package/dist/lib/contract/index.js +5 -2
- package/dist/lib/contract/interface.js +0 -1
- package/dist/lib/contract/lambda-view.js +0 -1
- package/dist/lib/contract/manager-lambda.js +0 -1
- package/dist/lib/contract/prepare.js +3 -4
- package/dist/lib/contract/rpc-contract-provider.js +25 -26
- package/dist/lib/contract/sapling-state-abstraction.js +0 -1
- package/dist/lib/contract/semantic.js +0 -1
- package/dist/lib/contract/view_lambda.js +0 -1
- package/dist/lib/errors.js +0 -1
- package/dist/lib/estimate/errors.js +0 -1
- package/dist/lib/estimate/estimate-provider-interface.js +0 -1
- package/dist/lib/estimate/estimate.js +0 -1
- package/dist/lib/estimate/index.js +5 -2
- package/dist/lib/estimate/rpc-estimate-provider.js +15 -16
- package/dist/lib/extension/extension.js +0 -1
- package/dist/lib/forger/composite-forger.js +0 -1
- package/dist/lib/forger/errors.js +0 -1
- package/dist/lib/forger/rpc-forger.js +0 -1
- package/dist/lib/forger/taquito-local-forger.js +0 -1
- package/dist/lib/global-constants/default-global-constants-provider.js +0 -1
- package/dist/lib/global-constants/errors.js +0 -1
- package/dist/lib/global-constants/interface-global-constants-provider.js +0 -1
- package/dist/lib/global-constants/noop-global-constants-provider.js +0 -1
- package/dist/lib/injector/helper.js +0 -1
- package/dist/lib/injector/interface.js +0 -1
- package/dist/lib/injector/rpc-injector.js +1 -2
- package/dist/lib/operations/ballot-operation.js +0 -1
- package/dist/lib/operations/batch-operation.js +4 -5
- package/dist/lib/operations/delegate-operation.js +0 -1
- package/dist/lib/operations/drain-delegate-operation.js +0 -1
- package/dist/lib/operations/errors.js +4 -5
- package/dist/lib/operations/failing-noop-operation.js +0 -1
- package/dist/lib/operations/increase-paid-storage-operation.js +0 -1
- package/dist/lib/operations/index.js +0 -1
- package/dist/lib/operations/operations.js +18 -19
- package/dist/lib/operations/origination-operation.js +1 -2
- package/dist/lib/operations/proposals-operation.js +0 -1
- package/dist/lib/operations/register-global-constant-operation.js +0 -1
- package/dist/lib/operations/reveal-operation.js +4 -5
- package/dist/lib/operations/smart-rollup-add-messages-operation.js +0 -1
- package/dist/lib/operations/smart-rollup-originate-operation.js +0 -1
- package/dist/lib/operations/transaction-operation.js +4 -5
- package/dist/lib/operations/transfer-ticket-operation.js +0 -1
- package/dist/lib/operations/tx-rollup-batch-operation.js +0 -1
- package/dist/lib/operations/tx-rollup-origination-operation.js +0 -1
- package/dist/lib/operations/types.js +3 -4
- package/dist/lib/operations/update-consensus-key-operation.js +0 -1
- package/dist/lib/packer/interface.js +0 -1
- package/dist/lib/packer/michel-codec-packer.js +1 -2
- package/dist/lib/packer/rpc-packer.js +0 -1
- package/dist/lib/parser/interface.js +0 -1
- package/dist/lib/parser/michel-codec-parser.js +0 -1
- package/dist/lib/parser/noop-parser.js +0 -1
- package/dist/lib/prepare/index.js +5 -2
- package/dist/lib/prepare/interface.js +0 -1
- package/dist/lib/prepare/prepare-provider.js +55 -58
- package/dist/lib/provider.js +13 -14
- package/dist/lib/read-provider/interface.js +0 -1
- package/dist/lib/read-provider/rpc-read-adapter.js +0 -1
- package/dist/lib/signer/errors.js +0 -1
- package/dist/lib/signer/interface.js +0 -1
- package/dist/lib/signer/noop.js +0 -1
- package/dist/lib/subscribe/create-observable-from-subscription.js +0 -1
- package/dist/lib/subscribe/errors.js +0 -1
- package/dist/lib/subscribe/filters.js +4 -5
- package/dist/lib/subscribe/interface.js +0 -1
- package/dist/lib/subscribe/observable-subscription.js +3 -4
- package/dist/lib/subscribe/polling-subcribe-provider.js +12 -13
- package/dist/lib/taquito.js +5 -2
- package/dist/lib/tz/interface.js +0 -1
- package/dist/lib/tz/rpc-tz-provider.js +6 -7
- package/dist/lib/version.js +2 -3
- package/dist/lib/wallet/batch-operation.js +1 -2
- package/dist/lib/wallet/delegation-operation.js +0 -1
- package/dist/lib/wallet/errors.js +0 -1
- package/dist/lib/wallet/increase-paid-storage-operation.js +0 -1
- package/dist/lib/wallet/index.js +5 -2
- package/dist/lib/wallet/interface.js +0 -1
- package/dist/lib/wallet/legacy.js +4 -5
- package/dist/lib/wallet/operation-factory.js +11 -12
- package/dist/lib/wallet/operation.js +33 -34
- package/dist/lib/wallet/origination-operation.js +2 -3
- package/dist/lib/wallet/receipt.js +1 -2
- package/dist/lib/wallet/transaction-operation.js +0 -1
- package/dist/lib/wallet/wallet.js +14 -15
- package/dist/taquito.es6.js +6404 -6405
- package/dist/taquito.es6.js.map +1 -1
- package/dist/taquito.min.js +1 -1
- package/dist/taquito.min.js.LICENSE.txt +1 -1
- package/dist/taquito.umd.js +6407 -6411
- package/dist/taquito.umd.js.map +1 -1
- package/dist/types/batch/rpc-batch-provider.d.ts +121 -121
- package/dist/types/constants.d.ts +77 -77
- package/dist/types/context.d.ts +100 -100
- package/dist/types/contract/big-map.d.ts +35 -35
- package/dist/types/contract/compose.d.ts +5 -5
- package/dist/types/contract/contract-methods/contract-method-factory.d.ts +16 -16
- package/dist/types/contract/contract-methods/contract-method-flat-param.d.ts +43 -43
- package/dist/types/contract/contract-methods/contract-method-interface.d.ts +28 -28
- package/dist/types/contract/contract-methods/contract-method-object-param.d.ts +38 -38
- package/dist/types/contract/contract-methods/contract-on-chain-view.d.ts +43 -43
- package/dist/types/contract/contract.d.ts +94 -94
- package/dist/types/contract/errors.d.ts +83 -83
- package/dist/types/contract/index.d.ts +11 -11
- package/dist/types/contract/interface.d.ts +224 -224
- package/dist/types/contract/lambda-view.d.ts +19 -19
- package/dist/types/contract/manager-lambda.d.ts +73 -73
- package/dist/types/contract/prepare.d.ts +16 -16
- package/dist/types/contract/rpc-contract-provider.d.ts +240 -240
- package/dist/types/contract/sapling-state-abstraction.d.ts +17 -17
- package/dist/types/contract/semantic.d.ts +3 -3
- package/dist/types/contract/view_lambda.d.ts +34 -34
- package/dist/types/errors.d.ts +26 -26
- package/dist/types/estimate/errors.d.ts +8 -8
- package/dist/types/estimate/estimate-provider-interface.d.ts +114 -114
- package/dist/types/estimate/estimate.d.ts +94 -94
- package/dist/types/estimate/index.d.ts +4 -4
- package/dist/types/estimate/rpc-estimate-provider.d.ts +129 -129
- package/dist/types/extension/extension.d.ts +4 -4
- package/dist/types/forger/composite-forger.d.ts +6 -6
- package/dist/types/forger/errors.d.ts +16 -16
- package/dist/types/forger/rpc-forger.d.ts +7 -7
- package/dist/types/forger/taquito-local-forger.d.ts +8 -8
- package/dist/types/global-constants/default-global-constants-provider.d.ts +18 -18
- package/dist/types/global-constants/errors.d.ts +16 -16
- package/dist/types/global-constants/interface-global-constants-provider.d.ts +11 -11
- package/dist/types/global-constants/noop-global-constants-provider.d.ts +5 -5
- package/dist/types/injector/helper.d.ts +2 -2
- package/dist/types/injector/interface.d.ts +5 -5
- package/dist/types/injector/rpc-injector.d.ts +7 -7
- package/dist/types/operations/ballot-operation.d.ts +18 -18
- package/dist/types/operations/batch-operation.d.ts +19 -19
- package/dist/types/operations/delegate-operation.d.ts +24 -24
- package/dist/types/operations/drain-delegate-operation.d.ts +17 -17
- package/dist/types/operations/errors.d.ts +48 -48
- package/dist/types/operations/failing-noop-operation.d.ts +17 -17
- package/dist/types/operations/increase-paid-storage-operation.d.ts +23 -23
- package/dist/types/operations/index.d.ts +9 -9
- package/dist/types/operations/operations.d.ts +35 -35
- package/dist/types/operations/origination-operation.d.ts +35 -35
- package/dist/types/operations/proposals-operation.d.ts +17 -17
- package/dist/types/operations/register-global-constant-operation.d.ts +25 -25
- package/dist/types/operations/reveal-operation.d.ts +24 -24
- package/dist/types/operations/smart-rollup-add-messages-operation.d.ts +20 -20
- package/dist/types/operations/smart-rollup-originate-operation.d.ts +24 -24
- package/dist/types/operations/transaction-operation.d.ts +28 -28
- package/dist/types/operations/transfer-ticket-operation.d.ts +22 -22
- package/dist/types/operations/tx-rollup-batch-operation.d.ts +21 -21
- package/dist/types/operations/tx-rollup-origination-operation.d.ts +24 -24
- package/dist/types/operations/types.d.ts +420 -420
- package/dist/types/operations/update-consensus-key-operation.d.ts +22 -22
- package/dist/types/packer/interface.d.ts +4 -4
- package/dist/types/packer/michel-codec-packer.d.ts +5 -5
- package/dist/types/packer/rpc-packer.d.ts +8 -8
- package/dist/types/parser/interface.d.ts +4 -4
- package/dist/types/parser/michel-codec-parser.d.ts +16 -16
- package/dist/types/parser/noop-parser.d.ts +5 -5
- package/dist/types/prepare/index.d.ts +2 -2
- package/dist/types/prepare/interface.d.ts +135 -135
- package/dist/types/prepare/prepare-provider.d.ts +174 -174
- package/dist/types/provider.d.ts +49 -49
- package/dist/types/read-provider/interface.d.ts +121 -121
- package/dist/types/read-provider/rpc-read-adapter.d.ts +119 -119
- package/dist/types/signer/errors.d.ts +8 -8
- package/dist/types/signer/interface.d.ts +28 -28
- package/dist/types/signer/noop.d.ts +11 -11
- package/dist/types/subscribe/create-observable-from-subscription.d.ts +4 -4
- package/dist/types/subscribe/errors.d.ts +18 -18
- package/dist/types/subscribe/filters.d.ts +6 -6
- package/dist/types/subscribe/interface.d.ts +48 -48
- package/dist/types/subscribe/observable-subscription.d.ts +21 -21
- package/dist/types/subscribe/polling-subcribe-provider.d.ts +23 -23
- package/dist/types/taquito.d.ts +247 -247
- package/dist/types/tz/interface.d.ts +15 -15
- package/dist/types/tz/rpc-tz-provider.d.ts +12 -12
- package/dist/types/version.d.ts +4 -4
- package/dist/types/wallet/batch-operation.d.ts +12 -12
- package/dist/types/wallet/delegation-operation.d.ts +12 -12
- package/dist/types/wallet/errors.d.ts +16 -16
- package/dist/types/wallet/increase-paid-storage-operation.d.ts +12 -12
- package/dist/types/wallet/index.d.ts +7 -7
- package/dist/types/wallet/interface.d.ts +41 -41
- package/dist/types/wallet/legacy.d.ts +16 -16
- package/dist/types/wallet/operation-factory.d.ts +28 -28
- package/dist/types/wallet/operation.d.ts +54 -54
- package/dist/types/wallet/origination-operation.d.ts +14 -14
- package/dist/types/wallet/receipt.d.ts +16 -16
- package/dist/types/wallet/transaction-operation.d.ts +12 -12
- package/dist/types/wallet/wallet.d.ts +174 -174
- package/package.json +39 -40
- package/signature.json +3 -5
- package/dist/lib/batch/rpc-batch-provider.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/context.js.map +0 -1
- package/dist/lib/contract/big-map.js.map +0 -1
- package/dist/lib/contract/compose.js.map +0 -1
- package/dist/lib/contract/contract-methods/contract-method-factory.js.map +0 -1
- package/dist/lib/contract/contract-methods/contract-method-flat-param.js.map +0 -1
- package/dist/lib/contract/contract-methods/contract-method-interface.js.map +0 -1
- package/dist/lib/contract/contract-methods/contract-method-object-param.js.map +0 -1
- package/dist/lib/contract/contract-methods/contract-on-chain-view.js.map +0 -1
- package/dist/lib/contract/contract.js.map +0 -1
- package/dist/lib/contract/errors.js.map +0 -1
- package/dist/lib/contract/index.js.map +0 -1
- package/dist/lib/contract/interface.js.map +0 -1
- package/dist/lib/contract/lambda-view.js.map +0 -1
- package/dist/lib/contract/manager-lambda.js.map +0 -1
- package/dist/lib/contract/prepare.js.map +0 -1
- package/dist/lib/contract/rpc-contract-provider.js.map +0 -1
- package/dist/lib/contract/sapling-state-abstraction.js.map +0 -1
- package/dist/lib/contract/semantic.js.map +0 -1
- package/dist/lib/contract/view_lambda.js.map +0 -1
- package/dist/lib/errors.js.map +0 -1
- package/dist/lib/estimate/errors.js.map +0 -1
- package/dist/lib/estimate/estimate-provider-interface.js.map +0 -1
- package/dist/lib/estimate/estimate.js.map +0 -1
- package/dist/lib/estimate/index.js.map +0 -1
- package/dist/lib/estimate/rpc-estimate-provider.js.map +0 -1
- package/dist/lib/extension/extension.js.map +0 -1
- package/dist/lib/forger/composite-forger.js.map +0 -1
- package/dist/lib/forger/errors.js.map +0 -1
- package/dist/lib/forger/rpc-forger.js.map +0 -1
- package/dist/lib/forger/taquito-local-forger.js.map +0 -1
- package/dist/lib/global-constants/default-global-constants-provider.js.map +0 -1
- package/dist/lib/global-constants/errors.js.map +0 -1
- package/dist/lib/global-constants/interface-global-constants-provider.js.map +0 -1
- package/dist/lib/global-constants/noop-global-constants-provider.js.map +0 -1
- package/dist/lib/injector/helper.js.map +0 -1
- package/dist/lib/injector/interface.js.map +0 -1
- package/dist/lib/injector/rpc-injector.js.map +0 -1
- package/dist/lib/operations/ballot-operation.js.map +0 -1
- package/dist/lib/operations/batch-operation.js.map +0 -1
- package/dist/lib/operations/delegate-operation.js.map +0 -1
- package/dist/lib/operations/drain-delegate-operation.js.map +0 -1
- package/dist/lib/operations/errors.js.map +0 -1
- package/dist/lib/operations/failing-noop-operation.js.map +0 -1
- package/dist/lib/operations/increase-paid-storage-operation.js.map +0 -1
- package/dist/lib/operations/index.js.map +0 -1
- package/dist/lib/operations/operations.js.map +0 -1
- package/dist/lib/operations/origination-operation.js.map +0 -1
- package/dist/lib/operations/proposals-operation.js.map +0 -1
- package/dist/lib/operations/register-global-constant-operation.js.map +0 -1
- package/dist/lib/operations/reveal-operation.js.map +0 -1
- package/dist/lib/operations/smart-rollup-add-messages-operation.js.map +0 -1
- package/dist/lib/operations/smart-rollup-originate-operation.js.map +0 -1
- package/dist/lib/operations/transaction-operation.js.map +0 -1
- package/dist/lib/operations/transfer-ticket-operation.js.map +0 -1
- package/dist/lib/operations/tx-rollup-batch-operation.js.map +0 -1
- package/dist/lib/operations/tx-rollup-origination-operation.js.map +0 -1
- package/dist/lib/operations/types.js.map +0 -1
- package/dist/lib/operations/update-consensus-key-operation.js.map +0 -1
- package/dist/lib/packer/interface.js.map +0 -1
- package/dist/lib/packer/michel-codec-packer.js.map +0 -1
- package/dist/lib/packer/rpc-packer.js.map +0 -1
- package/dist/lib/parser/interface.js.map +0 -1
- package/dist/lib/parser/michel-codec-parser.js.map +0 -1
- package/dist/lib/parser/noop-parser.js.map +0 -1
- package/dist/lib/prepare/index.js.map +0 -1
- package/dist/lib/prepare/interface.js.map +0 -1
- package/dist/lib/prepare/prepare-provider.js.map +0 -1
- package/dist/lib/provider.js.map +0 -1
- package/dist/lib/read-provider/interface.js.map +0 -1
- package/dist/lib/read-provider/rpc-read-adapter.js.map +0 -1
- package/dist/lib/signer/errors.js.map +0 -1
- package/dist/lib/signer/interface.js.map +0 -1
- package/dist/lib/signer/noop.js.map +0 -1
- package/dist/lib/subscribe/create-observable-from-subscription.js.map +0 -1
- package/dist/lib/subscribe/errors.js.map +0 -1
- package/dist/lib/subscribe/filters.js.map +0 -1
- package/dist/lib/subscribe/interface.js.map +0 -1
- package/dist/lib/subscribe/observable-subscription.js.map +0 -1
- package/dist/lib/subscribe/polling-subcribe-provider.js.map +0 -1
- package/dist/lib/taquito.js.map +0 -1
- package/dist/lib/tz/interface.js.map +0 -1
- package/dist/lib/tz/rpc-tz-provider.js.map +0 -1
- package/dist/lib/version.js.map +0 -1
- package/dist/lib/wallet/batch-operation.js.map +0 -1
- package/dist/lib/wallet/delegation-operation.js.map +0 -1
- package/dist/lib/wallet/errors.js.map +0 -1
- package/dist/lib/wallet/increase-paid-storage-operation.js.map +0 -1
- package/dist/lib/wallet/index.js.map +0 -1
- package/dist/lib/wallet/interface.js.map +0 -1
- package/dist/lib/wallet/legacy.js.map +0 -1
- package/dist/lib/wallet/operation-factory.js.map +0 -1
- package/dist/lib/wallet/operation.js.map +0 -1
- package/dist/lib/wallet/origination-operation.js.map +0 -1
- package/dist/lib/wallet/receipt.js.map +0 -1
- package/dist/lib/wallet/transaction-operation.js.map +0 -1
- package/dist/lib/wallet/wallet.js.map +0 -1
|
@@ -8,18 +8,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver,
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return value;
|
|
11
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
14
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17
16
|
};
|
|
18
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver,
|
|
19
|
-
if (!
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return privateMap.get(receiver);
|
|
17
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
18
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
19
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
23
21
|
};
|
|
24
22
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
25
23
|
var t = {};
|
|
@@ -32,7 +30,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
32
30
|
}
|
|
33
31
|
return t;
|
|
34
32
|
};
|
|
35
|
-
var
|
|
33
|
+
var _PrepareProvider_counters;
|
|
36
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
35
|
exports.PrepareProvider = void 0;
|
|
38
36
|
const rpc_1 = require("@taquito/rpc");
|
|
@@ -58,8 +56,8 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
58
56
|
constructor(context) {
|
|
59
57
|
super(context);
|
|
60
58
|
this.context = context;
|
|
61
|
-
|
|
62
|
-
__classPrivateFieldSet(this,
|
|
59
|
+
_PrepareProvider_counters.set(this, void 0);
|
|
60
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
63
61
|
}
|
|
64
62
|
getBlockHash(block) {
|
|
65
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -94,10 +92,10 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
94
92
|
});
|
|
95
93
|
}
|
|
96
94
|
getFee(op, pkh, headCounter) {
|
|
97
|
-
if (!__classPrivateFieldGet(this,
|
|
98
|
-
__classPrivateFieldGet(this,
|
|
95
|
+
if (!__classPrivateFieldGet(this, _PrepareProvider_counters, "f")[pkh] || __classPrivateFieldGet(this, _PrepareProvider_counters, "f")[pkh] < headCounter) {
|
|
96
|
+
__classPrivateFieldGet(this, _PrepareProvider_counters, "f")[pkh] = headCounter;
|
|
99
97
|
}
|
|
100
|
-
const opCounter = ++__classPrivateFieldGet(this,
|
|
98
|
+
const opCounter = ++__classPrivateFieldGet(this, _PrepareProvider_counters, "f")[pkh];
|
|
101
99
|
return {
|
|
102
100
|
counter: `${opCounter}`,
|
|
103
101
|
fee: typeof op.fee === 'undefined' ? '0' : `${op.fee}`,
|
|
@@ -110,17 +108,17 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
110
108
|
}
|
|
111
109
|
addRevealOperationIfNeeded(operation, publicKeyHash) {
|
|
112
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
if (types_1.isOpRequireReveal(operation)) {
|
|
111
|
+
if ((0, types_1.isOpRequireReveal)(operation)) {
|
|
114
112
|
const ops = [operation];
|
|
115
113
|
const { publicKey, pkh } = yield this.getKeys();
|
|
116
114
|
if (yield this.isAccountRevealRequired(publicKeyHash)) {
|
|
117
115
|
if (!publicKey) {
|
|
118
116
|
throw new core_1.PublicKeyNotFoundError(pkh);
|
|
119
117
|
}
|
|
120
|
-
ops.unshift(yield contract_1.createRevealOperation({
|
|
118
|
+
ops.unshift(yield (0, contract_1.createRevealOperation)({
|
|
121
119
|
fee: constants_1.DEFAULT_FEE.REVEAL,
|
|
122
120
|
storageLimit: constants_1.DEFAULT_STORAGE_LIMIT.REVEAL,
|
|
123
|
-
gasLimit: constants_1.getRevealGasLimit(pkh),
|
|
121
|
+
gasLimit: (0, constants_1.getRevealGasLimit)(pkh),
|
|
124
122
|
}, publicKeyHash, publicKey));
|
|
125
123
|
return ops;
|
|
126
124
|
}
|
|
@@ -197,14 +195,14 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
197
195
|
*/
|
|
198
196
|
activate({ pkh, secret }) {
|
|
199
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
-
const op = yield contract_1.createActivationOperation({
|
|
198
|
+
const op = yield (0, contract_1.createActivationOperation)({
|
|
201
199
|
pkh,
|
|
202
200
|
secret,
|
|
203
201
|
});
|
|
204
202
|
const ops = this.convertIntoArray(op);
|
|
205
203
|
const hash = yield this.getBlockHash();
|
|
206
204
|
const protocol = yield this.getProtocolHash();
|
|
207
|
-
__classPrivateFieldSet(this,
|
|
205
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
208
206
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
209
207
|
const contents = this.constructOpContents(ops, headCounter, pkh);
|
|
210
208
|
return {
|
|
@@ -233,7 +231,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
233
231
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
234
232
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
235
233
|
const mergedEstimates = mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS);
|
|
236
|
-
const op = yield contract_1.createRevealOperation({
|
|
234
|
+
const op = yield (0, contract_1.createRevealOperation)({
|
|
237
235
|
fee: mergedEstimates.fee,
|
|
238
236
|
gasLimit: mergedEstimates.gasLimit,
|
|
239
237
|
storageLimit: mergedEstimates.storageLimit,
|
|
@@ -241,7 +239,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
241
239
|
const ops = this.convertIntoArray(op);
|
|
242
240
|
const hash = yield this.getBlockHash();
|
|
243
241
|
const protocol = yield this.getProtocolHash();
|
|
244
|
-
__classPrivateFieldSet(this,
|
|
242
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
245
243
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
246
244
|
const contents = this.constructOpContents(ops, headCounter, pkh);
|
|
247
245
|
return {
|
|
@@ -267,12 +265,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
267
265
|
const { pkh } = yield this.getKeys();
|
|
268
266
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
269
267
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
270
|
-
const op = yield contract_1.createOriginationOperation(yield this.context.parser.prepareCodeOrigination(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS))));
|
|
268
|
+
const op = yield (0, contract_1.createOriginationOperation)(yield this.context.parser.prepareCodeOrigination(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS))));
|
|
271
269
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
272
270
|
const ops = this.convertIntoArray(operation);
|
|
273
271
|
const hash = yield this.getBlockHash();
|
|
274
272
|
const protocol = yield this.getProtocolHash();
|
|
275
|
-
__classPrivateFieldSet(this,
|
|
273
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
276
274
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
277
275
|
const contents = this.constructOpContents(ops, headCounter, pkh, source);
|
|
278
276
|
return {
|
|
@@ -298,12 +296,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
298
296
|
const { pkh } = yield this.getKeys();
|
|
299
297
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
300
298
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
301
|
-
const op = yield contract_1.createTransferOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
299
|
+
const op = yield (0, contract_1.createTransferOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
302
300
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
303
301
|
const ops = this.convertIntoArray(operation);
|
|
304
302
|
const hash = yield this.getBlockHash();
|
|
305
303
|
const protocol = yield this.getProtocolHash();
|
|
306
|
-
__classPrivateFieldSet(this,
|
|
304
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
307
305
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
308
306
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
309
307
|
return {
|
|
@@ -329,12 +327,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
329
327
|
const { pkh } = yield this.getKeys();
|
|
330
328
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
331
329
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
332
|
-
const op = yield contract_1.createSetDelegateOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
330
|
+
const op = yield (0, contract_1.createSetDelegateOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
333
331
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
334
332
|
const ops = this.convertIntoArray(operation);
|
|
335
333
|
const hash = yield this.getBlockHash();
|
|
336
334
|
const protocol = yield this.getProtocolHash();
|
|
337
|
-
__classPrivateFieldSet(this,
|
|
335
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
338
336
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
339
337
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
340
338
|
return {
|
|
@@ -360,7 +358,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
360
358
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
361
359
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
362
360
|
const mergedEstimates = mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS);
|
|
363
|
-
const op = yield contract_1.createRegisterDelegateOperation({
|
|
361
|
+
const op = yield (0, contract_1.createRegisterDelegateOperation)({
|
|
364
362
|
fee: mergedEstimates.fee,
|
|
365
363
|
storageLimit: mergedEstimates.storageLimit,
|
|
366
364
|
gasLimit: mergedEstimates.gasLimit,
|
|
@@ -369,7 +367,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
369
367
|
const ops = this.convertIntoArray(operation);
|
|
370
368
|
const hash = yield this.getBlockHash();
|
|
371
369
|
const protocol = yield this.getProtocolHash();
|
|
372
|
-
__classPrivateFieldSet(this,
|
|
370
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
373
371
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
374
372
|
const contents = this.constructOpContents(ops, headCounter, pkh, source);
|
|
375
373
|
return {
|
|
@@ -395,12 +393,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
395
393
|
const { pkh } = yield this.getKeys();
|
|
396
394
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
397
395
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
398
|
-
const op = yield contract_1.createRegisterGlobalConstantOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
396
|
+
const op = yield (0, contract_1.createRegisterGlobalConstantOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
399
397
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
400
398
|
const ops = this.convertIntoArray(operation);
|
|
401
399
|
const hash = yield this.getBlockHash();
|
|
402
400
|
const protocol = yield this.getProtocolHash();
|
|
403
|
-
__classPrivateFieldSet(this,
|
|
401
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
404
402
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
405
403
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
406
404
|
return {
|
|
@@ -426,12 +424,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
426
424
|
const { pkh } = yield this.getKeys();
|
|
427
425
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
428
426
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
429
|
-
const op = yield contract_1.createUpdateConsensusKeyOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
427
|
+
const op = yield (0, contract_1.createUpdateConsensusKeyOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
430
428
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
431
429
|
const ops = this.convertIntoArray(operation);
|
|
432
430
|
const hash = yield this.getBlockHash();
|
|
433
431
|
const protocol = yield this.getProtocolHash();
|
|
434
|
-
__classPrivateFieldSet(this,
|
|
432
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
435
433
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
436
434
|
const contents = this.constructOpContents(ops, headCounter, pkh, source);
|
|
437
435
|
return {
|
|
@@ -457,12 +455,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
457
455
|
const { pkh } = yield this.getKeys();
|
|
458
456
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
459
457
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
460
|
-
const op = yield contract_1.createIncreasePaidStorageOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
458
|
+
const op = yield (0, contract_1.createIncreasePaidStorageOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
461
459
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
462
460
|
const ops = this.convertIntoArray(operation);
|
|
463
461
|
const hash = yield this.getBlockHash();
|
|
464
462
|
const protocol = yield this.getProtocolHash();
|
|
465
|
-
__classPrivateFieldSet(this,
|
|
463
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
466
464
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
467
465
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
468
466
|
return {
|
|
@@ -484,11 +482,11 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
484
482
|
ballot(params) {
|
|
485
483
|
return __awaiter(this, void 0, void 0, function* () {
|
|
486
484
|
const { pkh } = yield this.getKeys();
|
|
487
|
-
const op = yield contract_1.createBallotOperation(Object.assign({}, params));
|
|
485
|
+
const op = yield (0, contract_1.createBallotOperation)(Object.assign({}, params));
|
|
488
486
|
const ops = this.convertIntoArray(op);
|
|
489
487
|
const hash = yield this.getBlockHash();
|
|
490
488
|
const protocol = yield this.getProtocolHash();
|
|
491
|
-
__classPrivateFieldSet(this,
|
|
489
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
492
490
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
493
491
|
let currentVotingPeriod;
|
|
494
492
|
try {
|
|
@@ -517,11 +515,11 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
517
515
|
proposals(params) {
|
|
518
516
|
return __awaiter(this, void 0, void 0, function* () {
|
|
519
517
|
const { pkh } = yield this.getKeys();
|
|
520
|
-
const op = yield contract_1.createProposalsOperation(Object.assign({}, params));
|
|
518
|
+
const op = yield (0, contract_1.createProposalsOperation)(Object.assign({}, params));
|
|
521
519
|
const ops = this.convertIntoArray(op);
|
|
522
520
|
const hash = yield this.getBlockHash();
|
|
523
521
|
const protocol = yield this.getProtocolHash();
|
|
524
|
-
__classPrivateFieldSet(this,
|
|
522
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
525
523
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
526
524
|
let currentVotingPeriod;
|
|
527
525
|
try {
|
|
@@ -550,11 +548,11 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
550
548
|
drainDelegate(params, source) {
|
|
551
549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
552
550
|
const { pkh } = yield this.getKeys();
|
|
553
|
-
const op = yield contract_1.createDrainDelegateOperation(Object.assign({}, params));
|
|
551
|
+
const op = yield (0, contract_1.createDrainDelegateOperation)(Object.assign({}, params));
|
|
554
552
|
const ops = this.convertIntoArray(op);
|
|
555
553
|
const hash = yield this.getBlockHash();
|
|
556
554
|
const protocol = yield this.getProtocolHash();
|
|
557
|
-
__classPrivateFieldSet(this,
|
|
555
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
558
556
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
559
557
|
const contents = this.constructOpContents(ops, headCounter, pkh, source);
|
|
560
558
|
return {
|
|
@@ -580,12 +578,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
580
578
|
const { pkh } = yield this.getKeys();
|
|
581
579
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
582
580
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
583
|
-
const op = yield contract_1.createTransferTicketOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
581
|
+
const op = yield (0, contract_1.createTransferTicketOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
584
582
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
585
583
|
const ops = this.convertIntoArray(operation);
|
|
586
584
|
const hash = yield this.getBlockHash();
|
|
587
585
|
const protocol = yield this.getProtocolHash();
|
|
588
|
-
__classPrivateFieldSet(this,
|
|
586
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
589
587
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
590
588
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
591
589
|
return {
|
|
@@ -611,12 +609,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
611
609
|
const { pkh } = yield this.getKeys();
|
|
612
610
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
613
611
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
614
|
-
const op = yield contract_1.createSmartRollupAddMessagesOperation(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
612
|
+
const op = yield (0, contract_1.createSmartRollupAddMessagesOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));
|
|
615
613
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
616
614
|
const ops = this.convertIntoArray(operation);
|
|
617
615
|
const hash = yield this.getBlockHash();
|
|
618
616
|
const protocol = yield this.getProtocolHash();
|
|
619
|
-
__classPrivateFieldSet(this,
|
|
617
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
620
618
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
621
619
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
622
620
|
return {
|
|
@@ -645,12 +643,12 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
645
643
|
});
|
|
646
644
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
647
645
|
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
|
|
648
|
-
const op = yield contract_1.createSmartRollupOriginateOperation(Object.assign(Object.assign(Object.assign({}, mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)), rest), { originationProof }));
|
|
646
|
+
const op = yield (0, contract_1.createSmartRollupOriginateOperation)(Object.assign(Object.assign(Object.assign({}, mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)), rest), { originationProof }));
|
|
649
647
|
const operation = yield this.addRevealOperationIfNeeded(op, pkh);
|
|
650
648
|
const ops = this.convertIntoArray(operation);
|
|
651
649
|
const hash = yield this.getBlockHash();
|
|
652
650
|
const protocol = yield this.getProtocolHash();
|
|
653
|
-
__classPrivateFieldSet(this,
|
|
651
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
654
652
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
655
653
|
const contents = this.constructOpContents(ops, headCounter, pkh, rest.source);
|
|
656
654
|
return {
|
|
@@ -678,7 +676,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
678
676
|
const ops = [];
|
|
679
677
|
if (!estimates) {
|
|
680
678
|
for (const op of batchParams) {
|
|
681
|
-
if (types_1.isOpWithFee(op)) {
|
|
679
|
+
if ((0, types_1.isOpWithFee)(op)) {
|
|
682
680
|
const limits = mergeLimits(op, DEFAULT_PARAMS);
|
|
683
681
|
ops.push(yield this.getRPCOp(Object.assign(Object.assign({}, op), limits)));
|
|
684
682
|
}
|
|
@@ -689,7 +687,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
689
687
|
}
|
|
690
688
|
else {
|
|
691
689
|
for (const op of batchParams) {
|
|
692
|
-
if (types_1.isOpWithFee(op)) {
|
|
690
|
+
if ((0, types_1.isOpWithFee)(op)) {
|
|
693
691
|
const e = estimates.shift();
|
|
694
692
|
const limits = mergeLimits(op, {
|
|
695
693
|
fee: e.suggestedFeeMutez,
|
|
@@ -707,15 +705,15 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
707
705
|
if (!publicKey) {
|
|
708
706
|
throw new core_1.PublicKeyNotFoundError(pkh);
|
|
709
707
|
}
|
|
710
|
-
ops.unshift(yield contract_1.createRevealOperation({
|
|
708
|
+
ops.unshift(yield (0, contract_1.createRevealOperation)({
|
|
711
709
|
fee: constants_1.DEFAULT_FEE.REVEAL,
|
|
712
710
|
storageLimit: constants_1.DEFAULT_STORAGE_LIMIT.REVEAL,
|
|
713
|
-
gasLimit: constants_1.getRevealGasLimit(pkh),
|
|
711
|
+
gasLimit: (0, constants_1.getRevealGasLimit)(pkh),
|
|
714
712
|
}, pkh, publicKey));
|
|
715
713
|
}
|
|
716
714
|
const hash = yield this.getBlockHash();
|
|
717
715
|
const protocol = yield this.getProtocolHash();
|
|
718
|
-
__classPrivateFieldSet(this,
|
|
716
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
719
717
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
720
718
|
const contents = this.constructOpContents(ops, headCounter, pkh);
|
|
721
719
|
return {
|
|
@@ -740,7 +738,7 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
740
738
|
const hash = yield this.getBlockHash();
|
|
741
739
|
const protocol = yield this.getProtocolHash();
|
|
742
740
|
const { pkh } = yield this.getKeys();
|
|
743
|
-
__classPrivateFieldSet(this,
|
|
741
|
+
__classPrivateFieldSet(this, _PrepareProvider_counters, {}, "f");
|
|
744
742
|
const headCounter = parseInt(yield this.getHeadCounter(pkh), 10);
|
|
745
743
|
const params = contractMethod.toTransferParams();
|
|
746
744
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
@@ -801,5 +799,4 @@ class PrepareProvider extends provider_1.Provider {
|
|
|
801
799
|
}
|
|
802
800
|
}
|
|
803
801
|
exports.PrepareProvider = PrepareProvider;
|
|
804
|
-
|
|
805
|
-
//# sourceMappingURL=prepare-provider.js.map
|
|
802
|
+
_PrepareProvider_counters = new WeakMap();
|
package/dist/lib/provider.js
CHANGED
|
@@ -27,15 +27,15 @@ const prepare_1 = require("./contract/prepare");
|
|
|
27
27
|
const rpc_1 = require("@taquito/rpc");
|
|
28
28
|
const utils_1 = require("@taquito/utils");
|
|
29
29
|
class Provider {
|
|
30
|
-
constructor(context) {
|
|
31
|
-
this.context = context;
|
|
32
|
-
}
|
|
33
30
|
get rpc() {
|
|
34
31
|
return this.context.rpc;
|
|
35
32
|
}
|
|
36
33
|
get signer() {
|
|
37
34
|
return this.context.signer;
|
|
38
35
|
}
|
|
36
|
+
constructor(context) {
|
|
37
|
+
this.context = context;
|
|
38
|
+
}
|
|
39
39
|
forge({ opOb: { branch, contents, protocol }, counter }) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const forgedBytes = yield this.context.forger.forge({ branch, contents });
|
|
@@ -82,21 +82,21 @@ class Provider {
|
|
|
82
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
83
|
switch (param.kind) {
|
|
84
84
|
case rpc_1.OpKind.TRANSACTION:
|
|
85
|
-
return prepare_1.createTransferOperation(Object.assign({}, param));
|
|
85
|
+
return (0, prepare_1.createTransferOperation)(Object.assign({}, param));
|
|
86
86
|
case rpc_1.OpKind.ORIGINATION:
|
|
87
|
-
return prepare_1.createOriginationOperation(yield this.context.parser.prepareCodeOrigination(Object.assign({}, param)));
|
|
87
|
+
return (0, prepare_1.createOriginationOperation)(yield this.context.parser.prepareCodeOrigination(Object.assign({}, param)));
|
|
88
88
|
case rpc_1.OpKind.DELEGATION:
|
|
89
|
-
return prepare_1.createSetDelegateOperation(Object.assign({}, param));
|
|
89
|
+
return (0, prepare_1.createSetDelegateOperation)(Object.assign({}, param));
|
|
90
90
|
case rpc_1.OpKind.REGISTER_GLOBAL_CONSTANT:
|
|
91
|
-
return prepare_1.createRegisterGlobalConstantOperation(Object.assign({}, param));
|
|
91
|
+
return (0, prepare_1.createRegisterGlobalConstantOperation)(Object.assign({}, param));
|
|
92
92
|
case rpc_1.OpKind.INCREASE_PAID_STORAGE:
|
|
93
|
-
return prepare_1.createIncreasePaidStorageOperation(Object.assign({}, param));
|
|
93
|
+
return (0, prepare_1.createIncreasePaidStorageOperation)(Object.assign({}, param));
|
|
94
94
|
case rpc_1.OpKind.TRANSFER_TICKET:
|
|
95
|
-
return prepare_1.createTransferTicketOperation(Object.assign({}, param));
|
|
95
|
+
return (0, prepare_1.createTransferTicketOperation)(Object.assign({}, param));
|
|
96
96
|
case rpc_1.OpKind.SMART_ROLLUP_ADD_MESSAGES:
|
|
97
|
-
return prepare_1.createSmartRollupAddMessagesOperation(Object.assign({}, param));
|
|
97
|
+
return (0, prepare_1.createSmartRollupAddMessagesOperation)(Object.assign({}, param));
|
|
98
98
|
case rpc_1.OpKind.SMART_ROLLUP_ORIGINATE:
|
|
99
|
-
return prepare_1.createSmartRollupOriginateOperation(Object.assign({}, param));
|
|
99
|
+
return (0, prepare_1.createSmartRollupOriginateOperation)(Object.assign({}, param));
|
|
100
100
|
default:
|
|
101
101
|
throw new utils_1.InvalidOperationKindError(param.kind);
|
|
102
102
|
}
|
|
@@ -135,7 +135,7 @@ class Provider {
|
|
|
135
135
|
isRevealRequiredForOpType(op) {
|
|
136
136
|
let opRequireReveal = false;
|
|
137
137
|
for (const operation of op) {
|
|
138
|
-
if (types_1.isOpRequireReveal(operation)) {
|
|
138
|
+
if ((0, types_1.isOpRequireReveal)(operation)) {
|
|
139
139
|
opRequireReveal = true;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -156,7 +156,7 @@ class Provider {
|
|
|
156
156
|
opResponse.push(results[i].contents[j]);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
const errors = errors_1.flattenErrors(results);
|
|
159
|
+
const errors = (0, errors_1.flattenErrors)(results);
|
|
160
160
|
if (errors.length) {
|
|
161
161
|
throw new errors_1.TezosOperationError(errors, 'Error occurred during validation simulation of operation');
|
|
162
162
|
}
|
|
@@ -170,4 +170,3 @@ class Provider {
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
exports.Provider = Provider;
|
|
173
|
-
//# sourceMappingURL=provider.js.map
|
package/dist/lib/signer/noop.js
CHANGED
|
@@ -66,10 +66,10 @@ const evaluateOpFilter = (op, filter) => {
|
|
|
66
66
|
exports.evaluateOpFilter = evaluateOpFilter;
|
|
67
67
|
const evaluateExpression = (op, exp) => {
|
|
68
68
|
if (Array.isArray(exp.and)) {
|
|
69
|
-
return exp.and.every((x) => exports.evaluateFilter(op, x));
|
|
69
|
+
return exp.and.every((x) => (0, exports.evaluateFilter)(op, x));
|
|
70
70
|
}
|
|
71
71
|
else if (Array.isArray(exp.or)) {
|
|
72
|
-
return exp.or.some((x) => exports.evaluateFilter(op, x));
|
|
72
|
+
return exp.or.some((x) => (0, exports.evaluateFilter)(op, x));
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
75
75
|
throw new errors_1.InvalidFilterExpressionError(exp);
|
|
@@ -86,12 +86,11 @@ const evaluateFilter = (op, filter) => {
|
|
|
86
86
|
}
|
|
87
87
|
return filters.every((filterOrExp) => {
|
|
88
88
|
if ('and' in filterOrExp || 'or' in filterOrExp) {
|
|
89
|
-
return exports.evaluateExpression(op, filterOrExp);
|
|
89
|
+
return (0, exports.evaluateExpression)(op, filterOrExp);
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
92
|
-
return exports.evaluateOpFilter(op, filterOrExp);
|
|
92
|
+
return (0, exports.evaluateOpFilter)(op, filterOrExp);
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
96
|
exports.evaluateFilter = evaluateFilter;
|
|
97
|
-
//# sourceMappingURL=filters.js.map
|
|
@@ -8,7 +8,7 @@ const errors_1 = require("./errors");
|
|
|
8
8
|
var errors_2 = require("./errors");
|
|
9
9
|
Object.defineProperty(exports, "UnsupportedEventError", { enumerable: true, get: function () { return errors_2.UnsupportedEventError; } });
|
|
10
10
|
class ObservableSubscription {
|
|
11
|
-
constructor(obs, shouldRetry = false, operatorFunction = operators_1.retry()) {
|
|
11
|
+
constructor(obs, shouldRetry = false, operatorFunction = (0, operators_1.retry)()) {
|
|
12
12
|
this.shouldRetry = shouldRetry;
|
|
13
13
|
this.operatorFunction = operatorFunction;
|
|
14
14
|
this.errorListeners = [];
|
|
@@ -16,13 +16,13 @@ class ObservableSubscription {
|
|
|
16
16
|
this.closeListeners = [];
|
|
17
17
|
this.completed$ = new rxjs_1.Subject();
|
|
18
18
|
obs
|
|
19
|
-
.pipe(operators_1.takeUntil(this.completed$), operators_1.tap((data) => {
|
|
19
|
+
.pipe((0, operators_1.takeUntil)(this.completed$), (0, operators_1.tap)((data) => {
|
|
20
20
|
this.call(this.messageListeners, data);
|
|
21
21
|
}, (error) => {
|
|
22
22
|
this.call(this.errorListeners, error);
|
|
23
23
|
}, () => {
|
|
24
24
|
this.call(this.closeListeners);
|
|
25
|
-
}), this.shouldRetry ? operatorFunction : operators_1.tap(), operators_1.catchError(() => rxjs_1.NEVER))
|
|
25
|
+
}), this.shouldRetry ? operatorFunction : (0, operators_1.tap)(), (0, operators_1.catchError)(() => rxjs_1.NEVER))
|
|
26
26
|
.subscribe();
|
|
27
27
|
}
|
|
28
28
|
call(listeners, value) {
|
|
@@ -77,4 +77,3 @@ class ObservableSubscription {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
exports.ObservableSubscription = ObservableSubscription;
|
|
80
|
-
//# sourceMappingURL=observable-subscription.js.map
|
|
@@ -17,17 +17,17 @@ const observable_subscription_1 = require("./observable-subscription");
|
|
|
17
17
|
const bignumber_js_1 = require("bignumber.js");
|
|
18
18
|
exports.defaultConfigStreamer = {
|
|
19
19
|
shouldObservableSubscriptionRetry: false,
|
|
20
|
-
observableSubscriptionRetryFunction: operators_1.retry(),
|
|
20
|
+
observableSubscriptionRetryFunction: (0, operators_1.retry)(),
|
|
21
21
|
};
|
|
22
22
|
const getLastBlock = (context) => {
|
|
23
|
-
return rxjs_1.from(context.rpc.getBlock()).pipe(operators_1.first());
|
|
23
|
+
return (0, rxjs_1.from)(context.rpc.getBlock()).pipe((0, operators_1.first)());
|
|
24
24
|
};
|
|
25
|
-
const applyFilter = (filter) => operators_1.concatMap((block) => {
|
|
25
|
+
const applyFilter = (filter) => (0, operators_1.concatMap)((block) => {
|
|
26
26
|
return new rxjs_1.Observable((sub) => {
|
|
27
27
|
for (const ops of block.operations) {
|
|
28
28
|
for (const op of ops) {
|
|
29
29
|
for (const content of op.contents) {
|
|
30
|
-
if (filters_1.evaluateFilter(Object.assign({ hash: op.hash }, content), filter)) {
|
|
30
|
+
if ((0, filters_1.evaluateFilter)(Object.assign({ hash: op.hash }, content), filter)) {
|
|
31
31
|
sub.next(Object.assign({ hash: op.hash }, content));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ const applyFilter = (filter) => operators_1.concatMap((block) => {
|
|
|
36
36
|
sub.complete();
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
const applyEventFilter = (filter) => operators_1.concatMap((block) => {
|
|
39
|
+
const applyEventFilter = (filter) => (0, operators_1.concatMap)((block) => {
|
|
40
40
|
return new rxjs_1.Observable((sub) => {
|
|
41
41
|
for (const ops of block.operations) {
|
|
42
42
|
for (const op of ops) {
|
|
@@ -45,7 +45,7 @@ const applyEventFilter = (filter) => operators_1.concatMap((block) => {
|
|
|
45
45
|
const internalOpResults = tx.metadata.internal_operation_results;
|
|
46
46
|
if (internalOpResults) {
|
|
47
47
|
for (const event of internalOpResults) {
|
|
48
|
-
if (filters_1.eventFilter(event, filter === null || filter === void 0 ? void 0 : filter.address, filter === null || filter === void 0 ? void 0 : filter.tag, filter === null || filter === void 0 ? void 0 : filter.excludeFailedOperations)) {
|
|
48
|
+
if ((0, filters_1.eventFilter)(event, filter === null || filter === void 0 ? void 0 : filter.address, filter === null || filter === void 0 ? void 0 : filter.tag, filter === null || filter === void 0 ? void 0 : filter.excludeFailedOperations)) {
|
|
49
49
|
sub.next(Object.assign({ opHash: op.hash, blockHash: block.hash, level: block.header.level }, event));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -60,17 +60,17 @@ class PollingSubscribeProvider {
|
|
|
60
60
|
constructor(context, config = {}) {
|
|
61
61
|
this.context = context;
|
|
62
62
|
this._config$ = new rxjs_1.BehaviorSubject(Object.assign(Object.assign({}, exports.defaultConfigStreamer), config));
|
|
63
|
-
this.timer$ = this._config$.pipe(operators_1.pluck('pollingIntervalMilliseconds'), operators_1.switchMap((pollingIntervalMilliseconds) => {
|
|
63
|
+
this.timer$ = this._config$.pipe((0, operators_1.pluck)('pollingIntervalMilliseconds'), (0, operators_1.switchMap)((pollingIntervalMilliseconds) => {
|
|
64
64
|
if (!pollingIntervalMilliseconds) {
|
|
65
|
-
return rxjs_1.from(this.getConfirmationPollingInterval()).pipe(operators_1.switchMap((interval) => {
|
|
66
|
-
return rxjs_1.timer(0, interval);
|
|
65
|
+
return (0, rxjs_1.from)(this.getConfirmationPollingInterval()).pipe((0, operators_1.switchMap)((interval) => {
|
|
66
|
+
return (0, rxjs_1.timer)(0, interval);
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
return rxjs_1.timer(0, pollingIntervalMilliseconds);
|
|
70
|
+
return (0, rxjs_1.timer)(0, pollingIntervalMilliseconds);
|
|
71
71
|
}
|
|
72
72
|
}));
|
|
73
|
-
this.newBlock$ = this.timer$.pipe(operators_1.switchMap(() => getLastBlock(this.context)), operators_1.distinctUntilKeyChanged('hash'), operators_1.publish(), operators_1.refCount());
|
|
73
|
+
this.newBlock$ = this.timer$.pipe((0, operators_1.switchMap)(() => getLastBlock(this.context)), (0, operators_1.distinctUntilKeyChanged)('hash'), (0, operators_1.publish)(), (0, operators_1.refCount)());
|
|
74
74
|
}
|
|
75
75
|
get config() {
|
|
76
76
|
return this._config$.getValue();
|
|
@@ -104,7 +104,7 @@ class PollingSubscribeProvider {
|
|
|
104
104
|
return new observable_subscription_1.ObservableSubscription(this.newBlock$, this.config.shouldObservableSubscriptionRetry, this.config.observableSubscriptionRetryFunction);
|
|
105
105
|
}
|
|
106
106
|
subscribe(_filter) {
|
|
107
|
-
return new observable_subscription_1.ObservableSubscription(this.newBlock$.pipe(operators_1.pluck('hash')), this.config.shouldObservableSubscriptionRetry, this.config.observableSubscriptionRetryFunction);
|
|
107
|
+
return new observable_subscription_1.ObservableSubscription(this.newBlock$.pipe((0, operators_1.pluck)('hash')), this.config.shouldObservableSubscriptionRetry, this.config.observableSubscriptionRetryFunction);
|
|
108
108
|
}
|
|
109
109
|
subscribeOperation(filter) {
|
|
110
110
|
return new observable_subscription_1.ObservableSubscription(this.newBlock$.pipe(applyFilter(filter)), this.config.shouldObservableSubscriptionRetry, this.config.observableSubscriptionRetryFunction);
|
|
@@ -114,4 +114,3 @@ class PollingSubscribeProvider {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
exports.PollingSubscribeProvider = PollingSubscribeProvider;
|
|
117
|
-
//# sourceMappingURL=polling-subcribe-provider.js.map
|
package/dist/lib/taquito.js
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
7
|
if (k2 === undefined) k2 = k;
|
|
8
|
-
Object.
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
9
13
|
}) : (function(o, m, k, k2) {
|
|
10
14
|
if (k2 === undefined) k2 = k;
|
|
11
15
|
o[k2] = m[k];
|
|
@@ -389,4 +393,3 @@ class TezosToolkit {
|
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
395
|
exports.TezosToolkit = TezosToolkit;
|
|
392
|
-
//# sourceMappingURL=taquito.js.map
|
package/dist/lib/tz/interface.js
CHANGED