@taquito/taquito 24.2.0 → 24.3.0-beta.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.
Files changed (129) hide show
  1. package/README.md +1 -1
  2. package/dist/lib/batch/rpc-batch-provider.js +91 -83
  3. package/dist/lib/context.js +22 -26
  4. package/dist/lib/contract/big-map.js +16 -29
  5. package/dist/lib/contract/contract-methods/contract-method-object-param.js +7 -7
  6. package/dist/lib/contract/contract-methods/contract-on-chain-view.js +31 -44
  7. package/dist/lib/contract/contract.js +21 -32
  8. package/dist/lib/contract/errors.js +9 -9
  9. package/dist/lib/contract/prepare.js +36 -45
  10. package/dist/lib/contract/rpc-contract-provider.js +426 -475
  11. package/dist/lib/contract/sapling-state-abstraction.js +3 -14
  12. package/dist/lib/contract/semantic.js +2 -2
  13. package/dist/lib/errors.js +3 -3
  14. package/dist/lib/estimate/errors.js +1 -1
  15. package/dist/lib/estimate/estimate.js +66 -20
  16. package/dist/lib/estimate/rpc-estimate-provider.js +427 -460
  17. package/dist/lib/forger/composite-forger.js +16 -27
  18. package/dist/lib/forger/errors.js +2 -2
  19. package/dist/lib/forger/taquito-local-forger.js +9 -22
  20. package/dist/lib/global-constants/default-global-constants-provider.js +8 -19
  21. package/dist/lib/global-constants/errors.js +2 -2
  22. package/dist/lib/global-constants/noop-global-constants-provider.js +2 -13
  23. package/dist/lib/import-key.js +23 -34
  24. package/dist/lib/injector/rpc-injector.js +13 -24
  25. package/dist/lib/operations/ballot-operation.js +2 -3
  26. package/dist/lib/operations/delegate-operation.js +5 -8
  27. package/dist/lib/operations/drain-delegate-operation.js +1 -1
  28. package/dist/lib/operations/errors.js +9 -6
  29. package/dist/lib/operations/increase-paid-storage-operation.js +4 -7
  30. package/dist/lib/operations/operations.js +100 -30
  31. package/dist/lib/operations/origination-operation.js +16 -27
  32. package/dist/lib/operations/proposals-operation.js +2 -3
  33. package/dist/lib/operations/register-global-constant-operation.js +4 -7
  34. package/dist/lib/operations/reveal-operation.js +1 -1
  35. package/dist/lib/operations/smart-rollup-add-messages-operation.js +4 -7
  36. package/dist/lib/operations/smart-rollup-execute-outbox-message-operation.js +4 -7
  37. package/dist/lib/operations/smart-rollup-originate-operation.js +4 -7
  38. package/dist/lib/operations/transaction-operation.js +2 -2
  39. package/dist/lib/operations/transfer-ticket-operation.js +4 -6
  40. package/dist/lib/operations/types.js +17 -19
  41. package/dist/lib/operations/update-companion-key-operation.js +4 -7
  42. package/dist/lib/operations/update-consensus-key-operation.js +4 -7
  43. package/dist/lib/packer/michel-codec-packer.js +3 -14
  44. package/dist/lib/packer/rpc-packer.js +2 -13
  45. package/dist/lib/parser/michel-codec-parser.js +82 -107
  46. package/dist/lib/parser/noop-parser.js +2 -13
  47. package/dist/lib/prepare/prepare-provider.js +780 -744
  48. package/dist/lib/provider.js +322 -128
  49. package/dist/lib/read-provider/rpc-read-adapter.js +76 -121
  50. package/dist/lib/signer/errors.js +1 -1
  51. package/dist/lib/signer/noop.js +9 -26
  52. package/dist/lib/subscribe/errors.js +2 -2
  53. package/dist/lib/subscribe/polling-subcribe-provider.js +35 -38
  54. package/dist/lib/taquito.js +33 -33
  55. package/dist/lib/tz/rpc-tz-provider.js +27 -44
  56. package/dist/lib/version.js +2 -2
  57. package/dist/lib/wallet/batch-operation.js +32 -45
  58. package/dist/lib/wallet/delegation-operation.js +25 -40
  59. package/dist/lib/wallet/errors.js +15 -3
  60. package/dist/lib/wallet/increase-paid-storage-operation.js +25 -40
  61. package/dist/lib/wallet/legacy.js +28 -63
  62. package/dist/lib/wallet/operation-factory.js +27 -56
  63. package/dist/lib/wallet/operation.js +123 -59
  64. package/dist/lib/wallet/origination-operation.js +34 -46
  65. package/dist/lib/wallet/register-global-constant-operation.js +26 -43
  66. package/dist/lib/wallet/transaction-operation.js +21 -36
  67. package/dist/lib/wallet/transfer-ticket-operation.js +21 -36
  68. package/dist/lib/wallet/wallet.js +187 -184
  69. package/dist/taquito.es6.js +3424 -3197
  70. package/dist/taquito.es6.js.map +1 -1
  71. package/dist/taquito.min.js +1 -1
  72. package/dist/taquito.umd.js +7930 -7701
  73. package/dist/taquito.umd.js.map +1 -1
  74. package/dist/types/batch/rpc-batch-provider.d.ts +18 -18
  75. package/dist/types/context.d.ts +4 -4
  76. package/dist/types/contract/big-map.d.ts +3 -3
  77. package/dist/types/contract/contract-methods/contract-method-interface.d.ts +4 -4
  78. package/dist/types/contract/contract-methods/contract-method-object-param.d.ts +6 -6
  79. package/dist/types/contract/contract-methods/contract-on-chain-view.d.ts +3 -3
  80. package/dist/types/contract/contract.d.ts +6 -6
  81. package/dist/types/contract/errors.d.ts +11 -11
  82. package/dist/types/contract/interface.d.ts +42 -42
  83. package/dist/types/contract/rpc-contract-provider.d.ts +44 -43
  84. package/dist/types/contract/sapling-state-abstraction.d.ts +1 -1
  85. package/dist/types/contract/semantic.d.ts +2 -2
  86. package/dist/types/errors.d.ts +5 -5
  87. package/dist/types/estimate/errors.d.ts +1 -1
  88. package/dist/types/estimate/estimate-provider-interface.d.ts +81 -84
  89. package/dist/types/estimate/estimate.d.ts +28 -11
  90. package/dist/types/estimate/rpc-estimate-provider.d.ts +34 -30
  91. package/dist/types/forger/errors.d.ts +2 -2
  92. package/dist/types/global-constants/default-global-constants-provider.d.ts +2 -2
  93. package/dist/types/global-constants/errors.d.ts +2 -2
  94. package/dist/types/global-constants/interface-global-constants-provider.d.ts +1 -1
  95. package/dist/types/import-key.d.ts +2 -2
  96. package/dist/types/operations/ballot-operation.d.ts +1 -1
  97. package/dist/types/operations/delegate-operation.d.ts +2 -2
  98. package/dist/types/operations/drain-delegate-operation.d.ts +1 -1
  99. package/dist/types/operations/errors.d.ts +5 -5
  100. package/dist/types/operations/failing-noop-operation.d.ts +1 -1
  101. package/dist/types/operations/increase-paid-storage-operation.d.ts +1 -1
  102. package/dist/types/operations/operations.d.ts +2 -2
  103. package/dist/types/operations/origination-operation.d.ts +5 -5
  104. package/dist/types/operations/proposals-operation.d.ts +1 -1
  105. package/dist/types/operations/register-global-constant-operation.d.ts +2 -2
  106. package/dist/types/operations/reveal-operation.d.ts +1 -1
  107. package/dist/types/operations/smart-rollup-add-messages-operation.d.ts +1 -1
  108. package/dist/types/operations/smart-rollup-execute-outbox-message-operation.d.ts +1 -1
  109. package/dist/types/operations/smart-rollup-originate-operation.d.ts +1 -1
  110. package/dist/types/operations/transaction-operation.d.ts +2 -2
  111. package/dist/types/operations/transfer-ticket-operation.d.ts +2 -2
  112. package/dist/types/operations/types.d.ts +387 -25
  113. package/dist/types/operations/update-companion-key-operation.d.ts +1 -1
  114. package/dist/types/operations/update-consensus-key-operation.d.ts +1 -1
  115. package/dist/types/prepare/interface.d.ts +32 -33
  116. package/dist/types/prepare/prepare-provider.d.ts +34 -60
  117. package/dist/types/provider.d.ts +7 -1
  118. package/dist/types/read-provider/interface.d.ts +21 -21
  119. package/dist/types/read-provider/rpc-read-adapter.d.ts +22 -22
  120. package/dist/types/signer/errors.d.ts +1 -1
  121. package/dist/types/signer/noop.d.ts +1 -1
  122. package/dist/types/subscribe/errors.d.ts +2 -2
  123. package/dist/types/taquito.d.ts +33 -33
  124. package/dist/types/wallet/errors.d.ts +10 -2
  125. package/dist/types/wallet/interface.d.ts +13 -13
  126. package/dist/types/wallet/operation.d.ts +4 -3
  127. package/dist/types/wallet/wallet.d.ts +36 -35
  128. package/package.json +27 -15
  129. package/LICENSE +0 -202
