@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
|
@@ -49,7 +49,7 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
getEstimationPropertiesFromOperationContent(content, size, costPerByte) {
|
|
52
|
-
const operationResults = errors_1.flattenOperationResult({ contents: [content] });
|
|
52
|
+
const operationResults = (0, errors_1.flattenOperationResult)({ contents: [content] });
|
|
53
53
|
let totalMilligas = 0;
|
|
54
54
|
let totalStorage = 0;
|
|
55
55
|
operationResults.forEach((result) => {
|
|
@@ -67,7 +67,7 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
67
67
|
: 0;
|
|
68
68
|
totalStorage += 'genesis_commitment_hash' in result ? Number(result.size) : 0;
|
|
69
69
|
});
|
|
70
|
-
if (types_1.isOpWithFee(content)) {
|
|
70
|
+
if ((0, types_1.isOpWithFee)(content)) {
|
|
71
71
|
return {
|
|
72
72
|
milligasLimit: totalMilligas || 0,
|
|
73
73
|
storageLimit: Number(totalStorage || 0),
|
|
@@ -94,7 +94,7 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
94
94
|
};
|
|
95
95
|
const { opResponse } = yield this.simulate(operation);
|
|
96
96
|
const { cost_per_byte } = constants;
|
|
97
|
-
const errors = [...errors_1.flattenErrors(opResponse, 'backtracked'), ...errors_1.flattenErrors(opResponse)];
|
|
97
|
+
const errors = [...(0, errors_1.flattenErrors)(opResponse, 'backtracked'), ...(0, errors_1.flattenErrors)(opResponse)];
|
|
98
98
|
// Fail early in case of errors
|
|
99
99
|
if (errors.length) {
|
|
100
100
|
throw new errors_1.TezosOperationError(errors, 'Error occurred during estimation');
|
|
@@ -144,13 +144,13 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
144
144
|
var _b;
|
|
145
145
|
var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
|
|
146
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
const toValidation = utils_1.validateAddress(rest.to);
|
|
147
|
+
const toValidation = (0, utils_1.validateAddress)(rest.to);
|
|
148
148
|
if (toValidation !== utils_1.ValidationResult.VALID) {
|
|
149
|
-
throw new core_1.InvalidAddressError(rest.to, utils_1.invalidDetail(toValidation));
|
|
149
|
+
throw new core_1.InvalidAddressError(rest.to, (0, utils_1.invalidDetail)(toValidation));
|
|
150
150
|
}
|
|
151
|
-
const sourceValidation = utils_1.validateAddress((_b = rest.source) !== null && _b !== void 0 ? _b : '');
|
|
151
|
+
const sourceValidation = (0, utils_1.validateAddress)((_b = rest.source) !== null && _b !== void 0 ? _b : '');
|
|
152
152
|
if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
|
|
153
|
-
throw new core_1.InvalidAddressError(rest.source, utils_1.invalidDetail(sourceValidation));
|
|
153
|
+
throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
|
|
154
154
|
}
|
|
155
155
|
if (rest.amount < 0) {
|
|
156
156
|
throw new core_1.InvalidAmountError(rest.amount.toString());
|
|
@@ -178,13 +178,13 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
178
178
|
var _b;
|
|
179
179
|
var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
|
|
180
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const destinationValidation = utils_1.validateAddress(rest.destination);
|
|
181
|
+
const destinationValidation = (0, utils_1.validateAddress)(rest.destination);
|
|
182
182
|
if (destinationValidation !== utils_1.ValidationResult.VALID) {
|
|
183
|
-
throw new core_1.InvalidAddressError(rest.destination, utils_1.invalidDetail(destinationValidation));
|
|
183
|
+
throw new core_1.InvalidAddressError(rest.destination, (0, utils_1.invalidDetail)(destinationValidation));
|
|
184
184
|
}
|
|
185
|
-
const sourceValidation = utils_1.validateAddress((_b = rest.source) !== null && _b !== void 0 ? _b : '');
|
|
185
|
+
const sourceValidation = (0, utils_1.validateAddress)((_b = rest.source) !== null && _b !== void 0 ? _b : '');
|
|
186
186
|
if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
|
|
187
|
-
throw new core_1.InvalidAddressError(rest.source, utils_1.invalidDetail(sourceValidation));
|
|
187
|
+
throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
|
|
188
188
|
}
|
|
189
189
|
const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
|
|
190
190
|
const preparedOperation = yield this.prepare.transferTicket(Object.assign({ fee,
|
|
@@ -209,13 +209,13 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
209
209
|
var _b;
|
|
210
210
|
var { fee, gasLimit, storageLimit } = _a, rest = __rest(_a, ["fee", "gasLimit", "storageLimit"]);
|
|
211
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
const sourceValidation = utils_1.validateAddress(rest.source);
|
|
212
|
+
const sourceValidation = (0, utils_1.validateAddress)(rest.source);
|
|
213
213
|
if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
|
|
214
|
-
throw new core_1.InvalidAddressError(rest.source, utils_1.invalidDetail(sourceValidation));
|
|
214
|
+
throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
|
|
215
215
|
}
|
|
216
|
-
const delegateValidation = utils_1.validateAddress((_b = rest.delegate) !== null && _b !== void 0 ? _b : '');
|
|
216
|
+
const delegateValidation = (0, utils_1.validateAddress)((_b = rest.delegate) !== null && _b !== void 0 ? _b : '');
|
|
217
217
|
if (rest.delegate && delegateValidation !== utils_1.ValidationResult.VALID) {
|
|
218
|
-
throw new core_1.InvalidAddressError(rest.delegate, utils_1.invalidDetail(delegateValidation));
|
|
218
|
+
throw new core_1.InvalidAddressError(rest.delegate, (0, utils_1.invalidDetail)(delegateValidation));
|
|
219
219
|
}
|
|
220
220
|
const preparedOperation = yield this.prepare.delegation(Object.assign({ fee,
|
|
221
221
|
storageLimit,
|
|
@@ -413,4 +413,3 @@ class RPCEstimateProvider extends provider_1.Provider {
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
exports.RPCEstimateProvider = RPCEstimateProvider;
|
|
416
|
-
//# sourceMappingURL=rpc-estimate-provider.js.map
|
|
@@ -25,7 +25,7 @@ class RpcInjector {
|
|
|
25
25
|
catch (error) {
|
|
26
26
|
const stringToStrip = '. You may want to use --replace to provide adequate fee and replace it';
|
|
27
27
|
if (error instanceof http_utils_1.HttpResponseError && error.message.includes(stringToStrip)) {
|
|
28
|
-
throw helper_1.formatErrorMessage(error, stringToStrip);
|
|
28
|
+
throw (0, helper_1.formatErrorMessage)(error, stringToStrip);
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
throw error;
|
|
@@ -36,4 +36,3 @@ class RpcInjector {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.RpcInjector = RpcInjector;
|
|
39
|
-
//# sourceMappingURL=rpc-injector.js.map
|
|
@@ -31,7 +31,7 @@ class BatchOperation extends operations_1.Operation {
|
|
|
31
31
|
return (this.results
|
|
32
32
|
.filter((result) => rpc_batch_provider_1.BATCH_KINDS.indexOf(result.kind) !== -1)
|
|
33
33
|
.map((result) => {
|
|
34
|
-
if (types_1.hasMetadataWithResult(result)) {
|
|
34
|
+
if ((0, types_1.hasMetadataWithResult)(result)) {
|
|
35
35
|
const opResult = result.metadata.operation_result;
|
|
36
36
|
return opResult.status;
|
|
37
37
|
}
|
|
@@ -54,14 +54,13 @@ class BatchOperation extends operations_1.Operation {
|
|
|
54
54
|
return new bignumber_js_1.default(this.consumedMilliGas).dividedBy(1000).toString();
|
|
55
55
|
}
|
|
56
56
|
get consumedMilliGas() {
|
|
57
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.results }), 'consumed_milligas'));
|
|
57
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.results }), 'consumed_milligas'));
|
|
58
58
|
}
|
|
59
59
|
get storageDiff() {
|
|
60
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.results }), 'paid_storage_size_diff'));
|
|
60
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.results }), 'paid_storage_size_diff'));
|
|
61
61
|
}
|
|
62
62
|
get errors() {
|
|
63
|
-
return errors_1.flattenErrors({ contents: this.results });
|
|
63
|
+
return (0, errors_1.flattenErrors)({ contents: this.results });
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.BatchOperation = BatchOperation;
|
|
67
|
-
//# sourceMappingURL=batch-operation.js.map
|
|
@@ -59,7 +59,7 @@ const flattenOperationResult = (response) => {
|
|
|
59
59
|
for (let i = 0; i < results.length; i++) {
|
|
60
60
|
for (let j = 0; j < results[i].contents.length; j++) {
|
|
61
61
|
const content = results[i].contents[j];
|
|
62
|
-
if (types_1.hasMetadataWithResult(content) && 'fee' in content) {
|
|
62
|
+
if ((0, types_1.hasMetadataWithResult)(content) && 'fee' in content) {
|
|
63
63
|
returnedResults.push(Object.assign({ fee: content.fee }, content.metadata.operation_result));
|
|
64
64
|
if (Array.isArray(content.metadata.internal_operation_results)) {
|
|
65
65
|
content.metadata.internal_operation_results.forEach((x) => returnedResults.push(x.result));
|
|
@@ -80,12 +80,12 @@ const flattenErrors = (response, status = 'failed') => {
|
|
|
80
80
|
for (let i = 0; i < results.length; i++) {
|
|
81
81
|
for (let j = 0; j < results[i].contents.length; j++) {
|
|
82
82
|
const content = results[i].contents[j];
|
|
83
|
-
if (types_1.hasMetadata(content)) {
|
|
84
|
-
if (types_1.hasMetadataWithResult(content) &&
|
|
83
|
+
if ((0, types_1.hasMetadata)(content)) {
|
|
84
|
+
if ((0, types_1.hasMetadataWithResult)(content) &&
|
|
85
85
|
content.metadata.operation_result.status === status) {
|
|
86
86
|
errors = errors.concat(content.metadata.operation_result.errors || []);
|
|
87
87
|
}
|
|
88
|
-
if (types_1.hasMetadataWithInternalOperationResult(content) &&
|
|
88
|
+
if ((0, types_1.hasMetadataWithInternalOperationResult)(content) &&
|
|
89
89
|
Array.isArray(content.metadata.internal_operation_results)) {
|
|
90
90
|
for (const internalResult of content.metadata.internal_operation_results) {
|
|
91
91
|
if ('result' in internalResult && internalResult.result.status === status) {
|
|
@@ -123,4 +123,3 @@ class InvalidEstimateValueError extends core_1.ParameterValidationError {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
exports.InvalidEstimateValueError = InvalidEstimateValueError;
|
|
126
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -21,4 +21,3 @@ var drain_delegate_operation_1 = require("./drain-delegate-operation");
|
|
|
21
21
|
Object.defineProperty(exports, "DrainDelegateOperation", { enumerable: true, get: function () { return drain_delegate_operation_1.DrainDelegateOperation; } });
|
|
22
22
|
var operations_1 = require("./operations");
|
|
23
23
|
Object.defineProperty(exports, "Operation", { enumerable: true, get: function () { return operations_1.Operation; } });
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -21,6 +21,9 @@ const core_1 = require("@taquito/core");
|
|
|
21
21
|
* @description Utility class to interact with Tezos operations
|
|
22
22
|
*/
|
|
23
23
|
class Operation {
|
|
24
|
+
get includedInBlock() {
|
|
25
|
+
return this._foundAt;
|
|
26
|
+
}
|
|
24
27
|
/**
|
|
25
28
|
*
|
|
26
29
|
* @param hash Operation hash
|
|
@@ -34,20 +37,20 @@ class Operation {
|
|
|
34
37
|
this.results = results;
|
|
35
38
|
this.context = context;
|
|
36
39
|
this._pollingConfig$ = new rxjs_1.ReplaySubject(1);
|
|
37
|
-
this.currentHead$ = this._pollingConfig$.pipe(operators_1.switchMap((config) => {
|
|
38
|
-
return new rxjs_1.BehaviorSubject(config).pipe(operators_1.timeout({
|
|
40
|
+
this.currentHead$ = this._pollingConfig$.pipe((0, operators_1.switchMap)((config) => {
|
|
41
|
+
return new rxjs_1.BehaviorSubject(config).pipe((0, operators_1.timeout)({
|
|
39
42
|
each: config.timeout * 1000,
|
|
40
|
-
with: () => rxjs_1.throwError(() => new errors_1.ConfirmationTimeoutError(`Confirmation polling timed out`)),
|
|
43
|
+
with: () => (0, rxjs_1.throwError)(() => new errors_1.ConfirmationTimeoutError(`Confirmation polling timed out`)),
|
|
41
44
|
}));
|
|
42
|
-
}), operators_1.switchMap(() => {
|
|
43
|
-
return rxjs_1.defer(() => create_observable_from_subscription_1.createObservableFromSubscription(this.context.stream.subscribeBlock('head'))).pipe(operators_1.switchMap((newHead) => {
|
|
45
|
+
}), (0, operators_1.switchMap)(() => {
|
|
46
|
+
return (0, rxjs_1.defer)(() => (0, create_observable_from_subscription_1.createObservableFromSubscription)(this.context.stream.subscribeBlock('head'))).pipe((0, operators_1.switchMap)((newHead) => {
|
|
44
47
|
var _a, _b;
|
|
45
48
|
const prevHead = (_b = (_a = this.lastHead) === null || _a === void 0 ? void 0 : _a.header.level) !== null && _b !== void 0 ? _b : newHead.header.level - 1;
|
|
46
|
-
return rxjs_1.range(prevHead + 1, newHead.header.level - prevHead - 1).pipe(operators_1.concatMap((level) => this.context.readProvider.getBlock(level)), operators_1.endWith(newHead));
|
|
47
|
-
}), operators_1.tap((newHead) => (this.lastHead = newHead)));
|
|
48
|
-
}), operators_1.shareReplay({ refCount: true }));
|
|
49
|
+
return (0, rxjs_1.range)(prevHead + 1, newHead.header.level - prevHead - 1).pipe((0, operators_1.concatMap)((level) => this.context.readProvider.getBlock(level)), (0, operators_1.endWith)(newHead));
|
|
50
|
+
}), (0, operators_1.tap)((newHead) => (this.lastHead = newHead)));
|
|
51
|
+
}), (0, operators_1.shareReplay)({ refCount: true }));
|
|
49
52
|
// Observable that emit once operation is seen in a block
|
|
50
|
-
this.confirmed$ = this.currentHead$.pipe(operators_1.map((head) => {
|
|
53
|
+
this.confirmed$ = this.currentHead$.pipe((0, operators_1.map)((head) => {
|
|
51
54
|
for (let i = 3; i >= 0; i--) {
|
|
52
55
|
head.operations[i].forEach((op) => {
|
|
53
56
|
if (op.hash === this.hash) {
|
|
@@ -58,20 +61,17 @@ class Operation {
|
|
|
58
61
|
if (head.header.level - this._foundAt >= 0) {
|
|
59
62
|
return this._foundAt;
|
|
60
63
|
}
|
|
61
|
-
}), operators_1.filter((x) => x !== undefined), operators_1.first(), operators_1.shareReplay());
|
|
64
|
+
}), (0, operators_1.filter)((x) => x !== undefined), (0, operators_1.first)(), (0, operators_1.shareReplay)());
|
|
62
65
|
this._foundAt = Number.POSITIVE_INFINITY;
|
|
63
|
-
if (utils_1.validateOperation(this.hash) !== utils_1.ValidationResult.VALID) {
|
|
66
|
+
if ((0, utils_1.validateOperation)(this.hash) !== utils_1.ValidationResult.VALID) {
|
|
64
67
|
throw new core_1.InvalidOperationHashError(this.hash);
|
|
65
68
|
}
|
|
66
69
|
this.confirmed$
|
|
67
|
-
.pipe(operators_1.first(), operators_1.catchError(() => {
|
|
68
|
-
return rxjs_1.of(rxjs_1.EMPTY);
|
|
70
|
+
.pipe((0, operators_1.first)(), (0, operators_1.catchError)(() => {
|
|
71
|
+
return (0, rxjs_1.of)(rxjs_1.EMPTY);
|
|
69
72
|
}))
|
|
70
73
|
.subscribe();
|
|
71
74
|
}
|
|
72
|
-
get includedInBlock() {
|
|
73
|
-
return this._foundAt;
|
|
74
|
-
}
|
|
75
75
|
get revealOperation() {
|
|
76
76
|
return (Array.isArray(this.results) &&
|
|
77
77
|
this.results.find((op) => op.kind === 'reveal'));
|
|
@@ -86,7 +86,7 @@ class Operation {
|
|
|
86
86
|
}
|
|
87
87
|
get status() {
|
|
88
88
|
return (this.results.map((result) => {
|
|
89
|
-
if (types_1.hasMetadataWithResult(result)) {
|
|
89
|
+
if ((0, types_1.hasMetadataWithResult)(result)) {
|
|
90
90
|
return result.metadata.operation_result.status;
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
@@ -111,7 +111,7 @@ class Operation {
|
|
|
111
111
|
const conf = confirmations !== undefined ? confirmations : defaultConfirmationCount;
|
|
112
112
|
return new Promise((resolve, reject) => {
|
|
113
113
|
this.confirmed$
|
|
114
|
-
.pipe(operators_1.switchMap(() => this.currentHead$), operators_1.filter((head) => head.header.level - this._foundAt >= conf - 1), operators_1.first())
|
|
114
|
+
.pipe((0, operators_1.switchMap)(() => this.currentHead$), (0, operators_1.filter)((head) => head.header.level - this._foundAt >= conf - 1), (0, operators_1.first)())
|
|
115
115
|
.subscribe((_) => {
|
|
116
116
|
resolve(this._foundAt + (conf - 1));
|
|
117
117
|
}, reject);
|
|
@@ -120,4 +120,3 @@ class Operation {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
exports.Operation = Operation;
|
|
123
|
-
//# sourceMappingURL=operations.js.map
|
|
@@ -37,7 +37,7 @@ class OriginationOperation extends operations_1.Operation {
|
|
|
37
37
|
const originationOp = Array.isArray(this.results) &&
|
|
38
38
|
this.results.find((op) => op.kind === 'origination');
|
|
39
39
|
const result = originationOp &&
|
|
40
|
-
types_1.hasMetadataWithResult(originationOp) &&
|
|
40
|
+
(0, types_1.hasMetadataWithResult)(originationOp) &&
|
|
41
41
|
originationOp.metadata.operation_result;
|
|
42
42
|
return result ? result : undefined;
|
|
43
43
|
}
|
|
@@ -87,4 +87,3 @@ class OriginationOperation extends operations_1.Operation {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
exports.OriginationOperation = OriginationOperation;
|
|
90
|
-
//# sourceMappingURL=origination-operation.js.map
|
|
@@ -50,17 +50,16 @@ class RevealOperation extends operations_1.Operation {
|
|
|
50
50
|
return new bignumber_js_1.BigNumber(this.consumedMilliGas).dividedBy(1000).toString();
|
|
51
51
|
}
|
|
52
52
|
get consumedMilliGas() {
|
|
53
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.operationResults }), 'consumed_milligas'));
|
|
53
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.operationResults }), 'consumed_milligas'));
|
|
54
54
|
}
|
|
55
55
|
get storageDiff() {
|
|
56
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.operationResults }), 'paid_storage_size_diff'));
|
|
56
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.operationResults }), 'paid_storage_size_diff'));
|
|
57
57
|
}
|
|
58
58
|
get storageSize() {
|
|
59
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.operationResults }), 'storage_size'));
|
|
59
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.operationResults }), 'storage_size'));
|
|
60
60
|
}
|
|
61
61
|
get errors() {
|
|
62
|
-
return errors_1.flattenErrors({ contents: this.operationResults });
|
|
62
|
+
return (0, errors_1.flattenErrors)({ contents: this.operationResults });
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
exports.RevealOperation = RevealOperation;
|
|
66
|
-
//# sourceMappingURL=reveal-operation.js.map
|
|
@@ -55,17 +55,16 @@ class TransactionOperation extends operations_1.Operation {
|
|
|
55
55
|
return new bignumber_js_1.default(this.consumedMilliGas).dividedBy(1000).toString();
|
|
56
56
|
}
|
|
57
57
|
get consumedMilliGas() {
|
|
58
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.operationResults }), 'consumed_milligas'));
|
|
58
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.operationResults }), 'consumed_milligas'));
|
|
59
59
|
}
|
|
60
60
|
get storageDiff() {
|
|
61
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.operationResults }), 'paid_storage_size_diff'));
|
|
61
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.operationResults }), 'paid_storage_size_diff'));
|
|
62
62
|
}
|
|
63
63
|
get storageSize() {
|
|
64
|
-
return String(this.sumProp(errors_1.flattenOperationResult({ contents: this.operationResults }), 'storage_size'));
|
|
64
|
+
return String(this.sumProp((0, errors_1.flattenOperationResult)({ contents: this.operationResults }), 'storage_size'));
|
|
65
65
|
}
|
|
66
66
|
get errors() {
|
|
67
|
-
return errors_1.flattenErrors({ contents: this.operationResults });
|
|
67
|
+
return (0, errors_1.flattenErrors)({ contents: this.operationResults });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
exports.TransactionOperation = TransactionOperation;
|
|
71
|
-
//# sourceMappingURL=transaction-operation.js.map
|
|
@@ -10,7 +10,7 @@ exports.attachKind = attachKind;
|
|
|
10
10
|
const findWithKind = (arr, kind) => {
|
|
11
11
|
if (Array.isArray(arr)) {
|
|
12
12
|
const found = arr.find((op) => op.kind === kind);
|
|
13
|
-
if (found && exports.isKind(found, kind)) {
|
|
13
|
+
if (found && (0, exports.isKind)(found, kind)) {
|
|
14
14
|
return found;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -62,11 +62,10 @@ const hasMetadata = (op) => {
|
|
|
62
62
|
};
|
|
63
63
|
exports.hasMetadata = hasMetadata;
|
|
64
64
|
const hasMetadataWithResult = (op) => {
|
|
65
|
-
return exports.hasMetadata(op) && 'operation_result' in op.metadata;
|
|
65
|
+
return (0, exports.hasMetadata)(op) && 'operation_result' in op.metadata;
|
|
66
66
|
};
|
|
67
67
|
exports.hasMetadataWithResult = hasMetadataWithResult;
|
|
68
68
|
const hasMetadataWithInternalOperationResult = (op) => {
|
|
69
|
-
return exports.hasMetadata(op) && 'internal_operation_results' in op.metadata;
|
|
69
|
+
return (0, exports.hasMetadata)(op) && 'internal_operation_results' in op.metadata;
|
|
70
70
|
};
|
|
71
71
|
exports.hasMetadataWithInternalOperationResult = hasMetadataWithInternalOperationResult;
|
|
72
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -14,10 +14,9 @@ const michel_codec_1 = require("@taquito/michel-codec");
|
|
|
14
14
|
class MichelCodecPacker {
|
|
15
15
|
packData(data) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const { bytes } = michel_codec_1.packDataBytes(data.data, data.type);
|
|
17
|
+
const { bytes } = (0, michel_codec_1.packDataBytes)(data.data, data.type);
|
|
18
18
|
return { packed: bytes };
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.MichelCodecPacker = MichelCodecPacker;
|
|
23
|
-
//# sourceMappingURL=michel-codec-packer.js.map
|
|
@@ -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];
|
|
@@ -12,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./interface"), exports);
|
|
14
18
|
__exportStar(require("./prepare-provider"), exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|