@bithomp/xrpl-api 3.0.7 → 3.0.9

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 (112) hide show
  1. package/lib/base58.d.ts +0 -1
  2. package/lib/base58.js +2 -3
  3. package/lib/client.js +6 -6
  4. package/lib/common/utils.js +9 -10
  5. package/lib/connection.d.ts +0 -1
  6. package/lib/faucet.js +5 -5
  7. package/lib/ledger/account_info.js +3 -4
  8. package/lib/ledger/account_lines.js +1 -2
  9. package/lib/ledger/account_namespace.js +1 -2
  10. package/lib/ledger/account_nfts.js +4 -5
  11. package/lib/ledger/account_objects.js +5 -6
  12. package/lib/ledger/account_offers.js +2 -3
  13. package/lib/ledger/account_tx.js +2 -3
  14. package/lib/ledger/amm_info.js +2 -3
  15. package/lib/ledger/book_offers.js +2 -3
  16. package/lib/ledger/currency.js +1 -2
  17. package/lib/ledger/fee.js +1 -2
  18. package/lib/ledger/gateway_balances.js +2 -3
  19. package/lib/ledger/ledger.js +2 -3
  20. package/lib/ledger/ledger_entry.js +4 -4
  21. package/lib/ledger/manifest.js +1 -2
  22. package/lib/ledger/nft_info.js +1 -2
  23. package/lib/ledger/server_definitions.js +1 -2
  24. package/lib/ledger/server_info.js +1 -2
  25. package/lib/ledger/transaction.d.ts +6 -1
  26. package/lib/ledger/transaction.js +66 -48
  27. package/lib/ledger/vl-v2.js +2 -3
  28. package/lib/ledger/vl.js +3 -4
  29. package/lib/models/account_info.js +5 -5
  30. package/lib/models/account_nfts.js +4 -5
  31. package/lib/models/account_object.js +3 -4
  32. package/lib/models/book_offers.js +1 -2
  33. package/lib/models/ledger.js +5 -5
  34. package/lib/models/manifest.d.ts +0 -1
  35. package/lib/models/manifest.js +3 -4
  36. package/lib/models/transaction.js +10 -11
  37. package/lib/models/vl.js +4 -5
  38. package/lib/parse/ledger/account-order.js +1 -2
  39. package/lib/parse/ledger/account.js +1 -2
  40. package/lib/parse/ledger/emit_details.js +1 -2
  41. package/lib/parse/ledger/flags.js +1 -2
  42. package/lib/parse/ledger/import.js +1 -2
  43. package/lib/parse/ledger/ledger.js +1 -2
  44. package/lib/parse/ledger/memos.js +2 -3
  45. package/lib/parse/ledger/orderbook-order.js +1 -2
  46. package/lib/parse/outcome/affected_objects.js +1 -2
  47. package/lib/parse/outcome/amm_changes.js +1 -2
  48. package/lib/parse/outcome/balance_changes.js +2 -3
  49. package/lib/parse/outcome/channel_changes.js +1 -2
  50. package/lib/parse/outcome/emitted_txns.js +1 -2
  51. package/lib/parse/outcome/escrow_changes.js +1 -2
  52. package/lib/parse/outcome/hooks_executions.js +1 -2
  53. package/lib/parse/outcome/locked_balance_changes.js +2 -3
  54. package/lib/parse/outcome/nftoken_changes.js +1 -2
  55. package/lib/parse/outcome/nftoken_offer_changes.js +1 -2
  56. package/lib/parse/outcome/orderbook_changes.js +1 -2
  57. package/lib/parse/outcome/orderbook_quality.js +1 -2
  58. package/lib/parse/outcome/unl_report_changes.js +1 -2
  59. package/lib/parse/outcome/uritoken_changes.js +1 -2
  60. package/lib/parse/outcome/uritoken_sell_offer_changes.js +1 -2
  61. package/lib/parse/outcome.js +1 -2
  62. package/lib/parse/specification/account-delete.js +2 -0
  63. package/lib/parse/specification/amendment.js +27 -0
  64. package/lib/parse/specification/amm-bid.js +3 -1
  65. package/lib/parse/specification/amm-create.js +3 -1
  66. package/lib/parse/specification/amm-delete.js +3 -1
  67. package/lib/parse/specification/amm-deposit.js +3 -1
  68. package/lib/parse/specification/amm-vote.js +3 -1
  69. package/lib/parse/specification/amm-withdraw.js +3 -1
  70. package/lib/parse/specification/check-cancel.js +3 -1
  71. package/lib/parse/specification/check-cash.js +3 -1
  72. package/lib/parse/specification/check-create.js +3 -1
  73. package/lib/parse/specification/clawback.js +3 -1
  74. package/lib/parse/specification/deposit-preauth.js +3 -1
  75. package/lib/parse/specification/escrow-cancel.js +2 -0
  76. package/lib/parse/specification/escrow-create.js +2 -0
  77. package/lib/parse/specification/escrow-finish.js +2 -0
  78. package/lib/parse/specification/fee-update.js +3 -1
  79. package/lib/parse/specification/import.js +2 -0
  80. package/lib/parse/specification/invoke.js +2 -0
  81. package/lib/parse/specification/nftoken-accept-offer.js +2 -0
  82. package/lib/parse/specification/nftoken-burn.js +2 -0
  83. package/lib/parse/specification/nftoken-cancel-offer.js +2 -0
  84. package/lib/parse/specification/nftoken-create-offer.js +2 -0
  85. package/lib/parse/specification/nftoken-mint.js +2 -0
  86. package/lib/parse/specification/offer-cancel.js +3 -1
  87. package/lib/parse/specification/offer-create.js +3 -1
  88. package/lib/parse/specification/payment-channel-claim.js +3 -1
  89. package/lib/parse/specification/payment-channel-create.js +3 -1
  90. package/lib/parse/specification/payment-channel-fund.js +3 -1
  91. package/lib/parse/specification/payment.js +3 -1
  92. package/lib/parse/specification/remit.js +2 -0
  93. package/lib/parse/specification/settings.js +2 -0
  94. package/lib/parse/specification/ticket-create.js +3 -1
  95. package/lib/parse/specification/trustline.js +3 -1
  96. package/lib/parse/specification/unl-report.js +2 -0
  97. package/lib/parse/specification/uritoken-burn.js +2 -0
  98. package/lib/parse/specification/uritoken-buy.js +2 -0
  99. package/lib/parse/specification/uritoken-cancel-sell-offer.js +2 -0
  100. package/lib/parse/specification/uritoken-create-sell-offer.js +2 -0
  101. package/lib/parse/specification/uritoken-mint.js +2 -3
  102. package/lib/parse/transaction.js +2 -3
  103. package/lib/parse/utils.d.ts +0 -1
  104. package/lib/parse/utils.js +12 -13
  105. package/lib/types/specification.d.ts +2 -0
  106. package/lib/v1/transaction/payment.js +1 -2
  107. package/lib/v1/utils.js +2 -3
  108. package/lib/validator.d.ts +0 -1
  109. package/lib/validator.js +5 -6
  110. package/lib/wallet.d.ts +0 -1
  111. package/lib/wallet.js +9 -9
  112. package/package.json +10 -10
