evernode-js-client 0.4.42 → 0.4.46

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 (2) hide show
  1. package/index.js +412 -273
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /******/ (() => { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 5774:
4
+ /***/ 3325:
5
5
  /***/ ((__unused_webpack_module, exports) => {
6
6
 
7
7
  "use strict";
@@ -159,7 +159,7 @@ function fromByteArray (uint8) {
159
159
 
160
160
  /***/ }),
161
161
 
162
- /***/ 912:
162
+ /***/ 4922:
163
163
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
164
164
 
165
165
  /* module decorator */ module = __nccwpck_require__.nmd(module);
@@ -1620,7 +1620,7 @@ if (typeof define === "function" && define.amd) {
1620
1620
 
1621
1621
  /***/ }),
1622
1622
 
1623
- /***/ 9125:
1623
+ /***/ 3365:
1624
1624
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
1625
1625
 
1626
1626
  "use strict";
@@ -1634,8 +1634,8 @@ if (typeof define === "function" && define.amd) {
1634
1634
 
1635
1635
 
1636
1636
 
1637
- var base64 = __nccwpck_require__(5774)
1638
- var ieee754 = __nccwpck_require__(3920)
1637
+ var base64 = __nccwpck_require__(3325)
1638
+ var ieee754 = __nccwpck_require__(2458)
1639
1639
  var customInspectSymbol =
1640
1640
  (typeof Symbol === 'function' && typeof Symbol.for === 'function')
1641
1641
  ? Symbol.for('nodejs.util.inspect.custom')
@@ -3422,7 +3422,7 @@ var hexSliceLookupTable = (function () {
3422
3422
 
3423
3423
  /***/ }),
3424
3424
 
3425
- /***/ 1639:
3425
+ /***/ 3614:
3426
3426
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
3427
3427
 
3428
3428
  module.exports = __nccwpck_require__(6113).createHash
@@ -3430,7 +3430,7 @@ module.exports = __nccwpck_require__(6113).createHash
3430
3430
 
3431
3431
  /***/ }),
3432
3432
 
3433
- /***/ 7888:
3433
+ /***/ 7569:
3434
3434
  /***/ (function(module) {
3435
3435
 
3436
3436
  ;(function (globalScope) {
@@ -8371,7 +8371,7 @@ module.exports = __nccwpck_require__(6113).createHash
8371
8371
 
8372
8372
  /***/ }),
8373
8373
 
8374
- /***/ 3920:
8374
+ /***/ 2458:
8375
8375
  /***/ ((__unused_webpack_module, exports) => {
8376
8376
 
8377
8377
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -8463,7 +8463,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
8463
8463
 
8464
8464
  /***/ }),
8465
8465
 
8466
- /***/ 1848:
8466
+ /***/ 6875:
8467
8467
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8468
8468
 
8469
8469
  "use strict";
@@ -8471,17 +8471,17 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
8471
8471
  /* eslint-disable func-style */
8472
8472
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8473
8473
  exports.transactionID = exports.sha512Half = exports.binaryToJSON = exports.signingClaimData = exports.signingData = exports.multiSigningData = exports.readJSON = exports.serializeObject = exports.makeParser = exports.BytesList = exports.BinarySerializer = exports.BinaryParser = void 0;
8474
- var types_1 = __nccwpck_require__(9028);
8475
- var binary_parser_1 = __nccwpck_require__(7271);
8474
+ var types_1 = __nccwpck_require__(9898);
8475
+ var binary_parser_1 = __nccwpck_require__(6055);
8476
8476
  Object.defineProperty(exports, "BinaryParser", ({ enumerable: true, get: function () { return binary_parser_1.BinaryParser; } }));
8477
- var hash_prefixes_1 = __nccwpck_require__(3362);
8478
- var binary_serializer_1 = __nccwpck_require__(2847);
8477
+ var hash_prefixes_1 = __nccwpck_require__(9756);
8478
+ var binary_serializer_1 = __nccwpck_require__(5047);
8479
8479
  Object.defineProperty(exports, "BinarySerializer", ({ enumerable: true, get: function () { return binary_serializer_1.BinarySerializer; } }));
8480
8480
  Object.defineProperty(exports, "BytesList", ({ enumerable: true, get: function () { return binary_serializer_1.BytesList; } }));
8481
- var hashes_1 = __nccwpck_require__(7229);
8481
+ var hashes_1 = __nccwpck_require__(4010);
8482
8482
  Object.defineProperty(exports, "sha512Half", ({ enumerable: true, get: function () { return hashes_1.sha512Half; } }));
8483
8483
  Object.defineProperty(exports, "transactionID", ({ enumerable: true, get: function () { return hashes_1.transactionID; } }));
8484
- var bigInt = __nccwpck_require__(912);
8484
+ var bigInt = __nccwpck_require__(4922);
8485
8485
  /**
8486
8486
  * Construct a BinaryParser
8487
8487
  *
@@ -8583,38 +8583,38 @@ exports.multiSigningData = multiSigningData;
8583
8583
 
8584
8584
  /***/ }),
8585
8585
 
8586
- /***/ 9340:
8586
+ /***/ 8613:
8587
8587
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8588
8588
 
8589
8589
  "use strict";
8590
8590
 
8591
8591
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8592
8592
  exports.types = exports.ShaMap = exports.HashPrefix = exports.quality = exports.TransactionResult = exports.Type = exports.LedgerEntryType = exports.TransactionType = exports.Field = exports.ledgerHashes = exports.binary = exports.hashes = void 0;
8593
- var enums_1 = __nccwpck_require__(4281);
8593
+ var enums_1 = __nccwpck_require__(7809);
8594
8594
  Object.defineProperty(exports, "Field", ({ enumerable: true, get: function () { return enums_1.Field; } }));
8595
8595
  Object.defineProperty(exports, "TransactionType", ({ enumerable: true, get: function () { return enums_1.TransactionType; } }));
8596
8596
  Object.defineProperty(exports, "LedgerEntryType", ({ enumerable: true, get: function () { return enums_1.LedgerEntryType; } }));
8597
8597
  Object.defineProperty(exports, "Type", ({ enumerable: true, get: function () { return enums_1.Type; } }));
8598
8598
  Object.defineProperty(exports, "TransactionResult", ({ enumerable: true, get: function () { return enums_1.TransactionResult; } }));
8599
- var types = __nccwpck_require__(9028);
8599
+ var types = __nccwpck_require__(9898);
8600
8600
  exports.types = types;
8601
- var binary = __nccwpck_require__(1848);
8601
+ var binary = __nccwpck_require__(6875);
8602
8602
  exports.binary = binary;
8603
- var shamap_1 = __nccwpck_require__(264);
8603
+ var shamap_1 = __nccwpck_require__(7613);
8604
8604
  Object.defineProperty(exports, "ShaMap", ({ enumerable: true, get: function () { return shamap_1.ShaMap; } }));
8605
- var ledgerHashes = __nccwpck_require__(999);
8605
+ var ledgerHashes = __nccwpck_require__(6075);
8606
8606
  exports.ledgerHashes = ledgerHashes;
8607
- var hashes = __nccwpck_require__(7229);
8607
+ var hashes = __nccwpck_require__(4010);
8608
8608
  exports.hashes = hashes;
8609
- var quality_1 = __nccwpck_require__(7383);
8609
+ var quality_1 = __nccwpck_require__(2258);
8610
8610
  Object.defineProperty(exports, "quality", ({ enumerable: true, get: function () { return quality_1.quality; } }));
8611
- var hash_prefixes_1 = __nccwpck_require__(3362);
8611
+ var hash_prefixes_1 = __nccwpck_require__(9756);
8612
8612
  Object.defineProperty(exports, "HashPrefix", ({ enumerable: true, get: function () { return hash_prefixes_1.HashPrefix; } }));
8613
8613
  //# sourceMappingURL=coretypes.js.map
8614
8614
 
8615
8615
  /***/ }),
8616
8616
 
8617
- /***/ 4281:
8617
+ /***/ 7809:
8618
8618
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8619
8619
 
8620
8620
  "use strict";
@@ -8622,8 +8622,8 @@ Object.defineProperty(exports, "HashPrefix", ({ enumerable: true, get: function
8622
8622
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8623
8623
  exports.TransactionType = exports.TransactionResult = exports.LedgerEntryType = exports.Type = exports.Field = exports.Bytes = exports.TRANSACTION_TYPES = void 0;
8624
8624
  var enums = __nccwpck_require__(6997);
8625
- var serialized_type_1 = __nccwpck_require__(1334);
8626
- var buffer_1 = __nccwpck_require__(9125);
8625
+ var serialized_type_1 = __nccwpck_require__(2088);
8626
+ var buffer_1 = __nccwpck_require__(3365);
8627
8627
  /*
8628
8628
  * @brief: All valid transaction types
8629
8629
  */
@@ -8754,14 +8754,14 @@ exports.Field = Field;
8754
8754
 
8755
8755
  /***/ }),
8756
8756
 
8757
- /***/ 3362:
8757
+ /***/ 9756:
8758
8758
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8759
8759
 
8760
8760
  "use strict";
8761
8761
 
8762
8762
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8763
8763
  exports.HashPrefix = void 0;
8764
- var buffer_1 = __nccwpck_require__(9125);
8764
+ var buffer_1 = __nccwpck_require__(3365);
8765
8765
  /**
8766
8766
  * Write a 32 bit integer to a Buffer
8767
8767
  *
@@ -8802,7 +8802,7 @@ exports.HashPrefix = HashPrefix;
8802
8802
 
8803
8803
  /***/ }),
