@bithomp/xrpl-api 3.2.18 → 3.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ledger/fee.js +6 -3
- package/lib/ledger/gateway_balances.js +1 -1
- package/lib/models/book_offers.js +1 -1
- package/lib/parse/ledger/account-order.js +7 -5
- package/lib/parse/ledger/amount.js +1 -1
- package/lib/parse/ledger/offer-create-flags.d.ts +5 -0
- package/lib/parse/ledger/offer-create-flags.js +8 -0
- package/lib/parse/ledger/orderbook-order.d.ts +3 -3
- package/lib/parse/ledger/orderbook-order.js +10 -8
- package/lib/parse/outcome/mptoken_changes.js +5 -2
- package/lib/parse/outcome/mptoken_issuance_changes.js +5 -2
- package/lib/parse/outcome/orderbook_changes.d.ts +4 -1
- package/lib/parse/outcome/orderbook_changes.js +13 -24
- package/lib/parse/outcome.js +8 -1
- package/lib/parse/specification/offer-create.js +8 -6
- package/lib/types/offers.d.ts +17 -4
- package/lib/types/offers.js +7 -1
- package/package.json +14 -14
package/lib/ledger/fee.js
CHANGED
|
@@ -32,9 +32,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.getFee = getFee;
|
|
37
|
-
const bignumber_js_1 = require("bignumber.js");
|
|
40
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
38
41
|
const ripple_binary_codec_1 = require("ripple-binary-codec");
|
|
39
42
|
const Client = __importStar(require("../client"));
|
|
40
43
|
const common_1 = require("../common");
|
|
@@ -58,9 +61,9 @@ async function getFee(options = {}) {
|
|
|
58
61
|
if (!openLedgerFee) {
|
|
59
62
|
return null;
|
|
60
63
|
}
|
|
61
|
-
const fee = new bignumber_js_1.
|
|
64
|
+
const fee = new bignumber_js_1.default(openLedgerFee)
|
|
62
65
|
.multipliedBy(Client.feeCushion)
|
|
63
66
|
.dividedBy(common_1.dropsInXRP)
|
|
64
|
-
.decimalPlaces(6, bignumber_js_1.
|
|
67
|
+
.decimalPlaces(6, bignumber_js_1.default.ROUND_UP);
|
|
65
68
|
return fee.toString();
|
|
66
69
|
}
|
|
@@ -106,7 +106,7 @@ function ObligationToObligationTrustline(account, value, currency) {
|
|
|
106
106
|
return {
|
|
107
107
|
account,
|
|
108
108
|
currency,
|
|
109
|
-
balance: new bignumber_js_1.default(
|
|
109
|
+
balance: new bignumber_js_1.default(value).times(-1).toString(),
|
|
110
110
|
limit: "0",
|
|
111
111
|
limit_peer: "0",
|
|
112
112
|
quality_in: 0,
|
|
@@ -30,7 +30,7 @@ function alignOrder(base, order) {
|
|
|
30
30
|
function formatBidsAndAsks(orderbook, offers) {
|
|
31
31
|
const orders = offers
|
|
32
32
|
.sort((a, b) => {
|
|
33
|
-
return new bignumber_js_1.default(a.quality).comparedTo(b.quality);
|
|
33
|
+
return new bignumber_js_1.default(a.quality).comparedTo(b.quality) ?? 0;
|
|
34
34
|
})
|
|
35
35
|
.map(orderbook_order_1.parseOrderbookOrder);
|
|
36
36
|
const alignedOrders = orders.map(lodash_1.default.partial(alignOrder, orderbook.base));
|
|
@@ -9,22 +9,24 @@ const xrpl_1 = require("xrpl");
|
|
|
9
9
|
const amount_1 = __importDefault(require("./amount"));
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
11
|
const common_1 = require("../../common");
|
|
12
|
+
const offer_flags_1 = __importDefault(require("../ledger/offer-flags"));
|
|
12
13
|
function computeQuality(takerGets, takerPays) {
|
|
13
14
|
const quotient = new bignumber_js_1.default(takerPays.value).dividedBy(takerGets.value);
|
|
14
15
|
return quotient.precision(16, bignumber_js_1.default.ROUND_HALF_UP).toString();
|
|
15
16
|
}
|
|
16
17
|
function parseAccountOrder(address, order) {
|
|
17
|
-
const
|
|
18
|
+
const flags = (0, offer_flags_1.default)(order.flags);
|
|
18
19
|
const takerGetsAmount = (0, amount_1.default)(order.taker_gets);
|
|
19
20
|
const takerPaysAmount = (0, amount_1.default)(order.taker_pays);
|
|
20
|
-
const quantity =
|
|
21
|
-
const totalPrice =
|
|
21
|
+
const quantity = flags.sell === true ? takerGetsAmount : takerPaysAmount;
|
|
22
|
+
const totalPrice = flags.sell === true ? takerPaysAmount : takerGetsAmount;
|
|
22
23
|
const specification = (0, common_1.removeUndefined)({
|
|
23
|
-
|
|
24
|
+
flags: flags,
|
|
24
25
|
quantity: quantity,
|
|
25
26
|
totalPrice: totalPrice,
|
|
26
|
-
passive: (order.flags & xrpl_1.LedgerEntry.OfferFlags.lsfPassive) !== 0 || undefined,
|
|
27
27
|
expirationTime: (0, utils_1.parseTimestamp)(order.expiration),
|
|
28
|
+
direction: (order.flags & xrpl_1.LedgerEntry.OfferFlags.lsfSell) === 0 ? "buy" : "sell",
|
|
29
|
+
passive: (order.flags & xrpl_1.LedgerEntry.OfferFlags.lsfPassive) !== 0 || undefined,
|
|
28
30
|
});
|
|
29
31
|
const makerExchangeRate = order.quality
|
|
30
32
|
? (0, utils_1.adjustQualityForXRP)(order.quality.toString(), takerGetsAmount.currency, takerPaysAmount.currency)
|
|
@@ -9,7 +9,7 @@ function parseAmount(amount) {
|
|
|
9
9
|
value: (0, common_1.dropsToXrp)(amount),
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
if ("value" in amount && "currency" in amount && "issuer" in amount) {
|
|
12
|
+
if (amount && "value" in amount && "currency" in amount && "issuer" in amount) {
|
|
13
13
|
return {
|
|
14
14
|
issuer: amount.issuer,
|
|
15
15
|
currency: amount.currency,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const offers_1 = require("../../types/offers");
|
|
4
|
+
const flags_1 = require("./flags");
|
|
5
|
+
function parseOfferCreateFlags(value, options = {}) {
|
|
6
|
+
return (0, flags_1.parseFlags)(value, offers_1.OfferCreateFlagsKeys, options);
|
|
7
|
+
}
|
|
8
|
+
exports.default = parseOfferCreateFlags;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Amount, OfferLedgerEntry,
|
|
1
|
+
import { Amount, OfferLedgerEntry, IssuedCurrencyAmount, FormattedOfferCreateSpecification } from "../../types";
|
|
2
2
|
export interface BookOffer extends OfferLedgerEntry {
|
|
3
3
|
quality?: string;
|
|
4
4
|
owner_funds?: string;
|
|
@@ -13,8 +13,8 @@ export type FormattedOrderbookOrder = {
|
|
|
13
13
|
makerExchangeRate: string;
|
|
14
14
|
};
|
|
15
15
|
state?: {
|
|
16
|
-
fundedAmount?:
|
|
17
|
-
priceOfFundedAmount?:
|
|
16
|
+
fundedAmount?: IssuedCurrencyAmount;
|
|
17
|
+
priceOfFundedAmount?: IssuedCurrencyAmount;
|
|
18
18
|
};
|
|
19
19
|
data: BookOffer;
|
|
20
20
|
};
|
|
@@ -9,23 +9,25 @@ const xrpl_1 = require("xrpl");
|
|
|
9
9
|
const utils_1 = require("../utils");
|
|
10
10
|
const common_1 = require("../../common");
|
|
11
11
|
const amount_1 = __importDefault(require("./amount"));
|
|
12
|
+
const offer_flags_1 = __importDefault(require("../ledger/offer-flags"));
|
|
12
13
|
function parseOrderbookOrder(data) {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const quantity =
|
|
17
|
-
const totalPrice =
|
|
14
|
+
const flags = (0, offer_flags_1.default)(data.Flags);
|
|
15
|
+
const takerGets = (0, amount_1.default)(data.TakerGets);
|
|
16
|
+
const takerPays = (0, amount_1.default)(data.TakerPays);
|
|
17
|
+
const quantity = flags.sell === true ? takerGets : takerPays;
|
|
18
|
+
const totalPrice = flags.sell === true ? takerPays : takerGets;
|
|
18
19
|
const specification = (0, common_1.removeUndefined)({
|
|
19
|
-
|
|
20
|
+
flags: flags,
|
|
20
21
|
quantity: quantity,
|
|
21
22
|
totalPrice: totalPrice,
|
|
22
|
-
passive: (data.Flags & xrpl_1.LedgerEntry.OfferFlags.lsfPassive) !== 0 || undefined,
|
|
23
23
|
expirationTime: (0, utils_1.parseTimestamp)(data.Expiration),
|
|
24
|
+
direction: (data.Flags & xrpl_1.LedgerEntry.OfferFlags.lsfSell) === 0 ? "buy" : "sell",
|
|
25
|
+
passive: (data.Flags & xrpl_1.LedgerEntry.OfferFlags.lsfPassive) !== 0 || undefined,
|
|
24
26
|
});
|
|
25
27
|
const properties = {
|
|
26
28
|
maker: data.Account,
|
|
27
29
|
sequence: data.Sequence,
|
|
28
|
-
makerExchangeRate: (0, utils_1.adjustQualityForXRP)(data.quality,
|
|
30
|
+
makerExchangeRate: (0, utils_1.adjustQualityForXRP)(data.quality, takerGets.currency, takerPays.currency),
|
|
29
31
|
};
|
|
30
32
|
const takerGetsFunded = data.taker_gets_funded ? (0, amount_1.default)(data.taker_gets_funded) : undefined;
|
|
31
33
|
const takerPaysFunded = data.taker_pays_funded ? (0, amount_1.default)(data.taker_pays_funded) : undefined;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.parseMPTokenChanges = parseMPTokenChanges;
|
|
4
|
-
const bignumber_js_1 = require("bignumber.js");
|
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
5
8
|
const common_1 = require("../../common");
|
|
6
9
|
function parseMPTokenChanges(tx) {
|
|
7
10
|
return new MPTokenChanges(tx).call();
|
|
@@ -51,7 +54,7 @@ class MPTokenChanges {
|
|
|
51
54
|
if (affectedNode.ModifiedNode) {
|
|
52
55
|
const mptIssuanceID = node.FinalFields.MPTokenIssuanceID;
|
|
53
56
|
const account = node.FinalFields.Account;
|
|
54
|
-
let amountChange = new bignumber_js_1.
|
|
57
|
+
let amountChange = new bignumber_js_1.default(node.FinalFields.MPTAmount ?? 0)
|
|
55
58
|
.minus(node.PreviousFields.MPTAmount ?? 0)
|
|
56
59
|
.toString();
|
|
57
60
|
if (amountChange === "0") {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.parseMPTokenIssuanceChanges = parseMPTokenIssuanceChanges;
|
|
4
|
-
const bignumber_js_1 = require("bignumber.js");
|
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
5
8
|
const common_1 = require("../../common");
|
|
6
9
|
const mptoken_1 = require("../../models/mptoken");
|
|
7
10
|
function parseMPTokenIssuanceChanges(tx) {
|
|
@@ -52,7 +55,7 @@ class MPTokenIssuanceChanges {
|
|
|
52
55
|
}
|
|
53
56
|
if (affectedNode.ModifiedNode) {
|
|
54
57
|
const mptIssuanceID = (0, mptoken_1.buildMPTokenIssuanceID)(node.FinalFields.Sequence, node.FinalFields.Issuer);
|
|
55
|
-
let outstandingAmountChange = new bignumber_js_1.
|
|
58
|
+
let outstandingAmountChange = new bignumber_js_1.default(node.FinalFields.OutstandingAmount ?? 0)
|
|
56
59
|
.minus(node.PreviousFields.OutstandingAmount ?? 0)
|
|
57
60
|
.toString();
|
|
58
61
|
if (outstandingAmountChange === "0") {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { TransactionMetadata } from "xrpl";
|
|
2
|
+
import { OfferFlagsKeysInterface } from "../../types";
|
|
2
3
|
type OfferDescription = {
|
|
3
|
-
|
|
4
|
+
flags: OfferFlagsKeysInterface;
|
|
5
|
+
account?: string;
|
|
4
6
|
quantity: any;
|
|
5
7
|
totalPrice: any;
|
|
6
8
|
sequence: number;
|
|
7
9
|
status?: string;
|
|
8
10
|
makerExchangeRate: string;
|
|
9
11
|
expirationTime?: string;
|
|
12
|
+
direction: string;
|
|
10
13
|
};
|
|
11
14
|
type Orderbook = {
|
|
12
15
|
[key: string]: OfferDescription[];
|
|
@@ -5,31 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.parseOrderbookChanges = parseOrderbookChanges;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
-
const bignumber_js_1 = require("bignumber.js");
|
|
8
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
9
|
+
const BigNumber = bignumber_js_1.default.clone({ DECIMAL_PLACES: 40 });
|
|
9
10
|
const xrpl_1 = require("xrpl");
|
|
10
|
-
const BigNumber = bignumber_js_1.BigNumber.clone({ DECIMAL_PLACES: 40 });
|
|
11
11
|
const common_1 = require("../../common");
|
|
12
12
|
const models_1 = require("../../models");
|
|
13
13
|
const utils_1 = require("../utils");
|
|
14
14
|
const orderbook_quality_1 = require("./orderbook_quality");
|
|
15
15
|
const currency_amount_1 = __importDefault(require("../ledger/currency-amount"));
|
|
16
|
+
const offer_flags_1 = __importDefault(require("../ledger/offer-flags"));
|
|
16
17
|
const client_1 = require("../../client");
|
|
17
|
-
function convertOrderChange(order) {
|
|
18
|
-
const takerGets = order.taker_gets;
|
|
19
|
-
const takerPays = order.taker_pays;
|
|
20
|
-
const direction = order.sell ? "sell" : "buy";
|
|
21
|
-
const quantity = direction === "buy" ? takerPays : takerGets;
|
|
22
|
-
const totalPrice = direction === "buy" ? takerGets : takerPays;
|
|
23
|
-
return (0, common_1.removeUndefined)({
|
|
24
|
-
direction: direction,
|
|
25
|
-
quantity: quantity,
|
|
26
|
-
totalPrice: totalPrice,
|
|
27
|
-
sequence: order.sequence,
|
|
28
|
-
status: order.status,
|
|
29
|
-
makerExchangeRate: order.quality,
|
|
30
|
-
expirationTime: order.expiration,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
18
|
function getExpirationTime(node) {
|
|
34
19
|
const expirationTime = (node.finalFields.Expiration || node.newFields.Expiration);
|
|
35
20
|
if (expirationTime === undefined) {
|
|
@@ -83,14 +68,18 @@ function parseChangeAmount(node, type) {
|
|
|
83
68
|
return lodash_1.default.assign({}, finalAmount, { value: value });
|
|
84
69
|
}
|
|
85
70
|
function parseOrderChange(node) {
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
const flags = (0, offer_flags_1.default)(node.finalFields.Flags);
|
|
72
|
+
const takerPays = parseChangeAmount(node, "TakerPays");
|
|
73
|
+
const takerGets = parseChangeAmount(node, "TakerGets");
|
|
74
|
+
const orderChange = (0, common_1.removeUndefined)({
|
|
75
|
+
flags,
|
|
76
|
+
quantity: flags.sell === true ? takerGets : takerPays,
|
|
77
|
+
totalPrice: flags.sell === true ? takerPays : takerGets,
|
|
90
78
|
sequence: (node.finalFields.Sequence || node.newFields.Sequence),
|
|
91
79
|
status: parseOrderStatus(node),
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
makerExchangeRate: getQuality(node),
|
|
81
|
+
expirationTime: getExpirationTime(node),
|
|
82
|
+
direction: (node.finalFields.Flags & xrpl_1.LedgerEntry.OfferFlags.lsfSell) === 0 ? "buy" : "sell",
|
|
94
83
|
});
|
|
95
84
|
Object.defineProperty(orderChange, "account", {
|
|
96
85
|
value: node.finalFields.Account || node.newFields.Account,
|
package/lib/parse/outcome.js
CHANGED
|
@@ -8,7 +8,14 @@ const common_1 = require("../common");
|
|
|
8
8
|
const ESCROW_TYPES = ["EscrowFinish", "EscrowCreate", "EscrowCancel"];
|
|
9
9
|
const CHANNEL_TYPES = ["PaymentChannelCreate", "PaymentChannelFund", "PaymentChannelClaim"];
|
|
10
10
|
const CHECK_TYPES = ["CheckCreate", "CheckCash", "CheckCancel"];
|
|
11
|
-
const NFTOKEN_TYPES = [
|
|
11
|
+
const NFTOKEN_TYPES = [
|
|
12
|
+
"NFTokenMint",
|
|
13
|
+
"NFTokenBurn",
|
|
14
|
+
"NFTokenCreateOffer",
|
|
15
|
+
"NFTokenCancelOffer",
|
|
16
|
+
"NFTokenAcceptOffer",
|
|
17
|
+
"NFTokenModify",
|
|
18
|
+
];
|
|
12
19
|
const URITOKEN_TYPES = [
|
|
13
20
|
"Remit",
|
|
14
21
|
"URITokenMint",
|
|
@@ -46,20 +46,22 @@ const common_1 = require("../../common");
|
|
|
46
46
|
const signers_1 = require("../ledger/signers");
|
|
47
47
|
const regular_key_1 = require("../ledger/regular-key");
|
|
48
48
|
const source_1 = require("../ledger/source");
|
|
49
|
+
const offer_create_flags_1 = __importDefault(require("../ledger/offer-create-flags"));
|
|
49
50
|
function parseOfferCreate(tx) {
|
|
50
51
|
assert.ok(tx.TransactionType === "OfferCreate");
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const quantity =
|
|
55
|
-
const totalPrice =
|
|
52
|
+
const flags = (0, offer_create_flags_1.default)(tx.Flags);
|
|
53
|
+
const takerGets = (0, amount_1.default)(tx.TakerGets);
|
|
54
|
+
const takerPays = (0, amount_1.default)(tx.TakerPays);
|
|
55
|
+
const quantity = flags.sell === true ? takerGets : takerPays;
|
|
56
|
+
const totalPrice = flags.sell === true ? takerPays : takerGets;
|
|
56
57
|
return (0, common_1.removeUndefined)({
|
|
57
58
|
signers: (0, signers_1.parseSigners)(tx),
|
|
58
59
|
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
59
60
|
source: (0, source_1.parseSource)(tx),
|
|
60
|
-
|
|
61
|
+
flags,
|
|
61
62
|
quantity: quantity,
|
|
62
63
|
totalPrice: totalPrice,
|
|
64
|
+
direction: (tx.Flags & xrpl_1.OfferCreateFlags.tfSell) === 0 ? "buy" : "sell",
|
|
63
65
|
passive: (tx.Flags & xrpl_1.OfferCreateFlags.tfPassive) !== 0 || undefined,
|
|
64
66
|
immediateOrCancel: (tx.Flags & xrpl_1.OfferCreateFlags.tfImmediateOrCancel) !== 0 || undefined,
|
|
65
67
|
fillOrKill: (tx.Flags & xrpl_1.OfferCreateFlags.tfFillOrKill) !== 0 || undefined,
|
package/lib/types/offers.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import { LedgerEntry } from "xrpl";
|
|
1
|
+
import { LedgerEntry, OfferCreateFlags } from "xrpl";
|
|
2
2
|
import { FormattedBaseSpecification } from "./specification";
|
|
3
3
|
import { FormattedIssuedCurrencyAmount } from "./amounts";
|
|
4
|
+
export declare const OfferCreateFlagsKeys: {
|
|
5
|
+
passive: OfferCreateFlags;
|
|
6
|
+
immediateOrCancel: OfferCreateFlags;
|
|
7
|
+
fillOrKill: OfferCreateFlags;
|
|
8
|
+
sell: OfferCreateFlags;
|
|
9
|
+
};
|
|
10
|
+
export interface OfferCreateFlagsKeysInterface {
|
|
11
|
+
passive: boolean;
|
|
12
|
+
immediateOrCancel: boolean;
|
|
13
|
+
fillOrKill: boolean;
|
|
14
|
+
sell: boolean;
|
|
15
|
+
}
|
|
4
16
|
export declare const OfferFlagsKeys: {
|
|
5
17
|
passive: LedgerEntry.OfferFlags;
|
|
6
18
|
sell: LedgerEntry.OfferFlags;
|
|
@@ -13,12 +25,13 @@ export type FormattedOfferCancelSpecification = {
|
|
|
13
25
|
orderSequence: number;
|
|
14
26
|
} & FormattedBaseSpecification;
|
|
15
27
|
export type FormattedOfferCreateSpecification = {
|
|
16
|
-
|
|
28
|
+
flags: OfferCreateFlagsKeysInterface;
|
|
17
29
|
quantity: FormattedIssuedCurrencyAmount;
|
|
18
30
|
totalPrice: FormattedIssuedCurrencyAmount;
|
|
19
|
-
immediateOrCancel?: boolean;
|
|
20
|
-
fillOrKill?: boolean;
|
|
21
31
|
expirationTime?: string;
|
|
22
32
|
orderToReplace?: number;
|
|
33
|
+
direction: string;
|
|
34
|
+
immediateOrCancel?: boolean;
|
|
35
|
+
fillOrKill?: boolean;
|
|
23
36
|
passive?: boolean;
|
|
24
37
|
} & FormattedBaseSpecification;
|
package/lib/types/offers.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OfferFlagsKeys = void 0;
|
|
3
|
+
exports.OfferFlagsKeys = exports.OfferCreateFlagsKeys = void 0;
|
|
4
4
|
const xrpl_1 = require("xrpl");
|
|
5
5
|
const { OfferFlags } = xrpl_1.LedgerEntry;
|
|
6
|
+
exports.OfferCreateFlagsKeys = {
|
|
7
|
+
passive: xrpl_1.OfferCreateFlags.tfPassive,
|
|
8
|
+
immediateOrCancel: xrpl_1.OfferCreateFlags.tfImmediateOrCancel,
|
|
9
|
+
fillOrKill: xrpl_1.OfferCreateFlags.tfFillOrKill,
|
|
10
|
+
sell: xrpl_1.OfferCreateFlags.tfSell,
|
|
11
|
+
};
|
|
6
12
|
exports.OfferFlagsKeys = {
|
|
7
13
|
passive: OfferFlags.lsfPassive,
|
|
8
14
|
sell: OfferFlags.lsfSell,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bithomp/xrpl-api",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.20",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"lib/**/*"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"axios": "^1.8.
|
|
55
|
+
"axios": "^1.8.4",
|
|
56
56
|
"base-x": "^5.0.1",
|
|
57
57
|
"bignumber.js": "^9.1.2",
|
|
58
58
|
"elliptic": "^6.6.1",
|
|
@@ -62,27 +62,27 @@
|
|
|
62
62
|
"xrpl": "^4.2.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@eslint/eslintrc": "^3.3.
|
|
66
|
-
"@types/chai": "^5.2.
|
|
67
|
-
"@types/chai-as-promised": "^8.0.
|
|
65
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
66
|
+
"@types/chai": "^5.2.1",
|
|
67
|
+
"@types/chai-as-promised": "^8.0.2",
|
|
68
68
|
"@types/lodash": "^4.17.16",
|
|
69
69
|
"@types/mocha": "^10.0.10",
|
|
70
70
|
"@types/nconf": "^0.10.7",
|
|
71
|
-
"@types/node": "^22.
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
73
|
-
"@typescript-eslint/parser": "^8.
|
|
71
|
+
"@types/node": "^22.14.1",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
73
|
+
"@typescript-eslint/parser": "^8.30.1",
|
|
74
74
|
"chai": "^4.5.0",
|
|
75
75
|
"chai-as-promised": "^7.1.2",
|
|
76
|
-
"eslint": "^9.
|
|
77
|
-
"eslint-config-prettier": "^10.1.
|
|
76
|
+
"eslint": "^9.24.0",
|
|
77
|
+
"eslint-config-prettier": "^10.1.2",
|
|
78
78
|
"eslint-plugin-chai-friendly": "^1.0.1",
|
|
79
79
|
"eslint-plugin-import": "^2.31.0",
|
|
80
|
-
"eslint-plugin-n": "^17.
|
|
80
|
+
"eslint-plugin-n": "^17.17.0",
|
|
81
81
|
"eslint-plugin-promise": "^7.2.1",
|
|
82
82
|
"mocha": "^11.1.0",
|
|
83
|
-
"nconf": "^0.
|
|
84
|
-
"ts-jest": "^29.2
|
|
83
|
+
"nconf": "^0.13.0",
|
|
84
|
+
"ts-jest": "^29.3.2",
|
|
85
85
|
"ts-node": "^10.9.2",
|
|
86
|
-
"typescript": "^5.8.
|
|
86
|
+
"typescript": "^5.8.3"
|
|
87
87
|
}
|
|
88
88
|
}
|