@@ -75,7 +75,7 @@ __exportStar(require("./prepare"), exports);
75
75
  var import_key_1 = require("./import-key");
76
76
  Object.defineProperty(exports, "importKey", { enumerable: true, get: function () { return import_key_1.importKey; } });
77
77
  /**
78
- * @description Facade class that surfaces all of the libraries capability and allow it's configuration
78
+ * Facade class that surfaces all of the libraries capability and allow it's configuration
79
79
  *
80
80
  * @param _rpc The RPC server to use
81
81
  */
@@ -95,7 +95,7 @@ class TezosToolkit {
95
95
  this.setProvider({ rpc: this._rpcClient });
96
96
  }
97
97
  /**
98
- * @description Sets configuration on the Tezos Taquito instance. Allows user to choose which signer, rpc client, rpc url, forger and so forth
98
+ * Sets configuration on the Tezos Taquito instance. Allows user to choose which signer, rpc client, rpc url, forger and so forth
99
99
  *
100
100
  * @param options rpc url or rpcClient to use to interact with the Tezos network
101
101
  *
@@ -120,9 +120,9 @@ class TezosToolkit {
120
120
  }
121
121
  }
122
122
  /**
123
- * @description Sets signer provider on the Tezos Taquito instance.
123
+ * Sets signer provider on the Tezos Taquito instance.
124
124
  *
125
- * @param options signer to use to interact with the Tezos network
125
+ * @param signer signer to use to interact with the Tezos network
126
126
  *
127
127
  * @example Tezos.setSignerProvider(new InMemorySigner.fromSecretKey('edsk...'))
128
128
  *
@@ -138,9 +138,9 @@ class TezosToolkit {
138
138
  }
139
139
  }
140
140
  /**
141
- * @description Sets rpc provider on the Tezos Taquito instance
141
+ * Sets rpc provider on the Tezos Taquito instance
142
142
  *
143
- * @param options rpc url or rpcClient to use to interact with the Tezos network
143
+ * @param rpc rpc url or rpcClient to use to interact with the Tezos network
144
144
  *
145
145
  * @example Tezos.setRpcProvider('https://mainnet.tezos.ecadinfra.com/')
146
146
  *
@@ -159,10 +159,10 @@ class TezosToolkit {
159
159
  this._context.rpc = this._rpcClient;
160
160
  }
161
161
  /**
162
- * @description Sets forger provider on the Tezos Taquito instance
162
+ * Sets forger provider on the Tezos Taquito instance
163
163
  * The `LocalForger` from `@taquito/local-forging` is set by default.
164
164
  *
165
- * @param options forger to use to interact with the Tezos network
165
+ * @param forger forger to use to interact with the Tezos network
166
166
  *
167
167
  * @example Tezos.setForgerProvider(this.getFactory(RpcForger)())
168
168
  *
@@ -179,9 +179,9 @@ class TezosToolkit {
179
179
  }
180
180
  }
181
181
  /**
182
- * @description Sets stream provider on the Tezos Taquito instance
182
+ * Sets stream provider on the Tezos Taquito instance
183
183
  *
184
- * @param options stream to use to interact with the Tezos network
184
+ * @param stream stream to use to interact with the Tezos network
185
185
  *
186
186
  * @example Tezos.setStreamProvider(...)
187
187
  *
@@ -203,9 +203,9 @@ class TezosToolkit {
203
203
  }
204
204
  }
205
205
  /**
206
- * @description Sets wallet provider on the Tezos Taquito instance
206
+ * Sets wallet provider on the Tezos Taquito instance
207
207
  *
208
- * @param options wallet to use to interact with the Tezos network
208
+ * @param wallet wallet to use to interact with the Tezos network
209
209
  *
210
210
  * @example Tezos.setWalletProvider(...)
211
211
  *
@@ -222,9 +222,9 @@ class TezosToolkit {
222
222
  }
223
223
  }
224
224
  /**
225
- * @description Sets Packer provider on the Tezos Taquito instance
225
+ * Sets Packer provider on the Tezos Taquito instance
226
226
  *
227
- * @param options packer to use to interact with the Tezos network
227
+ * @param packer packer to use to interact with the Tezos network
228
228
  *
229
229
  * @example Tezos.setPackerProvider(new MichelCodecPacker())
230
230
  *
@@ -241,9 +241,9 @@ class TezosToolkit {
241
241
  }
242
242
  }
243
243
  /**
244
- * @description Sets global constants provider on the Tezos Taquito instance
244
+ * Sets global constants provider on the Tezos Taquito instance
245
245
  *
246
- * @param options globalConstantsProvider to use to interact with the Tezos network
246
+ * @param globalConstantsProvider globalConstantsProvider to use to interact with the Tezos network
247
247
  *
248
248
  * @example
249
249
  * ```
@@ -268,10 +268,10 @@ class TezosToolkit {
268
268
  }
269
269
  }
270
270
  /**
271
- * @description Sets read provider on the Tezos Taquito instance
271
+ * Sets read provider on the Tezos Taquito instance
272
272
  * By default reads are done from the RPC usign the RpcReadAdapter class, this can be overridden to read from an indexer that implements the TzReadProvider interface
273
273
  *
274
- * @param options TzReadProvider to use to interact with the Tezos network
274
+ * @param readProvider TzReadProvider to use to interact with the Tezos network
275
275
  *
276
276
  */