8804
8804
 
8805
- /***/ 7229:
8805
+ /***/ 4010:
8806
8806
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
8807
8807
 
8808
8808
  "use strict";
@@ -8822,11 +8822,11 @@ var __extends = (this && this.__extends) || (function () {
8822
8822
  })();
8823
8823
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8824
8824
  exports.transactionID = exports.sha512Half = exports.Sha512Half = void 0;
8825
- var hash_prefixes_1 = __nccwpck_require__(3362);
8826
- var createHash = __nccwpck_require__(1639);
8827
- var hash_256_1 = __nccwpck_require__(4564);
8828
- var binary_serializer_1 = __nccwpck_require__(2847);
8829
- var buffer_1 = __nccwpck_require__(9125);
8825
+ var hash_prefixes_1 = __nccwpck_require__(9756);
8826
+ var createHash = __nccwpck_require__(3614);
8827
+ var hash_256_1 = __nccwpck_require__(7378);
8828
+ var binary_serializer_1 = __nccwpck_require__(5047);
8829
+ var buffer_1 = __nccwpck_require__(3365);
8830
8830
  /**
8831
8831
  * Class for hashing with SHA512
8832
8832
  * @extends BytesList So SerializedTypes can write bytes to a Sha512Half
@@ -8906,15 +8906,15 @@ exports.transactionID = transactionID;
8906
8906
 
8907
8907
  /***/ }),
8908
8908
 
8909
- /***/ 3511:
8909
+ /***/ 1269:
8910
8910
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
8911
8911
 
8912
8912
  "use strict";
8913
8913
 
8914
8914
  var assert = __nccwpck_require__(9491);
8915
- var coretypes_1 = __nccwpck_require__(9340);
8916
- var ledger_hashes_1 = __nccwpck_require__(999);
8917
- var enums_1 = __nccwpck_require__(4281);
8915
+ var coretypes_1 = __nccwpck_require__(8613);
8916
+ var ledger_hashes_1 = __nccwpck_require__(6075);
8917
+ var enums_1 = __nccwpck_require__(7809);
8918
8918
  var signingData = coretypes_1.binary.signingData, signingClaimData = coretypes_1.binary.signingClaimData, multiSigningData = coretypes_1.binary.multiSigningData, binaryToJSON = coretypes_1.binary.binaryToJSON, serializeObject = coretypes_1.binary.serializeObject;
8919
8919
  /**
8920
8920
  * Decode a transaction
@@ -9013,7 +9013,7 @@ module.exports = {
9013
9013
 
9014
9014
  /***/ }),
9015
9015
 
9016
- /***/ 999:
9016
+ /***/ 6075:
9017
9017
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
9018
9018
 
9019
9019
  "use strict";
@@ -9021,17 +9021,17 @@ module.exports = {
9021
9021
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9022
9022
  exports.decodeLedgerData = exports.ledgerHash = exports.transactionTreeHash = exports.accountStateHash = void 0;
9023
9023
  var assert = __nccwpck_require__(9491);
9024
- var shamap_1 = __nccwpck_require__(264);
9025
- var hash_prefixes_1 = __nccwpck_require__(3362);
9026
- var hashes_1 = __nccwpck_require__(7229);
9027
- var binary_1 = __nccwpck_require__(1848);
9028
- var hash_256_1 = __nccwpck_require__(4564);
9029
- var st_object_1 = __nccwpck_require__(9982);
9030
- var uint_64_1 = __nccwpck_require__(2623);
9031
- var uint_32_1 = __nccwpck_require__(4073);
9032
- var uint_8_1 = __nccwpck_require__(4333);
9033
- var binary_parser_1 = __nccwpck_require__(7271);
9034
- var bigInt = __nccwpck_require__(912);
9024
+ var shamap_1 = __nccwpck_require__(7613);
9025
+ var hash_prefixes_1 = __nccwpck_require__(9756);
9026
+ var hashes_1 = __nccwpck_require__(4010);
9027
+ var binary_1 = __nccwpck_require__(6875);
9028
+ var hash_256_1 = __nccwpck_require__(7378);
9029
+ var st_object_1 = __nccwpck_require__(3890);
9030
+ var uint_64_1 = __nccwpck_require__(140);
9031
+ var uint_32_1 = __nccwpck_require__(3808);
9032
+ var uint_8_1 = __nccwpck_require__(5086);
9033
+ var binary_parser_1 = __nccwpck_require__(6055);
9034
+ var bigInt = __nccwpck_require__(4922);
9035
9035
  /**
9036
9036
  * Computes the hash of a list of objects
9037
9037
  *
@@ -9155,17 +9155,17 @@ exports.decodeLedgerData = decodeLedgerData;
9155
9155
 
9156
9156
  /***/ }),
9157
9157
 
9158
- /***/ 7383:
9158
+ /***/ 2258:
9159
9159
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
9160
9160
 
9161
9161
  "use strict";
9162
9162
 
9163
9163
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9164
9164
  exports.quality = void 0;
9165
- var types_1 = __nccwpck_require__(9028);
9166
- var decimal_js_1 = __nccwpck_require__(7888);
9167
- var bigInt = __nccwpck_require__(912);
9168
- var buffer_1 = __nccwpck_require__(9125);
9165
+ var types_1 = __nccwpck_require__(9898);
9166
+ var decimal_js_1 = __nccwpck_require__(7569);
9167
+ var bigInt = __nccwpck_require__(4922);
9168
+ var buffer_1 = __nccwpck_require__(3365);
9169
9169
  /**
9170
9170
  * class for encoding and decoding quality
9171
9171
  */
@@ -9205,7 +9205,7 @@ exports.quality = quality;
9205
9205
 
9206
9206
  /***/ }),
9207
9207
 
9208
- /***/ 7271:
9208
+ /***/ 6055:
9209
9209
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
9210
9210
 
9211
9211
  "use strict";
@@ -9213,8 +9213,8 @@ exports.quality = quality;
9213
9213
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9214
9214
  exports.BinaryParser = void 0;
9215
9215
  var assert = __nccwpck_require__(9491);
9216
- var enums_1 = __nccwpck_require__(4281);
9217
- var buffer_1 = __nccwpck_require__(9125);
9216
+ var enums_1 = __nccwpck_require__(7809);
9217
+ var buffer_1 = __nccwpck_require__(3365);
9218
9218
  /**
9219
9219
  * BinaryParser is used to compute fields and values from a HexString
9220
9220
  */
@@ -9397,7 +9397,7 @@ exports.BinaryParser = BinaryParser;
9397
9397
 
9398
9398
  /***/ }),
9399
9399
 
9400
- /***/ 2847:
9400
+ /***/ 5047:
9401
9401
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
9402
9402
 
9403
9403
  "use strict";
@@ -9405,7 +9405,7 @@ exports.BinaryParser = BinaryParser;
9405
9405
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9406
9406
  exports.BinarySerializer = exports.BytesList = void 0;
9407
9407
  var assert = __nccwpck_require__(9491);
9408
- var buffer_1 = __nccwpck_require__(9125);
9408
+ var buffer_1 = __nccwpck_require__(3365);
9409
9409
  /**
9410
9410
  * Bytes list is a collection of buffer objects
9411
9411
  */
@@ -9557,7 +9557,7 @@ exports.BinarySerializer = BinarySerializer;
9557
9557
 
9558
9558
  /***/ }),
9559
9559
 
9560
- /***/ 264:
9560
+ /***/ 7613:
9561
9561
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
9562
9562
 
9563
9563
  "use strict";
@@ -9578,10 +9578,10 @@ var __extends = (this && this.__extends) || (function () {
9578
9578
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9579
9579
  exports.ShaMapLeaf = exports.ShaMapNode = exports.ShaMap = void 0;
9580
9580
  var assert_1 = __nccwpck_require__(9491);
9581
- var types_1 = __nccwpck_require__(9028);
9582
- var hash_prefixes_1 = __nccwpck_require__(3362);
9583
- var hashes_1 = __nccwpck_require__(7229);
9584
- var buffer_1 = __nccwpck_require__(9125);
9581
+ var types_1 = __nccwpck_require__(9898);
9582
+ var hash_prefixes_1 = __nccwpck_require__(9756);
9583
+ var hashes_1 = __nccwpck_require__(4010);
9584
+ var buffer_1 = __nccwpck_require__(3365);
9585
9585
  /**
9586
9586
  * Abstract class describing a SHAMapNode
9587
9587
  */
@@ -9760,7 +9760,7 @@ exports.ShaMap = ShaMap;
9760
9760
 
9761
9761
  /***/ }),
9762
9762
 
9763
- /***/ 3222:
9763
+ /***/ 2880:
9764
9764
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
9765
9765
 
9766
9766
  "use strict";
