@bithomp/xrpl-api 2.7.14 → 2.7.15

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.
@@ -4,6 +4,8 @@ export interface Trustline {
4
4
  currency: string;
5
5
  limit: string;
6
6
  limit_peer: string;
7
+ lock_count?: number;
8
+ locked_balance?: string;
7
9
  quality_in: number;
8
10
  quality_out: number;
9
11
  no_ripple?: boolean;
@@ -25,15 +25,22 @@ const RippleStateToTrustLine = (ledgerEntry, account) => {
25
25
  const balance = ledgerEntry.HighLimit.issuer === account && ledgerEntry.Balance.value.startsWith("-")
26
26
  ? ledgerEntry.Balance.value.slice(1)
27
27
  : ledgerEntry.Balance.value;
28
- return {
28
+ const lockedBalance = ledgerEntry.LockedBalance?.value;
29
+ let lockCount = undefined;
30
+ if (lockedBalance) {
31
+ lockCount = ledgerEntry.LockCount;
32
+ }
33
+ return (0, common_1.removeUndefined)({
29
34
  account: counterparty.issuer,
30
35
  balance,
31
36
  currency: self.currency,
32
37
  limit: self.value,
33
38
  limit_peer: counterparty.value,
39
+ lock_count: lockCount,
40
+ locked_balance: lockedBalance,
34
41
  no_ripple,
35
42
  no_ripple_peer,
36
- };
43
+ });
37
44
  };
38
45
  function accountObjectsToNFTOffers(accountObjects) {
39
46
  const nftOfferObjects = accountObjects.filter((obj) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "2.7.14",
3
+ "version": "2.7.15",
4
4
  "description": "A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",