277
277
  setReadProvider(readProvider) {
@@ -280,9 +280,9 @@ class TezosToolkit {
280
280
  this._context.readProvider = readP;
281
281
  }
282
282
  /**
283
- * @description Sets parser provider on the Tezos Taquito instance
283
+ * Sets parser provider on the Tezos Taquito instance
284
284
  *
285
- * @param options parserProvider to use to interact with the Tezos network
285
+ * @param parserProvider parserProvider to use to interact with the Tezos network
286
286
  *
287
287
  */
288
288
  setParserProvider(parserProvider) {
@@ -297,9 +297,9 @@ class TezosToolkit {
297
297
  }
298
298
  }
299
299
  /**
300
- * @description Sets injector provider on the Tezos Taquito instance
300
+ * Sets injector provider on the Tezos Taquito instance
301
301
  *
302
- * @param options Injector to use to interact with the Tezos network by default RpcInjector
302
+ * @param injectorProvider Injector to use to interact with the Tezos network by default RpcInjector
303
303
  *
304
304
  */
305
305
  setInjectorProvider(injectorProvider) {
@@ -314,26 +314,26 @@ class TezosToolkit {
314
314
  }
315
315
  }
316
316
  /**
317
- * @description Sets the strategy used for field numbering in Token execute/encode/decode to convert Michelson values to/from javascript objects
317
+ * Sets the strategy used for field numbering in Token execute/encode/decode to convert Michelson values to/from javascript objects
318
318
  * @param strategy a value of type FieldNumberingStrategy that controls how field numbers are calculated
319
319
  */
320
320
  setFieldNumberingStrategy(strategy) {
321
321
  michelson_encoder_1.Token.fieldNumberingStrategy = strategy;
322
322
  }
323
323
  /**
324
- * @description Provide access to tezos account management
324
+ * Provide access to tezos account management
325
325
  */
326
326
  get tz() {
327
327
  return this._context.tz;
328
328
  }
329
329
  /**
330
- * @description Provide access to smart contract utilities
330
+ * Provide access to smart contract utilities
331
331
  */
332
332
  get contract() {
333
333
  return this._context.contract;
334
334
  }
335
335
  /**
336
- * @description Provide access to tezos operation preparation utilities
336
+ * Provide access to tezos operation preparation utilities
337
337
  */
338
338
  get prepare() {
339
339
  return this._context.prepare;
@@ -345,37 +345,37 @@ class TezosToolkit {
345
345
  return this._context.operationFactory;
346
346
  }
347
347
  /**
348
- * @description Provide access to operation estimation utilities
348
+ * Provide access to operation estimation utilities
349
349
  */
350
350
  get estimate() {
351
351
  return this._context.estimate;
352
352
  }
353
353
  /**
354
- * @description Provide access to streaming utilities backed by an streamer implementation
354
+ * Provide access to streaming utilities backed by an streamer implementation
355
355
  */
356
356
  get stream() {
357
357
  return this._context.stream;
358
358
  }
359
359
  /**
360
- * @description Provide access to the currently used rpc client
360
+ * Provide access to the currently used rpc client
361
361
  */
362
362
  get rpc() {
363
363
  return this._context.rpc;
364
364
  }
365
365
  /**
366
- * @description Provide access to the currently used signer
366
+ * Provide access to the currently used signer
367
367
  */
368
368
  get signer() {
369
369
  return this._context.signer;
370
370
  }
371
371
  /**
372
- * @description Provide access to the currently used globalConstantsProvider
372
+ * Provide access to the currently used globalConstantsProvider
373
373
  */
374
374
  get globalConstants() {
375
375
  return this._context.globalConstantsProvider;
376
376
  }
377
377
  /**
378
- * @description Allow to add a module to the TezosToolkit instance. This method adds the appropriate Providers(s) required by the module to the internal context.
378
+ * Allow to add a module to the TezosToolkit instance. This method adds the appropriate Providers(s) required by the module to the internal context.
379
379
  *
380
380
  * @param module extension to add to the TezosToolkit instance
381
381
  *
@@ -395,7 +395,7 @@ class TezosToolkit {
395
395
  };
396
396
  }
397
397
  /**
398
- * @description Gets an object containing the version of Taquito library and git sha of the commit this library is compiled from
398
+ * Gets an object containing the version of Taquito library and git sha of the commit this library is compiled from
399
399
  */
400
400
  getVersionInfo() {
401
401
  return version_1.VERSION;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.RpcTzProvider = void 0;
13
4
  const operations_1 = require("../operations/operations");
@@ -20,44 +11,36 @@ class RpcTzProvider extends provider_1.Provider {
20
11
  super(context);
21
12
  this.prepare = new prepare_1.PrepareProvider(this.context);
22
13
  }
23
- getBalance(address) {
24
- return __awaiter(this, void 0, void 0, function* () {
25
- const addressValidation = (0, utils_1.validateAddress)(address);
26
- if (addressValidation !== utils_1.ValidationResult.VALID) {
27
- throw new core_1.InvalidAddressError(address, addressValidation);
28
- }
29
- return this.context.readProvider.getBalance(address, 'head');
30
- });
14
+ async getBalance(address) {
15
+ const addressValidation = (0, utils_1.validateAddress)(address);
16
+ if (addressValidation !== utils_1.ValidationResult.VALID) {
17
+ throw new core_1.InvalidAddressError(address, addressValidation);
18
+ }
19
+ return this.context.readProvider.getBalance(address, 'head');
31
20
  }
32
- getSpendable(address) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- const addressValidation = (0, utils_1.validateAddress)(address);
35
- if (addressValidation !== utils_1.ValidationResult.VALID) {
36
- throw new core_1.InvalidAddressError(address, addressValidation);
37
- }
38
- return this.context.readProvider.getSpendable(address, 'head');
39
- });
21
+ async getSpendable(address) {
22
+ const addressValidation = (0, utils_1.validateAddress)(address);
23
+ if (addressValidation !== utils_1.ValidationResult.VALID) {
24
+ throw new core_1.InvalidAddressError(address, addressValidation);
25
+ }
26
+ return this.context.readProvider.getSpendable(address, 'head');
40
27
  }
41
- getDelegate(address) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- const addressValidation = (0, utils_1.validateAddress)(address);
44
- if (addressValidation !== utils_1.ValidationResult.VALID) {
45
- throw new core_1.InvalidAddressError(address, addressValidation);
46
- }
47
- return this.context.readProvider.getDelegate(address, 'head');
48
- });
28
+ async getDelegate(address) {
29
+ const addressValidation = (0, utils_1.validateAddress)(address);
30
+ if (addressValidation !== utils_1.ValidationResult.VALID) {
31
+ throw new core_1.InvalidAddressError(address, addressValidation);
32
+ }
33
+ return this.context.readProvider.getDelegate(address, 'head');
49
34
  }
