@stellar/stellar-sdk 12.2.0 → 12.3.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/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/dist/stellar-sdk.js +497 -295
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/contract/assembled_transaction.d.ts +1 -3
- package/lib/contract/assembled_transaction.js +22 -30
- package/lib/horizon/call_builder.js +8 -7
- package/lib/rpc/api.d.ts +60 -6
- package/lib/rpc/parsers.d.ts +2 -0
- package/lib/rpc/parsers.js +29 -0
- package/lib/rpc/server.d.ts +39 -12
- package/lib/rpc/server.js +160 -105
- package/package.json +16 -16
package/lib/rpc/server.js
CHANGED
|
@@ -345,19 +345,7 @@ var Server = exports.Server = function () {
|
|
|
345
345
|
return _context8.abrupt("return", this._getTransaction(hash).then(function (raw) {
|
|
346
346
|
var foundInfo = {};
|
|
347
347
|
if (raw.status !== _api.Api.GetTransactionStatus.NOT_FOUND) {
|
|
348
|
-
|
|
349
|
-
var meta = _stellarBase.xdr.TransactionMeta.fromXDR(raw.resultMetaXdr, 'base64');
|
|
350
|
-
foundInfo = _objectSpread({
|
|
351
|
-
ledger: raw.ledger,
|
|
352
|
-
createdAt: raw.createdAt,
|
|
353
|
-
applicationOrder: raw.applicationOrder,
|
|
354
|
-
feeBump: raw.feeBump,
|
|
355
|
-
envelopeXdr: _stellarBase.xdr.TransactionEnvelope.fromXDR(raw.envelopeXdr, 'base64'),
|
|
356
|
-
resultXdr: _stellarBase.xdr.TransactionResult.fromXDR(raw.resultXdr, 'base64'),
|
|
357
|
-
resultMetaXdr: meta
|
|
358
|
-
}, meta.switch() === 3 && meta.v3().sorobanMeta() !== null && raw.status === _api.Api.GetTransactionStatus.SUCCESS && {
|
|
359
|
-
returnValue: (_meta$v3$sorobanMeta = meta.v3().sorobanMeta()) === null || _meta$v3$sorobanMeta === void 0 ? void 0 : _meta$v3$sorobanMeta.returnValue()
|
|
360
|
-
});
|
|
348
|
+
Object.assign(foundInfo, (0, _parsers.parseTransactionInfo)(raw));
|
|
361
349
|
}
|
|
362
350
|
var result = _objectSpread({
|
|
363
351
|
status: raw.status,
|
|
@@ -401,20 +389,68 @@ var Server = exports.Server = function () {
|
|
|
401
389
|
return _getTransaction;
|
|
402
390
|
}()
|
|
403
391
|
}, {
|
|
404
|
-
key: "
|
|
392
|
+
key: "getTransactions",
|
|
405
393
|
value: (function () {
|
|
406
|
-
var
|
|
394
|
+
var _getTransactions2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee10(request) {
|
|
407
395
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
408
396
|
while (1) switch (_context10.prev = _context10.next) {
|
|
409
397
|
case 0:
|
|
410
|
-
return _context10.abrupt("return", this.
|
|
398
|
+
return _context10.abrupt("return", this._getTransactions(request).then(function (raw) {
|
|
399
|
+
var result = {
|
|
400
|
+
transactions: raw.transactions.map(_parsers.parseRawTransactions),
|
|
401
|
+
latestLedger: raw.latestLedger,
|
|
402
|
+
latestLedgerCloseTimestamp: raw.latestLedgerCloseTimestamp,
|
|
403
|
+
oldestLedger: raw.oldestLedger,
|
|
404
|
+
oldestLedgerCloseTimestamp: raw.oldestLedgerCloseTimestamp,
|
|
405
|
+
cursor: raw.cursor
|
|
406
|
+
};
|
|
407
|
+
return result;
|
|
408
|
+
}));
|
|
411
409
|
case 1:
|
|
412
410
|
case "end":
|
|
413
411
|
return _context10.stop();
|
|
414
412
|
}
|
|
415
413
|
}, _callee10, this);
|
|
416
414
|
}));
|
|
417
|
-
function
|
|
415
|
+
function getTransactions(_x8) {
|
|
416
|
+
return _getTransactions2.apply(this, arguments);
|
|
417
|
+
}
|
|
418
|
+
return getTransactions;
|
|
419
|
+
}())
|
|
420
|
+
}, {
|
|
421
|
+
key: "_getTransactions",
|
|
422
|
+
value: function () {
|
|
423
|
+
var _getTransactions3 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee11(request) {
|
|
424
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
425
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
426
|
+
case 0:
|
|
427
|
+
return _context11.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'getTransactions', request));
|
|
428
|
+
case 1:
|
|
429
|
+
case "end":
|
|
430
|
+
return _context11.stop();
|
|
431
|
+
}
|
|
432
|
+
}, _callee11, this);
|
|
433
|
+
}));
|
|
434
|
+
function _getTransactions(_x9) {
|
|
435
|
+
return _getTransactions3.apply(this, arguments);
|
|
436
|
+
}
|
|
437
|
+
return _getTransactions;
|
|
438
|
+
}()
|
|
439
|
+
}, {
|
|
440
|
+
key: "getEvents",
|
|
441
|
+
value: (function () {
|
|
442
|
+
var _getEvents2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee12(request) {
|
|
443
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
444
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
445
|
+
case 0:
|
|
446
|
+
return _context12.abrupt("return", this._getEvents(request).then(_parsers.parseRawEvents));
|
|
447
|
+
case 1:
|
|
448
|
+
case "end":
|
|
449
|
+
return _context12.stop();
|
|
450
|
+
}
|
|
451
|
+
}, _callee12, this);
|
|
452
|
+
}));
|
|
453
|
+
function getEvents(_x10) {
|
|
418
454
|
return _getEvents2.apply(this, arguments);
|
|
419
455
|
}
|
|
420
456
|
return getEvents;
|
|
@@ -422,12 +458,12 @@ var Server = exports.Server = function () {
|
|
|
422
458
|
}, {
|
|
423
459
|
key: "_getEvents",
|
|
424
460
|
value: function () {
|
|
425
|
-
var _getEvents3 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
461
|
+
var _getEvents3 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee13(request) {
|
|
426
462
|
var _request$filters;
|
|
427
|
-
return _regeneratorRuntime().wrap(function
|
|
428
|
-
while (1) switch (
|
|
463
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
464
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
429
465
|
case 0:
|
|
430
|
-
return
|
|
466
|
+
return _context13.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'getEvents', _objectSpread({
|
|
431
467
|
filters: (_request$filters = request.filters) !== null && _request$filters !== void 0 ? _request$filters : [],
|
|
432
468
|
pagination: _objectSpread(_objectSpread({}, request.cursor && {
|
|
433
469
|
cursor: request.cursor
|
|
@@ -439,11 +475,11 @@ var Server = exports.Server = function () {
|
|
|
439
475
|
})));
|
|
440
476
|
case 1:
|
|
441
477
|
case "end":
|
|
442
|
-
return
|
|
478
|
+
return _context13.stop();
|
|
443
479
|
}
|
|
444
|
-
},
|
|
480
|
+
}, _callee13, this);
|
|
445
481
|
}));
|
|
446
|
-
function _getEvents(
|
|
482
|
+
function _getEvents(_x11) {
|
|
447
483
|
return _getEvents3.apply(this, arguments);
|
|
448
484
|
}
|
|
449
485
|
return _getEvents;
|
|
@@ -451,16 +487,16 @@ var Server = exports.Server = function () {
|
|
|
451
487
|
}, {
|
|
452
488
|
key: "getNetwork",
|
|
453
489
|
value: (function () {
|
|
454
|
-
var _getNetwork = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
455
|
-
return _regeneratorRuntime().wrap(function
|
|
456
|
-
while (1) switch (
|
|
490
|
+
var _getNetwork = _asyncToGenerator(_regeneratorRuntime().mark(function _callee14() {
|
|
491
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
492
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
457
493
|
case 0:
|
|
458
|
-
return
|
|
494
|
+
return _context14.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'getNetwork'));
|
|
459
495
|
case 1:
|
|
460
496
|
case "end":
|
|
461
|
-
return
|
|
497
|
+
return _context14.stop();
|
|
462
498
|
}
|
|
463
|
-
},
|
|
499
|
+
}, _callee14, this);
|
|
464
500
|
}));
|
|
465
501
|
function getNetwork() {
|
|
466
502
|
return _getNetwork.apply(this, arguments);
|
|
@@ -470,16 +506,16 @@ var Server = exports.Server = function () {
|
|
|
470
506
|
}, {
|
|
471
507
|
key: "getLatestLedger",
|
|
472
508
|
value: (function () {
|
|
473
|
-
var _getLatestLedger = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
474
|
-
return _regeneratorRuntime().wrap(function
|
|
475
|
-
while (1) switch (
|
|
509
|
+
var _getLatestLedger = _asyncToGenerator(_regeneratorRuntime().mark(function _callee15() {
|
|
510
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
511
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
476
512
|
case 0:
|
|
477
|
-
return
|
|
513
|
+
return _context15.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'getLatestLedger'));
|
|
478
514
|
case 1:
|
|
479
515
|
case "end":
|
|
480
|
-
return
|
|
516
|
+
return _context15.stop();
|
|
481
517
|
}
|
|
482
|
-
},
|
|
518
|
+
}, _callee15, this);
|
|
483
519
|
}));
|
|
484
520
|
function getLatestLedger() {
|
|
485
521
|
return _getLatestLedger.apply(this, arguments);
|
|
@@ -489,18 +525,18 @@ var Server = exports.Server = function () {
|
|
|
489
525
|
}, {
|
|
490
526
|
key: "simulateTransaction",
|
|
491
527
|
value: (function () {
|
|
492
|
-
var _simulateTransaction2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
493
|
-
return _regeneratorRuntime().wrap(function
|
|
494
|
-
while (1) switch (
|
|
528
|
+
var _simulateTransaction2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee16(tx, addlResources) {
|
|
529
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
530
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
495
531
|
case 0:
|
|
496
|
-
return
|
|
532
|
+
return _context16.abrupt("return", this._simulateTransaction(tx, addlResources).then(_parsers.parseRawSimulation));
|
|
497
533
|
case 1:
|
|
498
534
|
case "end":
|
|
499
|
-
return
|
|
535
|
+
return _context16.stop();
|
|
500
536
|
}
|
|
501
|
-
},
|
|
537
|
+
}, _callee16, this);
|
|
502
538
|
}));
|
|
503
|
-
function simulateTransaction(
|
|
539
|
+
function simulateTransaction(_x12, _x13) {
|
|
504
540
|
return _simulateTransaction2.apply(this, arguments);
|
|
505
541
|
}
|
|
506
542
|
return simulateTransaction;
|
|
@@ -508,11 +544,11 @@ var Server = exports.Server = function () {
|
|
|
508
544
|
}, {
|
|
509
545
|
key: "_simulateTransaction",
|
|
510
546
|
value: function () {
|
|
511
|
-
var _simulateTransaction3 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
512
|
-
return _regeneratorRuntime().wrap(function
|
|
513
|
-
while (1) switch (
|
|
547
|
+
var _simulateTransaction3 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee17(transaction, addlResources) {
|
|
548
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
549
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
514
550
|
case 0:
|
|
515
|
-
return
|
|
551
|
+
return _context17.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'simulateTransaction', _objectSpread({
|
|
516
552
|
transaction: transaction.toXDR()
|
|
517
553
|
}, addlResources !== undefined && {
|
|
518
554
|
resourceConfig: {
|
|
@@ -521,11 +557,11 @@ var Server = exports.Server = function () {
|
|
|
521
557
|
})));
|
|
522
558
|
case 1:
|
|
523
559
|
case "end":
|
|
524
|
-
return
|
|
560
|
+
return _context17.stop();
|
|
525
561
|
}
|
|
526
|
-
},
|
|
562
|
+
}, _callee17, this);
|
|
527
563
|
}));
|
|
528
|
-
function _simulateTransaction(
|
|
564
|
+
function _simulateTransaction(_x14, _x15) {
|
|
529
565
|
return _simulateTransaction3.apply(this, arguments);
|
|
530
566
|
}
|
|
531
567
|
return _simulateTransaction;
|
|
@@ -533,29 +569,29 @@ var Server = exports.Server = function () {
|
|
|
533
569
|
}, {
|
|
534
570
|
key: "prepareTransaction",
|
|
535
571
|
value: (function () {
|
|
536
|
-
var _prepareTransaction = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
572
|
+
var _prepareTransaction = _asyncToGenerator(_regeneratorRuntime().mark(function _callee18(tx) {
|
|
537
573
|
var simResponse;
|
|
538
|
-
return _regeneratorRuntime().wrap(function
|
|
539
|
-
while (1) switch (
|
|
574
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
575
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
540
576
|
case 0:
|
|
541
|
-
|
|
577
|
+
_context18.next = 2;
|
|
542
578
|
return this.simulateTransaction(tx);
|
|
543
579
|
case 2:
|
|
544
|
-
simResponse =
|
|
580
|
+
simResponse = _context18.sent;
|
|
545
581
|
if (!_api.Api.isSimulationError(simResponse)) {
|
|
546
|
-
|
|
582
|
+
_context18.next = 5;
|
|
547
583
|
break;
|
|
548
584
|
}
|
|
549
585
|
throw new Error(simResponse.error);
|
|
550
586
|
case 5:
|
|
551
|
-
return
|
|
587
|
+
return _context18.abrupt("return", (0, _transaction.assembleTransaction)(tx, simResponse).build());
|
|
552
588
|
case 6:
|
|
553
589
|
case "end":
|
|
554
|
-
return
|
|
590
|
+
return _context18.stop();
|
|
555
591
|
}
|
|
556
|
-
},
|
|
592
|
+
}, _callee18, this);
|
|
557
593
|
}));
|
|
558
|
-
function prepareTransaction(
|
|
594
|
+
function prepareTransaction(_x16) {
|
|
559
595
|
return _prepareTransaction.apply(this, arguments);
|
|
560
596
|
}
|
|
561
597
|
return prepareTransaction;
|
|
@@ -563,18 +599,18 @@ var Server = exports.Server = function () {
|
|
|
563
599
|
}, {
|
|
564
600
|
key: "sendTransaction",
|
|
565
601
|
value: (function () {
|
|
566
|
-
var _sendTransaction2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
567
|
-
return _regeneratorRuntime().wrap(function
|
|
568
|
-
while (1) switch (
|
|
602
|
+
var _sendTransaction2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee19(transaction) {
|
|
603
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
604
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
569
605
|
case 0:
|
|
570
|
-
return
|
|
606
|
+
return _context19.abrupt("return", this._sendTransaction(transaction).then(_parsers.parseRawSendTransaction));
|
|
571
607
|
case 1:
|
|
572
608
|
case "end":
|
|
573
|
-
return
|
|
609
|
+
return _context19.stop();
|
|
574
610
|
}
|
|
575
|
-
},
|
|
611
|
+
}, _callee19, this);
|
|
576
612
|
}));
|
|
577
|
-
function sendTransaction(
|
|
613
|
+
function sendTransaction(_x17) {
|
|
578
614
|
return _sendTransaction2.apply(this, arguments);
|
|
579
615
|
}
|
|
580
616
|
return sendTransaction;
|
|
@@ -582,20 +618,20 @@ var Server = exports.Server = function () {
|
|
|
582
618
|
}, {
|
|
583
619
|
key: "_sendTransaction",
|
|
584
620
|
value: function () {
|
|
585
|
-
var _sendTransaction3 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
586
|
-
return _regeneratorRuntime().wrap(function
|
|
587
|
-
while (1) switch (
|
|
621
|
+
var _sendTransaction3 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee20(transaction) {
|
|
622
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
623
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
588
624
|
case 0:
|
|
589
|
-
return
|
|
625
|
+
return _context20.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'sendTransaction', {
|
|
590
626
|
transaction: transaction.toXDR()
|
|
591
627
|
}));
|
|
592
628
|
case 1:
|
|
593
629
|
case "end":
|
|
594
|
-
return
|
|
630
|
+
return _context20.stop();
|
|
595
631
|
}
|
|
596
|
-
},
|
|
632
|
+
}, _callee20, this);
|
|
597
633
|
}));
|
|
598
|
-
function _sendTransaction(
|
|
634
|
+
function _sendTransaction(_x18) {
|
|
599
635
|
return _sendTransaction3.apply(this, arguments);
|
|
600
636
|
}
|
|
601
637
|
return _sendTransaction;
|
|
@@ -603,58 +639,58 @@ var Server = exports.Server = function () {
|
|
|
603
639
|
}, {
|
|
604
640
|
key: "requestAirdrop",
|
|
605
641
|
value: (function () {
|
|
606
|
-
var _requestAirdrop = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
642
|
+
var _requestAirdrop = _asyncToGenerator(_regeneratorRuntime().mark(function _callee21(address, friendbotUrl) {
|
|
607
643
|
var account, response, meta, sequence, _error$response, _error$response$detai;
|
|
608
|
-
return _regeneratorRuntime().wrap(function
|
|
609
|
-
while (1) switch (
|
|
644
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
645
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
610
646
|
case 0:
|
|
611
647
|
account = typeof address === 'string' ? address : address.accountId();
|
|
612
|
-
|
|
613
|
-
if (
|
|
614
|
-
|
|
648
|
+
_context21.t0 = friendbotUrl;
|
|
649
|
+
if (_context21.t0) {
|
|
650
|
+
_context21.next = 6;
|
|
615
651
|
break;
|
|
616
652
|
}
|
|
617
|
-
|
|
653
|
+
_context21.next = 5;
|
|
618
654
|
return this.getNetwork();
|
|
619
655
|
case 5:
|
|
620
|
-
|
|
656
|
+
_context21.t0 = _context21.sent.friendbotUrl;
|
|
621
657
|
case 6:
|
|
622
|
-
friendbotUrl =
|
|
658
|
+
friendbotUrl = _context21.t0;
|
|
623
659
|
if (friendbotUrl) {
|
|
624
|
-
|
|
660
|
+
_context21.next = 9;
|
|
625
661
|
break;
|
|
626
662
|
}
|
|
627
663
|
throw new Error('No friendbot URL configured for current network');
|
|
628
664
|
case 9:
|
|
629
|
-
|
|
630
|
-
|
|
665
|
+
_context21.prev = 9;
|
|
666
|
+
_context21.next = 12;
|
|
631
667
|
return _axios.default.post("".concat(friendbotUrl, "?addr=").concat(encodeURIComponent(account)));
|
|
632
668
|
case 12:
|
|
633
|
-
response =
|
|
669
|
+
response = _context21.sent;
|
|
634
670
|
meta = _stellarBase.xdr.TransactionMeta.fromXDR(response.data.result_meta_xdr, 'base64');
|
|
635
671
|
sequence = findCreatedAccountSequenceInTransactionMeta(meta);
|
|
636
|
-
return
|
|
672
|
+
return _context21.abrupt("return", new _stellarBase.Account(account, sequence));
|
|
637
673
|
case 18:
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
if (!(((_error$response =
|
|
641
|
-
|
|
674
|
+
_context21.prev = 18;
|
|
675
|
+
_context21.t1 = _context21["catch"](9);
|
|
676
|
+
if (!(((_error$response = _context21.t1.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 400)) {
|
|
677
|
+
_context21.next = 23;
|
|
642
678
|
break;
|
|
643
679
|
}
|
|
644
|
-
if (!((_error$response$detai =
|
|
645
|
-
|
|
680
|
+
if (!((_error$response$detai = _context21.t1.response.detail) !== null && _error$response$detai !== void 0 && _error$response$detai.includes('createAccountAlreadyExist'))) {
|
|
681
|
+
_context21.next = 23;
|
|
646
682
|
break;
|
|
647
683
|
}
|
|
648
|
-
return
|
|
684
|
+
return _context21.abrupt("return", this.getAccount(account));
|
|
649
685
|
case 23:
|
|
650
|
-
throw
|
|
686
|
+
throw _context21.t1;
|
|
651
687
|
case 24:
|
|
652
688
|
case "end":
|
|
653
|
-
return
|
|
689
|
+
return _context21.stop();
|
|
654
690
|
}
|
|
655
|
-
},
|
|
691
|
+
}, _callee21, this, [[9, 18]]);
|
|
656
692
|
}));
|
|
657
|
-
function requestAirdrop(
|
|
693
|
+
function requestAirdrop(_x19, _x20) {
|
|
658
694
|
return _requestAirdrop.apply(this, arguments);
|
|
659
695
|
}
|
|
660
696
|
return requestAirdrop;
|
|
@@ -662,21 +698,40 @@ var Server = exports.Server = function () {
|
|
|
662
698
|
}, {
|
|
663
699
|
key: "getFeeStats",
|
|
664
700
|
value: (function () {
|
|
665
|
-
var _getFeeStats = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
666
|
-
return _regeneratorRuntime().wrap(function
|
|
667
|
-
while (1) switch (
|
|
701
|
+
var _getFeeStats = _asyncToGenerator(_regeneratorRuntime().mark(function _callee22() {
|
|
702
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
703
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
668
704
|
case 0:
|
|
669
|
-
return
|
|
705
|
+
return _context22.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'getFeeStats'));
|
|
670
706
|
case 1:
|
|
671
707
|
case "end":
|
|
672
|
-
return
|
|
708
|
+
return _context22.stop();
|
|
673
709
|
}
|
|
674
|
-
},
|
|
710
|
+
}, _callee22, this);
|
|
675
711
|
}));
|
|
676
712
|
function getFeeStats() {
|
|
677
713
|
return _getFeeStats.apply(this, arguments);
|
|
678
714
|
}
|
|
679
715
|
return getFeeStats;
|
|
680
716
|
}())
|
|
717
|
+
}, {
|
|
718
|
+
key: "getVersionInfo",
|
|
719
|
+
value: (function () {
|
|
720
|
+
var _getVersionInfo = _asyncToGenerator(_regeneratorRuntime().mark(function _callee23() {
|
|
721
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
722
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
723
|
+
case 0:
|
|
724
|
+
return _context23.abrupt("return", jsonrpc.postObject(this.serverURL.toString(), 'getVersionInfo'));
|
|
725
|
+
case 1:
|
|
726
|
+
case "end":
|
|
727
|
+
return _context23.stop();
|
|
728
|
+
}
|
|
729
|
+
}, _callee23, this);
|
|
730
|
+
}));
|
|
731
|
+
function getVersionInfo() {
|
|
732
|
+
return _getVersionInfo.apply(this, arguments);
|
|
733
|
+
}
|
|
734
|
+
return getVersionInfo;
|
|
735
|
+
}())
|
|
681
736
|
}]);
|
|
682
737
|
}();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stellar/stellar-sdk",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stellar"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"test:node": "yarn _nyc mocha --recursive 'test/unit/**/*.js'",
|
|
54
54
|
"test:integration": "yarn _nyc mocha --recursive 'test/integration/**/*.js'",
|
|
55
55
|
"test:browser": "karma start config/karma.conf.js",
|
|
56
|
-
"fmt": "yarn eslint -c .eslintrc.js src/ --fix
|
|
56
|
+
"fmt": "yarn _prettier && yarn eslint -c .eslintrc.js src/ --fix",
|
|
57
57
|
"preversion": "yarn clean && yarn _prettier && yarn build:prod && yarn test",
|
|
58
58
|
"prepare": "yarn build:prod",
|
|
59
59
|
"_build": "yarn build:node && yarn build:test && yarn build:browser",
|
|
@@ -93,21 +93,21 @@
|
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@babel/cli": "^7.
|
|
96
|
+
"@babel/cli": "^7.25.6",
|
|
97
97
|
"@babel/core": "^7.24.9",
|
|
98
98
|
"@babel/eslint-plugin": "^7.24.7",
|
|
99
|
-
"@babel/preset-env": "^7.
|
|
99
|
+
"@babel/preset-env": "^7.25.4",
|
|
100
100
|
"@babel/preset-typescript": "^7.24.7",
|
|
101
101
|
"@babel/register": "^7.24.6",
|
|
102
|
-
"@definitelytyped/dtslint": "^0.2.
|
|
102
|
+
"@definitelytyped/dtslint": "^0.2.23",
|
|
103
103
|
"@istanbuljs/nyc-config-babel": "3.0.0",
|
|
104
104
|
"@stellar/tsconfig": "^1.0.2",
|
|
105
|
-
"@types/chai": "^4.3.
|
|
105
|
+
"@types/chai": "^4.3.19",
|
|
106
106
|
"@types/detect-node": "^2.0.0",
|
|
107
107
|
"@types/eventsource": "^1.1.12",
|
|
108
108
|
"@types/json-schema": "^7.0.15",
|
|
109
109
|
"@types/lodash": "^4.17.7",
|
|
110
|
-
"@types/mocha": "^10.0.
|
|
110
|
+
"@types/mocha": "^10.0.8",
|
|
111
111
|
"@types/node": "^20.14.11",
|
|
112
112
|
"@types/randombytes": "^2.0.1",
|
|
113
113
|
"@types/sinon": "^17.0.2",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@typescript-eslint/parser": "^7.16.1",
|
|
116
116
|
"axios-mock-adapter": "^1.22.0",
|
|
117
117
|
"babel-loader": "^9.1.3",
|
|
118
|
-
"babel-plugin-istanbul": "^
|
|
118
|
+
"babel-plugin-istanbul": "^7.0.0",
|
|
119
119
|
"buffer": "^6.0.3",
|
|
120
120
|
"chai": "^4.3.10",
|
|
121
121
|
"chai-as-promised": "^7.1.1",
|
|
@@ -126,14 +126,14 @@
|
|
|
126
126
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
127
127
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
128
128
|
"eslint-config-prettier": "^9.0.0",
|
|
129
|
-
"eslint-plugin-import": "^2.
|
|
129
|
+
"eslint-plugin-import": "^2.30.0",
|
|
130
130
|
"eslint-plugin-jsdoc": "^48.8.0",
|
|
131
131
|
"eslint-plugin-node": "^11.1.0",
|
|
132
132
|
"eslint-plugin-prefer-import": "^0.0.1",
|
|
133
133
|
"eslint-plugin-prettier": "^5.2.1",
|
|
134
134
|
"eslint-webpack-plugin": "^4.2.0",
|
|
135
135
|
"ghooks": "^2.0.4",
|
|
136
|
-
"husky": "^9.1.
|
|
136
|
+
"husky": "^9.1.6",
|
|
137
137
|
"jsdoc": "^4.0.2",
|
|
138
138
|
"json-schema-faker": "^0.5.6",
|
|
139
139
|
"karma": "^6.4.3",
|
|
@@ -144,12 +144,12 @@
|
|
|
144
144
|
"karma-mocha": "^2.0.0",
|
|
145
145
|
"karma-sinon-chai": "^2.0.2",
|
|
146
146
|
"karma-webpack": "^5.0.1",
|
|
147
|
-
"lint-staged": "^15.2.
|
|
147
|
+
"lint-staged": "^15.2.10",
|
|
148
148
|
"lodash": "^4.17.21",
|
|
149
149
|
"minami": "^1.1.1",
|
|
150
150
|
"mocha": "^10.6.0",
|
|
151
151
|
"node-polyfill-webpack-plugin": "^3.0.0",
|
|
152
|
-
"nyc": "^
|
|
152
|
+
"nyc": "^17.0.0",
|
|
153
153
|
"prettier": "^3.3.3",
|
|
154
154
|
"randombytes": "^2.1.0",
|
|
155
155
|
"sinon": "^17.0.1",
|
|
@@ -157,13 +157,13 @@
|
|
|
157
157
|
"taffydb": "^2.7.3",
|
|
158
158
|
"terser-webpack-plugin": "^5.3.10",
|
|
159
159
|
"ts-node": "^10.9.2",
|
|
160
|
-
"typescript": "^5.
|
|
161
|
-
"webpack": "^5.
|
|
160
|
+
"typescript": "^5.6.2",
|
|
161
|
+
"webpack": "^5.94.0",
|
|
162
162
|
"webpack-cli": "^5.0.1"
|
|
163
163
|
},
|
|
164
164
|
"dependencies": {
|
|
165
|
-
"@stellar/stellar-base": "^12.1.
|
|
166
|
-
"axios": "^1.7.
|
|
165
|
+
"@stellar/stellar-base": "^12.1.1",
|
|
166
|
+
"axios": "^1.7.7",
|
|
167
167
|
"bignumber.js": "^9.1.2",
|
|
168
168
|
"eventsource": "^2.0.2",
|
|
169
169
|
"randombytes": "^2.1.0",
|