@@ -9781,8 +9781,8 @@ var __extends = (this && this.__extends) || (function () {
9781
9781
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9782
9782
  exports.AccountID = void 0;
9783
9783
  var ripple_address_codec_1 = __nccwpck_require__(597);
9784
- var hash_160_1 = __nccwpck_require__(5611);
9785
- var buffer_1 = __nccwpck_require__(9125);
9784
+ var hash_160_1 = __nccwpck_require__(9025);
9785
+ var buffer_1 = __nccwpck_require__(3365);
9786
9786
  var HEX_REGEX = /^[A-F0-9]{40}$/;
9787
9787
  /**
9788
9788
  * Class defining how to encode and decode an AccountID
@@ -9853,7 +9853,7 @@ exports.AccountID = AccountID;
9853
9853
 
9854
9854
  /***/ }),
9855
9855
 
9856
- /***/ 4596:
9856
+ /***/ 9513:
9857
9857
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
9858
9858
 
9859
9859
  "use strict";
@@ -9873,13 +9873,13 @@ var __extends = (this && this.__extends) || (function () {
9873
9873
  })();
9874
9874
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9875
9875
  exports.Amount = void 0;
9876
- var decimal_js_1 = __nccwpck_require__(7888);
9877
- var binary_parser_1 = __nccwpck_require__(7271);
9878
- var account_id_1 = __nccwpck_require__(3222);
9879
- var currency_1 = __nccwpck_require__(9310);
9880
- var serialized_type_1 = __nccwpck_require__(1334);
9881
- var bigInt = __nccwpck_require__(912);
9882
- var buffer_1 = __nccwpck_require__(9125);
9876
+ var decimal_js_1 = __nccwpck_require__(7569);
9877
+ var binary_parser_1 = __nccwpck_require__(6055);
9878
+ var account_id_1 = __nccwpck_require__(2880);
9879
+ var currency_1 = __nccwpck_require__(85);
9880
+ var serialized_type_1 = __nccwpck_require__(2088);
9881
+ var bigInt = __nccwpck_require__(4922);
9882
+ var buffer_1 = __nccwpck_require__(3365);
9883
9883
  /**
9884
9884
  * Constants for validating amounts
9885
9885
  */
@@ -10082,7 +10082,7 @@ exports.Amount = Amount;
10082
10082
 
10083
10083
  /***/ }),
10084
10084
 
10085
- /***/ 3138:
10085
+ /***/ 3796:
10086
10086
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10087
10087
 
10088
10088
  "use strict";
@@ -10102,8 +10102,8 @@ var __extends = (this && this.__extends) || (function () {
10102
10102
  })();
10103
10103
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10104
10104
  exports.Blob = void 0;
10105
- var serialized_type_1 = __nccwpck_require__(1334);
10106
- var buffer_1 = __nccwpck_require__(9125);
10105
+ var serialized_type_1 = __nccwpck_require__(2088);
10106
+ var buffer_1 = __nccwpck_require__(3365);
10107
10107
  /**
10108
10108
  * Variable length encoded type
10109
10109
  */
@@ -10144,7 +10144,7 @@ exports.Blob = Blob;
10144
10144
 
10145
10145
  /***/ }),
10146
10146
 
10147
- /***/ 9310:
10147
+ /***/ 85:
10148
10148
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10149
10149
 
10150
10150
  "use strict";
@@ -10164,8 +10164,8 @@ var __extends = (this && this.__extends) || (function () {
10164
10164
  })();
10165
10165
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10166
10166
  exports.Currency = void 0;
10167
- var hash_160_1 = __nccwpck_require__(5611);
10168
- var buffer_1 = __nccwpck_require__(9125);
10167
+ var hash_160_1 = __nccwpck_require__(9025);
10168
+ var buffer_1 = __nccwpck_require__(3365);
10169
10169
  var ISO_REGEX = /^[A-Z0-9]{3}$/;
10170
10170
  var HEX_REGEX = /^[A-F0-9]{40}$/;
10171
10171
  /**
@@ -10291,7 +10291,7 @@ exports.Currency = Currency;
10291
10291
 
10292
10292
  /***/ }),
10293
10293
 
10294
- /***/ 277:
10294
+ /***/ 3921:
10295
10295
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10296
10296
 
10297
10297
  "use strict";
@@ -10311,8 +10311,8 @@ var __extends = (this && this.__extends) || (function () {
10311
10311
  })();
10312
10312
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10313
10313
  exports.Hash128 = void 0;
10314
- var hash_1 = __nccwpck_require__(370);
10315
- var buffer_1 = __nccwpck_require__(9125);
10314
+ var hash_1 = __nccwpck_require__(9195);
10315
+ var buffer_1 = __nccwpck_require__(3365);
10316
10316
  /**
10317
10317
  * Hash with a width of 128 bits
10318
10318
  */
@@ -10330,7 +10330,7 @@ exports.Hash128 = Hash128;
10330
10330
 
10331
10331
  /***/ }),
10332
10332
 
10333
- /***/ 5611:
10333
+ /***/ 9025:
10334
10334
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10335
10335
 
10336
10336
  "use strict";
@@ -10350,8 +10350,8 @@ var __extends = (this && this.__extends) || (function () {
10350
10350
  })();
10351
10351
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10352
10352
  exports.Hash160 = void 0;
10353
- var hash_1 = __nccwpck_require__(370);
10354
- var buffer_1 = __nccwpck_require__(9125);
10353
+ var hash_1 = __nccwpck_require__(9195);
10354
+ var buffer_1 = __nccwpck_require__(3365);
10355
10355
  /**
10356
10356
  * Hash with a width of 160 bits
10357
10357
  */
@@ -10374,7 +10374,7 @@ exports.Hash160 = Hash160;
10374
10374
 
10375
10375
  /***/ }),
10376
10376
 
10377
- /***/ 4564:
10377
+ /***/ 7378:
10378
10378
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10379
10379
 
10380
10380
  "use strict";
@@ -10394,8 +10394,8 @@ var __extends = (this && this.__extends) || (function () {
10394
10394
  })();
10395
10395
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10396
10396
  exports.Hash256 = void 0;
10397
- var hash_1 = __nccwpck_require__(370);
10398
- var buffer_1 = __nccwpck_require__(9125);
10397
+ var hash_1 = __nccwpck_require__(9195);
10398
+ var buffer_1 = __nccwpck_require__(3365);
10399
10399
  /**
10400
10400
  * Hash with a width of 256 bits
10401
10401
  */
@@ -10413,7 +10413,7 @@ exports.Hash256 = Hash256;
10413
10413
 
10414
10414
  /***/ }),
10415
10415
 
10416
- /***/ 370:
10416
+ /***/ 9195:
10417
10417
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10418
10418
 
10419
10419
  "use strict";
@@ -10433,8 +10433,8 @@ var __extends = (this && this.__extends) || (function () {
10433
10433
  })();
10434
10434
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10435
10435
  exports.Hash = void 0;
10436
- var serialized_type_1 = __nccwpck_require__(1334);
10437
- var buffer_1 = __nccwpck_require__(9125);
10436
+ var serialized_type_1 = __nccwpck_require__(2088);
10437
+ var buffer_1 = __nccwpck_require__(3365);
10438
10438
  /**
10439
10439
  * Base class defining how to encode and decode hashes
10440
10440
  */
@@ -10508,29 +10508,29 @@ exports.Hash = Hash;
10508
10508
 
10509
10509
  /***/ }),
10510
10510
 
10511
- /***/ 9028:
10511
+ /***/ 9898:
10512
10512
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
10513
10513
 
10514
10514
  "use strict";
10515
10515
 
10516
10516
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10517
10517
  exports.coreTypes = void 0;
10518
- var enums_1 = __nccwpck_require__(4281);
10519
- var account_id_1 = __nccwpck_require__(3222);
10520
- var amount_1 = __nccwpck_require__(4596);
10521
- var blob_1 = __nccwpck_require__(3138);
10522
- var currency_1 = __nccwpck_require__(9310);
10523
- var hash_128_1 = __nccwpck_require__(277);
10524
- var hash_160_1 = __nccwpck_require__(5611);
10525
- var hash_256_1 = __nccwpck_require__(4564);
10526
- var path_set_1 = __nccwpck_require__(1994);
10527
- var st_array_1 = __nccwpck_require__(8122);
10528
- var st_object_1 = __nccwpck_require__(9982);
10529
- var uint_16_1 = __nccwpck_require__(235);
10530
- var uint_32_1 = __nccwpck_require__(4073);
10531
- var uint_64_1 = __nccwpck_require__(2623);
10532
- var uint_8_1 = __nccwpck_require__(4333);
10533
- var vector_256_1 = __nccwpck_require__(3559);
10518
+ var enums_1 = __nccwpck_require__(7809);
10519
+ var account_id_1 = __nccwpck_require__(2880);
10520
+ var amount_1 = __nccwpck_require__(9513);
10521
+ var blob_1 = __nccwpck_require__(3796);
10522
+ var currency_1 = __nccwpck_require__(85);
10523
+ var hash_128_1 = __nccwpck_require__(3921);
10524
+ var hash_160_1 = __nccwpck_require__(9025);
10525
+ var hash_256_1 = __nccwpck_require__(7378);
10526
+ var path_set_1 = __nccwpck_require__(7545);
10527
+ var st_array_1 = __nccwpck_require__(7057);
10528
+ var st_object_1 = __nccwpck_require__(3890);
10529
+ var uint_16_1 = __nccwpck_require__(6067);
10530
+ var uint_32_1 = __nccwpck_require__(3808);
10531
+ var uint_64_1 = __nccwpck_require__(140);
10532
+ var uint_8_1 = __nccwpck_require__(5086);
10533
+ var vector_256_1 = __nccwpck_require__(7720);
10534
10534
  var coreTypes = {
10535
10535
  AccountID: account_id_1.AccountID,
10536
10536
  Amount: amount_1.Amount,
@@ -10559,7 +10559,7 @@ enums_1.Field['LedgerEntryType'].associatedType = enums_1.LedgerEntryType;
10559
10559
 
10560
10560
  /***/ }),
