@audius/sdk 3.0.8-beta.7 → 3.0.8-beta.8
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/dist/core.js +62 -37
- package/dist/core.js.map +1 -1
- package/dist/index.cjs.js +64 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +64 -39
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +64 -39
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +64 -39
- package/dist/native-libs.js.map +1 -1
- package/dist/web-libs.js +64 -39
- package/dist/web-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/services/solana/transactionHandler.ts +17 -1
package/dist/index.esm.js
CHANGED
|
@@ -35937,9 +35937,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
|
|
|
35937
35937
|
}();
|
|
35938
35938
|
|
|
35939
35939
|
var name = "@audius/sdk";
|
|
35940
|
-
var version = "3.0.8-beta.
|
|
35940
|
+
var version = "3.0.8-beta.8";
|
|
35941
35941
|
var audius = {
|
|
35942
|
-
releaseSHA: "
|
|
35942
|
+
releaseSHA: "a4c4a74b40fe6089348aed0d7ccf545de988e506"
|
|
35943
35943
|
};
|
|
35944
35944
|
var description = "Audius SDK";
|
|
35945
35945
|
var keywords = [
|
|
@@ -53288,15 +53288,17 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53288
53288
|
feePayerAccount,
|
|
53289
53289
|
tx,
|
|
53290
53290
|
rawTransaction,
|
|
53291
|
-
sendRawTransaction,
|
|
53292
|
-
txid,
|
|
53293
53291
|
errorCode,
|
|
53294
53292
|
error,
|
|
53293
|
+
sendRawTransaction,
|
|
53294
|
+
txid,
|
|
53295
|
+
_errorCode,
|
|
53296
|
+
_error,
|
|
53295
53297
|
done,
|
|
53296
53298
|
sendCount,
|
|
53297
53299
|
startTime,
|
|
53298
|
-
|
|
53299
|
-
|
|
53300
|
+
_errorCode2,
|
|
53301
|
+
_error2,
|
|
53300
53302
|
_args5 = arguments;
|
|
53301
53303
|
|
|
53302
53304
|
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -53369,8 +53371,31 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53369
53371
|
});
|
|
53370
53372
|
}
|
|
53371
53373
|
|
|
53372
|
-
|
|
53374
|
+
_context5.prev = 21;
|
|
53375
|
+
rawTransaction = tx.serialize();
|
|
53376
|
+
_context5.next = 32;
|
|
53377
|
+
break;
|
|
53378
|
+
|
|
53379
|
+
case 25:
|
|
53380
|
+
_context5.prev = 25;
|
|
53381
|
+
_context5.t1 = _context5["catch"](21);
|
|
53382
|
+
logger.warn("transactionHandler: transaction serialization failed: ".concat(_context5.t1));
|
|
53383
|
+
errorCode = null;
|
|
53384
|
+
error = null;
|
|
53373
53385
|
|
|
53386
|
+
if (_context5.t1 instanceof Error) {
|
|
53387
|
+
error = _context5.t1.message;
|
|
53388
|
+
errorCode = this._parseSolanaErrorCode(error);
|
|
53389
|
+
}
|
|
53390
|
+
|
|
53391
|
+
return _context5.abrupt("return", {
|
|
53392
|
+
res: null,
|
|
53393
|
+
error: error,
|
|
53394
|
+
errorCode: errorCode
|
|
53395
|
+
});
|
|
53396
|
+
|
|
53397
|
+
case 32:
|
|
53398
|
+
// Send the txn
|
|
53374
53399
|
sendRawTransaction = /*#__PURE__*/function () {
|
|
53375
53400
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
53376
53401
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -53400,35 +53425,35 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53400
53425
|
};
|
|
53401
53426
|
}();
|
|
53402
53427
|
|
|
53403
|
-
_context5.prev =
|
|
53404
|
-
_context5.next =
|
|
53428
|
+
_context5.prev = 33;
|
|
53429
|
+
_context5.next = 36;
|
|
53405
53430
|
return sendRawTransaction();
|
|
53406
53431
|
|
|
53407
|
-
case
|
|
53432
|
+
case 36:
|
|
53408
53433
|
txid = _context5.sent;
|
|
53409
|
-
_context5.next =
|
|
53434
|
+
_context5.next = 46;
|
|
53410
53435
|
break;
|
|
53411
53436
|
|
|
53412
|
-
case
|
|
53413
|
-
_context5.prev =
|
|
53414
|
-
_context5.
|
|
53437
|
+
case 39:
|
|
53438
|
+
_context5.prev = 39;
|
|
53439
|
+
_context5.t2 = _context5["catch"](33);
|
|
53415
53440
|
// Rarely, this intiial send will fail
|
|
53416
|
-
logger.warn("transactionHandler: Initial send failed: ".concat(_context5.
|
|
53417
|
-
|
|
53418
|
-
|
|
53441
|
+
logger.warn("transactionHandler: Initial send failed: ".concat(_context5.t2));
|
|
53442
|
+
_errorCode = null;
|
|
53443
|
+
_error = null;
|
|
53419
53444
|
|
|
53420
|
-
if (_context5.
|
|
53421
|
-
|
|
53422
|
-
|
|
53445
|
+
if (_context5.t2 instanceof Error) {
|
|
53446
|
+
_error = _context5.t2.message;
|
|
53447
|
+
_errorCode = this._parseSolanaErrorCode(_error);
|
|
53423
53448
|
}
|
|
53424
53449
|
|
|
53425
53450
|
return _context5.abrupt("return", {
|
|
53426
53451
|
res: null,
|
|
53427
|
-
error:
|
|
53428
|
-
errorCode:
|
|
53452
|
+
error: _error,
|
|
53453
|
+
errorCode: _errorCode
|
|
53429
53454
|
});
|
|
53430
53455
|
|
|
53431
|
-
case
|
|
53456
|
+
case 46:
|
|
53432
53457
|
done = false; // Start up resubmission loop
|
|
53433
53458
|
|
|
53434
53459
|
sendCount = 0;
|
|
@@ -53475,11 +53500,11 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53475
53500
|
} // Await for tx confirmation
|
|
53476
53501
|
|
|
53477
53502
|
|
|
53478
|
-
_context5.prev =
|
|
53479
|
-
_context5.next =
|
|
53503
|
+
_context5.prev = 50;
|
|
53504
|
+
_context5.next = 53;
|
|
53480
53505
|
return this._awaitTransactionSignatureConfirmation(txid, logger);
|
|
53481
53506
|
|
|
53482
|
-
case
|
|
53507
|
+
case 53:
|
|
53483
53508
|
done = true;
|
|
53484
53509
|
logger.info("transactionHandler: finished for txid ".concat(txid, " with ").concat(sendCount, " retries"));
|
|
53485
53510
|
return _context5.abrupt("return", {
|
|
@@ -53488,31 +53513,31 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53488
53513
|
errorCode: null
|
|
53489
53514
|
});
|
|
53490
53515
|
|
|
53491
|
-
case
|
|
53492
|
-
_context5.prev =
|
|
53493
|
-
_context5.
|
|
53494
|
-
logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.
|
|
53516
|
+
case 58:
|
|
53517
|
+
_context5.prev = 58;
|
|
53518
|
+
_context5.t3 = _context5["catch"](50);
|
|
53519
|
+
logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.t3), ", ").concat(txid));
|
|
53495
53520
|
done = true;
|
|
53496
|
-
|
|
53497
|
-
|
|
53521
|
+
_errorCode2 = null;
|
|
53522
|
+
_error2 = null;
|
|
53498
53523
|
|
|
53499
|
-
if (_context5.
|
|
53500
|
-
|
|
53501
|
-
|
|
53524
|
+
if (_context5.t3 instanceof Error) {
|
|
53525
|
+
_error2 = _context5.t3.message;
|
|
53526
|
+
_errorCode2 = this._parseSolanaErrorCode(_error2);
|
|
53502
53527
|
}
|
|
53503
53528
|
|
|
53504
53529
|
return _context5.abrupt("return", {
|
|
53505
53530
|
res: null,
|
|
53506
|
-
error:
|
|
53507
|
-
errorCode:
|
|
53531
|
+
error: _error2,
|
|
53532
|
+
errorCode: _errorCode2
|
|
53508
53533
|
});
|
|
53509
53534
|
|
|
53510
|
-
case
|
|
53535
|
+
case 66:
|
|
53511
53536
|
case "end":
|
|
53512
53537
|
return _context5.stop();
|
|
53513
53538
|
}
|
|
53514
53539
|
}
|
|
53515
|
-
}, _callee5, this, [[
|
|
53540
|
+
}, _callee5, this, [[21, 25], [33, 39], [50, 58]]);
|
|
53516
53541
|
}));
|
|
53517
53542
|
|
|
53518
53543
|
function _locallyConfirmTransaction(_x5, _x6, _x7, _x8) {
|