50
- activate(pkh, secret) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- const pkhValidation = (0, utils_1.validateKeyHash)(pkh);
53
- if (pkhValidation !== utils_1.ValidationResult.VALID) {
54
- throw new utils_1.InvalidKeyHashError(pkh, pkhValidation);
55
- }
56
- const prepared = yield this.prepare.activate({ pkh, secret });
57
- const forgedBytes = yield this.forge(prepared);
58
- const bytes = `${forgedBytes.opbytes}00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`;
59
- return new operations_1.Operation(yield this.rpc.injectOperation(bytes), Object.assign(Object.assign({}, forgedBytes), { opbytes: bytes }), [], this.context.clone());
60
- });
35
+ async activate(pkh, secret) {
36
+ const pkhValidation = (0, utils_1.validateKeyHash)(pkh);
37
+ if (pkhValidation !== utils_1.ValidationResult.VALID) {
38
+ throw new utils_1.InvalidKeyHashError(pkh, pkhValidation);
39
+ }
40
+ const prepared = await this.prepare.activate({ pkh, secret });
41
+ const forgedBytes = await this.forge(prepared);
42
+ const bytes = `${forgedBytes.opbytes}00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`;
43
+ return new operations_1.Operation(await this.rpc.injectOperation(bytes), { ...forgedBytes, opbytes: bytes }, [], this.context.clone());
61
44
  }