package/lib/base58.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="node" />
2
1
  export declare function decode(value: string): null | Buffer;
3
2
  export declare function encode(buffer: Buffer | number[] | Uint8Array): null | string;
package/lib/base58.js CHANGED
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.encode = exports.decode = void 0;
6
+ exports.decode = decode;
7
+ exports.encode = encode;
7
8
  const R_B58_DICT = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz";
8
9
  const base_x_1 = __importDefault(require("base-x"));
9
10
  const base58 = (0, base_x_1.default)(R_B58_DICT);
@@ -18,7 +19,6 @@ function decode(value) {
18
19
  }
19
20
  return null;
20
21
  }
21
- exports.decode = decode;
22
22
  function encode(buffer) {
23
23
  if (!buffer) {
24
24
  return null;
@@ -30,4 +30,3 @@ function encode(buffer) {
30
30
  }
31
31
  return null;
32
32
  }
33
- exports.encode = encode;
package/lib/client.js CHANGED
@@ -14,7 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.findConnection = exports.getNativeCurrency = exports.disconnect = exports.connect = exports.setup = exports.logger = exports.feeCushion = void 0;
17
+ exports.logger = exports.feeCushion = void 0;
18
+ exports.setup = setup;
19
+ exports.connect = connect;
20
+ exports.disconnect = disconnect;
21
+ exports.getNativeCurrency = getNativeCurrency;
22
+ exports.findConnection = findConnection;
18
23
  const connection_1 = require("./connection");
19
24
  __exportStar(require("./ledger"), exports);
20
25
  exports.feeCushion = 1.3;
@@ -47,7 +52,6 @@ function setup(servers, options = {}) {
47
52
  }
48
53
  loadBalancing = options.loadBalancing === true;
49
54
  }
