@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
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { FormattedBaseSpecification } from "./specification";
|
|
2
|
-
import { FormattedSourceAddress } from "./account";
|
|
3
2
|
export type FormattedUNLReportSpecification = {
|
|
4
|
-
source: FormattedSourceAddress;
|
|
5
3
|
activeValidator?: string;
|
|
6
4
|
importVLKey?: string;
|
|
7
5
|
} & FormattedBaseSpecification;
|
|
@@ -26,13 +26,25 @@ function isXRPToXRPPayment(payment) {
|
|
|
26
26
|
(destinationCurrency === (0, client_1.getNativeCurrency)() || destinationCurrency === "drops"));
|
|
27
27
|
}
|
|
28
28
|
function isIOUWithoutCounterparty(amount) {
|
|
29
|
-
|
|
29
|
+
if (typeof amount === "object") {
|
|
30
|
+
if ("currency" in amount && amount.currency !== (0, client_1.getNativeCurrency)() && amount.currency !== "drops") {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
if ("mpt_issuance_id" in amount && amount.mpt_issuance_id) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
if (amount.issuer == null &&
|
|
37
|
+
amount.counterparty == null) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
30
42
|
}
|
|
31
43
|
function applyAnyCounterpartyEncoding(payment) {
|
|
32
44
|
[payment.source, payment.destination].forEach((adjustment) => {
|
|
33
45
|
["amount", "minAmount", "maxAmount"].forEach((key) => {
|
|
34
46
|
if (isIOUWithoutCounterparty(adjustment[key])) {
|
|
35
|
-
adjustment[key].
|
|
47
|
+
adjustment[key].issuer = adjustment.address;
|
|
36
48
|
}
|
|
37
49
|
});
|
|
38
50
|
});
|