62
45
  }
63
46
  exports.RpcTzProvider = RpcTzProvider;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
5
5
  exports.VERSION = {
6
- "commitHash": "105a7b15cfb862a0732c204e0e9741098d697775",
7
- "version": "24.2.0"
6
+ "commitHash": "27675679db6515e8b092195ef5c58c2c0ea5f5c8",
7
+ "version": "24.3.0-beta.0"
8
8
  };
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.BatchWalletOperation = exports.WALLET_BATCH_KINDS = void 0;
13
4
  const rpc_1 = require("@taquito/rpc");
@@ -28,8 +19,8 @@ class BatchWalletOperation extends operation_1.WalletOperation {
28
19
  super(opHash, context, newHead$);
29
20
  this.opHash = opHash;
30
21
  this.context = context;
31
- this.getOriginatedContractAddresses = () => __awaiter(this, void 0, void 0, function* () {
32
- const opResult = yield this.operationResults();
22
+ this.getOriginatedContractAddresses = async () => {
23
+ const opResult = await this.operationResults();
33
24
  if (!opResult) {
34
25
  throw new errors_1.ObservableError('Unable to fetch operation results');
35
26
  }
@@ -43,42 +34,38 @@ class BatchWalletOperation extends operation_1.WalletOperation {
43
34
  }
44
35
  return addresses;
45
36
  }
46
- });
37
+ };
47
38
  }