10561
10561
 
10562
- /***/ 1994:
10562
+ /***/ 7545:
10563
10563
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10564
10564
 
10565
10565
  "use strict";
@@ -10579,11 +10579,11 @@ var __extends = (this && this.__extends) || (function () {
10579
10579
  })();
10580
10580
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10581
10581
  exports.PathSet = void 0;
10582
- var account_id_1 = __nccwpck_require__(3222);
10583
- var currency_1 = __nccwpck_require__(9310);
10584
- var binary_parser_1 = __nccwpck_require__(7271);
10585
- var serialized_type_1 = __nccwpck_require__(1334);
10586
- var buffer_1 = __nccwpck_require__(9125);
10582
+ var account_id_1 = __nccwpck_require__(2880);
10583
+ var currency_1 = __nccwpck_require__(85);
10584
+ var binary_parser_1 = __nccwpck_require__(6055);
10585
+ var serialized_type_1 = __nccwpck_require__(2088);
10586
+ var buffer_1 = __nccwpck_require__(3365);
10587
10587
  /**
10588
10588
  * Constants for separating Paths in a PathSet
10589
10589
  */
@@ -10827,7 +10827,7 @@ exports.PathSet = PathSet;
10827
10827
 
10828
10828
  /***/ }),
10829
10829
 
10830
- /***/ 1334:
10830
+ /***/ 2088:
10831
10831
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10832
10832
 
10833
10833
  "use strict";
@@ -10847,8 +10847,8 @@ var __extends = (this && this.__extends) || (function () {
10847
10847
  })();
10848
10848
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10849
10849
  exports.Comparable = exports.SerializedType = void 0;
10850
- var binary_serializer_1 = __nccwpck_require__(2847);
10851
- var buffer_1 = __nccwpck_require__(9125);
10850
+ var binary_serializer_1 = __nccwpck_require__(5047);
10851
+ var buffer_1 = __nccwpck_require__(3365);
10852
10852
  /**
10853
10853
  * The base class for all binary-codec types
10854
10854
  */
@@ -10950,7 +10950,7 @@ exports.Comparable = Comparable;
10950
10950
 
10951
10951
  /***/ }),
10952
10952
 
10953
- /***/ 8122:
10953
+ /***/ 7057:
10954
10954
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10955
10955
 
10956
10956
  "use strict";
@@ -10970,10 +10970,10 @@ var __extends = (this && this.__extends) || (function () {
10970
10970
  })();
10971
10971
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10972
10972
  exports.STArray = void 0;
10973
- var serialized_type_1 = __nccwpck_require__(1334);
10974
- var st_object_1 = __nccwpck_require__(9982);
10975
- var binary_parser_1 = __nccwpck_require__(7271);
10976
- var buffer_1 = __nccwpck_require__(9125);
10973
+ var serialized_type_1 = __nccwpck_require__(2088);
10974
+ var st_object_1 = __nccwpck_require__(3890);
10975
+ var binary_parser_1 = __nccwpck_require__(6055);
10976
+ var buffer_1 = __nccwpck_require__(3365);
10977
10977
  var ARRAY_END_MARKER = buffer_1.Buffer.from([0xf1]);
10978
10978
  var ARRAY_END_MARKER_NAME = 'ArrayEndMarker';
10979
10979
  var OBJECT_END_MARKER = buffer_1.Buffer.from([0xe1]);
@@ -11055,7 +11055,7 @@ exports.STArray = STArray;
11055
11055
 
11056
11056
  /***/ }),
11057
11057
 
11058
- /***/ 9982:
11058
+ /***/ 3890:
11059
11059
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11060
11060
 
11061
11061
  "use strict";
@@ -11075,12 +11075,12 @@ var __extends = (this && this.__extends) || (function () {
11075
11075
  })();
11076
11076
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11077
11077
  exports.STObject = void 0;
11078
- var enums_1 = __nccwpck_require__(4281);
11079
- var serialized_type_1 = __nccwpck_require__(1334);
11078
+ var enums_1 = __nccwpck_require__(7809);
11079
+ var serialized_type_1 = __nccwpck_require__(2088);
11080
11080
  var ripple_address_codec_1 = __nccwpck_require__(597);
11081
- var binary_parser_1 = __nccwpck_require__(7271);
11082
- var binary_serializer_1 = __nccwpck_require__(2847);
11083
- var buffer_1 = __nccwpck_require__(9125);
11081
+ var binary_parser_1 = __nccwpck_require__(6055);
11082
+ var binary_serializer_1 = __nccwpck_require__(5047);
11083
+ var buffer_1 = __nccwpck_require__(3365);
11084
11084
  var OBJECT_END_MARKER_BYTE = buffer_1.Buffer.from([0xe1]);
11085
11085
  var OBJECT_END_MARKER = 'ObjectEndMarker';
11086
11086
  var ST_OBJECT = 'STObject';
@@ -11228,7 +11228,7 @@ exports.STObject = STObject;
11228
11228
 
11229
11229
  /***/ }),
11230
11230
 
11231
- /***/ 235:
11231
+ /***/ 6067:
11232
11232
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11233
11233
 
11234
11234
  "use strict";
@@ -11248,8 +11248,8 @@ var __extends = (this && this.__extends) || (function () {
11248
11248
  })();
11249
11249
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11250
11250
  exports.UInt16 = void 0;
11251
- var uint_1 = __nccwpck_require__(4722);
11252
- var buffer_1 = __nccwpck_require__(9125);
11251
+ var uint_1 = __nccwpck_require__(2810);
11252
+ var buffer_1 = __nccwpck_require__(3365);
11253
11253
  /**
11254
11254
  * Derived UInt class for serializing/deserializing 16 bit UInt
11255
11255
  */
@@ -11294,7 +11294,7 @@ exports.UInt16 = UInt16;
11294
11294
 
11295
11295
  /***/ }),
11296
11296
 
11297
- /***/ 4073:
11297
+ /***/ 3808:
11298
11298
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11299
11299
 
11300
11300
  "use strict";
@@ -11314,8 +11314,8 @@ var __extends = (this && this.__extends) || (function () {
11314
11314
  })();
11315
11315
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11316
11316
  exports.UInt32 = void 0;
11317
- var uint_1 = __nccwpck_require__(4722);
11318
- var buffer_1 = __nccwpck_require__(9125);
11317
+ var uint_1 = __nccwpck_require__(2810);
11318
+ var buffer_1 = __nccwpck_require__(3365);
11319
11319
  /**
11320
11320
  * Derived UInt class for serializing/deserializing 32 bit UInt
11321
11321
  */
@@ -11365,7 +11365,7 @@ exports.UInt32 = UInt32;
11365
11365
 
11366
11366
  /***/ }),
11367
11367
 
11368
- /***/ 2623:
11368
+ /***/ 140:
11369
11369
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11370
11370
 
11371
11371
  "use strict";
@@ -11385,10 +11385,10 @@ var __extends = (this && this.__extends) || (function () {
11385
11385
  })();
11386
11386
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11387
11387
  exports.UInt64 = void 0;
11388
- var uint_1 = __nccwpck_require__(4722);
11389
- var bigInt = __nccwpck_require__(912);
11390
- var big_integer_1 = __nccwpck_require__(912);
11391
- var buffer_1 = __nccwpck_require__(9125);
11388
+ var uint_1 = __nccwpck_require__(2810);
11389
+ var bigInt = __nccwpck_require__(4922);
11390
+ var big_integer_1 = __nccwpck_require__(4922);
11391
+ var buffer_1 = __nccwpck_require__(3365);
11392
11392
  var HEX_REGEX = /^[a-fA-F0-9]{1,16}$/;
11393
11393
  var mask = bigInt(0x00000000ffffffff);
11394
11394
  /**
@@ -11474,7 +11474,7 @@ exports.UInt64 = UInt64;
11474
11474
 
11475
11475
  /***/ }),
11476
11476
 
11477
- /***/ 4333:
11477
+ /***/ 5086:
11478
11478
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11479
11479
 
11480
11480
  "use strict";
@@ -11494,8 +11494,8 @@ var __extends = (this && this.__extends) || (function () {
11494
11494
  })();
11495
11495
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11496
11496
  exports.UInt8 = void 0;
11497
- var uint_1 = __nccwpck_require__(4722);
11498
- var buffer_1 = __nccwpck_require__(9125);
11497
+ var uint_1 = __nccwpck_require__(2810);
11498
+ var buffer_1 = __nccwpck_require__(3365);
11499
11499
  /**
11500
11500
  * Derived UInt class for serializing/deserializing 8 bit UInt
11501
11501
  */
@@ -11540,7 +11540,7 @@ exports.UInt8 = UInt8;
11540
11540
 
11541
11541
  /***/ }),
11542
11542
 
11543
- /***/ 4722:
11543
+ /***/ 2810:
11544
11544
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11545
11545
 
