@streamflow/stream 4.0.2 → 4.1.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.
@@ -227,14 +227,15 @@ exports.signAllTransactionWithRecipients = signAllTransactionWithRecipients;
227
227
  * @return {Promise<BatchItemResult>} - Returns settled transaction item
228
228
  */
229
229
  function sendAndConfirmStreamRawTransaction(connection, batchItem) {
230
+ var _a, _b;
230
231
  return __awaiter(this, void 0, void 0, function () {
231
- var rawTx, _a, lastValidBlockHeight, signature, recentBlockhash, confirmationStrategy, completedTxSignature, error_1;
232
- return __generator(this, function (_b) {
233
- switch (_b.label) {
232
+ var rawTx, _c, lastValidBlockHeight, signature, recentBlockhash, confirmationStrategy, completedTxSignature, error_1;
233
+ return __generator(this, function (_d) {
234
+ switch (_d.label) {
234
235
  case 0:
235
- _b.trys.push([0, 2, , 3]);
236
+ _d.trys.push([0, 2, , 3]);
236
237
  rawTx = batchItem.tx.serialize();
237
- _a = batchItem.tx, lastValidBlockHeight = _a.lastValidBlockHeight, signature = _a.signature, recentBlockhash = _a.recentBlockhash;
238
+ _c = batchItem.tx, lastValidBlockHeight = _c.lastValidBlockHeight, signature = _c.signature, recentBlockhash = _c.recentBlockhash;
238
239
  if (!lastValidBlockHeight || !signature || !recentBlockhash)
239
240
  throw { recipient: batchItem.recipient, error: "no recent blockhash" };
240
241
  confirmationStrategy = {
@@ -244,11 +245,14 @@ function sendAndConfirmStreamRawTransaction(connection, batchItem) {
244
245
  };
245
246
  return [4 /*yield*/, (0, web3_js_1.sendAndConfirmRawTransaction)(connection, rawTx, confirmationStrategy)];
246
247
  case 1:
247
- completedTxSignature = _b.sent();
248
+ completedTxSignature = _d.sent();
248
249
  return [2 /*return*/, __assign(__assign({}, batchItem), { signature: completedTxSignature })];
249
250
  case 2:
250
- error_1 = _b.sent();
251
- throw { recipient: batchItem.recipient, error: error_1.toString() };
251
+ error_1 = _d.sent();
252
+ throw {
253
+ recipient: batchItem.recipient,
254
+ error: (_b = (_a = error_1 === null || error_1 === void 0 ? void 0 : error_1.error) !== null && _a !== void 0 ? _a : error_1 === null || error_1 === void 0 ? void 0 : error_1.message) !== null && _b !== void 0 ? _b : error_1.toString(),
255
+ };
252
256
  case 3: return [2 /*return*/];
253
257
  }
254
258
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/stream",
3
- "version": "4.0.2",
3
+ "version": "4.1.0-beta.0",
4
4
  "description": "JavaScript SDK to interact with Streamflow protocol.",
5
5
  "main": "dist/index.js",
6
6
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
@@ -35,6 +35,7 @@
35
35
  "aptos": "1.4.0",
36
36
  "bn.js": "5.2.1",
37
37
  "bs58": "5.0.0",
38
+ "ethers": "5.7.2",
38
39
  "js-sha256": "0.9.0"
39
40
  }
40
41
  }