48
- revealOperation() {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- const operationResult = yield this.operationResults();
51
- if (!operationResult) {
52
- throw new errors_1.ObservableError('Unable to fetch operation results');
53
- }
54
- else {
55
- return operationResult.find((x) => x.kind === rpc_1.OpKind.REVEAL);
56
- }
57
- });
39
+ async revealOperation() {
40
+ const operationResult = await this.operationResults();
41
+ if (!operationResult) {
42
+ throw new errors_1.ObservableError('Unable to fetch operation results');
43
+ }
44
+ else {
45
+ return operationResult.find((x) => x.kind === rpc_1.OpKind.REVEAL);
46
+ }
58
47
  }
59
- status() {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- if (!this._included) {
62
- return 'pending';
63
- }
64
- const op = yield this.operationResults();
65
- if (op) {
66
- return (op
67
- .filter((result) => exports.WALLET_BATCH_KINDS.indexOf(result.kind) !== -1)
68
- .map((result) => {
69
- if ((0, types_1.hasMetadataWithResult)(result)) {
70
- const opResult = result.metadata.operation_result;
71
- return opResult.status;
72
- }
73
- else {
74
- return 'unknown';
75
- }
76
- })[0] || 'unknown');
77
- }
78
- else {
79
- throw new errors_1.ObservableError('Unable to fetch operation results');
80
- }
81
- });
48
+ async status() {
49
+ if (!this._included) {
50
+ return 'pending';
51
+ }
52
+ const op = await this.operationResults();
53
+ if (op) {
54
+ return (op
55
+ .filter((result) => exports.WALLET_BATCH_KINDS.indexOf(result.kind) !== -1)
56
+ .map((result) => {
57
+ if ((0, types_1.hasMetadataWithResult)(result)) {
58
+ const opResult = result.metadata.operation_result;
59
+ return opResult.status;
60
+ }
61
+ else {
62
+ return 'unknown';
63
+ }
64
+ })[0] || 'unknown');
65
+ }
66
+ else {
67
+ throw new errors_1.ObservableError('Unable to fetch operation results');
68
+ }
82
69
  }