11546
11546
  "use strict";
@@ -11560,7 +11560,7 @@ var __extends = (this && this.__extends) || (function () {
11560
11560
  })();
11561
11561
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11562
11562
  exports.UInt = void 0;
11563
- var serialized_type_1 = __nccwpck_require__(1334);
11563
+ var serialized_type_1 = __nccwpck_require__(2088);
11564
11564
  /**
11565
11565
  * Compare numbers and bigInts n1 and n2
11566
11566
  *
@@ -11604,7 +11604,7 @@ exports.UInt = UInt;
11604
11604
 
11605
11605
  /***/ }),
11606
11606
 
11607
- /***/ 3559:
11607
+ /***/ 7720:
11608
11608
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11609
11609
 
11610
11610
  "use strict";
@@ -11624,9 +11624,9 @@ var __extends = (this && this.__extends) || (function () {
11624
11624
  })();
11625
11625
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11626
11626
  exports.Vector256 = void 0;
11627
- var serialized_type_1 = __nccwpck_require__(1334);
11628
- var hash_256_1 = __nccwpck_require__(4564);
11629
- var binary_serializer_1 = __nccwpck_require__(2847);
11627
+ var serialized_type_1 = __nccwpck_require__(2088);
11628
+ var hash_256_1 = __nccwpck_require__(7378);
11629
+ var binary_serializer_1 = __nccwpck_require__(5047);
11630
11630
  /**
11631
11631
  * TypeGuard for Array<string>
11632
11632
  */
@@ -11701,21 +11701,22 @@ exports.Vector256 = Vector256;
11701
11701
 
11702
11702
  /***/ }),
11703
11703
 
11704
- /***/ 8958:
11704
+ /***/ 6263:
11705
11705
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
11706
11706
 
11707
11707
  const codec = __nccwpck_require__(597);
11708
11708
  const { Buffer } = __nccwpck_require__(4300);
11709
- const { XrplApi } = __nccwpck_require__(5941);
11710
- const { XrplAccount } = __nccwpck_require__(6962);
11711
- const { XrplApiEvents } = __nccwpck_require__(884);
11712
- const { EvernodeEvents, MemoTypes, MemoFormats, EvernodeConstants, HookStateKeys } = __nccwpck_require__(5716);
11713
- const { DefaultValues } = __nccwpck_require__(7360);
11714
- const { EncryptionHelper } = __nccwpck_require__(1247);
11715
- const { EventEmitter } = __nccwpck_require__(1528);
11716
- const { UtilHelpers } = __nccwpck_require__(4954);
11717
- const { FirestoreHandler } = __nccwpck_require__(2092);
11718
- const { XflHelpers } = __nccwpck_require__(9281);
11709
+ const { XrplApi } = __nccwpck_require__(1850);
11710
+ const { XrplAccount } = __nccwpck_require__(9329);
11711
+ const { XrplApiEvents } = __nccwpck_require__(3307);
11712
+ const { EvernodeEvents, MemoTypes, MemoFormats, EvernodeConstants, HookStateKeys } = __nccwpck_require__(9849);
11713
+ const { DefaultValues } = __nccwpck_require__(8262);
11714
+ const { EncryptionHelper } = __nccwpck_require__(4832);
11715
+ const { EventEmitter } = __nccwpck_require__(6170);
11716
+ const { UtilHelpers } = __nccwpck_require__(6687);
11717
+ const { FirestoreHandler } = __nccwpck_require__(9718);
11718
+ const { XflHelpers } = __nccwpck_require__(3243);
11719
+ const { StateHelpers } = __nccwpck_require__(3860);
11719
11720
 