50
- exports.setup = setup;
51
55
  async function connect() {
52
56
  exports.logger?.debug({
53
57
  service: "Bithomp::XRPL::Client",
@@ -57,7 +61,6 @@ async function connect() {
57
61
  await connection.connect();
58
62
  }
59
63
  }
60
- exports.connect = connect;
61
64
  function disconnect() {
62
65
  exports.logger?.debug({
63
66
  service: "Bithomp::XRPL::Client",
@@ -67,11 +70,9 @@ function disconnect() {
67
70
  connection.disconnect();
68
71
  }
69
72
  }
70
- exports.disconnect = disconnect;
71
73
  function getNativeCurrency() {
72
74
  return nativeCurrency || "XRP";
73
75
  }
74
- exports.getNativeCurrency = getNativeCurrency;
75
76
  function findConnection(type, url, strongFilter, hash, networkID) {
76
77
  if (!strongFilter) {
77
78
  if (clientConnections.length === 0) {
@@ -140,7 +141,6 @@ function findConnection(type, url, strongFilter, hash, networkID) {
140
141
  connections = connections.sort(sortHelperConnections);
141
142
  return connections[0];
142
143
  }
143
- exports.findConnection = findConnection;
144
144
  function sortHelperConnections(a, b) {
145
145
  if (a.getLatencyMs() < b.getLatencyMs()) {
146
146
  return -1;
@@ -3,14 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getConstructorName = exports.removeUndefined = exports.xrpToDrops = exports.dropsToXrp = exports.parseMarker = exports.createMarker = exports.sleep = exports.compareTransactions = exports.signum = void 0;
6
+ exports.signum = signum;
7
+ exports.compareTransactions = compareTransactions;
8
+ exports.sleep = sleep;
9
+ exports.createMarker = createMarker;
10
+ exports.parseMarker = parseMarker;
11
+ exports.dropsToXrp = dropsToXrp;
12
+ exports.xrpToDrops = xrpToDrops;
13
+ exports.removeUndefined = removeUndefined;
14
+ exports.getConstructorName = getConstructorName;
7
15
  const lodash_1 = __importDefault(require("lodash"));
8
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
9
17
  const errors_1 = require("./errors");
10
18
  function signum(num) {
11
19
  return num === 0 ? 0 : num > 0 ? 1 : -1;
12
20
  }
13
- exports.signum = signum;
14
21
  function compareTransactions(first, second) {
15
22
  if (!first.tx || !first.meta || !second.tx || !second.meta) {
16
23
  return 0;
@@ -20,13 +27,11 @@ function compareTransactions(first, second) {
20
27
  }
21
28
  return first.tx.ledger_index < second.tx.ledger_index ? -1 : 1;
22
29
  }
23
- exports.compareTransactions = compareTransactions;
24
30
  async function sleep(ms) {
25
31
  return new Promise((resolve) => {
26
32
  setTimeout(resolve, ms);
27
33
  });
28
34
  }
29
- exports.sleep = sleep;
30
35
  function createMarker(hash, marker) {
31
36
  if (marker === undefined) {
32
37
  return undefined;
@@ -42,7 +47,6 @@ function createMarker(hash, marker) {
42
47
  }
43
48
  return marker;
44
49
  }
45
- exports.createMarker = createMarker;
46
50
  function parseMarker(marker) {
47
51
  let hash;
48
52
  if (typeof marker === "object" && marker.bithompHash) {
@@ -63,7 +67,6 @@ function parseMarker(marker) {
63
67
  }
64
68
  return { hash, marker };
65
69
  }
66
- exports.parseMarker = parseMarker;
67
70
  function dropsToXrp(drops) {
68
71
  if (typeof drops === "string") {
69
72
  if (!drops.match(/^-?[0-9]*\.?[0-9]*$/)) {
@@ -82,7 +85,6 @@ function dropsToXrp(drops) {
82
85
  }
83
86
  return new bignumber_js_1.default(drops).dividedBy(1000000.0).toString(10);
84
87
  }
85
- exports.dropsToXrp = dropsToXrp;
86
88
  function xrpToDrops(xrp) {
87
89
  if (typeof xrp === "string") {
88
90
  if (!xrp.match(/^-?[0-9]*\.?[0-9]*$/)) {
@@ -106,11 +108,9 @@ function xrpToDrops(xrp) {
106
108
  }
107
109
  return new bignumber_js_1.default(xrp).times(1000000.0).integerValue(bignumber_js_1.default.ROUND_FLOOR).toString(10);
108
110
  }
109
- exports.xrpToDrops = xrpToDrops;
110
111
  function removeUndefined(obj) {
111
112
  return lodash_1.default.omitBy(obj, (value) => value == null);
112
113
  }
113
- exports.removeUndefined = removeUndefined;
114
114
  function getConstructorName(object) {
115
115
  if (object.constructor.name) {
116
116
  return object.constructor.name;
@@ -126,4 +126,3 @@ function getConstructorName(object) {
126
126
  }
127
127
  return undefined;
128
128
  }
129
- exports.getConstructorName = getConstructorName;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from "events";
3
2
  import { Request, Response } from "xrpl";
4
3
  export interface ConnectionOptions {
package/lib/faucet.js CHANGED
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.xrplLabsToXrplResponse = exports.getAxiosFaucetOptions = exports.foundWallet = exports.getFaucetNetwork = exports.FaucetNetworks = void 0;
6
+ exports.FaucetNetworks = void 0;
7
+ exports.getFaucetNetwork = getFaucetNetwork;
8
+ exports.foundWallet = foundWallet;
9
+ exports.getAxiosFaucetOptions = getAxiosFaucetOptions;
10
+ exports.xrplLabsToXrplResponse = xrplLabsToXrplResponse;
7
11
  const axios_1 = __importDefault(require("axios"));
8
12
  const AddressCodec = require("ripple-address-codec");
9
13
  exports.FaucetNetworks = {
@@ -34,7 +38,6 @@ function getFaucetNetwork(network) {
34
38
  }
35
39
  return undefined;
36
40
  }
37
- exports.getFaucetNetwork = getFaucetNetwork;
38
41
  async function foundWallet(network, account) {
39
42
  if (typeof network === "string") {
40
43
  network = getFaucetNetwork(network);
@@ -49,7 +52,6 @@ async function foundWallet(network, account) {
49
52
  }
50
53
  return data;
51
54
  }
52
- exports.foundWallet = foundWallet;
53
55
  function getAxiosFaucetOptions(network, account) {
54
56
  const options = {
55
57
  method: "post",
@@ -65,7 +67,6 @@ function getAxiosFaucetOptions(network, account) {
65
67
  }
66
68
  return options;
67
69
  }
68
- exports.getAxiosFaucetOptions = getAxiosFaucetOptions;
69
70
  function xrplLabsToXrplResponse(data) {
70
71
  const secret = data.secret === "" ? undefined : data.secret;
71
72
  const balance = secret ? data.xrp : undefined;
@@ -86,4 +87,3 @@ function xrplLabsToXrplResponse(data) {
86
87
  }
87
88
  return response;
88
89
  }
89
- exports.xrplLabsToXrplResponse = xrplLabsToXrplResponse;
@@ -23,7 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.isActivated = exports.getAccountInfoData = exports.getAccountInfo = void 0;
26
+ exports.getAccountInfo = getAccountInfo;
27
+ exports.getAccountInfoData = getAccountInfoData;
28
+ exports.isActivated = isActivated;
27
29
  const Client = __importStar(require("../client"));
28
30
  async function getAccountInfo(account, options = {}) {
29
31
  const connection = options.connection || Client.findConnection();
@@ -67,7 +69,6 @@ async function getAccountInfo(account, options = {}) {
67
69
  }
68
70
  return result;
69
71
  }
70
- exports.getAccountInfo = getAccountInfo;
71
72
  async function getAccountInfoData(account, options = {}) {
72
73
  const response = await getAccountInfo(account, options);
73
74
  if ("error" in response) {
@@ -75,7 +76,6 @@ async function getAccountInfoData(account, options = {}) {
75
76
  }
76
77
  return response?.account_data;
77
78
  }
78
- exports.getAccountInfoData = getAccountInfoData;
79
79
  async function isActivated(account) {
80
80
  const response = await getAccountInfo(account);
81
81
  if (!response) {
@@ -86,4 +86,3 @@ async function isActivated(account) {
86
86
  }
87
87
  return true;
88
88
  }
89
- exports.isActivated = isActivated;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getAccountLines = void 0;
26
+ exports.getAccountLines = getAccountLines;
27
27
  const Client = __importStar(require("../client"));
28
28
  const utils_1 = require("../common/utils");
29
29
  async function getAccountLines(account, options = {}) {
@@ -67,4 +67,3 @@ async function getAccountLines(account, options = {}) {
67
67
  }
68
68
  return result;
69
69
  }
70
- exports.getAccountLines = getAccountLines;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getAccountNamespace = void 0;
26
+ exports.getAccountNamespace = getAccountNamespace;
27
27
  const Client = __importStar(require("../client"));
28
28
  async function getAccountNamespace(account, namespaceId, options = {}) {
29
29
  const connection = Client.findConnection();
@@ -58,4 +58,3 @@ async function getAccountNamespace(account, namespaceId, options = {}) {
58
58
  const result = response.result;
59
59
  return result;
60
60
  }
61
- exports.getAccountNamespace = getAccountNamespace;
@@ -23,7 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getAccountNftBuyOffers = exports.getAccountNftSellOffers = exports.findAccountNfts = exports.getAccountNfts = void 0;
26
+ exports.getAccountNfts = getAccountNfts;
27
+ exports.findAccountNfts = findAccountNfts;
28
+ exports.getAccountNftSellOffers = getAccountNftSellOffers;
29
+ exports.getAccountNftBuyOffers = getAccountNftBuyOffers;
27
30
  const Client = __importStar(require("../client"));
28
31
  const account_nfts_1 = require("../models/account_nfts");
29
32
  const utils_1 = require("../common/utils");
@@ -75,7 +78,6 @@ async function getAccountNfts(account, options = {}) {
75
78
  }
76
79
  return result;
77
80
  }
78
- exports.getAccountNfts = getAccountNfts;
79
81
  async function findAccountNfts(account, options = { timeout: 15000 }) {
80
82
  const timeStart = new Date();
81
83
  const limit = options.limit;
@@ -120,7 +122,6 @@ async function findAccountNfts(account, options = { timeout: 15000 }) {
120
122
  response.account_nfts = accountNfts;
121
123
  return response;
122
124
  }
123
- exports.findAccountNfts = findAccountNfts;
124
125
  async function getAccountNftSellOffers(nftID, options = {}) {
125
126
  const connection = Client.findConnection("!clio");
126
127
  if (!connection) {
@@ -151,7 +152,6 @@ async function getAccountNftSellOffers(nftID, options = {}) {
151
152
  }
152
153
  return response?.result;
153
154
  }
154
- exports.getAccountNftSellOffers = getAccountNftSellOffers;
155
155
  async function getAccountNftBuyOffers(nftID, options = {}) {
156
156
  const connection = Client.findConnection("!clio");
157
157
  if (!connection) {
@@ -182,4 +182,3 @@ async function getAccountNftBuyOffers(nftID, options = {}) {
182
182
  }
183
183
  return response?.result;
184
184
  }
185
- exports.getAccountNftBuyOffers = getAccountNftBuyOffers;
@@ -23,7 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getAccountURITokensObjects = exports.getAccountNFTOffersObjects = exports.getAccountLinesObjects = exports.getAccountAllObjects = exports.getAccountObjects = void 0;
26
+ exports.getAccountObjects = getAccountObjects;
27
+ exports.getAccountAllObjects = getAccountAllObjects;
28
+ exports.getAccountLinesObjects = getAccountLinesObjects;
29
+ exports.getAccountNFTOffersObjects = getAccountNFTOffersObjects;
30
+ exports.getAccountURITokensObjects = getAccountURITokensObjects;
27
31
  const Client = __importStar(require("../client"));
28
32
  const account_object_1 = require("../models/account_object");
29
33
  const utils_1 = require("../common/utils");
@@ -72,7 +76,6 @@ async function getAccountObjects(account, options = {}) {
72
76
  }
73
77
  return result;
74
78
  }
75
- exports.getAccountObjects = getAccountObjects;
76
79
  async function getAccountAllObjects(account, options = {}) {
77
80
  const timeStart = new Date();
78
81
  const limit = options.limit;
@@ -124,7 +127,6 @@ async function getAccountAllObjects(account, options = {}) {
124
127
  response.account_objects = accountObjects;
125
128
  return response;
126
129
  }
127
- exports.getAccountAllObjects = getAccountAllObjects;
128
130
  async function getAccountLinesObjects(account, options = {}) {
129
131
  const response = await getAccountAllObjects(account, {
130
132
  type: "state",
@@ -144,7 +146,6 @@ async function getAccountLinesObjects(account, options = {}) {
144
146
  lines: accountLines,
145
147
  };
146
148
  }
147
- exports.getAccountLinesObjects = getAccountLinesObjects;
148
149
  async function getAccountNFTOffersObjects(account, options = {}) {
149
150
  const response = await getAccountAllObjects(account, {
150
151
  type: "nft_offer",
@@ -166,7 +167,6 @@ async function getAccountNFTOffersObjects(account, options = {}) {
166
167
  nft_offers: nftOffers,
167
168
  };
168
169
  }
169
- exports.getAccountNFTOffersObjects = getAccountNFTOffersObjects;
170
170
  async function getAccountURITokensObjects(account, options = {}) {
171
171
  const response = await getAccountAllObjects(account, {
172
172
  ledgerHash: options.ledgerHash,
@@ -187,4 +187,3 @@ async function getAccountURITokensObjects(account, options = {}) {
187
187
  uritokens: uriTokens,
188
188
  };
189
189
  }
190
- exports.getAccountURITokensObjects = getAccountURITokensObjects;
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.getAccountAllOffers = exports.getAccountOffers = void 0;
29
+ exports.getAccountOffers = getAccountOffers;
30
+ exports.getAccountAllOffers = getAccountAllOffers;
30
31
  const lodash_1 = __importDefault(require("lodash"));
31
32
  const Client = __importStar(require("../client"));
32
33
  const utils_1 = require("../common/utils");
@@ -75,7 +76,6 @@ async function getAccountOffers(account, options = {}) {
75
76
  }
76
77
  return result;
77
78
  }
78
- exports.getAccountOffers = getAccountOffers;
79
79
  async function getAccountAllOffers(account, options = {}) {
80
80
  const limit = options.limit;
81
81
  let response;
@@ -124,7 +124,6 @@ async function getAccountAllOffers(account, options = {}) {
124
124
  response.offers = accountOffers;
125
125
  return response;
126
126
  }
127
- exports.getAccountAllOffers = getAccountAllOffers;
128
127
  function formatResponse(address, offers) {
129
128
  const orders = offers.map((offer) => {
130
129
  return (0, account_order_1.parseAccountOrder)(address, offer);
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.findTransactions = exports.getTransactions = void 0;
29
+ exports.getTransactions = getTransactions;
30
+ exports.findTransactions = findTransactions;
30
31
  const lodash_1 = __importDefault(require("lodash"));
31
32
  const xrpl_1 = require("xrpl");
32
33
  const Client = __importStar(require("../client"));
@@ -96,7 +97,6 @@ async function getTransactions(account, options = { limit: DEFAULT_LIMIT }) {
96
97
  }
97
98
  return result;
98
99
  }
99
- exports.getTransactions = getTransactions;
100
100
  async function findTransactions(account, options = { limit: DEFAULT_LIMIT, timeout: 15000 }) {
101
101
  let transactions = [];
102
102
  let accountTransactionsError = null;
@@ -167,7 +167,6 @@ async function findTransactions(account, options = { limit: DEFAULT_LIMIT, timeo
167
167
  }
168
168
  return transactions;
169
169
  }
170
- exports.findTransactions = findTransactions;
171
170
  function applyLimitOptions(options) {
172
171
  if (options.sourceTag > 0 || options.destinationTag > 0) {
173
172
  if (options.limit > MAX_LIMIT_WITH_TAG) {
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getAmmInfoByAssets = exports.getAmmInfo = void 0;
26
+ exports.getAmmInfo = getAmmInfo;
27
+ exports.getAmmInfoByAssets = getAmmInfoByAssets;
27
28
  const Client = __importStar(require("../client"));
28
29
  async function getAmmInfo(ammAccount, options = {}) {
29
30
  const connection = options.connection || Client.findConnection(options.type, options.url, true);
@@ -61,7 +62,6 @@ async function getAmmInfo(ammAccount, options = {}) {
61
62
  }
62
63
  return response?.result;
63
64
  }
64
- exports.getAmmInfo = getAmmInfo;
65
65
  async function getAmmInfoByAssets(asset, asset2, options = {}) {
66
66
  const connection = options.connection || Client.findConnection(options.type, options.url, true);
67
67
  if (!connection) {
@@ -99,4 +99,3 @@ async function getAmmInfoByAssets(asset, asset2, options = {}) {
99
99
  }
100
100
  return response?.result;
101
101
  }
102
- exports.getAmmInfoByAssets = getAmmInfoByAssets;
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getOrderbook = exports.getBookOffers = void 0;
26
+ exports.getBookOffers = getBookOffers;
27
+ exports.getOrderbook = getOrderbook;
27
28
  const Client = __importStar(require("../client"));
28
29
  const book_offers_1 = require("../models/book_offers");
29
30
  const utils_1 = require("../common/utils");
@@ -68,7 +69,6 @@ async function getBookOffers(taker, takerGets, takerPays, options = {}) {
68
69
  }
69
70
  return result;
70
71
  }
71
- exports.getBookOffers = getBookOffers;
72
72
  function convertIssueToTakerAmount(obj) {
73
73
  const issuer = obj.counterparty != null ? obj.counterparty : obj.issuer != null ? obj.issuer : undefined;
74
74
  const withIssuer = Object.assign({}, obj, { issuer });
@@ -88,4 +88,3 @@ async function getOrderbook(taker, orderbook, options = {}) {
88
88
  }
89
89
  return (0, book_offers_1.formatBidsAndAsks)(orderbook, [...directOfferResults.offers, ...reverseOfferResults.offers]);
90
90
  }
91
- exports.getOrderbook = getOrderbook;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.parseCurrencyInformation = void 0;
26
+ exports.parseCurrencyInformation = parseCurrencyInformation;
27
27
  const Client = __importStar(require("../client"));
28
28
  const utils_1 = require("../parse/utils");
29
29
  const transaction_1 = require("../parse/transaction");
@@ -44,7 +44,6 @@ async function parseCurrencyInformation(currency) {
44
44
  }
45
45
  return null;
46
46
  }
47
- exports.parseCurrencyInformation = parseCurrencyInformation;
48
47
  function decodeSimple(currencyCode) {
49
48
  return {
50
49
  type: "simple",
package/lib/ledger/fee.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getFee = void 0;
26
+ exports.getFee = getFee;
27
27
  const bignumber_js_1 = require("bignumber.js");
28
28
  const ripple_binary_codec_1 = require("ripple-binary-codec");
29
29
  const Client = __importStar(require("../client"));
@@ -54,4 +54,3 @@ async function getFee(options = {}) {
54
54
  .decimalPlaces(6, bignumber_js_1.BigNumber.ROUND_UP);
55
55
  return fee.toString();
56
56
  }
57
- exports.getFee = getFee;
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.getAccountObligations = exports.getBalanceSheet = void 0;
29
+ exports.getBalanceSheet = getBalanceSheet;
30
+ exports.getAccountObligations = getAccountObligations;
30
31
  const lodash_1 = __importDefault(require("lodash"));
31
32
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
32
33
  const Client = __importStar(require("../client"));
@@ -62,7 +63,6 @@ async function getBalanceSheet(account, options = {}) {
62
63
  }
63
64
  return response?.result;
64
65
  }
65
- exports.getBalanceSheet = getBalanceSheet;
66
66
  async function getAccountObligations(account) {
67
67
  const response = (await getBalanceSheet(account));
68
68
  if (response.error) {
@@ -86,7 +86,6 @@ async function getAccountObligations(account) {
86
86
  response.lines = obligationsLines;
87
87
  return response;
88
88
  }
89
- exports.getAccountObligations = getAccountObligations;
90
89
  function ObligationToObligationTrustline(account, value, currency) {
91
90
  return {
92
91
  account,
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getLedgerIndex = exports.getLedger = void 0;
26
+ exports.getLedger = getLedger;
27
+ exports.getLedgerIndex = getLedgerIndex;
27
28
  const Client = __importStar(require("../client"));
28
29
  const ledger_1 = require("../parse/ledger/ledger");
29
30
  async function getLedger(options = {}) {
@@ -67,7 +68,6 @@ async function getLedger(options = {}) {
67
68
  }
68
69
  return result;
69
70
  }
70
- exports.getLedger = getLedger;
71
71
  async function getLedgerIndex(options = {}) {
72
72
  const ledgerInfo = await Client.getLedger(options);
73
73
  const ledger = ledgerInfo?.ledger;
@@ -76,4 +76,3 @@ async function getLedgerIndex(options = {}) {
76
76
  }
77
77
  return undefined;
78
78
  }
79
- exports.getLedgerIndex = getLedgerIndex;
@@ -23,7 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getLedgerEntryURIToken = exports.getLedgerEntryAmendments = exports.getLedgerEntry = exports.LEDGER_ENTRY_UNL_REPORT = exports.LEDGER_ENTRY_LEDGER_HASHES = exports.LEDGER_ENTRY_FEE_SETTINGS = exports.LEDGER_ENTRY_NEGATIVE_UNL = exports.LEDGER_ENTRY_AMENDMENTS = void 0;
26
+ exports.LEDGER_ENTRY_UNL_REPORT = exports.LEDGER_ENTRY_LEDGER_HASHES = exports.LEDGER_ENTRY_FEE_SETTINGS = exports.LEDGER_ENTRY_NEGATIVE_UNL = exports.LEDGER_ENTRY_AMENDMENTS = void 0;
27
+ exports.getLedgerEntry = getLedgerEntry;
28
+ exports.getLedgerEntryAmendments = getLedgerEntryAmendments;
29
+ exports.getLedgerEntryURIToken = getLedgerEntryURIToken;
27
30
  const Client = __importStar(require("../client"));
28
31
  const common_1 = require("../common");
29
32
  exports.LEDGER_ENTRY_AMENDMENTS = "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4";
@@ -61,7 +64,6 @@ async function getLedgerEntry(ledgerEntry, options = {}) {
61
64
  }
62
65
  return response?.result;
63
66
  }
64
- exports.getLedgerEntry = getLedgerEntry;
65
67
  async function getLedgerEntryAmendments(options = {}) {
66
68
  const response = await getLedgerEntry(exports.LEDGER_ENTRY_AMENDMENTS, options);
67
69
  if (!response || !response.node) {
@@ -75,7 +77,6 @@ async function getLedgerEntryAmendments(options = {}) {
75
77
  }
76
78
  return response?.node;
77
79
  }
78
- exports.getLedgerEntryAmendments = getLedgerEntryAmendments;
79
80
  async function getLedgerEntryURIToken(uriTokenID, options = {}) {
80
81
  const response = await getLedgerEntry(uriTokenID, options);
81
82
  if (!response || !response.node) {
@@ -104,4 +105,3 @@ async function getLedgerEntryURIToken(uriTokenID, options = {}) {
104
105
  Destination: response.node.Destination,
105
106
  });
106
107
  }
107
- exports.getLedgerEntryURIToken = getLedgerEntryURIToken;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getManifest = void 0;
26
+ exports.getManifest = getManifest;
27
27
  const Client = __importStar(require("../client"));
28
28
  async function getManifest(publicKey, options = {}) {
29
29
  const connection = options.connection || Client.findConnection("manifest");
@@ -53,4 +53,3 @@ async function getManifest(publicKey, options = {}) {
53
53
  }
54
54
  return response?.result;
55
55
  }
56
- exports.getManifest = getManifest;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getNftInfo = void 0;
26
+ exports.getNftInfo = getNftInfo;
27
27
  const Client = __importStar(require("../client"));
28
28
  async function getNftInfo(nft_id, _options = {}) {
29
29
  const connection = Client.findConnection("clio", undefined, true);
@@ -53,4 +53,3 @@ async function getNftInfo(nft_id, _options = {}) {
53
53
  }
54
54
  return response?.result;
55
55
  }
56
- exports.getNftInfo = getNftInfo;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getServerDefinitions = void 0;
26
+ exports.getServerDefinitions = getServerDefinitions;
27
27
  const Client = __importStar(require("../client"));
28
28
  async function getServerDefinitions(options = {}) {
29
29
  const connection = options.connection || Client.findConnection();
@@ -51,4 +51,3 @@ async function getServerDefinitions(options = {}) {
51
51
  }
52
52
  return response?.result;
53
53
  }
54
- exports.getServerDefinitions = getServerDefinitions;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getServerInfo = void 0;
26
+ exports.getServerInfo = getServerInfo;
27
27
  const Client = __importStar(require("../client"));
28
28
  async function getServerInfo(options = {}) {
29
29
  const connection = options.connection || Client.findConnection(options.type, options.url, true);
@@ -51,4 +51,3 @@ async function getServerInfo(options = {}) {
51
51
  }
52
52
  return response?.result;
53
53
  }
54
- exports.getServerInfo = getServerInfo;
@@ -30,10 +30,15 @@ interface SubmitPaymentTransactionV1Interface {
30
30
  secret: string;
31
31
  fee?: string;
32
32
  sequence?: number;
33
+ lastLedgerSequence?: number;
33
34
  }
34
35
  export declare function submitPaymentTransactionV1(data: SubmitPaymentTransactionV1Interface, definitions?: XrplDefinitionsBase, validateTx?: boolean): Promise<TransactionResponse | FormattedTransaction | ErrorResponse>;
35
36
  export declare function getAccountPaymentParams(account: string, connection?: Connection): Promise<AccountPaymentParamsInterface | ErrorResponse>;
36
- export declare function getTxSubmitParams(account: string, tx?: string | any, definitions?: XrplDefinitionsBase, connection?: Connection): Promise<AccountPaymentParamsInterface | ErrorResponse>;
37
+ export declare function getTxSubmitParams(account: string, tx?: string | any, definitions?: XrplDefinitionsBase, connection?: Connection, skip?: {
38
+ fee?: boolean;
39
+ sequence?: boolean;
40
+ lastLedgerSequence?: boolean;
41
+ }): Promise<AccountPaymentParamsInterface | ErrorResponse>;
37
42
  export interface SubmitOptionsInterface {
38
43
  connection?: Connection;
39
44
  definitions?: XrplDefinitionsBase;