83
70
  }
84
71
  exports.BatchWalletOperation = BatchWalletOperation;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.DelegationWalletOperation = void 0;
13
4
  const rpc_1 = require("@taquito/rpc");
@@ -19,39 +10,33 @@ class DelegationWalletOperation extends operation_1.WalletOperation {
19
10
  this.opHash = opHash;
20
11
  this.context = context;
21
12
  }
22
- revealOperation() {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const operationResult = yield this.operationResults();
25
- if (operationResult) {
26
- return operationResult.find((x) => x.kind === rpc_1.OpKind.REVEAL);
27
- }
28
- else {
29
- throw new errors_1.ObservableError('Unable to fetch operation result');
30
- }
31
- });
13
+ async revealOperation() {
14
+ const operationResult = await this.operationResults();
15
+ if (operationResult) {
16
+ return operationResult.find((x) => x.kind === rpc_1.OpKind.REVEAL);
17
+ }
18
+ else {
19
+ throw new errors_1.ObservableError('Unable to fetch operation result');
20
+ }
32
21
  }
33
- delegationOperation() {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const operationResult = yield this.operationResults();
36
- if (operationResult) {
37
- return operationResult.find((x) => x.kind === rpc_1.OpKind.DELEGATION);
38
- }
39
- else {
40
- throw new errors_1.ObservableError('Unable to fetch operation result');
41
- }
42
- });
22
+ async delegationOperation() {
23
+ const operationResult = await this.operationResults();
24
+ if (operationResult) {
25
+ return operationResult.find((x) => x.kind === rpc_1.OpKind.DELEGATION);
26
+ }
27
+ else {
28
+ throw new errors_1.ObservableError('Unable to fetch operation result');
29
+ }
43
30
  }
44
- status() {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- if (!this._included) {
47
- return 'pending';
48
- }
49
- const op = yield this.delegationOperation();
50
- if (!op) {
51
- return 'unknown';
52
- }
53
- return op.metadata.operation_result.status;
54
- });
31
+ async status() {
32
+ if (!this._included) {
33
+ return 'pending';
34
+ }
35
+ const op = await this.delegationOperation();
36
+ if (!op) {
37
+ return 'unknown';
38
+ }
39
+ return op.metadata.operation_result.status;
55
40
  }
56
41
  }
