@bithomp/xrpl-api 2.7.14 → 3.0.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/common/errors/index.d.ts +2 -2
- package/lib/common/errors/index.js +3 -3
- package/lib/common/errors/validation_error.d.ts +2 -2
- package/lib/common/errors/validation_error.js +2 -2
- package/lib/common/errors/xrpl_api_error.d.ts +9 -0
- package/lib/common/errors/xrpl_api_error.js +28 -0
- package/lib/common/utils.d.ts +1 -0
- package/lib/common/utils.js +17 -1
- package/lib/ledger/account_info.js +7 -0
- package/lib/ledger/account_offers.d.ts +1 -1
- package/lib/ledger/ledger.d.ts +1 -1
- package/lib/ledger/transaction.d.ts +3 -3
- package/lib/ledger/transaction.js +4 -4
- package/lib/models/account_info.d.ts +1 -1
- package/lib/models/account_lines.d.ts +2 -0
- package/lib/models/account_nfts.js +2 -1
- package/lib/models/account_object.d.ts +1 -1
- package/lib/models/account_object.js +9 -2
- package/lib/models/account_offers.d.ts +9 -0
- package/lib/models/account_offers.js +2 -0
- package/lib/models/account_uritokens.d.ts +1 -1
- package/lib/models/path_find.d.ts +11 -0
- package/lib/models/path_find.js +2 -0
- package/lib/models/transaction.d.ts +1 -1
- package/lib/models/vl.js +1 -1
- package/lib/parse/index.d.ts +1 -0
- package/lib/parse/index.js +2 -1
- package/lib/parse/ledger/account-order.d.ts +1 -1
- package/lib/parse/ledger/account-order.js +1 -1
- package/lib/parse/ledger/account-trustline.d.ts +1 -1
- package/lib/parse/ledger/amount.d.ts +1 -1
- package/lib/parse/ledger/currency-amount.d.ts +1 -1
- package/lib/parse/ledger/emit_details.d.ts +1 -1
- package/lib/parse/ledger/import.d.ts +1 -1
- package/lib/parse/ledger/index.d.ts +1 -1
- package/lib/parse/ledger/index.js +2 -2
- package/lib/parse/ledger/ledger.d.ts +1 -1
- package/lib/parse/ledger/memos.d.ts +3 -2
- package/lib/parse/ledger/memos.js +12 -1
- package/lib/parse/ledger/nftoken-flags.d.ts +1 -1
- package/lib/parse/ledger/nftoken-flags.js +1 -1
- package/lib/parse/ledger/nftoken-offer-flags.d.ts +1 -1
- package/lib/parse/ledger/nftoken-offer-flags.js +1 -1
- package/lib/parse/ledger/orderbook-order.d.ts +7 -2
- package/lib/parse/ledger/orderbook-order.js +1 -1
- package/lib/parse/ledger/pathfind.d.ts +3 -3
- package/lib/parse/ledger/ripple-amount.d.ts +1 -1
- package/lib/parse/ledger/uritoken-flags.d.ts +1 -1
- package/lib/parse/ledger/uritoken-flags.js +1 -1
- package/lib/parse/outcome/balance_changes.js +1 -1
- package/lib/parse/outcome/channel_changes.js +1 -1
- package/lib/parse/outcome/escrow_changes.d.ts +1 -1
- package/lib/parse/outcome/escrow_changes.js +3 -4
- package/lib/parse/outcome/locked_balance_changes.js +1 -1
- package/lib/parse/outcome/orderbook_changes.js +1 -1
- package/lib/parse/outcome/unl_report_changes.js +1 -1
- package/lib/parse/outcome.d.ts +1 -1
- package/lib/parse/specification/account-delete.d.ts +1 -1
- package/lib/parse/specification/account-delete.js +13 -7
- package/lib/parse/specification/amendment.d.ts +1 -1
- package/lib/parse/specification/amendment.js +2 -5
- package/lib/parse/specification/check-cancel.d.ts +1 -1
- package/lib/parse/specification/check-cancel.js +2 -5
- package/lib/parse/specification/check-cash.d.ts +1 -1
- package/lib/parse/specification/check-cash.js +2 -2
- package/lib/parse/specification/check-create.d.ts +1 -1
- package/lib/parse/specification/check-create.js +13 -4
- package/lib/parse/specification/deposit-preauth.d.ts +1 -1
- package/lib/parse/specification/deposit-preauth.js +2 -5
- package/lib/parse/specification/escrow-cancel.d.ts +1 -1
- package/lib/parse/specification/escrow-cancel.js +2 -5
- package/lib/parse/specification/escrow-create.d.ts +1 -1
- package/lib/parse/specification/escrow-create.js +2 -5
- package/lib/parse/specification/escrow-finish.d.ts +1 -1
- package/lib/parse/specification/escrow-finish.js +2 -5
- package/lib/parse/specification/fee-update.d.ts +1 -1
- package/lib/parse/specification/fee-update.js +2 -2
- package/lib/parse/specification/import.d.ts +1 -1
- package/lib/parse/specification/import.js +2 -5
- package/lib/parse/specification/invoke.d.ts +1 -1
- package/lib/parse/specification/invoke.js +2 -5
- package/lib/parse/specification/nftoken-accept-offer.d.ts +1 -1
- package/lib/parse/specification/nftoken-accept-offer.js +2 -5
- package/lib/parse/specification/nftoken-burn.d.ts +1 -1
- package/lib/parse/specification/nftoken-burn.js +2 -5
- package/lib/parse/specification/nftoken-cancel-offer.d.ts +1 -1
- package/lib/parse/specification/nftoken-cancel-offer.js +2 -5
- package/lib/parse/specification/nftoken-create-offer.d.ts +1 -1
- package/lib/parse/specification/nftoken-create-offer.js +12 -3
- package/lib/parse/specification/nftoken-mint.d.ts +1 -1
- package/lib/parse/specification/nftoken-mint.js +2 -2
- package/lib/parse/specification/offer-cancel.d.ts +1 -1
- package/lib/parse/specification/offer-cancel.js +2 -5
- package/lib/parse/specification/offer-create.d.ts +1 -1
- package/lib/parse/specification/offer-create.js +2 -2
- package/lib/parse/specification/payment-channel-claim.d.ts +1 -1
- package/lib/parse/specification/payment-channel-claim.js +2 -2
- package/lib/parse/specification/payment-channel-create.d.ts +1 -1
- package/lib/parse/specification/payment-channel-create.js +13 -5
- package/lib/parse/specification/payment-channel-fund.d.ts +1 -1
- package/lib/parse/specification/payment-channel-fund.js +2 -2
- package/lib/parse/specification/payment.d.ts +1 -1
- package/lib/parse/specification/payment.js +3 -7
- package/lib/parse/specification/remit.d.ts +1 -1
- package/lib/parse/specification/remit.js +2 -2
- package/lib/parse/specification/settings.js +2 -2
- package/lib/parse/specification/ticket-create.d.ts +1 -1
- package/lib/parse/specification/ticket-create.js +2 -5
- package/lib/parse/specification/trustline.d.ts +1 -1
- package/lib/parse/specification/trustline.js +2 -5
- package/lib/parse/specification/unl-report.d.ts +1 -1
- package/lib/parse/specification/unl-report.js +2 -5
- package/lib/parse/specification/uritoken-burn.d.ts +1 -1
- package/lib/parse/specification/uritoken-burn.js +2 -5
- package/lib/parse/specification/uritoken-buy.d.ts +1 -1
- package/lib/parse/specification/uritoken-buy.js +2 -5
- package/lib/parse/specification/uritoken-cancel-sell-offer.d.ts +1 -1
- package/lib/parse/specification/uritoken-cancel-sell-offer.js +2 -5
- package/lib/parse/specification/uritoken-create-sell-offer.d.ts +2 -2
- package/lib/parse/specification/uritoken-create-sell-offer.js +12 -6
- package/lib/parse/specification/uritoken-mint.d.ts +3 -3
- package/lib/parse/specification/uritoken-mint.js +14 -5
- package/lib/parse/transaction.d.ts +19 -19
- package/lib/parse/utils.d.ts +10 -1
- package/lib/parse/utils.js +49 -1
- package/lib/types/account.d.ts +15 -0
- package/lib/types/account.js +2 -0
- package/lib/types/adjustments.d.ts +16 -0
- package/lib/types/adjustments.js +2 -0
- package/lib/types/amendments.d.ts +4 -0
- package/lib/types/amendments.js +2 -0
- package/lib/types/checks.d.ts +18 -0
- package/lib/types/checks.js +2 -0
- package/lib/types/deposits.d.ts +5 -0
- package/lib/types/deposits.js +2 -0
- package/lib/types/emit_details.d.ts +7 -0
- package/lib/types/emit_details.js +2 -0
- package/lib/types/escrows.d.ts +23 -0
- package/lib/types/escrows.js +2 -0
- package/lib/types/fees.d.ts +7 -0
- package/lib/types/fees.js +2 -0
- package/lib/types/flags.d.ts +5 -0
- package/lib/types/flags.js +8 -0
- package/lib/types/hooks.d.ts +14 -0
- package/lib/types/hooks.js +2 -0
- package/lib/types/import.d.ts +23 -0
- package/lib/types/import.js +2 -0
- package/lib/types/index.d.ts +24 -1
- package/lib/types/index.js +38 -0
- package/lib/types/invoke.d.ts +6 -0
- package/lib/types/invoke.js +2 -0
- package/lib/types/ledger.d.ts +45 -0
- package/lib/types/ledger.js +2 -0
- package/lib/types/ledger_data.d.ts +10 -0
- package/lib/types/ledger_data.js +2 -0
- package/lib/types/ledger_entries.d.ts +158 -0
- package/lib/types/ledger_entries.js +2 -0
- package/lib/types/memos.d.ts +12 -0
- package/lib/types/memos.js +2 -0
- package/lib/types/nftokens.d.ts +50 -0
- package/lib/types/nftokens.js +13 -0
- package/lib/types/offers.d.ts +15 -0
- package/lib/types/offers.js +2 -0
- package/lib/types/outcome.d.ts +33 -0
- package/lib/types/outcome.js +2 -0
- package/lib/types/path_find.d.ts +28 -0
- package/lib/types/path_find.js +2 -0
- package/lib/types/payment_channels.d.ts +25 -0
- package/lib/types/payment_channels.js +2 -0
- package/lib/types/payments.d.ts +11 -0
- package/lib/types/payments.js +2 -0
- package/lib/types/queue_data.d.ts +15 -0
- package/lib/types/queue_data.js +2 -0
- package/lib/types/remits.d.ts +18 -0
- package/lib/types/remits.js +2 -0
- package/lib/types/settings.d.ts +34 -0
- package/lib/types/settings.js +2 -0
- package/lib/types/signers.d.ts +6 -0
- package/lib/types/signers.js +2 -0
- package/lib/types/specification.d.ts +4 -0
- package/lib/types/specification.js +2 -0
- package/lib/types/tickets.d.ts +4 -0
- package/lib/types/tickets.js +2 -0
- package/lib/types/transactions.d.ts +21 -0
- package/lib/types/transactions.js +2 -0
- package/lib/types/trustlines.d.ts +38 -0
- package/lib/types/trustlines.js +2 -0
- package/lib/types/unl_reports.d.ts +7 -0
- package/lib/types/unl_reports.js +2 -0
- package/lib/types/uri_tokens.d.ts +7 -0
- package/lib/types/uri_tokens.js +6 -0
- package/lib/types/uritokens.d.ts +39 -0
- package/lib/types/uritokens.js +6 -0
- package/lib/v1/common/types/objects/account.d.ts +2 -2
- package/lib/v1/common/types/objects/checks.d.ts +3 -2
- package/lib/v1/common/types/objects/nftokens.d.ts +3 -1
- package/lib/v1/common/types/objects/payment_channels.d.ts +3 -3
- package/lib/v1/common/types/objects/uritokens.d.ts +5 -2
- package/lib/v1/common/types/objects/uritokens.js +1 -1
- package/lib/v1/transaction/payment.d.ts +2 -2
- package/lib/v1/transaction/payment.js +9 -9
- package/lib/v1/transaction/types.d.ts +1 -34
- package/lib/v1/transaction/utils.d.ts +2 -3
- package/lib/v1/transaction/utils.js +19 -15
- package/lib/v1/types.d.ts +9 -0
- package/lib/v1/types.js +2 -0
- package/lib/v1/utils.d.ts +7 -0
- package/lib/v1/utils.js +42 -0
- package/lib/validator.js +5 -4
- package/lib/wallet.d.ts +3 -0
- package/lib/wallet.js +26 -1
- package/package.json +20 -20
|
@@ -30,18 +30,26 @@ const assert = __importStar(require("assert"));
|
|
|
30
30
|
const common_1 = require("../../common");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const ripple_amount_1 = __importDefault(require("../ledger/ripple-amount"));
|
|
33
|
-
const memos_1 =
|
|
33
|
+
const memos_1 = require("../ledger/memos");
|
|
34
|
+
const account_1 = require("../ledger/account");
|
|
34
35
|
function parsePaymentChannelCreate(tx) {
|
|
35
36
|
assert.ok(tx.TransactionType === "PaymentChannelCreate");
|
|
37
|
+
const source = {
|
|
38
|
+
address: (0, account_1.parseAccount)(tx.Account),
|
|
39
|
+
tag: tx.SourceTag,
|
|
40
|
+
};
|
|
41
|
+
const destination = {
|
|
42
|
+
address: tx.Destination,
|
|
43
|
+
tag: tx.DestinationTag,
|
|
44
|
+
};
|
|
36
45
|
return (0, common_1.removeUndefined)({
|
|
37
|
-
|
|
46
|
+
source: (0, common_1.removeUndefined)(source),
|
|
47
|
+
destination: (0, common_1.removeUndefined)(destination),
|
|
48
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
38
49
|
amount: (0, ripple_amount_1.default)(tx.Amount),
|
|
39
|
-
destination: tx.Destination,
|
|
40
50
|
settleDelay: tx.SettleDelay,
|
|
41
51
|
publicKey: tx.PublicKey,
|
|
42
52
|
cancelAfter: tx.CancelAfter && (0, utils_1.parseTimestamp)(tx.CancelAfter),
|
|
43
|
-
sourceTag: tx.SourceTag,
|
|
44
|
-
destinationTag: tx.DestinationTag,
|
|
45
53
|
});
|
|
46
54
|
}
|
|
47
55
|
exports.default = parsePaymentChannelCreate;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedPaymentChannelFundSpecification } from "../../
|
|
1
|
+
import { FormattedPaymentChannelFundSpecification } from "../../types/payment_channels";
|
|
2
2
|
declare function parsePaymentChannelFund(tx: any): FormattedPaymentChannelFundSpecification;
|
|
3
3
|
export default parsePaymentChannelFund;
|
|
@@ -30,11 +30,11 @@ const assert = __importStar(require("assert"));
|
|
|
30
30
|
const common_1 = require("../../common");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const ripple_amount_1 = __importDefault(require("../ledger/ripple-amount"));
|
|
33
|
-
const memos_1 =
|
|
33
|
+
const memos_1 = require("../ledger/memos");
|
|
34
34
|
function parsePaymentChannelFund(tx) {
|
|
35
35
|
assert.ok(tx.TransactionType === "PaymentChannelFund");
|
|
36
36
|
return (0, common_1.removeUndefined)({
|
|
37
|
-
memos: (0, memos_1.
|
|
37
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
38
38
|
channel: tx.Channel,
|
|
39
39
|
amount: (0, ripple_amount_1.default)(tx.Amount),
|
|
40
40
|
expiration: tx.Expiration && (0, utils_1.parseTimestamp)(tx.Expiration),
|
|
@@ -26,27 +26,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
30
29
|
const assert = __importStar(require("assert"));
|
|
31
30
|
const xrpl_1 = require("xrpl");
|
|
32
31
|
const utils_1 = require("../utils");
|
|
33
32
|
const common_1 = require("../../common");
|
|
34
33
|
const amount_1 = __importDefault(require("../ledger/amount"));
|
|
35
|
-
const memos_1 =
|
|
34
|
+
const memos_1 = require("../ledger/memos");
|
|
36
35
|
function isNoDirectRipple(tx) {
|
|
37
36
|
return (tx.Flags & xrpl_1.PaymentFlags.tfNoDirectRipple) !== 0;
|
|
38
37
|
}
|
|
39
38
|
function isQualityLimited(tx) {
|
|
40
39
|
return (tx.Flags & xrpl_1.PaymentFlags.tfLimitQuality) !== 0;
|
|
41
40
|
}
|
|
42
|
-
function removeGenericCounterparty(amount, address) {
|
|
43
|
-
return amount.counterparty === address ? lodash_1.default.omit(amount, "counterparty") : amount;
|
|
44
|
-
}
|
|
45
41
|
function parsePayment(tx) {
|
|
46
42
|
assert.ok(tx.TransactionType === "Payment");
|
|
47
43
|
const source = {
|
|
48
44
|
address: tx.Account,
|
|
49
|
-
maxAmount: removeGenericCounterparty((0, amount_1.default)(tx.SendMax || tx.Amount), tx.Account),
|
|
45
|
+
maxAmount: (0, utils_1.removeGenericCounterparty)((0, amount_1.default)(tx.SendMax || tx.Amount), tx.Account),
|
|
50
46
|
tag: tx.SourceTag,
|
|
51
47
|
};
|
|
52
48
|
const destination = {
|
|
@@ -56,7 +52,7 @@ function parsePayment(tx) {
|
|
|
56
52
|
return (0, common_1.removeUndefined)({
|
|
57
53
|
source: (0, common_1.removeUndefined)(source),
|
|
58
54
|
destination: (0, common_1.removeUndefined)(destination),
|
|
59
|
-
memos: (0, memos_1.
|
|
55
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
60
56
|
invoiceID: tx.InvoiceID,
|
|
61
57
|
paths: tx.Paths ? JSON.stringify(tx.Paths) : undefined,
|
|
62
58
|
allowPartialPayment: (0, utils_1.isPartialPayment)(tx) || undefined,
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const assert = __importStar(require("assert"));
|
|
30
30
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
31
|
+
const memos_1 = require("../ledger/memos");
|
|
32
32
|
const account_1 = require("../ledger/account");
|
|
33
33
|
const uritoken_flags_1 = __importDefault(require("../ledger/uritoken-flags"));
|
|
34
34
|
function parseAmounts(amounts) {
|
|
@@ -75,7 +75,7 @@ function parseRemit(tx) {
|
|
|
75
75
|
blob: tx.Blob,
|
|
76
76
|
inform: tx.Inform,
|
|
77
77
|
invoiceID: tx.InvoiceID,
|
|
78
|
-
memos: (0, memos_1.
|
|
78
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
exports.default = parseRemit;
|
|
@@ -31,7 +31,7 @@ const assert = __importStar(require("assert"));
|
|
|
31
31
|
const account_info_1 = require("../../models/account_info");
|
|
32
32
|
const common_1 = require("../../common");
|
|
33
33
|
const fields_1 = __importDefault(require("../ledger/fields"));
|
|
34
|
-
const memos_1 =
|
|
34
|
+
const memos_1 = require("../ledger/memos");
|
|
35
35
|
function getAccountRootModifiedNode(tx) {
|
|
36
36
|
const modifiedNodes = tx.meta.AffectedNodes.filter((node) => node.ModifiedNode?.LedgerEntryType === "AccountRoot");
|
|
37
37
|
assert.ok(modifiedNodes.length === 1);
|
|
@@ -73,7 +73,7 @@ function parseSettings(tx) {
|
|
|
73
73
|
const txType = tx.TransactionType;
|
|
74
74
|
assert.ok(txType === "AccountSet" || txType === "SetRegularKey" || txType === "SignerListSet");
|
|
75
75
|
const baseSettings = (0, common_1.removeUndefined)({
|
|
76
|
-
memos: (0, memos_1.
|
|
76
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
77
77
|
});
|
|
78
78
|
return Object.assign(baseSettings, parseSettingsFlags(tx), (0, fields_1.default)(tx));
|
|
79
79
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedTicketCreateSpecification } from "../../
|
|
1
|
+
import { FormattedTicketCreateSpecification } from "../../types/tickets";
|
|
2
2
|
declare function parseTicketCreate(tx: any): FormattedTicketCreateSpecification;
|
|
3
3
|
export default parseTicketCreate;
|
|
@@ -22,17 +22,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
28
|
+
const memos_1 = require("../ledger/memos");
|
|
32
29
|
function parseTicketCreate(tx) {
|
|
33
30
|
assert.ok(tx.TransactionType === "TicketCreate");
|
|
34
31
|
return (0, common_1.removeUndefined)({
|
|
35
|
-
memos: (0, memos_1.
|
|
32
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
36
33
|
ticketCount: tx.TicketCount,
|
|
37
34
|
});
|
|
38
35
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedTrustlineSpecification } from "../../
|
|
1
|
+
import { FormattedTrustlineSpecification } from "../../types/trustlines";
|
|
2
2
|
declare function parseTrustline(tx: any): FormattedTrustlineSpecification;
|
|
3
3
|
export default parseTrustline;
|
|
@@ -22,15 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const xrpl_1 = require("xrpl");
|
|
31
28
|
const utils_1 = require("../utils");
|
|
32
29
|
const common_1 = require("../../common");
|
|
33
|
-
const memos_1 =
|
|
30
|
+
const memos_1 = require("../ledger/memos");
|
|
34
31
|
function parseFlag(flagsValue, trueValue, falseValue) {
|
|
35
32
|
if (flagsValue & trueValue) {
|
|
36
33
|
return true;
|
|
@@ -46,7 +43,7 @@ function parseTrustline(tx) {
|
|
|
46
43
|
limit: tx.LimitAmount.value,
|
|
47
44
|
currency: tx.LimitAmount.currency,
|
|
48
45
|
counterparty: tx.LimitAmount.issuer,
|
|
49
|
-
memos: (0, memos_1.
|
|
46
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
50
47
|
qualityIn: (0, utils_1.parseQuality)(tx.QualityIn),
|
|
51
48
|
qualityOut: (0, utils_1.parseQuality)(tx.QualityOut),
|
|
52
49
|
ripplingDisabled: parseFlag(tx.Flags, xrpl_1.TrustSetFlags.tfSetNoRipple, xrpl_1.TrustSetFlags.tfClearNoRipple),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedUNLReportSpecification } from "../../
|
|
1
|
+
import { FormattedUNLReportSpecification } from "../../types/unl_reports";
|
|
2
2
|
declare function parseUNLReport(tx: any): FormattedUNLReportSpecification;
|
|
3
3
|
export default parseUNLReport;
|
|
@@ -22,13 +22,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
28
|
+
const memos_1 = require("../ledger/memos");
|
|
32
29
|
const account_1 = require("../ledger/account");
|
|
33
30
|
function parseUNLReport(tx) {
|
|
34
31
|
assert.ok(tx.TransactionType === "UNLReport");
|
|
@@ -41,7 +38,7 @@ function parseUNLReport(tx) {
|
|
|
41
38
|
source: (0, common_1.removeUndefined)(source),
|
|
42
39
|
activeValidator,
|
|
43
40
|
importVLKey,
|
|
44
|
-
memos: (0, memos_1.
|
|
41
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
45
42
|
});
|
|
46
43
|
}
|
|
47
44
|
exports.default = parseUNLReport;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedURITokenBurnSpecification } from "../../
|
|
1
|
+
import { FormattedURITokenBurnSpecification } from "../../types/uritokens";
|
|
2
2
|
declare function parseNFTokenBurn(tx: any): FormattedURITokenBurnSpecification;
|
|
3
3
|
export default parseNFTokenBurn;
|
|
@@ -22,18 +22,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
28
|
+
const memos_1 = require("../ledger/memos");
|
|
32
29
|
function parseNFTokenBurn(tx) {
|
|
33
30
|
assert.ok(tx.TransactionType === "URITokenBurn");
|
|
34
31
|
return (0, common_1.removeUndefined)({
|
|
35
32
|
uritokenID: tx.URITokenID,
|
|
36
|
-
memos: (0, memos_1.
|
|
33
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
37
34
|
});
|
|
38
35
|
}
|
|
39
36
|
exports.default = parseNFTokenBurn;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedURITokenBuySpecification } from "../../
|
|
1
|
+
import { FormattedURITokenBuySpecification } from "../../types/uritokens";
|
|
2
2
|
declare function parseNFTokenBurn(tx: any): FormattedURITokenBuySpecification;
|
|
3
3
|
export default parseNFTokenBurn;
|
|
@@ -22,19 +22,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
28
|
+
const memos_1 = require("../ledger/memos");
|
|
32
29
|
function parseNFTokenBurn(tx) {
|
|
33
30
|
assert.ok(tx.TransactionType === "URITokenBuy");
|
|
34
31
|
return (0, common_1.removeUndefined)({
|
|
35
32
|
uritokenID: tx.URITokenID,
|
|
36
33
|
amount: tx.Amount,
|
|
37
|
-
memos: (0, memos_1.
|
|
34
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
38
35
|
});
|
|
39
36
|
}
|
|
40
37
|
exports.default = parseNFTokenBurn;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedURITokenCancelSellOfferSpecification } from "../../
|
|
1
|
+
import { FormattedURITokenCancelSellOfferSpecification } from "../../types/uritokens";
|
|
2
2
|
declare function parseNFTokenBurn(tx: any): FormattedURITokenCancelSellOfferSpecification;
|
|
3
3
|
export default parseNFTokenBurn;
|
|
@@ -22,18 +22,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
28
|
+
const memos_1 = require("../ledger/memos");
|
|
32
29
|
function parseNFTokenBurn(tx) {
|
|
33
30
|
assert.ok(tx.TransactionType === "URITokenCancelSellOffer");
|
|
34
31
|
return (0, common_1.removeUndefined)({
|
|
35
32
|
uritokenID: tx.URITokenID,
|
|
36
|
-
memos: (0, memos_1.
|
|
33
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
37
34
|
});
|
|
38
35
|
}
|
|
39
36
|
exports.default = parseNFTokenBurn;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function parseNFTokenBurn(tx: any):
|
|
1
|
+
import { FormattedURITokenCreateSellOfferSpecification } from "../../types/uritokens";
|
|
2
|
+
declare function parseNFTokenBurn(tx: any): FormattedURITokenCreateSellOfferSpecification;
|
|
3
3
|
export default parseNFTokenBurn;
|
|
@@ -22,20 +22,26 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const assert = __importStar(require("assert"));
|
|
30
27
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
28
|
+
const memos_1 = require("../ledger/memos");
|
|
29
|
+
const account_1 = require("../ledger/account");
|
|
32
30
|
function parseNFTokenBurn(tx) {
|
|
33
31
|
assert.ok(tx.TransactionType === "URITokenCreateSellOffer");
|
|
32
|
+
const source = (0, common_1.removeUndefined)({
|
|
33
|
+
address: (0, account_1.parseAccount)(tx.Account),
|
|
34
|
+
tag: tx.SourceTag,
|
|
35
|
+
});
|
|
36
|
+
const destination = (0, common_1.removeUndefined)({
|
|
37
|
+
address: tx.Destination,
|
|
38
|
+
});
|
|
34
39
|
return (0, common_1.removeUndefined)({
|
|
35
40
|
uritokenID: tx.URITokenID,
|
|
36
41
|
amount: tx.Amount,
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
source: Object.keys(source).length > 0 ? source : undefined,
|
|
43
|
+
destination: Object.keys(destination).length > 0 ? destination : undefined,
|
|
44
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
39
45
|
});
|
|
40
46
|
}
|
|
41
47
|
exports.default = parseNFTokenBurn;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormattedURITokenMintSpecification } from "../../
|
|
2
|
-
declare function
|
|
3
|
-
export default
|
|
1
|
+
import { FormattedURITokenMintSpecification } from "../../types/uritokens";
|
|
2
|
+
declare function parseNFTokenMint(tx: any): FormattedURITokenMintSpecification;
|
|
3
|
+
export default parseNFTokenMint;
|
|
@@ -28,20 +28,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const assert = __importStar(require("assert"));
|
|
30
30
|
const common_1 = require("../../common");
|
|
31
|
-
const memos_1 =
|
|
31
|
+
const memos_1 = require("../ledger/memos");
|
|
32
32
|
const uritoken_flags_1 = __importDefault(require("../ledger/uritoken-flags"));
|
|
33
33
|
const emit_details_1 = require("../ledger/emit_details");
|
|
34
|
-
|
|
34
|
+
const account_1 = require("../ledger/account");
|
|
35
|
+
function parseNFTokenMint(tx) {
|
|
35
36
|
assert.ok(tx.TransactionType === "URITokenMint");
|
|
36
37
|
const emittedDetails = (0, emit_details_1.parseEmittedDetails)(tx);
|
|
38
|
+
const source = (0, common_1.removeUndefined)({
|
|
39
|
+
address: (0, account_1.parseAccount)(tx.Account),
|
|
40
|
+
tag: tx.SourceTag,
|
|
41
|
+
});
|
|
42
|
+
const destination = (0, common_1.removeUndefined)({
|
|
43
|
+
address: tx.Destination,
|
|
44
|
+
});
|
|
37
45
|
return (0, common_1.removeUndefined)({
|
|
38
46
|
uri: tx.URI,
|
|
39
47
|
flags: (0, uritoken_flags_1.default)(tx.Flags),
|
|
40
48
|
digest: tx.Digest,
|
|
41
49
|
amount: tx.Amount,
|
|
42
|
-
|
|
50
|
+
source: Object.keys(source).length > 0 ? source : undefined,
|
|
51
|
+
destination: Object.keys(destination).length > 0 ? destination : undefined,
|
|
43
52
|
emittedDetails,
|
|
44
|
-
memos: (0, memos_1.
|
|
53
|
+
memos: (0, memos_1.parseMemos)(tx),
|
|
45
54
|
});
|
|
46
55
|
}
|
|
47
|
-
exports.default =
|
|
56
|
+
exports.default = parseNFTokenMint;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { XrplDefinitionsBase } from "ripple-binary-codec";
|
|
2
|
-
import { Outcome } from "../
|
|
3
|
-
import { FormattedAccountDeleteSpecification } from "../
|
|
4
|
-
import { FormattedSettingsSpecification } from "../
|
|
5
|
-
import { FormattedCheckCancelSpecification, FormattedCheckCashSpecification, FormattedCheckCreateSpecification } from "../
|
|
6
|
-
import { FormattedDepositPreauthSpecification } from "../
|
|
7
|
-
import { FormattedEscrowCancelSpecification, FormattedEscrowCreateSpecification, FormattedEscrowFinishSpecification } from "../
|
|
8
|
-
import { FormattedOfferCancelSpecification, FormattedOfferCreateSpecification } from "../
|
|
9
|
-
import { FormattedPaymentSpecification } from "../
|
|
10
|
-
import { FormattedPaymentChannelClaimSpecification, FormattedPaymentChannelCreateSpecification, FormattedPaymentChannelFundSpecification } from "../
|
|
11
|
-
import { FormattedTicketCreateSpecification } from "../
|
|
12
|
-
import { FormattedTrustlineSpecification } from "../
|
|
13
|
-
import { FormattedNFTokenBurnSpecification, FormattedNFTokenMintSpecification, FormattedNFTokenCancelOfferSpecification, FormattedNFTokenCreateOfferSpecification, FormattedNFTokenAcceptOfferSpecification } from "../
|
|
14
|
-
import { FormattedURITokenBurnSpecification, FormattedURITokenBuySpecification, FormattedURITokenCreateSellOfferSpecification, FormattedURITokenCancelSellOfferSpecification, FormattedURITokenMintSpecification } from "../
|
|
15
|
-
import { FormattedImportSpecification } from "../
|
|
16
|
-
import { FormattedInvokeSpecification } from "../
|
|
17
|
-
import { FormattedUNLReportSpecification } from "../
|
|
18
|
-
import { FormattedRemitsSpecification } from "../
|
|
19
|
-
import { FormattedAmendmentSpecification } from "../
|
|
20
|
-
import { FormattedFeeUpdateSpecification } from "../
|
|
2
|
+
import { Outcome } from "../types/outcome";
|
|
3
|
+
import { FormattedAccountDeleteSpecification } from "../types/account";
|
|
4
|
+
import { FormattedSettingsSpecification } from "../types/settings";
|
|
5
|
+
import { FormattedCheckCancelSpecification, FormattedCheckCashSpecification, FormattedCheckCreateSpecification } from "../types/checks";
|
|
6
|
+
import { FormattedDepositPreauthSpecification } from "../types/deposits";
|
|
7
|
+
import { FormattedEscrowCancelSpecification, FormattedEscrowCreateSpecification, FormattedEscrowFinishSpecification } from "../types/escrows";
|
|
8
|
+
import { FormattedOfferCancelSpecification, FormattedOfferCreateSpecification } from "../types/offers";
|
|
9
|
+
import { FormattedPaymentSpecification } from "../types/payments";
|
|
10
|
+
import { FormattedPaymentChannelClaimSpecification, FormattedPaymentChannelCreateSpecification, FormattedPaymentChannelFundSpecification } from "../types/payment_channels";
|
|
11
|
+
import { FormattedTicketCreateSpecification } from "../types/tickets";
|
|
12
|
+
import { FormattedTrustlineSpecification } from "../types/trustlines";
|
|
13
|
+
import { FormattedNFTokenBurnSpecification, FormattedNFTokenMintSpecification, FormattedNFTokenCancelOfferSpecification, FormattedNFTokenCreateOfferSpecification, FormattedNFTokenAcceptOfferSpecification } from "../types/nftokens";
|
|
14
|
+
import { FormattedURITokenBurnSpecification, FormattedURITokenBuySpecification, FormattedURITokenCreateSellOfferSpecification, FormattedURITokenCancelSellOfferSpecification, FormattedURITokenMintSpecification } from "../types/uritokens";
|
|
15
|
+
import { FormattedImportSpecification } from "../types/import";
|
|
16
|
+
import { FormattedInvokeSpecification } from "../types/invoke";
|
|
17
|
+
import { FormattedUNLReportSpecification } from "../types/unl_reports";
|
|
18
|
+
import { FormattedRemitsSpecification } from "../types/remits";
|
|
19
|
+
import { FormattedAmendmentSpecification } from "../types/amendments";
|
|
20
|
+
import { FormattedFeeUpdateSpecification } from "../types/fees";
|
|
21
21
|
declare function parseTransactionType(type: string): string;
|
|
22
22
|
export type FormattedSpecification = FormattedSettingsSpecification | FormattedAccountDeleteSpecification | FormattedCheckCancelSpecification | FormattedCheckCashSpecification | FormattedCheckCreateSpecification | FormattedDepositPreauthSpecification | FormattedEscrowCancelSpecification | FormattedEscrowCreateSpecification | FormattedEscrowFinishSpecification | FormattedOfferCancelSpecification | FormattedOfferCreateSpecification | FormattedPaymentSpecification | FormattedPaymentChannelClaimSpecification | FormattedPaymentChannelCreateSpecification | FormattedPaymentChannelFundSpecification | FormattedTicketCreateSpecification | FormattedTrustlineSpecification | FormattedNFTokenBurnSpecification | FormattedNFTokenMintSpecification | FormattedNFTokenCancelOfferSpecification | FormattedNFTokenCreateOfferSpecification | FormattedNFTokenAcceptOfferSpecification | FormattedURITokenBurnSpecification | FormattedURITokenBuySpecification | FormattedURITokenCreateSellOfferSpecification | FormattedURITokenCancelSellOfferSpecification | FormattedURITokenMintSpecification | FormattedImportSpecification | FormattedInvokeSpecification | FormattedUNLReportSpecification | FormattedRemitsSpecification | FormattedAmendmentSpecification | FormattedFeeUpdateSpecification;
|
|
23
23
|
export interface FormattedTransaction {
|
package/lib/parse/utils.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { TransactionMetadata } from "xrpl";
|
|
3
|
+
import { FormattedIssuedCurrencyAmount } from "../types";
|
|
1
4
|
declare function adjustQualityForXRP(quality: string, takerGetsCurrency: string, takerPaysCurrency: string): string;
|
|
2
5
|
declare function parseQuality(quality?: number | null): number | undefined;
|
|
3
6
|
declare function parseTimestamp(rippleTime?: number | null): string | undefined;
|
|
4
7
|
declare function isPartialPayment(tx: any): boolean;
|
|
8
|
+
declare function removeGenericCounterparty(amount: FormattedIssuedCurrencyAmount, address: string): FormattedIssuedCurrencyAmount;
|
|
9
|
+
declare function normalizeNodes(metadata: TransactionMetadata): any[];
|
|
5
10
|
declare function hexToString(hex: string | undefined): string | undefined;
|
|
6
|
-
|
|
11
|
+
declare function stringToHex(value: string | undefined): string | undefined;
|
|
12
|
+
declare function bytesToHex(value: Uint8Array | ArrayBufferLike): string;
|
|
13
|
+
declare function parseUint32(buf: Buffer, cur: number): string;
|
|
14
|
+
declare function parseUint64(buf: Buffer, cur: number): string;
|
|
15
|
+
export { parseQuality, parseTimestamp, adjustQualityForXRP, isPartialPayment, removeGenericCounterparty, normalizeNodes, hexToString, stringToHex, bytesToHex, parseUint32, parseUint64, };
|
package/lib/parse/utils.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.parseUint64 = exports.parseUint32 = exports.bytesToHex = exports.stringToHex = exports.hexToString = exports.normalizeNodes = exports.removeGenericCounterparty = exports.isPartialPayment = exports.adjustQualityForXRP = exports.parseTimestamp = exports.parseQuality = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
7
8
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
9
|
const xrpl_1 = require("xrpl");
|
|
9
10
|
const models_1 = require("../models");
|
|
@@ -33,7 +34,54 @@ function isPartialPayment(tx) {
|
|
|
33
34
|
return (tx.Flags & xrpl_1.PaymentFlags.tfPartialPayment) !== 0;
|
|
34
35
|
}
|
|
35
36
|
exports.isPartialPayment = isPartialPayment;
|
|
37
|
+
function removeGenericCounterparty(amount, address) {
|
|
38
|
+
return amount.counterparty === address ? lodash_1.default.omit(amount, "counterparty") : amount;
|
|
39
|
+
}
|
|
40
|
+
exports.removeGenericCounterparty = removeGenericCounterparty;
|
|
41
|
+
function normalizeNode(affectedNode) {
|
|
42
|
+
const diffType = Object.keys(affectedNode)[0];
|
|
43
|
+
const node = affectedNode[diffType];
|
|
44
|
+
return Object.assign({}, node, {
|
|
45
|
+
diffType,
|
|
46
|
+
entryType: node.LedgerEntryType,
|
|
47
|
+
ledgerIndex: node.LedgerIndex,
|
|
48
|
+
newFields: node.NewFields || {},
|
|
49
|
+
finalFields: node.FinalFields || {},
|
|
50
|
+
previousFields: node.PreviousFields || {},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function normalizeNodes(metadata) {
|
|
54
|
+
if (!metadata.AffectedNodes) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
return metadata.AffectedNodes.map(normalizeNode);
|
|
58
|
+
}
|
|
59
|
+
exports.normalizeNodes = normalizeNodes;
|
|
36
60
|
function hexToString(hex) {
|
|
37
61
|
return hex ? Buffer.from(hex, "hex").toString("utf-8") : undefined;
|
|
38
62
|
}
|
|
39
63
|
exports.hexToString = hexToString;
|
|
64
|
+
function stringToHex(value) {
|
|
65
|
+
return value ? Buffer.from(value, "utf8").toString("hex").toUpperCase() : undefined;
|
|
66
|
+
}
|
|
67
|
+
exports.stringToHex = stringToHex;
|
|
68
|
+
function bytesToHex(value) {
|
|
69
|
+
return Buffer.from(value).toString("hex").toUpperCase();
|
|
70
|
+
}
|
|
71
|
+
exports.bytesToHex = bytesToHex;
|
|
72
|
+
function parseUint32(buf, cur) {
|
|
73
|
+
return ((BigInt(buf[cur]) << 24n) + (BigInt(buf[cur + 1]) << 16n) + (BigInt(buf[cur + 2]) << 8n) + BigInt(buf[cur + 3]) + "");
|
|
74
|
+
}
|
|
75
|
+
exports.parseUint32 = parseUint32;
|
|
76
|
+
function parseUint64(buf, cur) {
|
|
77
|
+
return ((BigInt(buf[cur]) << 56n) +
|
|
78
|
+
(BigInt(buf[cur + 1]) << 48n) +
|
|
79
|
+
(BigInt(buf[cur + 2]) << 40n) +
|
|
80
|
+
(BigInt(buf[cur + 3]) << 32n) +
|
|
81
|
+
(BigInt(buf[cur + 4]) << 24n) +
|
|
82
|
+
(BigInt(buf[cur + 5]) << 16n) +
|
|
83
|
+
(BigInt(buf[cur + 6]) << 8n) +
|
|
84
|
+
BigInt(buf[cur + 7]) +
|
|
85
|
+
"");
|
|
86
|
+
}
|
|
87
|
+
exports.parseUint64 = parseUint64;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormattedBaseSpecification } from "./specification";
|
|
2
|
+
import { FormattedIssuedCurrencyAmount } from "./amounts";
|
|
3
|
+
export type FormattedAccountDeleteSpecification = {
|
|
4
|
+
source?: FormattedSourceAddress;
|
|
5
|
+
destination?: FormattedDestinationAddress;
|
|
6
|
+
} & FormattedBaseSpecification;
|
|
7
|
+
export type FormattedSourceAddress = {
|
|
8
|
+
address: string;
|
|
9
|
+
maxAmount?: FormattedIssuedCurrencyAmount;
|
|
10
|
+
tag?: number;
|
|
11
|
+
};
|
|
12
|
+
export type FormattedDestinationAddress = {
|
|
13
|
+
address: string;
|
|
14
|
+
tag?: number;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FormattedIssuedCurrencyAmount } from "./amounts";
|
|
2
|
+
export type Adjustment = {
|
|
3
|
+
address: string;
|
|
4
|
+
amount: FormattedIssuedCurrencyAmount;
|
|
5
|
+
tag?: number;
|
|
6
|
+
};
|
|
7
|
+
export type MaxAdjustment = {
|
|
8
|
+
address: string;
|
|
9
|
+
maxAmount: FormattedIssuedCurrencyAmount;
|
|
10
|
+
tag?: number;
|
|
11
|
+
};
|
|
12
|
+
export type MinAdjustment = {
|
|
13
|
+
address: string;
|
|
14
|
+
minAmount: FormattedIssuedCurrencyAmount;
|
|
15
|
+
tag?: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormattedBaseSpecification } from "./specification";
|
|
2
|
+
import { FormattedIssuedCurrencyAmount } from "./amounts";
|
|
3
|
+
import { FormattedSourceAddress, FormattedDestinationAddress } from "./account";
|
|
4
|
+
export type FormattedCheckCancelSpecification = {
|
|
5
|
+
checkID: string;
|
|
6
|
+
} & FormattedBaseSpecification;
|
|
7
|
+
export type FormattedCheckCashSpecification = {
|
|
8
|
+
checkID: string;
|
|
9
|
+
amount: FormattedIssuedCurrencyAmount;
|
|
10
|
+
deliverMin: FormattedIssuedCurrencyAmount;
|
|
11
|
+
} & FormattedBaseSpecification;
|
|
12
|
+
export type FormattedCheckCreateSpecification = {
|
|
13
|
+
source?: FormattedSourceAddress;
|
|
14
|
+
destination?: FormattedDestinationAddress;
|
|
15
|
+
sendMax: FormattedIssuedCurrencyAmount;
|
|
16
|
+
expiration?: string;
|
|
17
|
+
invoiceID?: string;
|
|
18
|
+
} & FormattedBaseSpecification;
|