@bithomp/xrpl-api 3.5.1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +3 -2
- package/lib/common/index.d.ts +2 -0
- package/lib/common/index.js +3 -1
- package/lib/ledger/transaction.js +4 -4
- package/lib/models/account_info.js +1 -1
- package/lib/parse/ledger/amount.js +3 -0
- package/lib/parse/ledger/batch-flags.d.ts +5 -0
- package/lib/parse/ledger/batch-flags.js +8 -0
- package/lib/parse/ledger/global-flags.d.ts +4 -0
- package/lib/parse/ledger/global-flags.js +8 -0
- package/lib/parse/ledger/ledger.js +35 -1
- package/lib/parse/ledger/tx-account-set-flags.d.ts +4 -0
- package/lib/parse/ledger/tx-account-set-flags.js +42 -0
- package/lib/parse/ledger/tx-amm-clawback-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-amm-clawback-flags.js +8 -0
- package/lib/parse/ledger/tx-amm-deposit-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-amm-deposit-flags.js +8 -0
- package/lib/parse/ledger/tx-amm-withdraw-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-amm-withdraw-flags.js +8 -0
- package/lib/parse/ledger/tx-batch-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-batch-flags.js +8 -0
- package/lib/parse/ledger/tx-global-flags.d.ts +5 -0
- package/lib/parse/ledger/tx-global-flags.js +8 -0
- package/lib/parse/ledger/tx-mptoken-authorize-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-mptoken-authorize-flags.js +8 -0
- package/lib/parse/ledger/tx-mptoken-issuance-create-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-mptoken-issuance-create-flags.js +8 -0
- package/lib/parse/ledger/tx-mptoken-issuance-set-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-mptoken-issuance-set-flags.js +8 -0
- package/lib/parse/ledger/tx-nftoken-mint-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-nftoken-mint-flags.js +8 -0
- package/lib/parse/ledger/tx-nftoken-offer-create-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-nftoken-offer-create-flags.js +8 -0
- package/lib/parse/ledger/tx-offer-create-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-offer-create-flags.js +8 -0
- package/lib/parse/ledger/tx-payment-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-payment-flags.js +8 -0
- package/lib/parse/ledger/tx-trust-set-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-trust-set-flags.js +8 -0
- package/lib/parse/ledger/tx-uritoken-mint-flags.d.ts +6 -0
- package/lib/parse/ledger/tx-uritoken-mint-flags.js +8 -0
- package/lib/parse/outcome/emitted_txns.d.ts +1 -1
- package/lib/parse/outcome/emitted_txns.js +6 -5
- package/lib/parse/outcome.js +9 -9
- package/lib/parse/specification/account-delete.d.ts +1 -1
- package/lib/parse/specification/account-delete.js +3 -1
- package/lib/parse/specification/amendment.d.ts +1 -1
- package/lib/parse/specification/amendment.js +3 -1
- package/lib/parse/specification/amm-bid.d.ts +1 -1
- package/lib/parse/specification/amm-bid.js +3 -1
- package/lib/parse/specification/amm-clawback.d.ts +1 -1
- package/lib/parse/specification/amm-clawback.js +3 -3
- package/lib/parse/specification/amm-create.d.ts +1 -1
- package/lib/parse/specification/amm-create.js +3 -1
- package/lib/parse/specification/amm-delete.d.ts +1 -1
- package/lib/parse/specification/amm-delete.js +3 -1
- package/lib/parse/specification/amm-deposit.d.ts +1 -1
- package/lib/parse/specification/amm-deposit.js +3 -3
- package/lib/parse/specification/amm-vote.d.ts +1 -1
- package/lib/parse/specification/amm-vote.js +3 -1
- package/lib/parse/specification/amm-withdraw.d.ts +1 -1
- package/lib/parse/specification/amm-withdraw.js +3 -3
- package/lib/parse/specification/batch.d.ts +4 -0
- package/lib/parse/specification/batch.js +83 -0
- package/lib/parse/specification/check-cancel.d.ts +1 -1
- package/lib/parse/specification/check-cancel.js +3 -1
- package/lib/parse/specification/check-cash.d.ts +1 -1
- package/lib/parse/specification/check-cash.js +3 -1
- package/lib/parse/specification/check-create.d.ts +1 -1
- package/lib/parse/specification/check-create.js +3 -1
- package/lib/parse/specification/clawback.d.ts +1 -1
- package/lib/parse/specification/clawback.js +3 -1
- package/lib/parse/specification/credential-accept.d.ts +2 -1
- package/lib/parse/specification/credential-accept.js +3 -1
- package/lib/parse/specification/credential-create.d.ts +2 -1
- package/lib/parse/specification/credential-create.js +3 -1
- package/lib/parse/specification/credential-delete.d.ts +2 -1
- package/lib/parse/specification/credential-delete.js +4 -2
- package/lib/parse/specification/delegate-set.d.ts +1 -1
- package/lib/parse/specification/delegate-set.js +3 -1
- package/lib/parse/specification/deposit-preauth.d.ts +1 -1
- package/lib/parse/specification/deposit-preauth.js +12 -1
- package/lib/parse/specification/did-delete.d.ts +1 -1
- package/lib/parse/specification/did-delete.js +3 -1
- package/lib/parse/specification/did-set.d.ts +1 -1
- package/lib/parse/specification/did-set.js +3 -1
- package/lib/parse/specification/escrow-cancel.d.ts +1 -1
- package/lib/parse/specification/escrow-cancel.js +3 -1
- package/lib/parse/specification/escrow-create.d.ts +1 -1
- package/lib/parse/specification/escrow-create.js +3 -1
- package/lib/parse/specification/escrow-finish.d.ts +1 -1
- package/lib/parse/specification/escrow-finish.js +3 -1
- package/lib/parse/specification/fee-update.d.ts +1 -1
- package/lib/parse/specification/fee-update.js +3 -1
- package/lib/parse/specification/genesis-mint.d.ts +1 -1
- package/lib/parse/specification/genesis-mint.js +3 -1
- package/lib/parse/specification/mptoken-authorize.d.ts +1 -1
- package/lib/parse/specification/mptoken-authorize.js +3 -3
- package/lib/parse/specification/mptoken-issuance-create.d.ts +1 -1
- package/lib/parse/specification/mptoken-issuance-create.js +3 -3
- package/lib/parse/specification/mptoken-issuance-destroy.d.ts +1 -1
- package/lib/parse/specification/mptoken-issuance-destroy.js +3 -1
- package/lib/parse/specification/mptoken-issuance-set.d.ts +1 -1
- package/lib/parse/specification/mptoken-issuance-set.js +3 -3
- package/lib/parse/specification/nftoken-accept-offer.d.ts +1 -1
- package/lib/parse/specification/nftoken-accept-offer.js +3 -3
- package/lib/parse/specification/nftoken-burn.d.ts +1 -1
- package/lib/parse/specification/nftoken-burn.js +3 -3
- package/lib/parse/specification/nftoken-cancel-offer.d.ts +1 -1
- package/lib/parse/specification/nftoken-cancel-offer.js +3 -3
- package/lib/parse/specification/nftoken-create-offer.d.ts +1 -1
- package/lib/parse/specification/nftoken-create-offer.js +3 -5
- package/lib/parse/specification/nftoken-mint.d.ts +1 -1
- package/lib/parse/specification/nftoken-mint.js +3 -3
- package/lib/parse/specification/nftoken-modify.d.ts +1 -1
- package/lib/parse/specification/nftoken-modify.js +3 -3
- package/lib/parse/specification/offer-cancel.d.ts +1 -1
- package/lib/parse/specification/offer-cancel.js +3 -1
- package/lib/parse/specification/offer-create.d.ts +1 -1
- package/lib/parse/specification/offer-create.js +6 -6
- package/lib/parse/specification/oracle-delete.d.ts +1 -1
- package/lib/parse/specification/oracle-delete.js +3 -1
- package/lib/parse/specification/oracle-set.d.ts +1 -1
- package/lib/parse/specification/oracle-set.js +3 -1
- package/lib/parse/specification/payment-channel-claim.d.ts +1 -1
- package/lib/parse/specification/payment-channel-claim.js +3 -1
- package/lib/parse/specification/payment-channel-create.d.ts +1 -1
- package/lib/parse/specification/payment-channel-create.js +3 -1
- package/lib/parse/specification/payment-channel-fund.d.ts +1 -1
- package/lib/parse/specification/payment-channel-fund.js +3 -1
- package/lib/parse/specification/payment.d.ts +1 -1
- package/lib/parse/specification/payment.js +8 -3
- package/lib/parse/specification/remit.d.ts +1 -1
- package/lib/parse/specification/remit.js +3 -1
- package/lib/parse/specification/set-remarks.d.ts +1 -1
- package/lib/parse/specification/set-remarks.js +3 -1
- package/lib/parse/specification/settings.d.ts +2 -1
- package/lib/parse/specification/settings.js +3 -1
- package/lib/parse/specification/ticket-create.d.ts +1 -1
- package/lib/parse/specification/ticket-create.js +3 -1
- package/lib/parse/specification/trust-set.d.ts +1 -1
- package/lib/parse/specification/trust-set.js +6 -1
- package/lib/parse/specification/unrecognized.d.ts +1 -1
- package/lib/parse/specification/unrecognized.js +3 -1
- package/lib/parse/specification/uritoken-burn.d.ts +1 -1
- package/lib/parse/specification/uritoken-burn.js +3 -1
- package/lib/parse/specification/uritoken-buy.d.ts +1 -1
- package/lib/parse/specification/uritoken-buy.js +3 -1
- package/lib/parse/specification/uritoken-cancel-sell-offer.d.ts +1 -1
- package/lib/parse/specification/uritoken-cancel-sell-offer.js +3 -1
- package/lib/parse/specification/uritoken-create-sell-offer.d.ts +1 -1
- package/lib/parse/specification/uritoken-create-sell-offer.js +3 -1
- package/lib/parse/specification/uritoken-mint.d.ts +1 -1
- package/lib/parse/specification/uritoken-mint.js +3 -3
- package/lib/parse/transaction.d.ts +118 -1
- package/lib/parse/transaction.js +8 -4
- package/lib/types/amm.d.ts +8 -7
- package/lib/types/amm.js +46 -6
- package/lib/types/batch.d.ts +21 -0
- package/lib/types/batch.js +26 -0
- package/lib/types/credentials.d.ts +1 -1
- package/lib/types/deposits.d.ts +6 -0
- package/lib/types/global.d.ts +19 -0
- package/lib/types/global.js +28 -0
- package/lib/types/mptokens.d.ts +7 -3
- package/lib/types/mptokens.js +44 -0
- package/lib/types/nftokens.d.ts +5 -2
- package/lib/types/nftokens.js +30 -0
- package/lib/types/offers.d.ts +3 -1
- package/lib/types/offers.js +16 -0
- package/lib/types/payments.d.ts +13 -0
- package/lib/types/payments.js +23 -0
- package/lib/types/specification.d.ts +2 -0
- package/lib/types/trustlines.d.ts +21 -1
- package/lib/types/trustlines.js +26 -1
- package/lib/types/uritokens.d.ts +3 -1
- package/lib/types/uritokens.js +16 -0
- package/package.json +7 -7
|
@@ -36,12 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
40
|
const memos_1 = require("../ledger/memos");
|
|
40
41
|
const signers_1 = require("../ledger/signers");
|
|
41
42
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
43
|
const delegate_1 = require("../ledger/delegate");
|
|
43
44
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseDidDelete(tx) {
|
|
45
|
+
function parseDidDelete(tx, nativeCurrency) {
|
|
45
46
|
assert.ok(tx.TransactionType === "DIDDelete");
|
|
46
47
|
return (0, common_1.removeUndefined)({
|
|
47
48
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -49,6 +50,7 @@ function parseDidDelete(tx) {
|
|
|
49
50
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
50
51
|
source: (0, source_1.parseSource)(tx),
|
|
51
52
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
53
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
52
54
|
memos: (0, memos_1.parseMemos)(tx),
|
|
53
55
|
});
|
|
54
56
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DIDSet } from "xrpl";
|
|
2
2
|
import { FormattedDIDSetSpecification } from "../../types/did";
|
|
3
|
-
declare function parseDidSet(tx: DIDSet): FormattedDIDSetSpecification;
|
|
3
|
+
declare function parseDidSet(tx: DIDSet, nativeCurrency?: string): FormattedDIDSetSpecification;
|
|
4
4
|
export default parseDidSet;
|
|
@@ -36,12 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
40
|
const memos_1 = require("../ledger/memos");
|
|
40
41
|
const signers_1 = require("../ledger/signers");
|
|
41
42
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
43
|
const delegate_1 = require("../ledger/delegate");
|
|
43
44
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseDidSet(tx) {
|
|
45
|
+
function parseDidSet(tx, nativeCurrency) {
|
|
45
46
|
assert.ok(tx.TransactionType === "DIDSet");
|
|
46
47
|
return (0, common_1.removeUndefined)({
|
|
47
48
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -52,6 +53,7 @@ function parseDidSet(tx) {
|
|
|
52
53
|
data: tx.Data,
|
|
53
54
|
didDocument: tx.DIDDocument,
|
|
54
55
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
56
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
55
57
|
memos: (0, memos_1.parseMemos)(tx),
|
|
56
58
|
});
|
|
57
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EscrowCancel } from "xrpl";
|
|
2
2
|
import { FormattedEscrowCancelSpecification } from "../../types/escrows";
|
|
3
|
-
declare function parseEscrowCancel(tx: EscrowCancel): FormattedEscrowCancelSpecification;
|
|
3
|
+
declare function parseEscrowCancel(tx: EscrowCancel, nativeCurrency?: string): FormattedEscrowCancelSpecification;
|
|
4
4
|
export default parseEscrowCancel;
|
|
@@ -36,12 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
40
|
const memos_1 = require("../ledger/memos");
|
|
40
41
|
const signers_1 = require("../ledger/signers");
|
|
41
42
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
43
|
const delegate_1 = require("../ledger/delegate");
|
|
43
44
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseEscrowCancel(tx) {
|
|
45
|
+
function parseEscrowCancel(tx, nativeCurrency) {
|
|
45
46
|
assert.ok(tx.TransactionType === "EscrowCancel");
|
|
46
47
|
return (0, common_1.removeUndefined)({
|
|
47
48
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -51,6 +52,7 @@ function parseEscrowCancel(tx) {
|
|
|
51
52
|
owner: tx.Owner,
|
|
52
53
|
escrowSequence: tx.OfferSequence,
|
|
53
54
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
55
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
54
56
|
memos: (0, memos_1.parseMemos)(tx),
|
|
55
57
|
});
|
|
56
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EscrowCreate } from "xrpl";
|
|
2
2
|
import { FormattedEscrowCreateSpecification } from "../../types/escrows";
|
|
3
|
-
declare function parseEscrowCreation(tx: EscrowCreate): FormattedEscrowCreateSpecification;
|
|
3
|
+
declare function parseEscrowCreation(tx: EscrowCreate, nativeCurrency?: string): FormattedEscrowCreateSpecification;
|
|
4
4
|
export default parseEscrowCreation;
|
|
@@ -37,13 +37,14 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const utils_1 = require("../utils");
|
|
39
39
|
const emit_details_1 = require("../ledger/emit_details");
|
|
40
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
40
41
|
const memos_1 = require("../ledger/memos");
|
|
41
42
|
const signers_1 = require("../ledger/signers");
|
|
42
43
|
const regular_key_1 = require("../ledger/regular-key");
|
|
43
44
|
const delegate_1 = require("../ledger/delegate");
|
|
44
45
|
const source_1 = require("../ledger/source");
|
|
45
46
|
const destination_1 = require("../ledger/destination");
|
|
46
|
-
function parseEscrowCreation(tx) {
|
|
47
|
+
function parseEscrowCreation(tx, nativeCurrency) {
|
|
47
48
|
assert.ok(tx.TransactionType === "EscrowCreate");
|
|
48
49
|
return (0, common_1.removeUndefined)({
|
|
49
50
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -56,6 +57,7 @@ function parseEscrowCreation(tx) {
|
|
|
56
57
|
allowCancelAfter: (0, utils_1.parseTimestamp)(tx.CancelAfter),
|
|
57
58
|
allowExecuteAfter: (0, utils_1.parseTimestamp)(tx.FinishAfter),
|
|
58
59
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
60
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
59
61
|
memos: (0, memos_1.parseMemos)(tx),
|
|
60
62
|
});
|
|
61
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EscrowFinish } from "xrpl";
|
|
2
2
|
import { FormattedEscrowFinishSpecification } from "../../types/escrows";
|
|
3
|
-
declare function parseEscrowFinish(tx: EscrowFinish): FormattedEscrowFinishSpecification;
|
|
3
|
+
declare function parseEscrowFinish(tx: EscrowFinish, nativeCurrency?: string): FormattedEscrowFinishSpecification;
|
|
4
4
|
export default parseEscrowFinish;
|
|
@@ -36,12 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
40
|
const memos_1 = require("../ledger/memos");
|
|
40
41
|
const signers_1 = require("../ledger/signers");
|
|
41
42
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
43
|
const delegate_1 = require("../ledger/delegate");
|
|
43
44
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseEscrowFinish(tx) {
|
|
45
|
+
function parseEscrowFinish(tx, nativeCurrency) {
|
|
45
46
|
assert.ok(tx.TransactionType === "EscrowFinish");
|
|
46
47
|
return (0, common_1.removeUndefined)({
|
|
47
48
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -53,6 +54,7 @@ function parseEscrowFinish(tx) {
|
|
|
53
54
|
condition: tx.Condition,
|
|
54
55
|
fulfillment: tx.Fulfillment,
|
|
55
56
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
57
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
56
58
|
memos: (0, memos_1.parseMemos)(tx),
|
|
57
59
|
});
|
|
58
60
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FormattedFeeUpdateSpecification } from "../../types/fees";
|
|
2
|
-
declare function parseFeeUpdate(tx: any): FormattedFeeUpdateSpecification;
|
|
2
|
+
declare function parseFeeUpdate(tx: any, nativeCurrency?: string): FormattedFeeUpdateSpecification;
|
|
3
3
|
export default parseFeeUpdate;
|
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
7
7
|
const common_1 = require("../../common");
|
|
8
8
|
const emit_details_1 = require("../ledger/emit_details");
|
|
9
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
9
10
|
const memos_1 = require("../ledger/memos");
|
|
10
11
|
const source_1 = require("../ledger/source");
|
|
11
|
-
function parseFeeUpdate(tx) {
|
|
12
|
+
function parseFeeUpdate(tx, nativeCurrency) {
|
|
12
13
|
const baseFeeDrops = new bignumber_js_1.default(tx.BaseFee, 16).toString();
|
|
13
14
|
return {
|
|
14
15
|
source: (0, source_1.parseSource)(tx),
|
|
@@ -17,6 +18,7 @@ function parseFeeUpdate(tx) {
|
|
|
17
18
|
reserveBaseXRP: (0, common_1.dropsToXrp)(tx.ReserveBase),
|
|
18
19
|
reserveIncrementXRP: (0, common_1.dropsToXrp)(tx.ReserveIncrement),
|
|
19
20
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
21
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
20
22
|
memos: (0, memos_1.parseMemos)(tx),
|
|
21
23
|
};
|
|
22
24
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FormattedGenesisMintSpecification } from "../../types/genesis_mint";
|
|
2
|
-
declare function parseGenesisMint(tx: any): FormattedGenesisMintSpecification;
|
|
2
|
+
declare function parseGenesisMint(tx: any, nativeCurrency?: string): FormattedGenesisMintSpecification;
|
|
3
3
|
export default parseGenesisMint;
|
|
@@ -36,15 +36,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
40
|
const memos_1 = require("../ledger/memos");
|
|
40
41
|
const source_1 = require("../ledger/source");
|
|
41
42
|
const genesis_mints_1 = require("../ledger/genesis-mints");
|
|
42
|
-
function parseGenesisMint(tx) {
|
|
43
|
+
function parseGenesisMint(tx, nativeCurrency) {
|
|
43
44
|
assert.ok(tx.TransactionType === "GenesisMint");
|
|
44
45
|
return (0, common_1.removeUndefined)({
|
|
45
46
|
source: (0, source_1.parseSource)(tx),
|
|
46
47
|
genesisMints: (0, genesis_mints_1.parseGenesisMints)(tx),
|
|
47
48
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
49
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
48
50
|
memos: (0, memos_1.parseMemos)(tx),
|
|
49
51
|
});
|
|
50
52
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MPTokenAuthorize } from "xrpl";
|
|
2
2
|
import { FormattedMPTokenAuthorizeSpecification } from "../../types/mptokens";
|
|
3
|
-
declare function parseMPTokenAuthorize(tx: MPTokenAuthorize): FormattedMPTokenAuthorizeSpecification;
|
|
3
|
+
declare function parseMPTokenAuthorize(tx: MPTokenAuthorize, nativeCurrency?: string): FormattedMPTokenAuthorizeSpecification;
|
|
4
4
|
export default parseMPTokenAuthorize;
|
|
@@ -39,19 +39,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
const assert = __importStar(require("assert"));
|
|
40
40
|
const common_1 = require("../../common");
|
|
41
41
|
const memos_1 = require("../ledger/memos");
|
|
42
|
-
const
|
|
42
|
+
const tx_mptoken_authorize_flags_1 = __importDefault(require("../ledger/tx-mptoken-authorize-flags"));
|
|
43
43
|
const signers_1 = require("../ledger/signers");
|
|
44
44
|
const regular_key_1 = require("../ledger/regular-key");
|
|
45
45
|
const delegate_1 = require("../ledger/delegate");
|
|
46
46
|
const source_1 = require("../ledger/source");
|
|
47
|
-
function parseMPTokenAuthorize(tx) {
|
|
47
|
+
function parseMPTokenAuthorize(tx, nativeCurrency) {
|
|
48
48
|
assert.ok(tx.TransactionType === "MPTokenAuthorize");
|
|
49
49
|
return (0, common_1.removeUndefined)({
|
|
50
50
|
signers: (0, signers_1.parseSigners)(tx),
|
|
51
51
|
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
52
52
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
53
53
|
source: (0, source_1.parseSource)(tx),
|
|
54
|
-
flags: (0,
|
|
54
|
+
flags: (0, tx_mptoken_authorize_flags_1.default)(tx.Flags, { nativeCurrency }),
|
|
55
55
|
holder: tx.Holder,
|
|
56
56
|
mptIssuanceID: tx.MPTokenIssuanceID,
|
|
57
57
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MPTokenIssuanceCreate } from "xrpl";
|
|
2
2
|
import { FormattedMPTokenIssuanceCreateSpecification } from "../../types/mptokens";
|
|
3
|
-
declare function parseMPTokenIssuanceCreate(tx: MPTokenIssuanceCreate): FormattedMPTokenIssuanceCreateSpecification;
|
|
3
|
+
declare function parseMPTokenIssuanceCreate(tx: MPTokenIssuanceCreate, nativeCurrency?: string): FormattedMPTokenIssuanceCreateSpecification;
|
|
4
4
|
export default parseMPTokenIssuanceCreate;
|
|
@@ -39,12 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
const assert = __importStar(require("assert"));
|
|
40
40
|
const common_1 = require("../../common");
|
|
41
41
|
const memos_1 = require("../ledger/memos");
|
|
42
|
-
const
|
|
42
|
+
const tx_mptoken_issuance_create_flags_1 = __importDefault(require("../ledger/tx-mptoken-issuance-create-flags"));
|
|
43
43
|
const signers_1 = require("../ledger/signers");
|
|
44
44
|
const regular_key_1 = require("../ledger/regular-key");
|
|
45
45
|
const delegate_1 = require("../ledger/delegate");
|
|
46
46
|
const source_1 = require("../ledger/source");
|
|
47
|
-
function parseMPTokenIssuanceCreate(tx) {
|
|
47
|
+
function parseMPTokenIssuanceCreate(tx, nativeCurrency) {
|
|
48
48
|
assert.ok(tx.TransactionType === "MPTokenIssuanceCreate");
|
|
49
49
|
return (0, common_1.removeUndefined)({
|
|
50
50
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -52,7 +52,7 @@ function parseMPTokenIssuanceCreate(tx) {
|
|
|
52
52
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
53
53
|
source: (0, source_1.parseSource)(tx),
|
|
54
54
|
scale: tx.AssetScale,
|
|
55
|
-
flags: (0,
|
|
55
|
+
flags: (0, tx_mptoken_issuance_create_flags_1.default)(tx.Flags, { nativeCurrency }),
|
|
56
56
|
metadata: tx.MPTokenMetadata,
|
|
57
57
|
maximumAmount: tx.MaximumAmount,
|
|
58
58
|
transferFee: tx.TransferFee,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MPTokenIssuanceDestroy } from "xrpl";
|
|
2
2
|
import { FormattedMPTokenIssuanceDestroySpecification } from "../../types/mptokens";
|
|
3
|
-
declare function parseMPTokenIssuanceCreate(tx: MPTokenIssuanceDestroy): FormattedMPTokenIssuanceDestroySpecification;
|
|
3
|
+
declare function parseMPTokenIssuanceCreate(tx: MPTokenIssuanceDestroy, nativeCurrency?: string): FormattedMPTokenIssuanceDestroySpecification;
|
|
4
4
|
export default parseMPTokenIssuanceCreate;
|
|
@@ -35,12 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
38
39
|
const memos_1 = require("../ledger/memos");
|
|
39
40
|
const signers_1 = require("../ledger/signers");
|
|
40
41
|
const regular_key_1 = require("../ledger/regular-key");
|
|
41
42
|
const delegate_1 = require("../ledger/delegate");
|
|
42
43
|
const source_1 = require("../ledger/source");
|
|
43
|
-
function parseMPTokenIssuanceCreate(tx) {
|
|
44
|
+
function parseMPTokenIssuanceCreate(tx, nativeCurrency) {
|
|
44
45
|
assert.ok(tx.TransactionType === "MPTokenIssuanceDestroy");
|
|
45
46
|
return (0, common_1.removeUndefined)({
|
|
46
47
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -48,6 +49,7 @@ function parseMPTokenIssuanceCreate(tx) {
|
|
|
48
49
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
49
50
|
source: (0, source_1.parseSource)(tx),
|
|
50
51
|
mptIssuanceID: tx.MPTokenIssuanceID,
|
|
52
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
51
53
|
memos: (0, memos_1.parseMemos)(tx),
|
|
52
54
|
});
|
|
53
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MPTokenIssuanceSet } from "xrpl";
|
|
2
2
|
import { FormattedMPTokenIssuanceSetSpecification } from "../../types/mptokens";
|
|
3
|
-
declare function parseMPTokenIssuanceCreate(tx: MPTokenIssuanceSet): FormattedMPTokenIssuanceSetSpecification;
|
|
3
|
+
declare function parseMPTokenIssuanceCreate(tx: MPTokenIssuanceSet, nativeCurrency?: string): FormattedMPTokenIssuanceSetSpecification;
|
|
4
4
|
export default parseMPTokenIssuanceCreate;
|
|
@@ -43,15 +43,15 @@ const signers_1 = require("../ledger/signers");
|
|
|
43
43
|
const regular_key_1 = require("../ledger/regular-key");
|
|
44
44
|
const delegate_1 = require("../ledger/delegate");
|
|
45
45
|
const source_1 = require("../ledger/source");
|
|
46
|
-
const
|
|
47
|
-
function parseMPTokenIssuanceCreate(tx) {
|
|
46
|
+
const tx_mptoken_issuance_set_flags_1 = __importDefault(require("../ledger/tx-mptoken-issuance-set-flags"));
|
|
47
|
+
function parseMPTokenIssuanceCreate(tx, nativeCurrency) {
|
|
48
48
|
assert.ok(tx.TransactionType === "MPTokenIssuanceSet");
|
|
49
49
|
return (0, common_1.removeUndefined)({
|
|
50
50
|
signers: (0, signers_1.parseSigners)(tx),
|
|
51
51
|
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
52
52
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
53
53
|
source: (0, source_1.parseSource)(tx),
|
|
54
|
-
flags: (0,
|
|
54
|
+
flags: (0, tx_mptoken_issuance_set_flags_1.default)(tx.Flags, { nativeCurrency }),
|
|
55
55
|
holder: tx.Holder,
|
|
56
56
|
mptIssuanceID: tx.MPTokenIssuanceID,
|
|
57
57
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NFTokenAcceptOffer } from "xrpl";
|
|
2
2
|
import { FormattedNFTokenAcceptOfferSpecification } from "../../types/nftokens";
|
|
3
|
-
declare function parseNFTokenAcceptOffer(tx: NFTokenAcceptOffer): FormattedNFTokenAcceptOfferSpecification;
|
|
3
|
+
declare function parseNFTokenAcceptOffer(tx: NFTokenAcceptOffer, nativeCurrency?: string): FormattedNFTokenAcceptOfferSpecification;
|
|
4
4
|
export default parseNFTokenAcceptOffer;
|
|
@@ -35,13 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
|
-
const
|
|
38
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
40
|
const signers_1 = require("../ledger/signers");
|
|
41
41
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
42
|
const delegate_1 = require("../ledger/delegate");
|
|
43
43
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseNFTokenAcceptOffer(tx) {
|
|
44
|
+
function parseNFTokenAcceptOffer(tx, nativeCurrency) {
|
|
45
45
|
assert.ok(tx.TransactionType === "NFTokenAcceptOffer");
|
|
46
46
|
return (0, common_1.removeUndefined)({
|
|
47
47
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -51,7 +51,7 @@ function parseNFTokenAcceptOffer(tx) {
|
|
|
51
51
|
nftokenSellOffer: tx.NFTokenSellOffer,
|
|
52
52
|
nftokenBuyOffer: tx.NFTokenBuyOffer,
|
|
53
53
|
nftokenBrokerFee: tx.NFTokenBrokerFee,
|
|
54
|
-
|
|
54
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
55
55
|
memos: (0, memos_1.parseMemos)(tx),
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NFTokenBurn } from "xrpl";
|
|
2
2
|
import { FormattedNFTokenBurnSpecification } from "../../types/nftokens";
|
|
3
|
-
declare function parseNFTokenBurn(tx: NFTokenBurn): FormattedNFTokenBurnSpecification;
|
|
3
|
+
declare function parseNFTokenBurn(tx: NFTokenBurn, nativeCurrency?: string): FormattedNFTokenBurnSpecification;
|
|
4
4
|
export default parseNFTokenBurn;
|
|
@@ -35,13 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
|
-
const
|
|
38
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
40
|
const signers_1 = require("../ledger/signers");
|
|
41
41
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
42
|
const delegate_1 = require("../ledger/delegate");
|
|
43
43
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseNFTokenBurn(tx) {
|
|
44
|
+
function parseNFTokenBurn(tx, nativeCurrency) {
|
|
45
45
|
assert.ok(tx.TransactionType === "NFTokenBurn");
|
|
46
46
|
return (0, common_1.removeUndefined)({
|
|
47
47
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -49,7 +49,7 @@ function parseNFTokenBurn(tx) {
|
|
|
49
49
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
50
50
|
source: (0, source_1.parseSource)(tx),
|
|
51
51
|
nftokenID: tx.NFTokenID,
|
|
52
|
-
|
|
52
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
53
53
|
memos: (0, memos_1.parseMemos)(tx),
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NFTokenCancelOffer } from "xrpl";
|
|
2
2
|
import { FormattedNFTokenCancelOfferSpecification } from "../../types/nftokens";
|
|
3
|
-
declare function parseNFTokenCancelOffer(tx: NFTokenCancelOffer): FormattedNFTokenCancelOfferSpecification;
|
|
3
|
+
declare function parseNFTokenCancelOffer(tx: NFTokenCancelOffer, nativeCurrency?: string): FormattedNFTokenCancelOfferSpecification;
|
|
4
4
|
export default parseNFTokenCancelOffer;
|
|
@@ -35,13 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
|
-
const
|
|
38
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
40
|
const signers_1 = require("../ledger/signers");
|
|
41
41
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
42
|
const delegate_1 = require("../ledger/delegate");
|
|
43
43
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseNFTokenCancelOffer(tx) {
|
|
44
|
+
function parseNFTokenCancelOffer(tx, nativeCurrency) {
|
|
45
45
|
assert.ok(tx.TransactionType === "NFTokenCancelOffer");
|
|
46
46
|
return (0, common_1.removeUndefined)({
|
|
47
47
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -49,7 +49,7 @@ function parseNFTokenCancelOffer(tx) {
|
|
|
49
49
|
delegate: (0, delegate_1.parseDelegate)(tx),
|
|
50
50
|
source: (0, source_1.parseSource)(tx),
|
|
51
51
|
nftokenOffers: tx.NFTokenOffers,
|
|
52
|
-
|
|
52
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
53
53
|
memos: (0, memos_1.parseMemos)(tx),
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NFTokenCreateOffer } from "xrpl";
|
|
2
2
|
import { FormattedNFTokenCreateOfferSpecification } from "../../types/nftokens";
|
|
3
|
-
declare function parseNFTokenCreateOffer(tx: NFTokenCreateOffer): FormattedNFTokenCreateOfferSpecification;
|
|
3
|
+
declare function parseNFTokenCreateOffer(tx: NFTokenCreateOffer, nativeCurrency?: string): FormattedNFTokenCreateOfferSpecification;
|
|
4
4
|
export default parseNFTokenCreateOffer;
|
|
@@ -38,16 +38,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const assert = __importStar(require("assert"));
|
|
40
40
|
const common_1 = require("../../common");
|
|
41
|
-
const emit_details_1 = require("../ledger/emit_details");
|
|
42
41
|
const memos_1 = require("../ledger/memos");
|
|
43
|
-
const
|
|
42
|
+
const tx_nftoken_offer_create_flags_1 = __importDefault(require("../ledger/tx-nftoken-offer-create-flags"));
|
|
44
43
|
const ledger_1 = require("../../models/ledger");
|
|
45
44
|
const signers_1 = require("../ledger/signers");
|
|
46
45
|
const regular_key_1 = require("../ledger/regular-key");
|
|
47
46
|
const delegate_1 = require("../ledger/delegate");
|
|
48
47
|
const source_1 = require("../ledger/source");
|
|
49
48
|
const destination_1 = require("../ledger/destination");
|
|
50
|
-
function parseNFTokenCreateOffer(tx) {
|
|
49
|
+
function parseNFTokenCreateOffer(tx, nativeCurrency) {
|
|
51
50
|
assert.ok(tx.TransactionType === "NFTokenCreateOffer");
|
|
52
51
|
let expiration;
|
|
53
52
|
if (typeof tx.Expiration === "number") {
|
|
@@ -63,8 +62,7 @@ function parseNFTokenCreateOffer(tx) {
|
|
|
63
62
|
amount: tx.Amount,
|
|
64
63
|
owner: tx.Owner,
|
|
65
64
|
expiration,
|
|
66
|
-
flags: (0,
|
|
67
|
-
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
65
|
+
flags: (0, tx_nftoken_offer_create_flags_1.default)(tx.Flags, { nativeCurrency }),
|
|
68
66
|
memos: (0, memos_1.parseMemos)(tx),
|
|
69
67
|
});
|
|
70
68
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NFTokenMint } from "xrpl";
|
|
2
2
|
import { FormattedNFTokenMintSpecification } from "../../types/nftokens";
|
|
3
|
-
declare function parseNFTokenMint(tx: NFTokenMint): FormattedNFTokenMintSpecification;
|
|
3
|
+
declare function parseNFTokenMint(tx: NFTokenMint, nativeCurrency?: string): FormattedNFTokenMintSpecification;
|
|
4
4
|
export default parseNFTokenMint;
|
|
@@ -45,9 +45,9 @@ const regular_key_1 = require("../ledger/regular-key");
|
|
|
45
45
|
const delegate_1 = require("../ledger/delegate");
|
|
46
46
|
const source_1 = require("../ledger/source");
|
|
47
47
|
const destination_1 = require("../ledger/destination");
|
|
48
|
-
const
|
|
48
|
+
const tx_nftoken_mint_flags_1 = __importDefault(require("../ledger/tx-nftoken-mint-flags"));
|
|
49
49
|
const ledger_1 = require("../../models/ledger");
|
|
50
|
-
function parseNFTokenMint(tx) {
|
|
50
|
+
function parseNFTokenMint(tx, nativeCurrency) {
|
|
51
51
|
assert.ok(tx.TransactionType === "NFTokenMint");
|
|
52
52
|
let expiration;
|
|
53
53
|
if (typeof tx.Expiration === "number") {
|
|
@@ -63,7 +63,7 @@ function parseNFTokenMint(tx) {
|
|
|
63
63
|
issuer: tx.Issuer,
|
|
64
64
|
transferFee: tx.TransferFee,
|
|
65
65
|
uri: tx.URI,
|
|
66
|
-
flags: (0,
|
|
66
|
+
flags: (0, tx_nftoken_mint_flags_1.default)(tx.Flags, { nativeCurrency }),
|
|
67
67
|
amount: tx.Amount,
|
|
68
68
|
expiration,
|
|
69
69
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NFTokenModify } from "xrpl";
|
|
2
2
|
import { FormattedNFTokenModifySpecification } from "../../types/nftokens";
|
|
3
|
-
declare function parseNFTokenModify(tx: NFTokenModify): FormattedNFTokenModifySpecification;
|
|
3
|
+
declare function parseNFTokenModify(tx: NFTokenModify, nativeCurrency?: string): FormattedNFTokenModifySpecification;
|
|
4
4
|
export default parseNFTokenModify;
|
|
@@ -35,13 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
|
-
const
|
|
38
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
40
|
const signers_1 = require("../ledger/signers");
|
|
41
41
|
const regular_key_1 = require("../ledger/regular-key");
|
|
42
42
|
const delegate_1 = require("../ledger/delegate");
|
|
43
43
|
const source_1 = require("../ledger/source");
|
|
44
|
-
function parseNFTokenModify(tx) {
|
|
44
|
+
function parseNFTokenModify(tx, nativeCurrency) {
|
|
45
45
|
assert.ok(tx.TransactionType === "NFTokenModify");
|
|
46
46
|
return (0, common_1.removeUndefined)({
|
|
47
47
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -51,7 +51,7 @@ function parseNFTokenModify(tx) {
|
|
|
51
51
|
nftokenID: tx.NFTokenID,
|
|
52
52
|
owner: tx.Owner,
|
|
53
53
|
uri: tx.URI,
|
|
54
|
-
|
|
54
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
55
55
|
memos: (0, memos_1.parseMemos)(tx),
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { OfferCancel } from "xrpl";
|
|
2
2
|
import { FormattedOfferCancelSpecification } from "../../types/offers";
|
|
3
|
-
declare function parseOfferCancel(tx: OfferCancel): FormattedOfferCancelSpecification;
|
|
3
|
+
declare function parseOfferCancel(tx: OfferCancel, nativeCurrency?: string): FormattedOfferCancelSpecification;
|
|
4
4
|
export default parseOfferCancel;
|
|
@@ -34,13 +34,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
|
+
const tx_global_flags_1 = require("../ledger/tx-global-flags");
|
|
37
38
|
const memos_1 = require("../ledger/memos");
|
|
38
39
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
40
|
const signers_1 = require("../ledger/signers");
|
|
40
41
|
const regular_key_1 = require("../ledger/regular-key");
|
|
41
42
|
const delegate_1 = require("../ledger/delegate");
|
|
42
43
|
const source_1 = require("../ledger/source");
|
|
43
|
-
function parseOfferCancel(tx) {
|
|
44
|
+
function parseOfferCancel(tx, nativeCurrency) {
|
|
44
45
|
assert.ok(tx.TransactionType === "OfferCancel");
|
|
45
46
|
return {
|
|
46
47
|
signers: (0, signers_1.parseSigners)(tx),
|
|
@@ -49,6 +50,7 @@ function parseOfferCancel(tx) {
|
|
|
49
50
|
source: (0, source_1.parseSource)(tx),
|
|
50
51
|
orderSequence: tx.OfferSequence,
|
|
51
52
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
53
|
+
flags: (0, tx_global_flags_1.parseTxGlobalFlags)(tx.Flags, { nativeCurrency }),
|
|
52
54
|
memos: (0, memos_1.parseMemos)(tx),
|
|
53
55
|
};
|
|
54
56
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { OfferCreate } from "xrpl";
|
|
2
2
|
import { FormattedOfferCreateSpecification } from "../../types";
|
|
3
|
-
declare function parseOfferCreate(tx: OfferCreate): FormattedOfferCreateSpecification;
|
|
3
|
+
declare function parseOfferCreate(tx: OfferCreate, nativeCurrency?: string): FormattedOfferCreateSpecification;
|
|
4
4
|
export default parseOfferCreate;
|
|
@@ -47,10 +47,10 @@ const signers_1 = require("../ledger/signers");
|
|
|
47
47
|
const regular_key_1 = require("../ledger/regular-key");
|
|
48
48
|
const delegate_1 = require("../ledger/delegate");
|
|
49
49
|
const source_1 = require("../ledger/source");
|
|
50
|
-
const
|
|
51
|
-
function parseOfferCreate(tx) {
|
|
50
|
+
const tx_offer_create_flags_1 = __importDefault(require("../ledger/tx-offer-create-flags"));
|
|
51
|
+
function parseOfferCreate(tx, nativeCurrency) {
|
|
52
52
|
assert.ok(tx.TransactionType === "OfferCreate");
|
|
53
|
-
const flags = (0,
|
|
53
|
+
const flags = (0, tx_offer_create_flags_1.default)(tx.Flags, { nativeCurrency });
|
|
54
54
|
const takerGets = (0, amount_1.default)(tx.TakerGets);
|
|
55
55
|
const takerPays = (0, amount_1.default)(tx.TakerPays);
|
|
56
56
|
const quantity = flags.sell === true ? takerGets : takerPays;
|
|
@@ -63,13 +63,13 @@ function parseOfferCreate(tx) {
|
|
|
63
63
|
flags,
|
|
64
64
|
quantity: quantity,
|
|
65
65
|
totalPrice: totalPrice,
|
|
66
|
+
expirationTime: (0, utils_1.parseTimestamp)(tx.Expiration),
|
|
67
|
+
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
68
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
66
69
|
direction: (tx.Flags & xrpl_1.OfferCreateFlags.tfSell) === 0 ? "buy" : "sell",
|
|
67
70
|
passive: (tx.Flags & xrpl_1.OfferCreateFlags.tfPassive) !== 0 || undefined,
|
|
68
71
|
immediateOrCancel: (tx.Flags & xrpl_1.OfferCreateFlags.tfImmediateOrCancel) !== 0 || undefined,
|
|
69
72
|
fillOrKill: (tx.Flags & xrpl_1.OfferCreateFlags.tfFillOrKill) !== 0 || undefined,
|
|
70
|
-
expirationTime: (0, utils_1.parseTimestamp)(tx.Expiration),
|
|
71
|
-
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
72
|
-
memos: (0, memos_1.parseMemos)(tx),
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
exports.default = parseOfferCreate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { OracleDelete } from "xrpl";
|
|
2
2
|
import { FormattedOracleDeleteSpecification } from "../../types/oracle";
|
|
3
|
-
declare function parseDidDelete(tx: OracleDelete): FormattedOracleDeleteSpecification;
|
|
3
|
+
declare function parseDidDelete(tx: OracleDelete, nativeCurrency?: string): FormattedOracleDeleteSpecification;
|
|
4
4
|
export default parseDidDelete;
|