@taquito/taquito 20.0.2-beta.1 → 20.0.2-beta.2

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 CHANGED
@@ -7,7 +7,7 @@ The `@taquito/taquito` package contains higher-level functionality that builds u
7
7
  ## CDN Bundle
8
8
 
9
9
  ```html
10
- <script src="https://unpkg.com/@taquito/taquito@20.0.2-beta.1/dist/taquito.min.js"
10
+ <script src="https://unpkg.com/@taquito/taquito@20.0.2-beta.2/dist/taquito.min.js"
11
11
  crossorigin="anonymous" integrity="sha384-IxvP0ECHi5oqLyz94wF85pU9+ktcsL1HHtA42MITxZsGbsUMEu/g+0Vkjj5vqiMR"></script>
12
12
  ```
13
13
 
@@ -80,15 +80,15 @@ exports.protocols = {
80
80
  '005': [Protocols.PsBABY5H, Protocols.PsBabyM1],
81
81
  '006': [Protocols.PsCARTHA],
82
82
  '007': [Protocols.PsDELPH1],
83
- '008': [Protocols.PtEdo2Zk],
83
+ '008': [Protocols.PtEdo2Zk], // edonet v2
84
84
  '009': [Protocols.PsFLorena],
85
85
  '010': [Protocols.PtGRANADs],
86
- '011': [Protocols.PtHangz2],
86
+ '011': [Protocols.PtHangz2], // hangzhou v2,
87
87
  '012': [Protocols.PsiThaCa, Protocols.Psithaca2],
88
88
  '013': [Protocols.PtJakart2],
89
89
  '014': [Protocols.PtKathman],
90
90
  '015': [Protocols.PtLimaPtL],
91
- '016': [Protocols.PtMumbai2],
91
+ '016': [Protocols.PtMumbai2], // mumbai v2
92
92
  '017': [Protocols.PtNairobi],
93
93
  '019': [Protocols.ProxfordY],
94
94
  '020': [Protocols.PtParisBx, Protocols.PsParisCZ],
@@ -152,8 +152,8 @@ class Context {
152
152
  set stream(value) {
153
153
  this._stream = value;
154
154
  }
155
- isAnyProtocolActive(protocol = []) {
156
- return __awaiter(this, void 0, void 0, function* () {
155
+ isAnyProtocolActive() {
156
+ return __awaiter(this, arguments, void 0, function* (protocol = []) {
157
157
  if (this._proto) {
158
158
  return protocol.includes(this._proto);
159
159
  }
@@ -55,8 +55,8 @@ class BigMapAbstraction {
55
55
  * @returns A MichelsonMap containing the keys queried in the big map and their value in a well-formatted JSON object format
56
56
  *
57
57
  */
58
- getMultipleValues(keysToEncode, block, batchSize = 5) {
59
- return __awaiter(this, void 0, void 0, function* () {
58
+ getMultipleValues(keysToEncode_1, block_1) {
59
+ return __awaiter(this, arguments, void 0, function* (keysToEncode, block, batchSize = 5) {
60
60
  return this.provider.getBigMapKeysByID(this.id.toString(), keysToEncode, this.schema, block, batchSize);
61
61
  });
62
62
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compose = void 0;
3
+ exports.compose = compose;
4
4
  function compose(functioncomposer1, functioncomposer2) {
5
5
  return (contractAbstraction, context) => functioncomposer2(functioncomposer1(contractAbstraction, context), context);
6
6
  }
7
- exports.compose = compose;
@@ -15,7 +15,7 @@ const rpc_1 = require("@taquito/rpc");
15
15
  const constants_1 = require("../constants");
16
16
  const utils_1 = require("@taquito/utils");
17
17
  const errors_1 = require("./errors");
18
- const createActivationOperation = ({ pkh, secret }) => __awaiter(void 0, void 0, void 0, function* () {
18
+ const createActivationOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pkh, secret }) {
19
19
  return {
20
20
  kind: rpc_1.OpKind.ACTIVATION,
21
21
  pkh,
@@ -23,7 +23,7 @@ const createActivationOperation = ({ pkh, secret }) => __awaiter(void 0, void 0,
23
23
  };
24
24
  });
25
25
  exports.createActivationOperation = createActivationOperation;
26
- const createOriginationOperation = ({ code, init, balance = '0', delegate, storage, fee, gasLimit, storageLimit, mutez = false, }) => __awaiter(void 0, void 0, void 0, function* () {
26
+ const createOriginationOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ code, init, balance = '0', delegate, storage, fee, gasLimit, storageLimit, mutez = false, }) {
27
27
  if (storage !== undefined && init !== undefined) {
28
28
  throw new errors_1.OriginationParameterError('Storage and Init cannot be set a the same time. Please either use storage or init but not both.');
29
29
  }
@@ -66,7 +66,7 @@ const createOriginationOperation = ({ code, init, balance = '0', delegate, stora
66
66
  return operation;
67
67
  });
68
68
  exports.createOriginationOperation = createOriginationOperation;
69
- const createTransferOperation = ({ to, amount, parameter, fee, gasLimit, storageLimit, mutez = false, }) => __awaiter(void 0, void 0, void 0, function* () {
69
+ const createTransferOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ to, amount, parameter, fee, gasLimit, storageLimit, mutez = false, }) {
70
70
  return {
71
71
  kind: rpc_1.OpKind.TRANSACTION,
72
72
  fee,
@@ -78,7 +78,7 @@ const createTransferOperation = ({ to, amount, parameter, fee, gasLimit, storage
78
78
  };
79
79
  });
80
80
  exports.createTransferOperation = createTransferOperation;
81
- const createSetDelegateOperation = ({ delegate, source, fee, gasLimit, storageLimit, }) => __awaiter(void 0, void 0, void 0, function* () {
81
+ const createSetDelegateOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ delegate, source, fee, gasLimit, storageLimit, }) {
82
82
  const operation = {
83
83
  kind: rpc_1.OpKind.DELEGATION,
84
84
  source,
@@ -90,7 +90,7 @@ const createSetDelegateOperation = ({ delegate, source, fee, gasLimit, storageLi
90
90
  return operation;
91
91
  });
92
92
  exports.createSetDelegateOperation = createSetDelegateOperation;
93
- const createRegisterDelegateOperation = ({ fee, gasLimit, storageLimit }, source) => __awaiter(void 0, void 0, void 0, function* () {
93
+ const createRegisterDelegateOperation = (_a, source_1) => __awaiter(void 0, [_a, source_1], void 0, function* ({ fee, gasLimit, storageLimit }, source) {
94
94
  return {
95
95
  kind: rpc_1.OpKind.DELEGATION,
96
96
  fee,
@@ -100,7 +100,7 @@ const createRegisterDelegateOperation = ({ fee, gasLimit, storageLimit }, source
100
100
  };
101
101
  });
102
102
  exports.createRegisterDelegateOperation = createRegisterDelegateOperation;
103
- const createRevealOperation = ({ fee, gasLimit, storageLimit }, source, publicKey) => __awaiter(void 0, void 0, void 0, function* () {
103
+ const createRevealOperation = (_a, source_1, publicKey_1) => __awaiter(void 0, [_a, source_1, publicKey_1], void 0, function* ({ fee, gasLimit, storageLimit }, source, publicKey) {
104
104
  return {
105
105
  kind: rpc_1.OpKind.REVEAL,
106
106
  fee,
@@ -111,7 +111,7 @@ const createRevealOperation = ({ fee, gasLimit, storageLimit }, source, publicKe
111
111
  };
112
112
  });
113
113
  exports.createRevealOperation = createRevealOperation;
114
- const createRegisterGlobalConstantOperation = ({ value, source, fee, gasLimit, storageLimit, }) => __awaiter(void 0, void 0, void 0, function* () {
114
+ const createRegisterGlobalConstantOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ value, source, fee, gasLimit, storageLimit, }) {
115
115
  return {
116
116
  kind: rpc_1.OpKind.REGISTER_GLOBAL_CONSTANT,
117
117
  value,
@@ -122,7 +122,7 @@ const createRegisterGlobalConstantOperation = ({ value, source, fee, gasLimit, s
122
122
  };
123
123
  });
124
124
  exports.createRegisterGlobalConstantOperation = createRegisterGlobalConstantOperation;
125
- const createTransferTicketOperation = ({ ticketContents, ticketTy, ticketTicketer, ticketAmount, destination, entrypoint, source, fee, gasLimit, storageLimit, }) => __awaiter(void 0, void 0, void 0, function* () {
125
+ const createTransferTicketOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ ticketContents, ticketTy, ticketTicketer, ticketAmount, destination, entrypoint, source, fee, gasLimit, storageLimit, }) {
126
126
  return {
127
127
  kind: rpc_1.OpKind.TRANSFER_TICKET,
128
128
  fee,
@@ -138,7 +138,7 @@ const createTransferTicketOperation = ({ ticketContents, ticketTy, ticketTickete
138
138
  };
139
139
  });
140
140
  exports.createTransferTicketOperation = createTransferTicketOperation;
141
- const createIncreasePaidStorageOperation = ({ source, fee, gasLimit, storageLimit, amount, destination, }) => __awaiter(void 0, void 0, void 0, function* () {
141
+ const createIncreasePaidStorageOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, fee, gasLimit, storageLimit, amount, destination, }) {
142
142
  return {
143
143
  kind: rpc_1.OpKind.INCREASE_PAID_STORAGE,
144
144
  source,
@@ -150,7 +150,7 @@ const createIncreasePaidStorageOperation = ({ source, fee, gasLimit, storageLimi
150
150
  };
151
151
  });
152
152
  exports.createIncreasePaidStorageOperation = createIncreasePaidStorageOperation;
153
- const createDrainDelegateOperation = ({ consensus_key, delegate, destination, }) => __awaiter(void 0, void 0, void 0, function* () {
153
+ const createDrainDelegateOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ consensus_key, delegate, destination, }) {
154
154
  return {
155
155
  kind: rpc_1.OpKind.DRAIN_DELEGATE,
156
156
  consensus_key,
@@ -159,7 +159,7 @@ const createDrainDelegateOperation = ({ consensus_key, delegate, destination, })
159
159
  };
160
160
  });
161
161
  exports.createDrainDelegateOperation = createDrainDelegateOperation;
162
- const createBallotOperation = ({ source, proposal, ballot }) => __awaiter(void 0, void 0, void 0, function* () {
162
+ const createBallotOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, proposal, ballot }) {
163
163
  return {
164
164
  kind: rpc_1.OpKind.BALLOT,
165
165
  source,
@@ -168,7 +168,7 @@ const createBallotOperation = ({ source, proposal, ballot }) => __awaiter(void 0
168
168
  };
169
169
  });
170
170
  exports.createBallotOperation = createBallotOperation;
171
- const createProposalsOperation = ({ source, proposals }) => __awaiter(void 0, void 0, void 0, function* () {
171
+ const createProposalsOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, proposals }) {
172
172
  return {
173
173
  kind: rpc_1.OpKind.PROPOSALS,
174
174
  source,
@@ -176,7 +176,7 @@ const createProposalsOperation = ({ source, proposals }) => __awaiter(void 0, vo
176
176
  };
177
177
  });
178
178
  exports.createProposalsOperation = createProposalsOperation;
179
- const createUpdateConsensusKeyOperation = ({ source, fee, gasLimit, storageLimit, pk, }) => __awaiter(void 0, void 0, void 0, function* () {
179
+ const createUpdateConsensusKeyOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, fee, gasLimit, storageLimit, pk, }) {
180
180
  return {
181
181
  kind: rpc_1.OpKind.UPDATE_CONSENSUS_KEY,
182
182
  source,
@@ -187,7 +187,7 @@ const createUpdateConsensusKeyOperation = ({ source, fee, gasLimit, storageLimit
187
187
  };
188
188
  });
189
189
  exports.createUpdateConsensusKeyOperation = createUpdateConsensusKeyOperation;
190
- const createSmartRollupAddMessagesOperation = ({ source, fee, gasLimit, storageLimit, message, }) => __awaiter(void 0, void 0, void 0, function* () {
190
+ const createSmartRollupAddMessagesOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, fee, gasLimit, storageLimit, message, }) {
191
191
  return {
192
192
  kind: rpc_1.OpKind.SMART_ROLLUP_ADD_MESSAGES,
193
193
  source,
@@ -198,7 +198,7 @@ const createSmartRollupAddMessagesOperation = ({ source, fee, gasLimit, storageL
198
198
  };
199
199
  });
200
200
  exports.createSmartRollupAddMessagesOperation = createSmartRollupAddMessagesOperation;
201
- const createSmartRollupOriginateOperation = ({ source, fee, gasLimit, storageLimit, pvmKind, kernel, parametersType, }) => __awaiter(void 0, void 0, void 0, function* () {
201
+ const createSmartRollupOriginateOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, fee, gasLimit, storageLimit, pvmKind, kernel, parametersType, }) {
202
202
  return {
203
203
  kind: rpc_1.OpKind.SMART_ROLLUP_ORIGINATE,
204
204
  source,
@@ -211,7 +211,7 @@ const createSmartRollupOriginateOperation = ({ source, fee, gasLimit, storageLim
211
211
  };
212
212
  });
213
213
  exports.createSmartRollupOriginateOperation = createSmartRollupOriginateOperation;
214
- const createSmartRollupExecuteOutboxMessageOperation = ({ source, fee, gasLimit, storageLimit, rollup, cementedCommitment, outputProof, }) => __awaiter(void 0, void 0, void 0, function* () {
214
+ const createSmartRollupExecuteOutboxMessageOperation = (_a) => __awaiter(void 0, [_a], void 0, function* ({ source, fee, gasLimit, storageLimit, rollup, cementedCommitment, outputProof, }) {
215
215
  return {
216
216
  kind: rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE,
217
217
  source,
@@ -141,8 +141,8 @@ class RpcContractProvider extends provider_1.Provider {
141
141
  * @returns A MichelsonMap containing the keys queried in the big map and their value in a well-formatted JSON object format
142
142
  *
143
143
  */
144
- getBigMapKeysByID(id, keys, schema, block, batchSize = 5) {
145
- return __awaiter(this, void 0, void 0, function* () {
144
+ getBigMapKeysByID(id_1, keys_1, schema_1, block_1) {
145
+ return __awaiter(this, arguments, void 0, function* (id, keys, schema, block, batchSize = 5) {
146
146
  const level = yield this.getBlockForRequest(keys, block);
147
147
  const bigMapValues = new michelson_encoder_1.MichelsonMap();
148
148
  // Execute batch of promises in series
@@ -227,8 +227,8 @@ class RpcContractProvider extends provider_1.Provider {
227
227
  * @param SetDelegate operation parameter
228
228
  */
229
229
  setDelegate(params) {
230
- var _a;
231
230
  return __awaiter(this, void 0, void 0, function* () {
231
+ var _a;
232
232
  const sourceValidation = (0, utils_1.validateAddress)(params.source);
233
233
  if (params.source && sourceValidation !== utils_1.ValidationResult.VALID) {
234
234
  throw new core_1.InvalidAddressError(params.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -279,8 +279,8 @@ class RpcContractProvider extends provider_1.Provider {
279
279
  * @param Transfer operation parameter
280
280
  */
281
281
  transfer(params) {
282
- var _a;
283
282
  return __awaiter(this, void 0, void 0, function* () {
283
+ var _a;
284
284
  const toValidation = (0, utils_1.validateAddress)(params.to);
285
285
  if (toValidation !== utils_1.ValidationResult.VALID) {
286
286
  throw new core_1.InvalidAddressError(params.to, (0, utils_1.invalidDetail)(toValidation));
@@ -311,8 +311,8 @@ class RpcContractProvider extends provider_1.Provider {
311
311
  * @param Stake pseudo-operation parameter
312
312
  */
313
313
  stake(params) {
314
- var _a;
315
314
  return __awaiter(this, void 0, void 0, function* () {
315
+ var _a;
316
316
  const sourceValidation = (0, utils_1.validateAddress)((_a = params.source) !== null && _a !== void 0 ? _a : '');
317
317
  if (params.source && sourceValidation !== utils_1.ValidationResult.VALID) {
318
318
  throw new core_1.InvalidAddressError(params.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -347,8 +347,8 @@ class RpcContractProvider extends provider_1.Provider {
347
347
  * @param Unstake pseudo-operation parameter
348
348
  */
349
349
  unstake(params) {
350
- var _a;
351
350
  return __awaiter(this, void 0, void 0, function* () {
351
+ var _a;
352
352
  const sourceValidation = (0, utils_1.validateAddress)((_a = params.source) !== null && _a !== void 0 ? _a : '');
353
353
  if (params.source && sourceValidation !== utils_1.ValidationResult.VALID) {
354
354
  throw new core_1.InvalidAddressError(params.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -380,8 +380,8 @@ class RpcContractProvider extends provider_1.Provider {
380
380
  * @param Finalize_unstake pseudo-operation parameter
381
381
  */
382
382
  finalizeUnstake(params) {
383
- var _a;
384
383
  return __awaiter(this, void 0, void 0, function* () {
384
+ var _a;
385
385
  const sourceValidation = (0, utils_1.validateAddress)((_a = params.source) !== null && _a !== void 0 ? _a : '');
386
386
  if (params.source && sourceValidation !== utils_1.ValidationResult.VALID) {
387
387
  throw new core_1.InvalidAddressError(params.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -417,8 +417,8 @@ class RpcContractProvider extends provider_1.Provider {
417
417
  * @param TransferTicketParams operation parameter
418
418
  */
419
419
  transferTicket(params) {
420
- var _a, _b;
421
420
  return __awaiter(this, void 0, void 0, function* () {
421
+ var _a, _b;
422
422
  const destinationValidation = (0, utils_1.validateAddress)(params.destination);
423
423
  if (destinationValidation !== utils_1.ValidationResult.VALID) {
424
424
  throw new core_1.InvalidAddressError(params.destination, (0, utils_1.invalidDetail)(destinationValidation));
@@ -529,8 +529,8 @@ class RpcContractProvider extends provider_1.Provider {
529
529
  * @param BallotParams Ballot operation parameter
530
530
  */
531
531
  ballot(params) {
532
- var _a, _b;
533
532
  return __awaiter(this, void 0, void 0, function* () {
533
+ var _a, _b;
534
534
  const publicKeyHash = yield this.signer.publicKeyHash();
535
535
  const sourceValidation = (0, utils_1.validateAddress)((_a = params.source) !== null && _a !== void 0 ? _a : '');
536
536
  if (params.source && sourceValidation !== utils_1.ValidationResult.VALID) {
@@ -553,8 +553,8 @@ class RpcContractProvider extends provider_1.Provider {
553
553
  * @param ProposalsParams Proposals operation parameter
554
554
  */
555
555
  proposals(params) {
556
- var _a, _b;
557
556
  return __awaiter(this, void 0, void 0, function* () {
557
+ var _a, _b;
558
558
  const publicKeyHash = yield this.signer.publicKeyHash();
559
559
  const sourceValidation = (0, utils_1.validateAddress)((_a = params.source) !== null && _a !== void 0 ? _a : '');
560
560
  if (params.source && sourceValidation !== utils_1.ValidationResult.VALID) {
@@ -677,8 +677,8 @@ class RpcContractProvider extends provider_1.Provider {
677
677
  * @param address Smart contract address
678
678
  * @throws {@link InvalidContractAddressError}
679
679
  */
680
- at(address, contractAbstractionComposer = (x) => x) {
681
- return __awaiter(this, void 0, void 0, function* () {
680
+ at(address_1) {
681
+ return __awaiter(this, arguments, void 0, function* (address, contractAbstractionComposer = (x) => x) {
682
682
  const addressValidation = (0, utils_1.validateContractAddress)(address);
683
683
  if (addressValidation !== utils_1.ValidationResult.VALID) {
684
684
  throw new core_1.InvalidContractAddressError(address, (0, utils_1.invalidDetail)(addressValidation));
@@ -152,9 +152,9 @@ class RPCEstimateProvider extends provider_1.Provider {
152
152
  * @param TransferOperation Originate operation parameter
153
153
  */
154
154
  transfer(_a) {
155
- var _b;
156
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
157
155
  return __awaiter(this, void 0, void 0, function* () {
156
+ var _b;
157
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
158
158
  const toValidation = (0, utils_1.validateAddress)(rest.to);
159
159
  if (toValidation !== utils_1.ValidationResult.VALID) {
160
160
  throw new core_1.InvalidAddressError(rest.to, (0, utils_1.invalidDetail)(toValidation));
@@ -187,9 +187,9 @@ class RPCEstimateProvider extends provider_1.Provider {
187
187
  * @param Stake pseudo-operation parameter
188
188
  */
189
189
  stake(_a) {
190
- var _b;
191
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
192
190
  return __awaiter(this, void 0, void 0, function* () {
191
+ var _b;
192
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
193
193
  const sourceValidation = (0, utils_1.validateAddress)((_b = rest.source) !== null && _b !== void 0 ? _b : '');
194
194
  if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
195
195
  throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -224,9 +224,9 @@ class RPCEstimateProvider extends provider_1.Provider {
224
224
  * @param Unstake pseudo-operation parameter
225
225
  */
226
226
  unstake(_a) {
227
- var _b;
228
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
229
227
  return __awaiter(this, void 0, void 0, function* () {
228
+ var _b;
229
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
230
230
  const sourceValidation = (0, utils_1.validateAddress)((_b = rest.source) !== null && _b !== void 0 ? _b : '');
231
231
  if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
232
232
  throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -261,9 +261,9 @@ class RPCEstimateProvider extends provider_1.Provider {
261
261
  * @param finalize_unstake pseudo-operation parameter
262
262
  */
263
263
  finalizeUnstake(_a) {
264
- var _b;
265
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
266
264
  return __awaiter(this, void 0, void 0, function* () {
265
+ var _b;
266
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
267
267
  const sourceValidation = (0, utils_1.validateAddress)((_b = rest.source) !== null && _b !== void 0 ? _b : '');
268
268
  if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
269
269
  throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -301,9 +301,9 @@ class RPCEstimateProvider extends provider_1.Provider {
301
301
  * @param TransferTicketParams operation parameter
302
302
  */
303
303
  transferTicket(_a) {
304
- var _b;
305
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
306
304
  return __awaiter(this, void 0, void 0, function* () {
305
+ var _b;
306
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
307
307
  const destinationValidation = (0, utils_1.validateAddress)(rest.destination);
308
308
  if (destinationValidation !== utils_1.ValidationResult.VALID) {
309
309
  throw new core_1.InvalidAddressError(rest.destination, (0, utils_1.invalidDetail)(destinationValidation));
@@ -333,9 +333,9 @@ class RPCEstimateProvider extends provider_1.Provider {
333
333
  * @param Estimate
334
334
  */
335
335
  setDelegate(_a) {
336
- var _b;
337
- var { fee, gasLimit, storageLimit } = _a, rest = __rest(_a, ["fee", "gasLimit", "storageLimit"]);
338
336
  return __awaiter(this, void 0, void 0, function* () {
337
+ var _b;
338
+ var { fee, gasLimit, storageLimit } = _a, rest = __rest(_a, ["fee", "gasLimit", "storageLimit"]);
339
339
  const sourceValidation = (0, utils_1.validateAddress)(rest.source);
340
340
  if (rest.source && sourceValidation !== utils_1.ValidationResult.VALID) {
341
341
  throw new core_1.InvalidAddressError(rest.source, (0, utils_1.invalidDetail)(sourceValidation));
@@ -379,8 +379,8 @@ class RPCEstimateProvider extends provider_1.Provider {
379
379
  * @param Estimate
380
380
  */
381
381
  registerDelegate(_a, source) {
382
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
383
382
  return __awaiter(this, void 0, void 0, function* () {
383
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
384
384
  const pkh = (yield this.getKeys()).publicKeyHash;
385
385
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
386
386
  const checkSource = source || pkh;
@@ -426,8 +426,8 @@ class RPCEstimateProvider extends provider_1.Provider {
426
426
  * @param params registerGlobalConstant operation parameter
427
427
  */
428
428
  registerGlobalConstant(_a) {
429
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
430
429
  return __awaiter(this, void 0, void 0, function* () {
430
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
431
431
  const preparedOperation = yield this.prepare.registerGlobalConstant(Object.assign({ fee,
432
432
  storageLimit,
433
433
  gasLimit }, rest));
@@ -449,8 +449,8 @@ class RPCEstimateProvider extends provider_1.Provider {
449
449
  * @param params increasePaidStorage operation parameters
450
450
  */
451
451
  increasePaidStorage(_a) {
452
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
453
452
  return __awaiter(this, void 0, void 0, function* () {
453
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
454
454
  if (rest.amount < 0) {
455
455
  throw new core_1.InvalidAmountError(rest.amount.toString());
456
456
  }
@@ -18,8 +18,8 @@ class CompositeForger {
18
18
  throw new errors_1.UnspecifiedForgerError();
19
19
  }
20
20
  }
21
- forge({ branch, contents }) {
22
- return __awaiter(this, void 0, void 0, function* () {
21
+ forge(_a) {
22
+ return __awaiter(this, arguments, void 0, function* ({ branch, contents }) {
23
23
  const results = yield Promise.all(this.forgers.map((forger) => {
24
24
  return forger.forge({ branch, contents });
25
25
  }));
@@ -24,8 +24,8 @@ class TaquitoLocalForger {
24
24
  return this.context.proto;
25
25
  });
26
26
  }
27
- forge({ branch, contents }) {
28
- return __awaiter(this, void 0, void 0, function* () {
27
+ forge(_a) {
28
+ return __awaiter(this, arguments, void 0, function* ({ branch, contents }) {
29
29
  const forger = new local_forging_1.LocalForger(yield this.getNextProto());
30
30
  return forger.forge({ branch, contents });
31
31
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatErrorMessage = void 0;
3
+ exports.formatErrorMessage = formatErrorMessage;
4
4
  const http_utils_1 = require("@taquito/http-utils");
5
5
  function formatErrorMessage(error, stringToReplace) {
6
6
  const body = JSON.parse(error.body);
@@ -16,4 +16,3 @@ function formatErrorMessage(error, stringToReplace) {
16
16
  return error;
17
17
  }
18
18
  }
19
- exports.formatErrorMessage = formatErrorMessage;
@@ -70,8 +70,8 @@ class PrepareProvider extends provider_1.Provider {
70
70
  });
71
71
  }
72
72
  getHeadCounter(pkh) {
73
- var _a;
74
73
  return __awaiter(this, void 0, void 0, function* () {
74
+ var _a;
75
75
  return (_a = this.context.readProvider.getCounter(pkh, 'head')) !== null && _a !== void 0 ? _a : '0';
76
76
  });
77
77
  }
@@ -193,8 +193,8 @@ class PrepareProvider extends provider_1.Provider {
193
193
  * @param source string or undefined source pkh
194
194
  * @returns a PreparedOperation object
195
195
  */
196
- activate({ pkh, secret }) {
197
- return __awaiter(this, void 0, void 0, function* () {
196
+ activate(_a) {
197
+ return __awaiter(this, arguments, void 0, function* ({ pkh, secret }) {
198
198
  const op = yield (0, contract_1.createActivationOperation)({
199
199
  pkh,
200
200
  secret,
@@ -222,8 +222,8 @@ class PrepareProvider extends provider_1.Provider {
222
222
  * @param source string or undefined source pkh
223
223
  * @returns a PreparedOperation object
224
224
  */
225
- reveal({ fee, gasLimit, storageLimit }) {
226
- return __awaiter(this, void 0, void 0, function* () {
225
+ reveal(_a) {
226
+ return __awaiter(this, arguments, void 0, function* ({ fee, gasLimit, storageLimit }) {
227
227
  const { pkh, publicKey } = yield this.getKeys();
228
228
  if (!publicKey) {
229
229
  throw new core_1.PublicKeyNotFoundError(pkh);
@@ -260,8 +260,8 @@ class PrepareProvider extends provider_1.Provider {
260
260
  * @returns a PreparedOperation object
261
261
  */
262
262
  originate(_a, source) {
263
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
264
263
  return __awaiter(this, void 0, void 0, function* () {
264
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
265
265
  const { pkh } = yield this.getKeys();
266
266
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
267
267
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -291,8 +291,8 @@ class PrepareProvider extends provider_1.Provider {
291
291
  * @returns a PreparedOperation object
292
292
  */
293
293
  transaction(_a) {
294
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
295
294
  return __awaiter(this, void 0, void 0, function* () {
295
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
296
296
  const { pkh } = yield this.getKeys();
297
297
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
298
298
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -322,8 +322,8 @@ class PrepareProvider extends provider_1.Provider {
322
322
  * @returns a PreparedOperation object
323
323
  */
324
324
  stake(_a) {
325
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
326
325
  return __awaiter(this, void 0, void 0, function* () {
326
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
327
327
  const { pkh } = yield this.getKeys();
328
328
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
329
329
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -358,8 +358,8 @@ class PrepareProvider extends provider_1.Provider {
358
358
  * @returns a PreparedOperation object
359
359
  */
360
360
  unstake(_a) {
361
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
362
361
  return __awaiter(this, void 0, void 0, function* () {
362
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
363
363
  const { pkh } = yield this.getKeys();
364
364
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
365
365
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -392,8 +392,8 @@ class PrepareProvider extends provider_1.Provider {
392
392
  * @returns a PreparedOperation object
393
393
  */
394
394
  finalizeUnstake(_a) {
395
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
396
395
  return __awaiter(this, void 0, void 0, function* () {
396
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
397
397
  const { pkh } = yield this.getKeys();
398
398
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
399
399
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -426,8 +426,8 @@ class PrepareProvider extends provider_1.Provider {
426
426
  * @returns a PreparedOperation object
427
427
  */
428
428
  delegation(_a) {
429
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
430
429
  return __awaiter(this, void 0, void 0, function* () {
430
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
431
431
  const { pkh } = yield this.getKeys();
432
432
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
433
433
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -456,8 +456,8 @@ class PrepareProvider extends provider_1.Provider {
456
456
  * @param source string or undefined source pkh
457
457
  * @returns a PreparedOperation object
458
458
  */
459
- registerDelegate({ fee, storageLimit, gasLimit }, source) {
460
- return __awaiter(this, void 0, void 0, function* () {
459
+ registerDelegate(_a, source_1) {
460
+ return __awaiter(this, arguments, void 0, function* ({ fee, storageLimit, gasLimit }, source) {
461
461
  const { pkh } = yield this.getKeys();
462
462
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
463
463
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -492,8 +492,8 @@ class PrepareProvider extends provider_1.Provider {
492
492
  * @returns a PreparedOperation object
493
493
  */
494
494
  registerGlobalConstant(_a) {
495
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
496
495
  return __awaiter(this, void 0, void 0, function* () {
496
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
497
497
  const { pkh } = yield this.getKeys();
498
498
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
499
499
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -523,8 +523,8 @@ class PrepareProvider extends provider_1.Provider {
523
523
  * @returns a PreparedOperation object
524
524
  */
525
525
  updateConsensusKey(_a, source) {
526
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
527
526
  return __awaiter(this, void 0, void 0, function* () {
527
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
528
528
  const { pkh } = yield this.getKeys();
529
529
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
530
530
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -554,8 +554,8 @@ class PrepareProvider extends provider_1.Provider {
554
554
  * @returns a PreparedOperation object
555
555
  */
556
556
  increasePaidStorage(_a) {
557
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
558
557
  return __awaiter(this, void 0, void 0, function* () {
558
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
559
559
  const { pkh } = yield this.getKeys();
560
560
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
561
561
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -677,8 +677,8 @@ class PrepareProvider extends provider_1.Provider {
677
677
  * @returns a PreparedOperation object
678
678
  */
679
679
  transferTicket(_a) {
680
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
681
680
  return __awaiter(this, void 0, void 0, function* () {
681
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
682
682
  const { pkh } = yield this.getKeys();
683
683
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
684
684
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -708,8 +708,8 @@ class PrepareProvider extends provider_1.Provider {
708
708
  * @returns a PreparedOperation object
709
709
  */
710
710
  smartRollupAddMessages(_a) {
711
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
712
711
  return __awaiter(this, void 0, void 0, function* () {
712
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
713
713
  const { pkh } = yield this.getKeys();
714
714
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
715
715
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -738,8 +738,8 @@ class PrepareProvider extends provider_1.Provider {
738
738
  * @returns a PreparedOperation object
739
739
  */
740
740
  smartRollupOriginate(_a) {
741
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
742
741
  return __awaiter(this, void 0, void 0, function* () {
742
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
743
743
  const { pkh } = yield this.getKeys();
744
744
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
745
745
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -769,8 +769,8 @@ class PrepareProvider extends provider_1.Provider {
769
769
  * @returns a PreparedOperation object
770
770
  */
771
771
  smartRollupExecuteOutboxMessage(_a) {
772
- var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
773
772
  return __awaiter(this, void 0, void 0, function* () {
773
+ var { fee, storageLimit, gasLimit } = _a, rest = __rest(_a, ["fee", "storageLimit", "gasLimit"]);
774
774
  const { pkh } = yield this.getKeys();
775
775
  const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
776
776
  const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
@@ -864,8 +864,8 @@ class PrepareProvider extends provider_1.Provider {
864
864
  * @returns a PreparedOperation object
865
865
  */
866
866
  contractCall(contractMethod) {
867
- var _a, _b, _c;
868
867
  return __awaiter(this, void 0, void 0, function* () {
868
+ var _a, _b, _c;
869
869
  const hash = yield this.getBlockHash();
870
870
  const protocol = yield this.getProtocolHash();
871
871
  const { pkh } = yield this.getKeys();
@@ -36,8 +36,8 @@ class Provider {
36
36
  constructor(context) {
37
37
  this.context = context;
38
38
  }
39
- forge({ opOb: { branch, contents, protocol }, counter }) {
40
- return __awaiter(this, void 0, void 0, function* () {
39
+ forge(_a) {
40
+ return __awaiter(this, arguments, void 0, function* ({ opOb: { branch, contents, protocol }, counter }) {
41
41
  const forgedBytes = yield this.context.forger.forge({ branch, contents });
42
42
  return {
43
43
  opbytes: forgedBytes,
@@ -51,8 +51,8 @@ class Provider {
51
51
  });
52
52
  }
53
53
  estimate(_a, estimator) {
54
- var { fee, gasLimit, storageLimit } = _a, rest = __rest(_a, ["fee", "gasLimit", "storageLimit"]);
55
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ var { fee, gasLimit, storageLimit } = _a, rest = __rest(_a, ["fee", "gasLimit", "storageLimit"]);
56
56
  let calculatedFee = fee;
57
57
  let calculatedGas = gasLimit;
58
58
  let calculatedStorage = storageLimit;