@bithomp/xrpl-api 3.2.8 → 3.2.10
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/account_lines.d.ts +1 -1
- package/lib/ledger/account_lines.js +11 -2
- package/lib/ledger/currency.d.ts +1 -0
- package/lib/ledger/currency.js +4 -2
- package/lib/ledger/transaction.js +6 -0
- package/lib/models/book_offers.d.ts +3 -3
- package/lib/models/book_offers.js +1 -1
- package/lib/parse/ledger/amount.d.ts +2 -2
- package/lib/parse/ledger/amount.js +1 -0
- package/lib/parse/ledger/asset.d.ts +1 -1
- package/lib/parse/ledger/asset.js +1 -0
- package/lib/parse/ledger/destination.d.ts +2 -0
- package/lib/parse/ledger/destination.js +12 -0
- package/lib/parse/ledger/gateway-balances.js +4 -4
- package/lib/parse/ledger/ledger.js +12 -8
- package/lib/parse/ledger/regular-key.d.ts +2 -0
- package/lib/parse/ledger/regular-key.js +14 -0
- package/lib/parse/ledger/signers.d.ts +2 -0
- package/lib/parse/ledger/signers.js +12 -0
- package/lib/parse/ledger/source.d.ts +3 -0
- package/lib/parse/ledger/source.js +28 -0
- package/lib/parse/outcome/amm_changes.js +4 -2
- package/lib/parse/outcome/balance_changes.d.ts +2 -1
- package/lib/parse/outcome/balance_changes.js +5 -3
- package/lib/parse/outcome/locked_balance_changes.d.ts +2 -1
- package/lib/parse/outcome/locked_balance_changes.js +2 -1
- package/lib/parse/outcome.js +3 -2
- package/lib/parse/specification/account-delete.js +8 -11
- package/lib/parse/specification/amm-bid.js +6 -6
- package/lib/parse/specification/amm-clawback.js +6 -5
- package/lib/parse/specification/amm-create.js +6 -6
- package/lib/parse/specification/amm-delete.js +6 -6
- package/lib/parse/specification/amm-deposit.js +6 -6
- package/lib/parse/specification/amm-vote.js +6 -6
- package/lib/parse/specification/amm-withdraw.js +6 -6
- package/lib/parse/specification/check-cancel.js +6 -0
- package/lib/parse/specification/check-cash.js +6 -0
- package/lib/parse/specification/check-create.js +8 -11
- package/lib/parse/specification/clawback.js +6 -6
- package/lib/parse/specification/deposit-preauth.js +6 -0
- package/lib/parse/specification/did-delete.js +6 -6
- package/lib/parse/specification/did-set.js +6 -6
- package/lib/parse/specification/escrow-cancel.js +6 -5
- package/lib/parse/specification/escrow-create.js +8 -10
- package/lib/parse/specification/escrow-finish.js +6 -5
- package/lib/parse/specification/fee-update.js +2 -0
- package/lib/parse/specification/genesis-mint.js +2 -0
- package/lib/parse/specification/import.js +6 -5
- package/lib/parse/specification/invoke.js +8 -10
- package/lib/parse/specification/mptoken-authorize.js +6 -6
- package/lib/parse/specification/mptoken-issuance-create.js +6 -6
- package/lib/parse/specification/mptoken-issuance-destroy.js +6 -6
- package/lib/parse/specification/mptoken-issuance-set.js +6 -6
- package/lib/parse/specification/nftoken-accept-offer.js +6 -5
- package/lib/parse/specification/nftoken-burn.js +6 -5
- package/lib/parse/specification/nftoken-cancel-offer.js +6 -5
- package/lib/parse/specification/nftoken-create-offer.js +8 -10
- package/lib/parse/specification/nftoken-mint.js +8 -10
- package/lib/parse/specification/offer-cancel.js +8 -5
- package/lib/parse/specification/offer-create.js +8 -5
- package/lib/parse/specification/oracle-delete.js +6 -6
- package/lib/parse/specification/oracle-set.js +6 -6
- package/lib/parse/specification/payment-channel-claim.js +9 -3
- package/lib/parse/specification/payment-channel-create.js +10 -13
- package/lib/parse/specification/payment-channel-fund.js +8 -2
- package/lib/parse/specification/payment.js +8 -15
- package/lib/parse/specification/remit.js +8 -11
- package/lib/parse/specification/settings.js +6 -0
- package/lib/parse/specification/ticket-create.js +6 -0
- package/lib/parse/specification/trustline.js +6 -0
- package/lib/parse/specification/unl-report.js +2 -7
- package/lib/parse/specification/unrecognized.js +6 -6
- package/lib/parse/specification/uritoken-burn.js +6 -0
- package/lib/parse/specification/uritoken-buy.js +6 -0
- package/lib/parse/specification/uritoken-cancel-sell-offer.js +6 -0
- package/lib/parse/specification/uritoken-create-sell-offer.js +8 -10
- package/lib/parse/specification/uritoken-mint.js +8 -10
- package/lib/parse/utils.d.ts +2 -2
- package/lib/parse/utils.js +3 -0
- package/lib/types/account.d.ts +5 -2
- package/lib/types/adjustments.d.ts +4 -4
- package/lib/types/amounts.d.ts +1 -1
- package/lib/types/escrows.d.ts +0 -5
- package/lib/types/gateway_balances.d.ts +3 -3
- package/lib/types/import.d.ts +0 -2
- package/lib/types/invoke.d.ts +2 -3
- package/lib/types/ledger.d.ts +1 -0
- package/lib/types/outcome.d.ts +1 -0
- package/lib/types/payments.d.ts +2 -2
- package/lib/types/remits.d.ts +0 -3
- package/lib/types/signers.d.ts +16 -0
- package/lib/types/specification.d.ts +4 -1
- package/lib/types/unl_reports.d.ts +0 -2
- package/lib/v1/transaction/payment.js +14 -2
- package/package.json +1 -1
|
@@ -37,9 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseCheckCancel(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "CheckCancel");
|
|
42
45
|
return (0, common_1.removeUndefined)({
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
43
49
|
checkID: tx.CheckID,
|
|
44
50
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
45
51
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -41,9 +41,15 @@ const common_1 = require("../../common");
|
|
|
41
41
|
const amount_1 = __importDefault(require("../ledger/amount"));
|
|
42
42
|
const emit_details_1 = require("../ledger/emit_details");
|
|
43
43
|
const memos_1 = require("../ledger/memos");
|
|
44
|
+
const signers_1 = require("../ledger/signers");
|
|
45
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
46
|
+
const source_1 = require("../ledger/source");
|
|
44
47
|
function parseCheckCash(tx) {
|
|
45
48
|
assert.ok(tx.TransactionType === "CheckCash");
|
|
46
49
|
return (0, common_1.removeUndefined)({
|
|
50
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
51
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
52
|
+
source: (0, source_1.parseSource)(tx),
|
|
47
53
|
checkID: tx.CheckID,
|
|
48
54
|
amount: tx.Amount && (0, amount_1.default)(tx.Amount),
|
|
49
55
|
deliverMin: tx.DeliverMin && (0, amount_1.default)(tx.DeliverMin),
|
|
@@ -42,20 +42,17 @@ const utils_1 = require("../utils");
|
|
|
42
42
|
const amount_1 = __importDefault(require("../ledger/amount"));
|
|
43
43
|
const emit_details_1 = require("../ledger/emit_details");
|
|
44
44
|
const memos_1 = require("../ledger/memos");
|
|
45
|
-
const
|
|
45
|
+
const signers_1 = require("../ledger/signers");
|
|
46
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
47
|
+
const source_1 = require("../ledger/source");
|
|
48
|
+
const destination_1 = require("../ledger/destination");
|
|
46
49
|
function parseCheckCreate(tx) {
|
|
47
50
|
assert.ok(tx.TransactionType === "CheckCreate");
|
|
48
|
-
const source = (0, common_1.removeUndefined)({
|
|
49
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
50
|
-
tag: tx.SourceTag,
|
|
51
|
-
});
|
|
52
|
-
const destination = (0, common_1.removeUndefined)({
|
|
53
|
-
address: tx.Destination,
|
|
54
|
-
tag: tx.DestinationTag,
|
|
55
|
-
});
|
|
56
51
|
return (0, common_1.removeUndefined)({
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
53
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
54
|
+
source: (0, source_1.parseSource)(tx),
|
|
55
|
+
destination: (0, destination_1.parseDestination)(tx),
|
|
59
56
|
sendMax: (0, amount_1.default)(tx.SendMax),
|
|
60
57
|
expiration: tx.Expiration && (0, utils_1.parseTimestamp)(tx.Expiration),
|
|
61
58
|
invoiceID: tx.InvoiceID,
|
|
@@ -41,15 +41,15 @@ const common_1 = require("../../common");
|
|
|
41
41
|
const amount_1 = __importDefault(require("../ledger/amount"));
|
|
42
42
|
const emit_details_1 = require("../ledger/emit_details");
|
|
43
43
|
const memos_1 = require("../ledger/memos");
|
|
44
|
-
const
|
|
44
|
+
const signers_1 = require("../ledger/signers");
|
|
45
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
46
|
+
const source_1 = require("../ledger/source");
|
|
45
47
|
function parseClawback(tx) {
|
|
46
48
|
assert.ok(tx.TransactionType === "Clawback");
|
|
47
|
-
const source = (0, common_1.removeUndefined)({
|
|
48
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
49
|
-
tag: tx.SourceTag,
|
|
50
|
-
});
|
|
51
49
|
return (0, common_1.removeUndefined)({
|
|
52
|
-
|
|
50
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
51
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
52
|
+
source: (0, source_1.parseSource)(tx),
|
|
53
53
|
amount: tx.Amount ? (0, amount_1.default)(tx.Amount) : undefined,
|
|
54
54
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
55
55
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -37,9 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseDepositPreauth(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "DepositPreauth");
|
|
42
45
|
return (0, common_1.removeUndefined)({
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
43
49
|
authorize: tx.Authorize,
|
|
44
50
|
unauthorize: tx.Unauthorize,
|
|
45
51
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
@@ -37,15 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
-
const
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
41
43
|
function parseDidDelete(tx) {
|
|
42
44
|
assert.ok(tx.TransactionType === "DIDDelete");
|
|
43
|
-
const source = (0, common_1.removeUndefined)({
|
|
44
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
45
|
-
tag: tx.SourceTag,
|
|
46
|
-
});
|
|
47
45
|
return (0, common_1.removeUndefined)({
|
|
48
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
49
49
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
50
50
|
memos: (0, memos_1.parseMemos)(tx),
|
|
51
51
|
});
|
|
@@ -37,15 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
-
const
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
41
43
|
function parseDidSet(tx) {
|
|
42
44
|
assert.ok(tx.TransactionType === "DIDSet");
|
|
43
|
-
const source = (0, common_1.removeUndefined)({
|
|
44
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
45
|
-
tag: tx.SourceTag,
|
|
46
|
-
});
|
|
47
45
|
return (0, common_1.removeUndefined)({
|
|
48
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
49
49
|
uri: tx.URI,
|
|
50
50
|
data: tx.Data,
|
|
51
51
|
didDocument: tx.DIDDocument,
|
|
@@ -37,14 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseEscrowCancel(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "EscrowCancel");
|
|
42
|
-
const source = {
|
|
43
|
-
address: tx.Account,
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
};
|
|
46
45
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
49
|
owner: tx.Owner,
|
|
49
50
|
escrowSequence: tx.OfferSequence,
|
|
50
51
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
@@ -38,20 +38,18 @@ const common_1 = require("../../common");
|
|
|
38
38
|
const utils_1 = require("../utils");
|
|
39
39
|
const emit_details_1 = require("../ledger/emit_details");
|
|
40
40
|
const memos_1 = require("../ledger/memos");
|
|
41
|
+
const signers_1 = require("../ledger/signers");
|
|
42
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
43
|
+
const source_1 = require("../ledger/source");
|
|
44
|
+
const destination_1 = require("../ledger/destination");
|
|
41
45
|
function parseEscrowCreation(tx) {
|
|
42
46
|
assert.ok(tx.TransactionType === "EscrowCreate");
|
|
43
|
-
const source = {
|
|
44
|
-
address: tx.Account,
|
|
45
|
-
tag: tx.SourceTag,
|
|
46
|
-
};
|
|
47
|
-
const destination = {
|
|
48
|
-
address: tx.Destination,
|
|
49
|
-
tag: tx.DestinationTag,
|
|
50
|
-
};
|
|
51
47
|
return (0, common_1.removeUndefined)({
|
|
48
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
49
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
50
|
+
source: (0, source_1.parseSource)(tx),
|
|
51
|
+
destination: (0, destination_1.parseDestination)(tx),
|
|
52
52
|
amount: tx.Amount,
|
|
53
|
-
source: (0, common_1.removeUndefined)(source),
|
|
54
|
-
destination: (0, common_1.removeUndefined)(destination),
|
|
55
53
|
condition: tx.Condition,
|
|
56
54
|
allowCancelAfter: (0, utils_1.parseTimestamp)(tx.CancelAfter),
|
|
57
55
|
allowExecuteAfter: (0, utils_1.parseTimestamp)(tx.FinishAfter),
|
|
@@ -37,14 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseEscrowFinish(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "EscrowFinish");
|
|
42
|
-
const source = {
|
|
43
|
-
address: tx.Account,
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
};
|
|
46
45
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
49
|
owner: tx.Owner,
|
|
49
50
|
escrowSequence: tx.OfferSequence,
|
|
50
51
|
condition: tx.Condition,
|
|
@@ -7,9 +7,11 @@ 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
9
|
const memos_1 = require("../ledger/memos");
|
|
10
|
+
const source_1 = require("../ledger/source");
|
|
10
11
|
function parseFeeUpdate(tx) {
|
|
11
12
|
const baseFeeDrops = new bignumber_js_1.default(tx.BaseFee, 16).toString();
|
|
12
13
|
return {
|
|
14
|
+
source: (0, source_1.parseSource)(tx),
|
|
13
15
|
baseFeeXRP: (0, common_1.dropsToXrp)(baseFeeDrops),
|
|
14
16
|
referenceFeeUnits: tx.ReferenceFeeUnits,
|
|
15
17
|
reserveBaseXRP: (0, common_1.dropsToXrp)(tx.ReserveBase),
|
|
@@ -37,10 +37,12 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const source_1 = require("../ledger/source");
|
|
40
41
|
const genesis_mints_1 = require("../ledger/genesis-mints");
|
|
41
42
|
function parseGenesisMint(tx) {
|
|
42
43
|
assert.ok(tx.TransactionType === "GenesisMint");
|
|
43
44
|
return (0, common_1.removeUndefined)({
|
|
45
|
+
source: (0, source_1.parseSource)(tx),
|
|
44
46
|
genesisMints: (0, genesis_mints_1.parseGenesisMints)(tx),
|
|
45
47
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
46
48
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -38,15 +38,16 @@ const common_1 = require("../../common");
|
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
40
|
const import_1 = require("../ledger/import");
|
|
41
|
+
const signers_1 = require("../ledger/signers");
|
|
42
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
43
|
+
const source_1 = require("../ledger/source");
|
|
41
44
|
function parseImport(tx) {
|
|
42
45
|
assert.ok(tx.TransactionType === "Import");
|
|
43
|
-
const source = {
|
|
44
|
-
address: tx.Account,
|
|
45
|
-
tag: tx.SourceTag,
|
|
46
|
-
};
|
|
47
46
|
return (0, common_1.removeUndefined)({
|
|
48
47
|
blob: (0, import_1.parseImportBlob)(tx.Blob),
|
|
49
|
-
|
|
48
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
49
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
50
|
+
source: (0, source_1.parseSource)(tx),
|
|
50
51
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
51
52
|
memos: (0, memos_1.parseMemos)(tx),
|
|
52
53
|
});
|
|
@@ -34,21 +34,19 @@ 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 common_1 = require("../../common");
|
|
38
37
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
38
|
const memos_1 = require("../ledger/memos");
|
|
39
|
+
const signers_1 = require("../ledger/signers");
|
|
40
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
41
|
+
const source_1 = require("../ledger/source");
|
|
42
|
+
const destination_1 = require("../ledger/destination");
|
|
40
43
|
function parseInvoke(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "Invoke");
|
|
42
|
-
const source = {
|
|
43
|
-
address: tx.Account,
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
};
|
|
46
|
-
const destination = {
|
|
47
|
-
address: tx.Destination,
|
|
48
|
-
};
|
|
49
45
|
return {
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
49
|
+
destination: (0, destination_1.parseDestination)(tx),
|
|
52
50
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
53
51
|
memos: (0, memos_1.parseMemos)(tx),
|
|
54
52
|
};
|
|
@@ -40,15 +40,15 @@ const assert = __importStar(require("assert"));
|
|
|
40
40
|
const common_1 = require("../../common");
|
|
41
41
|
const memos_1 = require("../ledger/memos");
|
|
42
42
|
const mptoken_authorize_flags_1 = __importDefault(require("../ledger/mptoken-authorize-flags"));
|
|
43
|
-
const
|
|
43
|
+
const signers_1 = require("../ledger/signers");
|
|
44
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
45
|
+
const source_1 = require("../ledger/source");
|
|
44
46
|
function parseMPTokenAuthorize(tx) {
|
|
45
47
|
assert.ok(tx.TransactionType === "MPTokenAuthorize");
|
|
46
|
-
const source = (0, common_1.removeUndefined)({
|
|
47
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
48
|
-
tag: tx.SourceTag,
|
|
49
|
-
});
|
|
50
48
|
return (0, common_1.removeUndefined)({
|
|
51
|
-
|
|
49
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
50
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
51
|
+
source: (0, source_1.parseSource)(tx),
|
|
52
52
|
flags: (0, mptoken_authorize_flags_1.default)(tx.Flags),
|
|
53
53
|
holder: tx.Holder,
|
|
54
54
|
mptIssuanceID: tx.MPTokenIssuanceID,
|
|
@@ -40,15 +40,15 @@ const assert = __importStar(require("assert"));
|
|
|
40
40
|
const common_1 = require("../../common");
|
|
41
41
|
const memos_1 = require("../ledger/memos");
|
|
42
42
|
const mptoken_issuance_create_flags_1 = __importDefault(require("../ledger/mptoken-issuance-create-flags"));
|
|
43
|
-
const
|
|
43
|
+
const signers_1 = require("../ledger/signers");
|
|
44
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
45
|
+
const source_1 = require("../ledger/source");
|
|
44
46
|
function parseMPTokenIssuanceCreate(tx) {
|
|
45
47
|
assert.ok(tx.TransactionType === "MPTokenIssuanceCreate");
|
|
46
|
-
const source = (0, common_1.removeUndefined)({
|
|
47
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
48
|
-
tag: tx.SourceTag,
|
|
49
|
-
});
|
|
50
48
|
return (0, common_1.removeUndefined)({
|
|
51
|
-
|
|
49
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
50
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
51
|
+
source: (0, source_1.parseSource)(tx),
|
|
52
52
|
scale: tx.AssetScale,
|
|
53
53
|
flags: (0, mptoken_issuance_create_flags_1.default)(tx.Flags),
|
|
54
54
|
metadata: tx.MPTokenMetadata,
|
|
@@ -36,15 +36,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const memos_1 = require("../ledger/memos");
|
|
39
|
-
const
|
|
39
|
+
const signers_1 = require("../ledger/signers");
|
|
40
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
41
|
+
const source_1 = require("../ledger/source");
|
|
40
42
|
function parseMPTokenIssuanceCreate(tx) {
|
|
41
43
|
assert.ok(tx.TransactionType === "MPTokenIssuanceDestroy");
|
|
42
|
-
const source = (0, common_1.removeUndefined)({
|
|
43
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
});
|
|
46
44
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
45
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
46
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
47
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
48
|
mptIssuanceID: tx.MPTokenIssuanceID,
|
|
49
49
|
memos: (0, memos_1.parseMemos)(tx),
|
|
50
50
|
});
|
|
@@ -39,16 +39,16 @@ 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 signers_1 = require("../ledger/signers");
|
|
43
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
44
|
+
const source_1 = require("../ledger/source");
|
|
42
45
|
const mptoken_issuance_set_flags_1 = __importDefault(require("../ledger/mptoken-issuance-set-flags"));
|
|
43
|
-
const account_1 = require("../ledger/account");
|
|
44
46
|
function parseMPTokenIssuanceCreate(tx) {
|
|
45
47
|
assert.ok(tx.TransactionType === "MPTokenIssuanceSet");
|
|
46
|
-
const source = (0, common_1.removeUndefined)({
|
|
47
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
48
|
-
tag: tx.SourceTag,
|
|
49
|
-
});
|
|
50
48
|
return (0, common_1.removeUndefined)({
|
|
51
|
-
|
|
49
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
50
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
51
|
+
source: (0, source_1.parseSource)(tx),
|
|
52
52
|
flags: (0, mptoken_issuance_set_flags_1.default)(tx.Flags),
|
|
53
53
|
holder: tx.Holder,
|
|
54
54
|
mptIssuanceID: tx.MPTokenIssuanceID,
|
|
@@ -37,14 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseNFTokenAcceptOffer(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "NFTokenAcceptOffer");
|
|
42
|
-
const source = {
|
|
43
|
-
address: tx.Account,
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
};
|
|
46
45
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
49
|
nftokenSellOffer: tx.NFTokenSellOffer,
|
|
49
50
|
nftokenBuyOffer: tx.NFTokenBuyOffer,
|
|
50
51
|
nftokenBrokerFee: tx.NFTokenBrokerFee,
|
|
@@ -37,14 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseNFTokenBurn(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "NFTokenBurn");
|
|
42
|
-
const source = {
|
|
43
|
-
address: tx.Account,
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
};
|
|
46
45
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
49
|
account: tx.Account,
|
|
49
50
|
nftokenID: tx.NFTokenID,
|
|
50
51
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
@@ -37,14 +37,15 @@ const assert = __importStar(require("assert"));
|
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const emit_details_1 = require("../ledger/emit_details");
|
|
39
39
|
const memos_1 = require("../ledger/memos");
|
|
40
|
+
const signers_1 = require("../ledger/signers");
|
|
41
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
42
|
+
const source_1 = require("../ledger/source");
|
|
40
43
|
function parseNFTokenCancelOffer(tx) {
|
|
41
44
|
assert.ok(tx.TransactionType === "NFTokenCancelOffer");
|
|
42
|
-
const source = {
|
|
43
|
-
address: tx.Account,
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
};
|
|
46
45
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
46
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
47
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
48
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
49
|
nftokenOffers: tx.NFTokenOffers,
|
|
49
50
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
50
51
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -42,26 +42,24 @@ const emit_details_1 = require("../ledger/emit_details");
|
|
|
42
42
|
const memos_1 = require("../ledger/memos");
|
|
43
43
|
const nftoken_offer_flags_1 = __importDefault(require("../ledger/nftoken-offer-flags"));
|
|
44
44
|
const ledger_1 = require("../../models/ledger");
|
|
45
|
-
const
|
|
45
|
+
const signers_1 = require("../ledger/signers");
|
|
46
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
47
|
+
const source_1 = require("../ledger/source");
|
|
48
|
+
const destination_1 = require("../ledger/destination");
|
|
46
49
|
function parseNFTokenCreateOffer(tx) {
|
|
47
50
|
assert.ok(tx.TransactionType === "NFTokenCreateOffer");
|
|
48
51
|
let expiration;
|
|
49
52
|
if (typeof tx.Expiration === "number") {
|
|
50
53
|
expiration = (0, ledger_1.ledgerTimeToUnixTime)(tx.Expiration);
|
|
51
54
|
}
|
|
52
|
-
const source = (0, common_1.removeUndefined)({
|
|
53
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
54
|
-
tag: tx.SourceTag,
|
|
55
|
-
});
|
|
56
|
-
const destination = (0, common_1.removeUndefined)({
|
|
57
|
-
address: tx.Destination,
|
|
58
|
-
});
|
|
59
55
|
return (0, common_1.removeUndefined)({
|
|
56
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
57
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
58
|
+
source: (0, source_1.parseSource)(tx),
|
|
59
|
+
destination: (0, destination_1.parseDestination)(tx),
|
|
60
60
|
nftokenID: tx.NFTokenID,
|
|
61
61
|
amount: tx.Amount,
|
|
62
62
|
owner: tx.Owner,
|
|
63
|
-
source: Object.keys(source).length > 0 ? source : undefined,
|
|
64
|
-
destination: Object.keys(destination).length > 0 ? destination : undefined,
|
|
65
63
|
expiration,
|
|
66
64
|
flags: (0, nftoken_offer_flags_1.default)(tx.Flags),
|
|
67
65
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
@@ -40,31 +40,29 @@ const assert = __importStar(require("assert"));
|
|
|
40
40
|
const common_1 = require("../../common");
|
|
41
41
|
const emit_details_1 = require("../ledger/emit_details");
|
|
42
42
|
const memos_1 = require("../ledger/memos");
|
|
43
|
+
const signers_1 = require("../ledger/signers");
|
|
44
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
45
|
+
const source_1 = require("../ledger/source");
|
|
46
|
+
const destination_1 = require("../ledger/destination");
|
|
43
47
|
const nftoken_flags_1 = __importDefault(require("../ledger/nftoken-flags"));
|
|
44
48
|
const ledger_1 = require("../../models/ledger");
|
|
45
|
-
const account_1 = require("../ledger/account");
|
|
46
49
|
function parseNFTokenMint(tx) {
|
|
47
50
|
assert.ok(tx.TransactionType === "NFTokenMint");
|
|
48
|
-
const source = (0, common_1.removeUndefined)({
|
|
49
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
50
|
-
tag: tx.SourceTag,
|
|
51
|
-
});
|
|
52
|
-
const destination = (0, common_1.removeUndefined)({
|
|
53
|
-
address: tx.Destination,
|
|
54
|
-
});
|
|
55
51
|
let expiration;
|
|
56
52
|
if (typeof tx.Expiration === "number") {
|
|
57
53
|
expiration = (0, ledger_1.ledgerTimeToUnixTime)(tx.Expiration);
|
|
58
54
|
}
|
|
59
55
|
return (0, common_1.removeUndefined)({
|
|
60
|
-
|
|
56
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
57
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
58
|
+
source: (0, source_1.parseSource)(tx),
|
|
59
|
+
destination: (0, destination_1.parseDestination)(tx),
|
|
61
60
|
nftokenTaxon: tx.NFTokenTaxon,
|
|
62
61
|
issuer: tx.Issuer,
|
|
63
62
|
transferFee: tx.TransferFee,
|
|
64
63
|
uri: tx.URI,
|
|
65
64
|
flags: (0, nftoken_flags_1.default)(tx.Flags),
|
|
66
65
|
amount: tx.Amount,
|
|
67
|
-
destination: Object.keys(destination).length > 0 ? destination : undefined,
|
|
68
66
|
expiration,
|
|
69
67
|
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
70
68
|
memos: (0, memos_1.parseMemos)(tx),
|
|
@@ -35,15 +35,18 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const memos_1 = require("../ledger/memos");
|
|
38
|
+
const emit_details_1 = require("../ledger/emit_details");
|
|
39
|
+
const signers_1 = require("../ledger/signers");
|
|
40
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
41
|
+
const source_1 = require("../ledger/source");
|
|
38
42
|
function parseOfferCancel(tx) {
|
|
39
43
|
assert.ok(tx.TransactionType === "OfferCancel");
|
|
40
|
-
const source = {
|
|
41
|
-
address: tx.Account,
|
|
42
|
-
tag: tx.SourceTag,
|
|
43
|
-
};
|
|
44
44
|
return {
|
|
45
|
-
|
|
45
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
46
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
47
|
+
source: (0, source_1.parseSource)(tx),
|
|
46
48
|
orderSequence: tx.OfferSequence,
|
|
49
|
+
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
47
50
|
memos: (0, memos_1.parseMemos)(tx),
|
|
48
51
|
};
|
|
49
52
|
}
|
|
@@ -41,7 +41,11 @@ const xrpl_1 = require("xrpl");
|
|
|
41
41
|
const utils_1 = require("../utils");
|
|
42
42
|
const amount_1 = __importDefault(require("../ledger/amount"));
|
|
43
43
|
const memos_1 = require("../ledger/memos");
|
|
44
|
+
const emit_details_1 = require("../ledger/emit_details");
|
|
44
45
|
const common_1 = require("../../common");
|
|
46
|
+
const signers_1 = require("../ledger/signers");
|
|
47
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
48
|
+
const source_1 = require("../ledger/source");
|
|
45
49
|
function parseOfferCreate(tx) {
|
|
46
50
|
assert.ok(tx.TransactionType === "OfferCreate");
|
|
47
51
|
const direction = (tx.Flags & xrpl_1.OfferCreateFlags.tfSell) === 0 ? "buy" : "sell";
|
|
@@ -49,12 +53,10 @@ function parseOfferCreate(tx) {
|
|
|
49
53
|
const takerPaysAmount = (0, amount_1.default)(tx.TakerPays);
|
|
50
54
|
const quantity = direction === "buy" ? takerPaysAmount : takerGetsAmount;
|
|
51
55
|
const totalPrice = direction === "buy" ? takerGetsAmount : takerPaysAmount;
|
|
52
|
-
const source = {
|
|
53
|
-
address: tx.Account,
|
|
54
|
-
tag: tx.SourceTag,
|
|
55
|
-
};
|
|
56
56
|
return (0, common_1.removeUndefined)({
|
|
57
|
-
|
|
57
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
58
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
59
|
+
source: (0, source_1.parseSource)(tx),
|
|
58
60
|
direction: direction,
|
|
59
61
|
quantity: quantity,
|
|
60
62
|
totalPrice: totalPrice,
|
|
@@ -62,6 +64,7 @@ function parseOfferCreate(tx) {
|
|
|
62
64
|
immediateOrCancel: (tx.Flags & xrpl_1.OfferCreateFlags.tfImmediateOrCancel) !== 0 || undefined,
|
|
63
65
|
fillOrKill: (tx.Flags & xrpl_1.OfferCreateFlags.tfFillOrKill) !== 0 || undefined,
|
|
64
66
|
expirationTime: (0, utils_1.parseTimestamp)(tx.Expiration),
|
|
67
|
+
emittedDetails: (0, emit_details_1.parseEmittedDetails)(tx),
|
|
65
68
|
memos: (0, memos_1.parseMemos)(tx),
|
|
66
69
|
});
|
|
67
70
|
}
|
|
@@ -36,15 +36,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const assert = __importStar(require("assert"));
|
|
37
37
|
const common_1 = require("../../common");
|
|
38
38
|
const memos_1 = require("../ledger/memos");
|
|
39
|
-
const
|
|
39
|
+
const signers_1 = require("../ledger/signers");
|
|
40
|
+
const regular_key_1 = require("../ledger/regular-key");
|
|
41
|
+
const source_1 = require("../ledger/source");
|
|
40
42
|
function parseDidDelete(tx) {
|
|
41
43
|
assert.ok(tx.TransactionType === "OracleDelete");
|
|
42
|
-
const source = (0, common_1.removeUndefined)({
|
|
43
|
-
address: (0, account_1.parseAccount)(tx.Account),
|
|
44
|
-
tag: tx.SourceTag,
|
|
45
|
-
});
|
|
46
44
|
return (0, common_1.removeUndefined)({
|
|
47
|
-
|
|
45
|
+
signers: (0, signers_1.parseSigners)(tx),
|
|
46
|
+
signer: (0, regular_key_1.parseSignerRegularKey)(tx),
|
|
47
|
+
source: (0, source_1.parseSource)(tx),
|
|
48
48
|
oracleDocumentID: tx.OracleDocumentID,
|
|
49
49
|
memos: (0, memos_1.parseMemos)(tx),
|
|
50
50
|
});
|