11720
11721
  class BaseEvernodeClient {
11721
11722
 
@@ -11800,27 +11801,13 @@ class BaseEvernodeClient {
11800
11801
  return '0';
11801
11802
  }
11802
11803
 
11803
- async getHosts(filters = null, pageSize = null, nextPageToken = null) {
11804
- const hosts = await this.#firestoreHandler.getHosts(filters, pageSize, nextPageToken);
11805
- const curMomentStartIdx = await this.getMomentStartIndex();
11806
- // Populate the host active status.
11807
- (hosts.nextPageToken ? hosts.data : hosts).forEach(h => {
11808
- h.active = (h.lastHeartbeatLedger > (this.config.hostHeartbeatFreq * this.config.momentSize) ?
11809
- (h.lastHeartbeatLedger >= (curMomentStartIdx - (this.config.hostHeartbeatFreq * this.config.momentSize))) :
11810
- (h.lastHeartbeatLedger > 0))
11811
- });
11812
- return hosts;
11813
- }
11814
-
11815
11804
  async getHookStates() {
11816
11805
  const regAcc = new XrplAccount(this.registryAddress, null, { xrplApi: this.xrplApi });
11817
- const hookNamespaces = (await regAcc.getInfo())?.HookNamespaces;
11818
- if (hookNamespaces) {
11819
- const configs = await regAcc.getNamespaceEntries(hookNamespaces[0]);
11806
+ const configs = await regAcc.getNamespaceEntries(EvernodeConstants.HOOK_NAMESPACE);
11807
+
11808
+ if (configs)
11820
11809
  return configs.filter(c => c.LedgerEntryType === 'HookState').map(c => { return { key: c.HookStateKey, data: c.HookStateData } });
11821
- }
11822
11810
  return [];
11823
-
11824
11811
  }
11825
11812
 
11826
11813
  async getMoment(ledgerIndex = null) {
@@ -12071,6 +12058,77 @@ class BaseEvernodeClient {
12071
12058
 
12072
12059
  return null;
12073
12060
  }
12061
+
12062
+ // To get Host details from Hook States.
12063
+ async getHostInfo(hostAddress = this.xrplAcc.address) {
12064
+ const hostAddrStatekey = StateHelpers.generateHostAddrStateKey(hostAddress);
12065
+ const stateLedgerIndex = StateHelpers.getHookStateIndex(this.registryAddress, hostAddrStatekey);
12066
+ const ledgerEntry = await this.xrplApi.getLedgerEntry(stateLedgerIndex);
12067
+ const curMomentStartIdx = await this.getMomentStartIndex();
12068
+ if (ledgerEntry?.HookStateData) {
12069
+ const hostAddrStateData = ledgerEntry.HookStateData;
12070
+ const hostInfo = StateHelpers.decodeHostAddressState(Buffer.from(hostAddrStatekey, 'hex'), Buffer.from(hostAddrStateData, 'hex'));
12071
+ hostInfo.active = (hostInfo.lastHeartbeatLedger > (this.config.hostHeartbeatFreq * this.config.momentSize) ?
12072
+ (hostInfo.lastHeartbeatLedger >= (curMomentStartIdx - (this.config.hostHeartbeatFreq * this.config.momentSize))) :
12073
+ (hostInfo.lastHeartbeatLedger > 0))
12074
+ return hostInfo;
12075
+ }
12076
+
12077
+ return null;
12078
+ }
12079
+
12080
+ // To fetch records from host collection in Firestore database. (Pagination is applied - default page size :20)
12081
+ async getHosts(filters = null, pageSize = null, nextPageToken = null) {
12082
+ const hosts = await this.#firestoreHandler.getHosts(filters, pageSize, nextPageToken);
12083
+ const curMomentStartIdx = await this.getMomentStartIndex();
12084
+ // Populate the host active status.
12085
+ (hosts.nextPageToken ? hosts.data : hosts).forEach(h => {
12086
+ h.active = (h.lastHeartbeatLedger > (this.config.hostHeartbeatFreq * this.config.momentSize) ?
12087
+ (h.lastHeartbeatLedger >= (curMomentStartIdx - (this.config.hostHeartbeatFreq * this.config.momentSize))) :
12088
+ (h.lastHeartbeatLedger > 0))
12089
+ });
12090
+ return hosts;
12091
+ }
12092
+
12093
+ // To fetch all records from config collection in Firestore database.
12094
+ async getAllConfigs() {
12095
+ let fullConfigList = [];
12096
+ const configs = await this.#firestoreHandler.getConfigs();
12097
+ if (configs.nextPageToken) {
12098
+ let currentPageToken = configs.nextPageToken;
12099
+ let nextConfigs = null;
12100
+ fullConfigList = fullConfigList.concat(configs.data);
12101
+ while (currentPageToken) {
12102
+ nextConfigs = await this.#firestoreHandler.getConfigs(null, 50, currentPageToken);
12103
+ fullConfigList = fullConfigList.concat(nextConfigs.nextPageToken ? nextConfigs.data : nextConfigs);
12104
+ currentPageToken = nextConfigs.nextPageToken;
12105
+ }
12106
+ } else {
12107
+ fullConfigList = fullConfigList.concat(configs);
12108
+ }
12109
+
12110
+ return fullConfigList;
12111
+ }
12112
+
12113
+ // To fetch all records from host collection in Firestore database.
12114
+ async getAllHosts() {
12115
+ let fullHostList = [];
12116
+ const hosts = await this.#firestoreHandler.getHosts();
12117
+ if (hosts.nextPageToken) {
12118
+ let currentPageToken = hosts.nextPageToken;
12119
+ let nextHosts = null;
12120
+ fullHostList = fullHostList.concat(hosts.data);
12121
+ while (currentPageToken) {
12122
+ nextHosts = await this.#firestoreHandler.getHosts(null, 50, currentPageToken);
12123
+ fullHostList = fullHostList.concat(nextHosts.nextPageToken ? nextHosts.data : nextHosts);
12124
+ currentPageToken = nextHosts.nextPageToken;
12125
+ }
12126
+ } else {
12127
+ fullHostList = fullHostList.concat(hosts);
12128
+ }
12129
+
12130
+ return fullHostList;
12131
+ }
12074
12132
  }
12075
12133
 
12076
12134
  module.exports = {
@@ -12079,17 +12137,18 @@ module.exports = {
12079
12137
 
12080
12138
  /***/ }),
12081
12139
 
12082
- /***/ 1091:
12140
+ /***/ 1437:
12083
12141
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
12084
12142
 
12085
- const { XrplConstants } = __nccwpck_require__(884);
12086
- const { BaseEvernodeClient } = __nccwpck_require__(8958);
12087
- const { EvernodeEvents, EvernodeConstants, MemoFormats, MemoTypes, ErrorCodes } = __nccwpck_require__(5716);
12088
- const { XrplAccount } = __nccwpck_require__(6962);
12089
- const { EncryptionHelper } = __nccwpck_require__(1247);
12143
+ const { XrplConstants } = __nccwpck_require__(3307);
12144
+ const { BaseEvernodeClient } = __nccwpck_require__(6263);
12145
+ const { EvernodeEvents, EvernodeConstants, MemoFormats, MemoTypes, ErrorCodes } = __nccwpck_require__(9849);
12146
+ const { XrplAccount } = __nccwpck_require__(9329);
12147
+ const { EncryptionHelper } = __nccwpck_require__(4832);
12090
12148
  const { Buffer } = __nccwpck_require__(4300);
12091
12149
  const codec = __nccwpck_require__(597);
12092
- const { XflHelpers } = __nccwpck_require__(9281);
12150
+ const { XflHelpers } = __nccwpck_require__(3243);
12151
+ const { EvernodeHelpers } = __nccwpck_require__(2523);
12093
12152
 
12094
12153
  const OFFER_WAIT_TIMEOUT = 60;
12095
12154
 
@@ -12123,14 +12182,17 @@ class HostClient extends BaseEvernodeClient {
12123
12182
  // Check whether we own an evernode host token.
12124
12183
  const nft = await this.getRegistrationNft();
12125
12184
  if (nft) {
12126
- const host = await this.getHosts({ nfTokenId: nft.NFTokenID });
12127
- if (host && host.length == 1)
12128
- return host[0];
12185
+ const host = await this.getHostInfo();
12186
+ return (host?.nfTokenId == nft.NFTokenID) ? host : null;
12129
12187
  }
12130
12188
 
12131
12189
  return null;
12132
12190
  }
12133
12191
 
12192
+ async getLeaseOffers() {
12193
+ return await EvernodeHelpers.getLeaseOffers(this.xrplAcc);
12194
+ }
12195
+
12134
12196
  async cancelOffer(offerIndex) {
12135
12197
  return this.xrplAcc.cancelOffer(offerIndex);
12136
12198
  }
@@ -12220,10 +12282,10 @@ class HostClient extends BaseEvernodeClient {
12220
12282
  // from the client-side in order to complete the registration.
12221
12283
  const regNft = await this.getRegistrationNft();
12222
12284
  if (!regNft) {
12223
- const regInfo = await this.getHosts({ address: this.xrplAcc.address });
12224
- if (regInfo.length !== 0) {
12285
+ const regInfo = await this.getHostInfo(this.xrplAcc.address);
12286
+ if (regInfo) {
12225
12287
  const registryAcc = new XrplAccount(this.registryAddress, null, { xrplApi: this.xrplApi });
12226
- const sellOffer = (await registryAcc.getNftOffers()).find(o => o.NFTokenID == regInfo[0].nfTokenId);
12288
+ const sellOffer = (await registryAcc.getNftOffers()).find(o => o.NFTokenID == regInfo.nfTokenId);
12227
12289
  if (sellOffer) {
12228
12290
  await this.xrplAcc.buyNft(sellOffer.index);
12229
12291
  console.log("Registration was successfully completed after acquiring the NFT.");
@@ -12408,6 +12470,27 @@ class HostClient extends BaseEvernodeClient {
12408
12470
  memos,
12409
12471
  options.transactionOptions);
12410
12472
  }
12473
+
12474
+ async refundTenant(txHash, tenantAddress, refundAmount, options = {}) {
12475
+ const memos = [
12476
+ { type: MemoTypes.REFUND, format: '', data: '' },
12477
+ { type: MemoTypes.REFUND_REF, format: MemoFormats.HEX, data: txHash }];
12478
+
12479
+ return this.xrplAcc.makePayment(tenantAddress,
12480
+ refundAmount.toString(),
12481
+ EvernodeConstants.EVR,
12482
+ this.config.evrIssuerAddress,
12483
+ memos,
12484
+ options.transactionOptions);
12485
+ }
12486
+
12487
+ getLeaseNFTokenIdPrefix() {
12488
+ let buf = Buffer.allocUnsafe(24);
12489
+ buf.writeUInt16BE(1);
12490
+ buf.writeUInt16BE(0, 2);
12491
+ codec.decodeAccountID(this.xrplAcc.address).copy(buf, 4);
12492
+ return buf.toString('hex');
12493
+ }
12411
12494
  }
12412
12495
 
12413
12496
  module.exports = {
@@ -12417,12 +12500,12 @@ module.exports = {
12417
12500
 
12418
12501
  /***/ }),
12419
12502
 
12420
- /***/ 6949:
12503
+ /***/ 5898:
12421
12504
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
12422
12505
 
12423
- const { EvernodeEvents } = __nccwpck_require__(5716);
12424
- const { BaseEvernodeClient } = __nccwpck_require__(8958);
12425
- const { DefaultValues } = __nccwpck_require__(7360);
12506
+ const { EvernodeEvents } = __nccwpck_require__(9849);
12507
+ const { BaseEvernodeClient } = __nccwpck_require__(6263);
12508
+ const { DefaultValues } = __nccwpck_require__(8262);
12426
12509
 
12427
12510
  const RegistryEvents = {
12428
12511
  HostRegistered: EvernodeEvents.HostRegistered,
@@ -12449,7 +12532,7 @@ class RegistryClient extends BaseEvernodeClient {
12449
12532
  while (currentPageToken) {
12450
12533
  nextHosts = await this.getHosts(null, null, currentPageToken);
12451
12534
  fullHostList = fullHostList.concat(nextHosts.nextPageToken ? nextHosts.data : nextHosts);
12452
- currentPageToken = nextHosts.nextPageToken;
12535
+ currentPageToken = nextHosts.nextPageToken;
12453
12536
  }
12454
12537
  } else {
12455
12538
  fullHostList = fullHostList.concat(hosts);
@@ -12466,17 +12549,18 @@ module.exports = {
12466
12549
 
12467
12550
  /***/ }),
12468
12551
 
12469
- /***/ 9426:
12552
+ /***/ 6449:
12470
12553
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
12471
12554
 
12472
- const { BaseEvernodeClient } = __nccwpck_require__(8958);
12473
- const { EvernodeEvents, MemoFormats, MemoTypes, ErrorCodes, ErrorReasons, EvernodeConstants } = __nccwpck_require__(5716);
12474
- const { EventEmitter } = __nccwpck_require__(1528);
12475
- const { EncryptionHelper } = __nccwpck_require__(1247);
12476
- const { XrplAccount } = __nccwpck_require__(6962);
12477
- const { UtilHelpers } = __nccwpck_require__(4954);
12555
+ const { BaseEvernodeClient } = __nccwpck_require__(6263);
12556
+ const { EvernodeEvents, MemoFormats, MemoTypes, ErrorCodes, ErrorReasons, EvernodeConstants } = __nccwpck_require__(9849);
12557
+ const { EventEmitter } = __nccwpck_require__(6170);
12558
+ const { EncryptionHelper } = __nccwpck_require__(4832);
12559
+ const { XrplAccount } = __nccwpck_require__(9329);
12560
+ const { UtilHelpers } = __nccwpck_require__(6687);
12478
12561
  const { Buffer } = __nccwpck_require__(4300);
12479
12562
  const codec = __nccwpck_require__(597);
12563
+ const { EvernodeHelpers } = __nccwpck_require__(2523);
12480
12564
 
12481
12565
  const ACQUIRE_WATCH_PREFIX = 'acquire_';
12482
12566
  const EXTEND_WATCH_PREFIX = 'extend_';
@@ -12536,35 +12620,40 @@ class TenantClient extends BaseEvernodeClient {
12536
12620
  throw { reason: ErrorReasons.HOST_INVALID, error: "Host is not registered." };
12537
12621
 
12538
12622
  // Check whether active.
12539
- const hosts = await this.getHosts({ address: host.address });
12540
- if (!hosts || !hosts.length)
12623
+ const hostInfo = await this.getHostInfo(host.address);
12624
+ if (hostInfo)
12541
12625
  throw { reason: ErrorReasons.HOST_INVALID, error: "Host is not registered." };
12542
- else if (!hosts[0].active)
12626
+ else if (hostInfo.active)
12543
12627
  throw { reason: ErrorReasons.HOST_INACTIVE, error: "Host is not active." };
12544
12628
 
12545
12629
  return host;
12546
12630
  }
12547
12631
 
12548
12632
  async acquireLeaseSubmit(hostAddress, requirement, options = {}) {
12549
- const host = await this.getLeaseHost(hostAddress);
12550
- const hostNfts = (await host.getNfts()).filter(nft => nft.URI.startsWith(EvernodeConstants.LEASE_NFT_PREFIX_HEX));
12551
- const hostTokenIDs = hostNfts.map(nft => nft.NFTokenID);
12552
- const nftOffers = (await host.getNftOffers())?.filter(offer => (offer.Flags == 1 && hostTokenIDs.includes(offer.NFTokenID))); // Filter only sell offers
12553
-
12554
- // Accept the offer.
12555
- if (nftOffers && nftOffers.length > 0) {
12556
- // Encrypt the requirements with the host's encryption key (Specified in MessageKey field of the host account).
12557
- const encKey = await host.getMessageKey();
12558
- if (!encKey)
12559
- throw { reason: ErrorReasons.INTERNAL_ERR, error: "Host encryption key not set." };
12560
-
12561
- const ecrypted = await EncryptionHelper.encrypt(encKey, requirement, {
12562
- iv: options.iv, // Must be null or 16 bytes.
12563
- ephemPrivateKey: options.ephemPrivateKey // Must be null or 32 bytes.
12564
- });
12565
- return this.xrplAcc.buyNft(nftOffers[0].index, [{ type: MemoTypes.ACQUIRE_LEASE, format: MemoFormats.BASE64, data: ecrypted }], options.transactionOptions);
12566
- } else
12567
- throw { reason: ErrorReasons.NO_OFFER, error: "No offers available." };
12633
+
12634
+ const hostAcc = await this.getLeaseHost(hostAddress);
12635
+ let selectedOfferIndex = options.leaseOfferIndex;
12636
+
12637
+ // Attempt to get first available offer, if offer is not specified in options.
12638
+ if (!selectedOfferIndex) {
12639
+ const nftOffers = await EvernodeHelpers.getLeaseOffers(hostAcc);
12640
+ selectedOfferIndex = nftOffers && nftOffers[0] && nftOffers[0].index;
12641
+
12642
+ if (!selectedOfferIndex)
12643
+ throw { reason: ErrorReasons.NO_OFFER, error: "No offers available." };
12644
+ }
12645
+
12646
+ // Encrypt the requirements with the host's encryption key (Specified in MessageKey field of the host account).
12647
+ const encKey = await hostAcc.getMessageKey();
12648
+ if (!encKey)
12649
+ throw { reason: ErrorReasons.INTERNAL_ERR, error: "Host encryption key not set." };
12650
+
12651
+ const ecrypted = await EncryptionHelper.encrypt(encKey, requirement, {
12652
+ iv: options.iv, // Must be null or 16 bytes.
12653
+ ephemPrivateKey: options.ephemPrivateKey // Must be null or 32 bytes.
12654
+ });
12655
+
12656
+ return this.xrplAcc.buyNft(selectedOfferIndex, [{ type: MemoTypes.ACQUIRE_LEASE, format: MemoFormats.BASE64, data: ecrypted }], options.transactionOptions);
12568
12657
  }
12569
12658
 
12570
12659
  watchAcquireResponse(tx, options = {}) {
@@ -12674,11 +12763,11 @@ module.exports = {
12674
12763
 
12675
12764
  /***/ }),
12676
12765
 
12677
- /***/ 7360:
12766
+ /***/ 8262:
12678
12767
  /***/ ((module) => {
12679
12768
 
12680
12769
  const DefaultValues = {
12681
- registryAddress: 'rDPqJv7zu6DfeXexAYseABNM2hT2j2rpHv',
12770
+ registryAddress: 'raaFre81618XegCrzTzVotAmarBcqNSAvK',
12682
12771
  rippledServer: 'wss://hooks-testnet-v2.xrpl-labs.com',
12683
12772
  xrplApi: null,
12684
12773
  stateIndexId: 'evernodeindex'
@@ -12701,7 +12790,7 @@ module.exports = {
12701
12790
 
12702
12791
  /***/ }),
12703
12792
 
12704
- /***/ 4579:
12793
+ /***/ 4776:
12705
12794
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
12706
12795
 
12707
12796
  // Code taken from https://github.com/bitchan/eccrypto/blob/master/browser.js
@@ -12965,10 +13054,10 @@ exports.decrypt = function (privateKey, opts) {
12965
13054
 
12966
13055
  /***/ }),
12967
13056
 
12968
- /***/ 1247:
13057
+ /***/ 4832:
12969
13058
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
12970
13059
 
12971
- const eccrypto = __nccwpck_require__(4579) // Using local copy of the eccrypto code file.
13060
+ const eccrypto = __nccwpck_require__(4776) // Using local copy of the eccrypto code file.
12972
13061
 
12973
13062
  class EncryptionHelper {
12974
13063
  // Offsets of the properties in the encrypted buffer.
@@ -13012,7 +13101,7 @@ module.exports = {
13012
13101
 
13013
13102
  /***/ }),
13014
13103
 
13015
- /***/ 1528:
13104
+ /***/ 6170:
13016
13105
  /***/ ((module) => {
13017
13106
 
13018
13107
  class EventEmitter {
@@ -13063,13 +13152,14 @@ module.exports = {
13063
13152
 
13064
13153
  /***/ }),
13065
13154
 
13066
- /***/ 5716:
13155
+ /***/ 9849:
13067
13156
  /***/ ((module) => {
13068
13157
 
13069
13158
  const EvernodeConstants = {
13070
13159
  EVR: 'EVR',
13071
13160
  NFT_PREFIX_HEX: '657672686F7374', // evrhost
13072
- LEASE_NFT_PREFIX_HEX: '6576726C65617365' // evrlease
13161
+ LEASE_NFT_PREFIX_HEX: '6576726C65617365', // evrlease
13162
+ HOOK_NAMESPACE: '01EAF09326B4911554384121FF56FA8FECC215FDDE2EC35D9E59F2C53EC665A0'
13073
13163
  }
13074
13164
 
13075
13165
  const MemoTypes = {
@@ -13086,7 +13176,9 @@ const MemoTypes = {
13086
13176
  EXTEND_SUCCESS: 'evnExtendSuccess',
13087
13177
  EXTEND_ERROR: 'evnExtendError',
13088
13178
  EXTEND_REF: 'evnExtendRef',
13089
- REGISTRY_INIT: 'evnInitialize'
13179
+ REGISTRY_INIT: 'evnInitialize',
13180
+ REFUND: 'evnRefund',
13181
+ REFUND_REF: 'evnRefundRef'
13090
13182
  }
13091
13183
 
13092
13184
  const MemoFormats = {
@@ -13163,11 +13255,31 @@ module.exports = {
13163
13255
 
13164
13256
  /***/ }),
13165
13257
 
13166
- /***/ 2092:
13258
+ /***/ 2523:
13259
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13260
+
13261
+ const { EvernodeConstants } = __nccwpck_require__(9849);
13262
+
13263
+ class EvernodeHelpers {
13264
+ static async getLeaseOffers(xrplAcc) {
13265
+ const hostNfts = (await xrplAcc.getNfts()).filter(nft => nft.URI.startsWith(EvernodeConstants.LEASE_NFT_PREFIX_HEX));
13266
+ const hostTokenIDs = hostNfts.map(nft => nft.NFTokenID);
13267
+ const nftOffers = (await xrplAcc.getNftOffers())?.filter(offer => (offer.Flags == 1 && hostTokenIDs.includes(offer.NFTokenID))); // Filter only sell offers
13268
+ return nftOffers;
13269
+ }
13270
+ }
13271
+
13272
+ module.exports = {
13273
+ EvernodeHelpers
13274
+ }
13275
+
13276
+ /***/ }),
13277
+
13278
+ /***/ 9718:
13167
13279
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13168
13280
 
13169
13281
  const https = __nccwpck_require__(5687);
13170
- const { DefaultValues } = __nccwpck_require__(7360);
13282
+ const { DefaultValues } = __nccwpck_require__(8262);
13171
13283
 
13172
13284
  const FirestoreOperations = {
13173
13285
  EQUAL: 'EQUAL',
@@ -13448,21 +13560,21 @@ module.exports = {
13448
13560
 
13449
13561
  /***/ }),
13450
13562
 
13451
- /***/ 3364:
13563
+ /***/ 5053:
13452
13564
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13453
13565
 
13454
- const { Defaults } = __nccwpck_require__(7360);
13455
- const { RegistryClient, RegistryEvents } = __nccwpck_require__(6949);
13456
- const { TenantClient, TenantEvents } = __nccwpck_require__(9426);
13457
- const { HostClient, HostEvents } = __nccwpck_require__(1091);
13458
- const { XrplApi } = __nccwpck_require__(5941);
13459
- const { XrplApiEvents, XrplConstants } = __nccwpck_require__(884);
13460
- const { XrplAccount } = __nccwpck_require__(6962);
13461
- const { EvernodeConstants, HookStateKeys, MemoTypes } = __nccwpck_require__(5716);
13462
- const { XflHelpers } = __nccwpck_require__(9281);
13463
- const { FirestoreHandler } = __nccwpck_require__(2092);
13464
- const { StateHelpers } = __nccwpck_require__(8844);
13465
- const { UtilHelpers } = __nccwpck_require__(4954);
13566
+ const { Defaults } = __nccwpck_require__(8262);
13567
+ const { RegistryClient, RegistryEvents } = __nccwpck_require__(5898);
13568
+ const { TenantClient, TenantEvents } = __nccwpck_require__(6449);
13569
+ const { HostClient, HostEvents } = __nccwpck_require__(1437);
13570
+ const { XrplApi } = __nccwpck_require__(1850);
13571
+ const { XrplApiEvents, XrplConstants } = __nccwpck_require__(3307);
13572
+ const { XrplAccount } = __nccwpck_require__(9329);
13573
+ const { EvernodeConstants, HookStateKeys, MemoTypes } = __nccwpck_require__(9849);
13574
+ const { XflHelpers } = __nccwpck_require__(3243);
13575
+ const { FirestoreHandler } = __nccwpck_require__(9718);
13576
+ const { StateHelpers } = __nccwpck_require__(3860);
13577
+ const { UtilHelpers } = __nccwpck_require__(6687);
13466
13578
 
13467
13579
  module.exports = {
13468
13580
  RegistryClient,
@@ -13487,13 +13599,14 @@ module.exports = {
13487
13599
 
13488
13600
  /***/ }),
13489
13601
 
13490
- /***/ 8844:
13602
+ /***/ 3860:
13491
13603
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13492
13604
 
13493
13605
  const codec = __nccwpck_require__(597);
13494
13606
  const { Buffer } = __nccwpck_require__(4300);
13495
- const { HookStateKeys } = __nccwpck_require__(5716);
13496
- const { XflHelpers } = __nccwpck_require__(9281);
13607
+ const { HookStateKeys, EvernodeConstants } = __nccwpck_require__(9849);
13608
+ const { XflHelpers } = __nccwpck_require__(3243);
13609
+ const crypto = __nccwpck_require__(6113);
13497
13610
 
13498
13611
  const NFTOKEN_PREFIX = '00080000';
13499
13612
 
@@ -13523,6 +13636,7 @@ const STATE_KEY_TYPES = {
13523
13636
 
13524
13637
  const EVERNODE_PREFIX = 'EVR';
13525
13638
  const HOST_ADDR_KEY_ZERO_COUNT = 8;
13639
+ const HOOK_STATE_LEDGER_TYPE_PREFIX = 118; // Decimal value of ASCII 'v'
13526
13640
 
13527
13641
  class StateHelpers {
13528
13642
  static StateTypes = {
@@ -13700,6 +13814,26 @@ class StateHelpers {
13700
13814
  const stateKeyBuf = Buffer.concat([Buffer.from(EVERNODE_PREFIX, "utf-8"), buf, addrBuf]);
13701
13815
  return stateKeyBuf.toString('hex').toUpperCase();
13702
13816
  }
13817
+
13818
+ static getHookStateIndex(hookAccount, stateKey, hookNamespace = EvernodeConstants.HOOK_NAMESPACE) {
13819
+ const typeBuf = Buffer.allocUnsafe(2);
13820
+ typeBuf.writeInt16BE(HOOK_STATE_LEDGER_TYPE_PREFIX);
13821
+
13822
+ const accIdBuf = codec.decodeAccountID(hookAccount);
13823
+ const stateKeyBuf = Buffer.from(stateKey, 'hex');
13824
+ const namespaceBuf = Buffer.from(hookNamespace, 'hex');
13825
+
13826
+ let hash = crypto.createHash('sha512');
13827
+
13828
+ let data = hash.update(typeBuf);
13829
+ data = hash.update(accIdBuf);
13830
+ data = hash.update(stateKeyBuf);
13831
+ data = hash.update(namespaceBuf);
13832
+
13833
+ const digest = data.digest('hex');
13834
+ // Get the first 32 bytes of hash.
13835
+ return digest.substring(0, 64).toUpperCase();
13836
+ }
13703
13837
  }
13704
13838
 
13705
13839
  module.exports = {
@@ -13708,10 +13842,10 @@ module.exports = {
13708
13842
 
13709
13843
  /***/ }),
13710
13844
 
13711
- /***/ 9777:
13845
+ /***/ 7071:
13712
13846
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13713
13847
 
13714
- const { MemoFormats } = __nccwpck_require__(5716);
13848
+ const { MemoFormats } = __nccwpck_require__(9849);
13715
13849
 
13716
13850
  class TransactionHelper {
13717
13851
 
@@ -13776,12 +13910,12 @@ module.exports = {
13776
13910
 
13777
13911
  /***/ }),
13778
13912
 
13779
- /***/ 4954:
13913
+ /***/ 6687:
13780
13914
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13781
13915
 
13782
13916
  const { Buffer } = __nccwpck_require__(4300);
13783
- const { XflHelpers } = __nccwpck_require__(9281);
13784
- const { EvernodeConstants, ErrorReasons } = __nccwpck_require__(5716);
13917
+ const { XflHelpers } = __nccwpck_require__(3243);
13918
+ const { EvernodeConstants, ErrorReasons } = __nccwpck_require__(9849);
13785
13919
 
13786
13920
  // Utility helper functions.
13787
13921
  class UtilHelpers {
@@ -13830,7 +13964,7 @@ module.exports = {
13830
13964
 
13831
13965
  /***/ }),
13832
13966
 
13833
- /***/ 9281:
13967
+ /***/ 3243:
13834
13968
  /***/ ((module) => {
13835
13969
 
13836
13970
  const minMantissa = 1000000000000000n
@@ -13966,18 +14100,18 @@ module.exports = {
13966
14100
 
13967
14101
  /***/ }),
13968
14102
 
13969
- /***/ 6962:
14103
+ /***/ 9329:
13970
14104
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13971
14105
 
13972
14106
  const xrpl = __nccwpck_require__(4666);
13973
14107
  const kp = __nccwpck_require__(8150);
13974
14108
  const codec = __nccwpck_require__(597);
13975
14109
  const crypto = __nccwpck_require__(6113);
13976
- const { XrplConstants } = __nccwpck_require__(884);
13977
- const { TransactionHelper } = __nccwpck_require__(9777);
13978
- const { EventEmitter } = __nccwpck_require__(1528);
13979
- const { DefaultValues } = __nccwpck_require__(7360);
13980
- const xrplCodec = __nccwpck_require__(3511);
14110
+ const { XrplConstants } = __nccwpck_require__(3307);
14111
+ const { TransactionHelper } = __nccwpck_require__(7071);
14112
+ const { EventEmitter } = __nccwpck_require__(6170);
14113
+ const { DefaultValues } = __nccwpck_require__(8262);
14114
+ const xrplCodec = __nccwpck_require__(1269);
13981
14115
 
13982
14116
  class XrplAccount {
13983
14117
 
@@ -14442,15 +14576,15 @@ module.exports = {
14442
14576
 
14443
14577
  /***/ }),
14444
14578
 
14445
- /***/ 5941:
14579
+ /***/ 1850:
14446
14580
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
14447
14581
 
14448
14582
  const xrpl = __nccwpck_require__(4666);
14449
14583
  const kp = __nccwpck_require__(8150);
14450
- const { EventEmitter } = __nccwpck_require__(1528);
14451
- const { DefaultValues } = __nccwpck_require__(7360);
14452
- const { TransactionHelper } = __nccwpck_require__(9777);
14453
- const { XrplApiEvents } = __nccwpck_require__(884);
14584
+ const { EventEmitter } = __nccwpck_require__(6170);
14585
+ const { DefaultValues } = __nccwpck_require__(8262);
14586
+ const { TransactionHelper } = __nccwpck_require__(7071);
14587
+ const { XrplApiEvents } = __nccwpck_require__(3307);
14454
14588
 
14455
14589
  class XrplApi {
14456
14590
 
@@ -14662,6 +14796,11 @@ class XrplApi {
14662
14796
  return [];
14663
14797
  }
14664
14798
 
14799
+ async getLedgerEntry(index, options) {
14800
+ const resp = (await this.#client.request({ command: 'ledger_entry', index: index, ledger_index: "validated", ...options }));
14801
+ return resp?.result?.node;
14802
+ }
14803
+
14665
14804
  async submitAndVerify(tx, options) {
14666
14805
  return await this.#client.submitAndWait(tx, options);
14667
14806
  }
@@ -14696,7 +14835,7 @@ module.exports = {
14696
14835
 
14697
14836
  /***/ }),
14698
14837
 
14699
- /***/ 884:
14838
+ /***/ 3307:
14700
14839
  /***/ ((module) => {
14701
14840
 
14702
14841
  const XrplApiEvents = {
@@ -14845,7 +14984,7 @@ module.exports = JSON.parse('{"TYPES":{"Done":-1,"Unknown":-2,"NotPresent":0,"UI
14845
14984
  /******/ // startup
14846
14985
  /******/ // Load entry module and return exports
14847
14986
  /******/ // This entry module is referenced by other modules so it can't be inlined
14848
- /******/ var __webpack_exports__ = __nccwpck_require__(3364);
14987
+ /******/ var __webpack_exports__ = __nccwpck_require__(5053);
14849
14988
  /******/ module.exports = __webpack_exports__;
14850
14989
  /******/
14851
14990
  /******/ })()