57
42
  exports.DelegationWalletOperation = DelegationWalletOperation;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObservableError = exports.ConfirmationUndefinedError = void 0;
3
+ exports.OriginationWalletOperationError = exports.ObservableError = exports.ConfirmationUndefinedError = void 0;
4
4
  const core_1 = require("@taquito/core");
5
5
  /**
6
6
  * @category Error
7
- * @description Error that indicates undefined confirmation has not been specified or configured
7
+ * Error that indicates undefined confirmation has not been specified or configured
8
8
  */
9
9
  class ConfirmationUndefinedError extends core_1.TezosToolkitConfigError {
10
10
  constructor() {
@@ -16,7 +16,7 @@ class ConfirmationUndefinedError extends core_1.TezosToolkitConfigError {
16
16
  exports.ConfirmationUndefinedError = ConfirmationUndefinedError;
17
17
  /**
18
18
  * @category Error
19
- * @description Error that indicates a generic failure when trying to fetch an observable
19
+ * Error that indicates a generic failure when trying to fetch an observable
20
20
  */
21
21
  class ObservableError extends core_1.NetworkError {
22
22
  constructor(message) {
@@ -26,3 +26,15 @@ class ObservableError extends core_1.NetworkError {
26
26
  }
27
27
  }
28
28
  exports.ObservableError = ObservableError;
29
+ /**
30
+ * @category Error
31
+ * Error that indicates a newly originated wallet contract could not be resolved
32
+ */
33
+ class OriginationWalletOperationError extends ObservableError {
34
+ constructor(message) {
35
+ super(message);
36
+ this.message = message;
37
+ this.name = 'OriginationWalletOperationError';
38
+ }
39
+ }
40
+ exports.OriginationWalletOperationError = OriginationWalletOperationError;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.IncreasePaidStorageWalletOperation = void 0;
13
4
  const operation_1 = require("./operation");
@@ -19,39 +10,33 @@ class IncreasePaidStorageWalletOperation extends operation_1.WalletOperation {
19
10
  this.opHash = opHash;
20
11
  this.context = context;
21
12
  }
22
- revealOperation() {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const operationResult = yield this.operationResults();
25
- if (!operationResult) {
26
- throw new errors_1.ObservableError('Unable to fetch operation result');
27
- }
28
- else {
29
- return operationResult.find((x) => x.kind === rpc_1.OpKind.REVEAL);
30
- }
31
- });
13
+ async revealOperation() {
14
+ const operationResult = await this.operationResults();
15
+ if (!operationResult) {
16
+ throw new errors_1.ObservableError('Unable to fetch operation result');
17
+ }
18
+ else {
19
+ return operationResult.find((x) => x.kind === rpc_1.OpKind.REVEAL);
20
+ }
32
21
  }
33
- increasePaidStorageOperation() {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const operationResult = yield this.operationResults();
36
- if (!operationResult) {
37
- throw new errors_1.ObservableError('Unable to fetch operation result');
38
- }
39
- else {
40
- return operationResult.find((x) => x.kind === rpc_1.OpKind.INCREASE_PAID_STORAGE);
41
- }
42
- });
22
+ async increasePaidStorageOperation() {
23
+ const operationResult = await this.operationResults();
24
+ if (!operationResult) {
25
+ throw new errors_1.ObservableError('Unable to fetch operation result');
26
+ }
27
+ else {
28
+ return operationResult.find((x) => x.kind === rpc_1.OpKind.INCREASE_PAID_STORAGE);
29
+ }
43
30
  }
44
- status() {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- if (!this._included) {
47
- return 'pending';
48
- }
49
- const op = yield this.increasePaidStorageOperation();
50
- if (!op) {
51
- return 'unknown';
52
- }
53
- return op.metadata.operation_result.status;
54
- });
31
+ async status() {
32
+ if (!this._included) {
33
+ return 'pending';
34
+ }
35
+ const op = await this.increasePaidStorageOperation();
36
+ if (!op) {
37
+ return 'unknown';
38
+ }
39
+ return op.metadata.operation_result.status;
55
40
  }
56
41
  }
57
42
  exports.IncreasePaidStorageWalletOperation = IncreasePaidStorageWalletOperation;