xrpjson 0.1.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/LICENSE +21 -0
- package/README.md +183 -0
- package/dist/errors.d.ts +20 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +27 -0
- package/dist/errors.js.map +1 -0
- package/dist/fp/factories/account-delete.d.ts +33 -0
- package/dist/fp/factories/account-delete.d.ts.map +1 -0
- package/dist/fp/factories/account-delete.js +138 -0
- package/dist/fp/factories/account-delete.js.map +1 -0
- package/dist/fp/factories/account-set.d.ts +31 -0
- package/dist/fp/factories/account-set.d.ts.map +1 -0
- package/dist/fp/factories/account-set.js +44 -0
- package/dist/fp/factories/account-set.js.map +1 -0
- package/dist/fp/factories/amm-bid.d.ts +134 -0
- package/dist/fp/factories/amm-bid.d.ts.map +1 -0
- package/dist/fp/factories/amm-bid.js +82 -0
- package/dist/fp/factories/amm-bid.js.map +1 -0
- package/dist/fp/factories/amm-clawback.d.ts +166 -0
- package/dist/fp/factories/amm-clawback.d.ts.map +1 -0
- package/dist/fp/factories/amm-clawback.js +143 -0
- package/dist/fp/factories/amm-clawback.js.map +1 -0
- package/dist/fp/factories/amm-create.d.ts +91 -0
- package/dist/fp/factories/amm-create.d.ts.map +1 -0
- package/dist/fp/factories/amm-create.js +140 -0
- package/dist/fp/factories/amm-create.js.map +1 -0
- package/dist/fp/factories/amm-delete.d.ts +84 -0
- package/dist/fp/factories/amm-delete.d.ts.map +1 -0
- package/dist/fp/factories/amm-delete.js +36 -0
- package/dist/fp/factories/amm-delete.js.map +1 -0
- package/dist/fp/factories/amm-deposit.d.ts +109 -0
- package/dist/fp/factories/amm-deposit.d.ts.map +1 -0
- package/dist/fp/factories/amm-deposit.js +68 -0
- package/dist/fp/factories/amm-deposit.js.map +1 -0
- package/dist/fp/factories/amm-vote.d.ts +87 -0
- package/dist/fp/factories/amm-vote.d.ts.map +1 -0
- package/dist/fp/factories/amm-vote.js +53 -0
- package/dist/fp/factories/amm-vote.js.map +1 -0
- package/dist/fp/factories/amm-withdraw.d.ts +131 -0
- package/dist/fp/factories/amm-withdraw.d.ts.map +1 -0
- package/dist/fp/factories/amm-withdraw.js +147 -0
- package/dist/fp/factories/amm-withdraw.js.map +1 -0
- package/dist/fp/factories/batch.d.ts +133 -0
- package/dist/fp/factories/batch.d.ts.map +1 -0
- package/dist/fp/factories/batch.js +264 -0
- package/dist/fp/factories/batch.js.map +1 -0
- package/dist/fp/factories/check-cancel.d.ts +22 -0
- package/dist/fp/factories/check-cancel.d.ts.map +1 -0
- package/dist/fp/factories/check-cancel.js +119 -0
- package/dist/fp/factories/check-cancel.js.map +1 -0
- package/dist/fp/factories/check-cash.d.ts +84 -0
- package/dist/fp/factories/check-cash.d.ts.map +1 -0
- package/dist/fp/factories/check-cash.js +95 -0
- package/dist/fp/factories/check-cash.js.map +1 -0
- package/dist/fp/factories/check-create.d.ts +82 -0
- package/dist/fp/factories/check-create.d.ts.map +1 -0
- package/dist/fp/factories/check-create.js +101 -0
- package/dist/fp/factories/check-create.js.map +1 -0
- package/dist/fp/factories/clawback.d.ts +160 -0
- package/dist/fp/factories/clawback.d.ts.map +1 -0
- package/dist/fp/factories/clawback.js +111 -0
- package/dist/fp/factories/clawback.js.map +1 -0
- package/dist/fp/factories/confidential-mpt-clawback.d.ts +24 -0
- package/dist/fp/factories/confidential-mpt-clawback.d.ts.map +1 -0
- package/dist/fp/factories/confidential-mpt-clawback.js +200 -0
- package/dist/fp/factories/confidential-mpt-clawback.js.map +1 -0
- package/dist/fp/factories/confidential-mpt-convert-back.d.ts +32 -0
- package/dist/fp/factories/confidential-mpt-convert-back.d.ts.map +1 -0
- package/dist/fp/factories/confidential-mpt-convert-back.js +203 -0
- package/dist/fp/factories/confidential-mpt-convert-back.js.map +1 -0
- package/dist/fp/factories/confidential-mpt-convert.d.ts +32 -0
- package/dist/fp/factories/confidential-mpt-convert.d.ts.map +1 -0
- package/dist/fp/factories/confidential-mpt-convert.js +209 -0
- package/dist/fp/factories/confidential-mpt-convert.js.map +1 -0
- package/dist/fp/factories/confidential-mpt-merge-inbox.d.ts +18 -0
- package/dist/fp/factories/confidential-mpt-merge-inbox.d.ts.map +1 -0
- package/dist/fp/factories/confidential-mpt-merge-inbox.js +130 -0
- package/dist/fp/factories/confidential-mpt-merge-inbox.js.map +1 -0
- package/dist/fp/factories/confidential-mpt-send.d.ts +38 -0
- package/dist/fp/factories/confidential-mpt-send.d.ts.map +1 -0
- package/dist/fp/factories/confidential-mpt-send.js +254 -0
- package/dist/fp/factories/confidential-mpt-send.js.map +1 -0
- package/dist/fp/factories/credential-accept.d.ts +23 -0
- package/dist/fp/factories/credential-accept.d.ts.map +1 -0
- package/dist/fp/factories/credential-accept.js +135 -0
- package/dist/fp/factories/credential-accept.js.map +1 -0
- package/dist/fp/factories/credential-create.d.ts +24 -0
- package/dist/fp/factories/credential-create.d.ts.map +1 -0
- package/dist/fp/factories/credential-create.js +204 -0
- package/dist/fp/factories/credential-create.js.map +1 -0
- package/dist/fp/factories/credential-delete.d.ts +33 -0
- package/dist/fp/factories/credential-delete.d.ts.map +1 -0
- package/dist/fp/factories/credential-delete.js +167 -0
- package/dist/fp/factories/credential-delete.js.map +1 -0
- package/dist/fp/factories/delegate-set.d.ts +52 -0
- package/dist/fp/factories/delegate-set.d.ts.map +1 -0
- package/dist/fp/factories/delegate-set.js +190 -0
- package/dist/fp/factories/delegate-set.js.map +1 -0
- package/dist/fp/factories/deposit-preauth.d.ts +183 -0
- package/dist/fp/factories/deposit-preauth.d.ts.map +1 -0
- package/dist/fp/factories/deposit-preauth.js +159 -0
- package/dist/fp/factories/deposit-preauth.js.map +1 -0
- package/dist/fp/factories/did-delete.d.ts +22 -0
- package/dist/fp/factories/did-delete.d.ts.map +1 -0
- package/dist/fp/factories/did-delete.js +126 -0
- package/dist/fp/factories/did-delete.js.map +1 -0
- package/dist/fp/factories/did-set.d.ts +68 -0
- package/dist/fp/factories/did-set.d.ts.map +1 -0
- package/dist/fp/factories/did-set.js +178 -0
- package/dist/fp/factories/did-set.js.map +1 -0
- package/dist/fp/factories/escrow-cancel.d.ts +28 -0
- package/dist/fp/factories/escrow-cancel.d.ts.map +1 -0
- package/dist/fp/factories/escrow-cancel.js +127 -0
- package/dist/fp/factories/escrow-cancel.js.map +1 -0
- package/dist/fp/factories/escrow-create.d.ts +103 -0
- package/dist/fp/factories/escrow-create.d.ts.map +1 -0
- package/dist/fp/factories/escrow-create.js +133 -0
- package/dist/fp/factories/escrow-create.js.map +1 -0
- package/dist/fp/factories/escrow-finish.d.ts +39 -0
- package/dist/fp/factories/escrow-finish.d.ts.map +1 -0
- package/dist/fp/factories/escrow-finish.js +173 -0
- package/dist/fp/factories/escrow-finish.js.map +1 -0
- package/dist/fp/factories/ledger-state-fix.d.ts +31 -0
- package/dist/fp/factories/ledger-state-fix.d.ts.map +1 -0
- package/dist/fp/factories/ledger-state-fix.js +163 -0
- package/dist/fp/factories/ledger-state-fix.js.map +1 -0
- package/dist/fp/factories/loan-broker-cover-clawback.d.ts +106 -0
- package/dist/fp/factories/loan-broker-cover-clawback.d.ts.map +1 -0
- package/dist/fp/factories/loan-broker-cover-clawback.js +122 -0
- package/dist/fp/factories/loan-broker-cover-clawback.js.map +1 -0
- package/dist/fp/factories/loan-broker-cover-deposit.d.ts +65 -0
- package/dist/fp/factories/loan-broker-cover-deposit.d.ts.map +1 -0
- package/dist/fp/factories/loan-broker-cover-deposit.js +81 -0
- package/dist/fp/factories/loan-broker-cover-deposit.js.map +1 -0
- package/dist/fp/factories/loan-broker-cover-withdraw.d.ts +96 -0
- package/dist/fp/factories/loan-broker-cover-withdraw.d.ts.map +1 -0
- package/dist/fp/factories/loan-broker-cover-withdraw.js +116 -0
- package/dist/fp/factories/loan-broker-cover-withdraw.js.map +1 -0
- package/dist/fp/factories/loan-broker-delete.d.ts +20 -0
- package/dist/fp/factories/loan-broker-delete.d.ts.map +1 -0
- package/dist/fp/factories/loan-broker-delete.js +94 -0
- package/dist/fp/factories/loan-broker-delete.js.map +1 -0
- package/dist/fp/factories/loan-broker-set.d.ts +108 -0
- package/dist/fp/factories/loan-broker-set.d.ts.map +1 -0
- package/dist/fp/factories/loan-broker-set.js +133 -0
- package/dist/fp/factories/loan-broker-set.js.map +1 -0
- package/dist/fp/factories/loan-delete.d.ts +18 -0
- package/dist/fp/factories/loan-delete.d.ts.map +1 -0
- package/dist/fp/factories/loan-delete.js +95 -0
- package/dist/fp/factories/loan-delete.js.map +1 -0
- package/dist/fp/factories/loan-manage.d.ts +72 -0
- package/dist/fp/factories/loan-manage.d.ts.map +1 -0
- package/dist/fp/factories/loan-manage.js +79 -0
- package/dist/fp/factories/loan-manage.js.map +1 -0
- package/dist/fp/factories/loan-pay.d.ts +70 -0
- package/dist/fp/factories/loan-pay.d.ts.map +1 -0
- package/dist/fp/factories/loan-pay.js +115 -0
- package/dist/fp/factories/loan-pay.js.map +1 -0
- package/dist/fp/factories/loan-set.d.ts +67 -0
- package/dist/fp/factories/loan-set.d.ts.map +1 -0
- package/dist/fp/factories/loan-set.js +102 -0
- package/dist/fp/factories/loan-set.js.map +1 -0
- package/dist/fp/factories/mptoken-authorize.d.ts +83 -0
- package/dist/fp/factories/mptoken-authorize.d.ts.map +1 -0
- package/dist/fp/factories/mptoken-authorize.js +63 -0
- package/dist/fp/factories/mptoken-authorize.js.map +1 -0
- package/dist/fp/factories/mptoken-issuance-create.d.ts +71 -0
- package/dist/fp/factories/mptoken-issuance-create.d.ts.map +1 -0
- package/dist/fp/factories/mptoken-issuance-create.js +135 -0
- package/dist/fp/factories/mptoken-issuance-create.js.map +1 -0
- package/dist/fp/factories/mptoken-issuance-destroy.d.ts +32 -0
- package/dist/fp/factories/mptoken-issuance-destroy.d.ts.map +1 -0
- package/dist/fp/factories/mptoken-issuance-destroy.js +105 -0
- package/dist/fp/factories/mptoken-issuance-destroy.js.map +1 -0
- package/dist/fp/factories/mptoken-issuance-set.d.ts +196 -0
- package/dist/fp/factories/mptoken-issuance-set.d.ts.map +1 -0
- package/dist/fp/factories/mptoken-issuance-set.js +333 -0
- package/dist/fp/factories/mptoken-issuance-set.js.map +1 -0
- package/dist/fp/factories/nftoken-accept-offer.d.ts +108 -0
- package/dist/fp/factories/nftoken-accept-offer.d.ts.map +1 -0
- package/dist/fp/factories/nftoken-accept-offer.js +105 -0
- package/dist/fp/factories/nftoken-accept-offer.js.map +1 -0
- package/dist/fp/factories/nftoken-burn.d.ts +27 -0
- package/dist/fp/factories/nftoken-burn.d.ts.map +1 -0
- package/dist/fp/factories/nftoken-burn.js +125 -0
- package/dist/fp/factories/nftoken-burn.js.map +1 -0
- package/dist/fp/factories/nftoken-cancel-offer.d.ts +19 -0
- package/dist/fp/factories/nftoken-cancel-offer.d.ts.map +1 -0
- package/dist/fp/factories/nftoken-cancel-offer.js +143 -0
- package/dist/fp/factories/nftoken-cancel-offer.js.map +1 -0
- package/dist/fp/factories/nftoken-create-offer.d.ts +159 -0
- package/dist/fp/factories/nftoken-create-offer.d.ts.map +1 -0
- package/dist/fp/factories/nftoken-create-offer.js +212 -0
- package/dist/fp/factories/nftoken-create-offer.js.map +1 -0
- package/dist/fp/factories/nftoken-mint.d.ts +155 -0
- package/dist/fp/factories/nftoken-mint.d.ts.map +1 -0
- package/dist/fp/factories/nftoken-mint.js +165 -0
- package/dist/fp/factories/nftoken-mint.js.map +1 -0
- package/dist/fp/factories/nftoken-modify.d.ts +28 -0
- package/dist/fp/factories/nftoken-modify.d.ts.map +1 -0
- package/dist/fp/factories/nftoken-modify.js +209 -0
- package/dist/fp/factories/nftoken-modify.js.map +1 -0
- package/dist/fp/factories/offer-cancel.d.ts +21 -0
- package/dist/fp/factories/offer-cancel.d.ts.map +1 -0
- package/dist/fp/factories/offer-cancel.js +99 -0
- package/dist/fp/factories/offer-cancel.js.map +1 -0
- package/dist/fp/factories/offer-create.d.ts +125 -0
- package/dist/fp/factories/offer-create.d.ts.map +1 -0
- package/dist/fp/factories/offer-create.js +230 -0
- package/dist/fp/factories/offer-create.js.map +1 -0
- package/dist/fp/factories/oracle-delete.d.ts +21 -0
- package/dist/fp/factories/oracle-delete.d.ts.map +1 -0
- package/dist/fp/factories/oracle-delete.js +101 -0
- package/dist/fp/factories/oracle-delete.js.map +1 -0
- package/dist/fp/factories/oracle-set.d.ts +40 -0
- package/dist/fp/factories/oracle-set.d.ts.map +1 -0
- package/dist/fp/factories/oracle-set.js +257 -0
- package/dist/fp/factories/oracle-set.js.map +1 -0
- package/dist/fp/factories/payment-channel-claim.d.ts +153 -0
- package/dist/fp/factories/payment-channel-claim.d.ts.map +1 -0
- package/dist/fp/factories/payment-channel-claim.js +118 -0
- package/dist/fp/factories/payment-channel-claim.js.map +1 -0
- package/dist/fp/factories/payment-channel-create.d.ts +30 -0
- package/dist/fp/factories/payment-channel-create.d.ts.map +1 -0
- package/dist/fp/factories/payment-channel-create.js +172 -0
- package/dist/fp/factories/payment-channel-create.js.map +1 -0
- package/dist/fp/factories/payment-channel-fund.d.ts +25 -0
- package/dist/fp/factories/payment-channel-fund.d.ts.map +1 -0
- package/dist/fp/factories/payment-channel-fund.js +142 -0
- package/dist/fp/factories/payment-channel-fund.js.map +1 -0
- package/dist/fp/factories/payment.d.ts +65 -0
- package/dist/fp/factories/payment.d.ts.map +1 -0
- package/dist/fp/factories/payment.js +48 -0
- package/dist/fp/factories/payment.js.map +1 -0
- package/dist/fp/factories/permissioned-domain-delete.d.ts +18 -0
- package/dist/fp/factories/permissioned-domain-delete.d.ts.map +1 -0
- package/dist/fp/factories/permissioned-domain-delete.js +88 -0
- package/dist/fp/factories/permissioned-domain-delete.js.map +1 -0
- package/dist/fp/factories/permissioned-domain-set.d.ts +118 -0
- package/dist/fp/factories/permissioned-domain-set.d.ts.map +1 -0
- package/dist/fp/factories/permissioned-domain-set.js +100 -0
- package/dist/fp/factories/permissioned-domain-set.js.map +1 -0
- package/dist/fp/factories/set-regular-key.d.ts +30 -0
- package/dist/fp/factories/set-regular-key.d.ts.map +1 -0
- package/dist/fp/factories/set-regular-key.js +81 -0
- package/dist/fp/factories/set-regular-key.js.map +1 -0
- package/dist/fp/factories/signer-list-set.d.ts +61 -0
- package/dist/fp/factories/signer-list-set.d.ts.map +1 -0
- package/dist/fp/factories/signer-list-set.js +250 -0
- package/dist/fp/factories/signer-list-set.js.map +1 -0
- package/dist/fp/factories/sponsorship-set.d.ts +148 -0
- package/dist/fp/factories/sponsorship-set.d.ts.map +1 -0
- package/dist/fp/factories/sponsorship-set.js +201 -0
- package/dist/fp/factories/sponsorship-set.js.map +1 -0
- package/dist/fp/factories/sponsorship-transfer.d.ts +173 -0
- package/dist/fp/factories/sponsorship-transfer.d.ts.map +1 -0
- package/dist/fp/factories/sponsorship-transfer.js +195 -0
- package/dist/fp/factories/sponsorship-transfer.js.map +1 -0
- package/dist/fp/factories/ticket-create.d.ts +20 -0
- package/dist/fp/factories/ticket-create.d.ts.map +1 -0
- package/dist/fp/factories/ticket-create.js +120 -0
- package/dist/fp/factories/ticket-create.js.map +1 -0
- package/dist/fp/factories/trust-set.d.ts +100 -0
- package/dist/fp/factories/trust-set.d.ts.map +1 -0
- package/dist/fp/factories/trust-set.js +111 -0
- package/dist/fp/factories/trust-set.js.map +1 -0
- package/dist/fp/factories/vault-clawback.d.ts +83 -0
- package/dist/fp/factories/vault-clawback.d.ts.map +1 -0
- package/dist/fp/factories/vault-clawback.js +91 -0
- package/dist/fp/factories/vault-clawback.js.map +1 -0
- package/dist/fp/factories/vault-create.d.ts +51 -0
- package/dist/fp/factories/vault-create.d.ts.map +1 -0
- package/dist/fp/factories/vault-create.js +141 -0
- package/dist/fp/factories/vault-create.js.map +1 -0
- package/dist/fp/factories/vault-delete.d.ts +20 -0
- package/dist/fp/factories/vault-delete.d.ts.map +1 -0
- package/dist/fp/factories/vault-delete.js +103 -0
- package/dist/fp/factories/vault-delete.js.map +1 -0
- package/dist/fp/factories/vault-deposit.d.ts +56 -0
- package/dist/fp/factories/vault-deposit.d.ts.map +1 -0
- package/dist/fp/factories/vault-deposit.js +85 -0
- package/dist/fp/factories/vault-deposit.js.map +1 -0
- package/dist/fp/factories/vault-set.d.ts +32 -0
- package/dist/fp/factories/vault-set.d.ts.map +1 -0
- package/dist/fp/factories/vault-set.js +135 -0
- package/dist/fp/factories/vault-set.js.map +1 -0
- package/dist/fp/factories/vault-withdraw.d.ts +82 -0
- package/dist/fp/factories/vault-withdraw.d.ts.map +1 -0
- package/dist/fp/factories/vault-withdraw.js +122 -0
- package/dist/fp/factories/vault-withdraw.js.map +1 -0
- package/dist/fp/factories/xchain-account-create-commit.d.ts +180 -0
- package/dist/fp/factories/xchain-account-create-commit.d.ts.map +1 -0
- package/dist/fp/factories/xchain-account-create-commit.js +99 -0
- package/dist/fp/factories/xchain-account-create-commit.js.map +1 -0
- package/dist/fp/factories/xchain-add-account-create-attestation.d.ts +213 -0
- package/dist/fp/factories/xchain-add-account-create-attestation.d.ts.map +1 -0
- package/dist/fp/factories/xchain-add-account-create-attestation.js +95 -0
- package/dist/fp/factories/xchain-add-account-create-attestation.js.map +1 -0
- package/dist/fp/factories/xchain-add-claim-attestation.d.ts +206 -0
- package/dist/fp/factories/xchain-add-claim-attestation.d.ts.map +1 -0
- package/dist/fp/factories/xchain-add-claim-attestation.js +97 -0
- package/dist/fp/factories/xchain-add-claim-attestation.js.map +1 -0
- package/dist/fp/factories/xchain-claim.d.ts +187 -0
- package/dist/fp/factories/xchain-claim.d.ts.map +1 -0
- package/dist/fp/factories/xchain-claim.js +140 -0
- package/dist/fp/factories/xchain-claim.js.map +1 -0
- package/dist/fp/factories/xchain-commit.d.ts +168 -0
- package/dist/fp/factories/xchain-commit.d.ts.map +1 -0
- package/dist/fp/factories/xchain-commit.js +137 -0
- package/dist/fp/factories/xchain-commit.js.map +1 -0
- package/dist/fp/factories/xchain-create-bridge.d.ts +206 -0
- package/dist/fp/factories/xchain-create-bridge.d.ts.map +1 -0
- package/dist/fp/factories/xchain-create-bridge.js +100 -0
- package/dist/fp/factories/xchain-create-bridge.js.map +1 -0
- package/dist/fp/factories/xchain-create-claim-id.d.ts +199 -0
- package/dist/fp/factories/xchain-create-claim-id.d.ts.map +1 -0
- package/dist/fp/factories/xchain-create-claim-id.js +78 -0
- package/dist/fp/factories/xchain-create-claim-id.js.map +1 -0
- package/dist/fp/factories/xchain-modify-bridge.d.ts +198 -0
- package/dist/fp/factories/xchain-modify-bridge.d.ts.map +1 -0
- package/dist/fp/factories/xchain-modify-bridge.js +102 -0
- package/dist/fp/factories/xchain-modify-bridge.js.map +1 -0
- package/dist/fp/index.d.ts +124 -0
- package/dist/fp/index.d.ts.map +1 -0
- package/dist/fp/index.js +152 -0
- package/dist/fp/index.js.map +1 -0
- package/dist/fp/shape.d.ts +34 -0
- package/dist/fp/shape.d.ts.map +1 -0
- package/dist/fp/shape.js +80 -0
- package/dist/fp/shape.js.map +1 -0
- package/dist/types/amounts.d.ts +49 -0
- package/dist/types/amounts.d.ts.map +1 -0
- package/dist/types/amounts.js +8 -0
- package/dist/types/amounts.js.map +1 -0
- package/dist/types/base.d.ts +103 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js +2 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/common.d.ts +163 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +5 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/flags.d.ts +317 -0
- package/dist/types/flags.d.ts.map +1 -0
- package/dist/types/flags.js +253 -0
- package/dist/types/flags.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/transaction-types.d.ts +7 -0
- package/dist/types/transaction-types.d.ts.map +1 -0
- package/dist/types/transaction-types.js +2 -0
- package/dist/types/transaction-types.js.map +1 -0
- package/dist/validation/base.d.ts +8 -0
- package/dist/validation/base.d.ts.map +1 -0
- package/dist/validation/base.js +79 -0
- package/dist/validation/base.js.map +1 -0
- package/dist/validation/helpers.d.ts +42 -0
- package/dist/validation/helpers.d.ts.map +1 -0
- package/dist/validation/helpers.js +154 -0
- package/dist/validation/helpers.js.map +1 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +3 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Functional LoanBrokerCoverClawback factory — frozen-object style.
|
|
3
|
+
*
|
|
4
|
+
* Claws back First-Loss Capital from a `LoanBroker` ledger entry. Only the
|
|
5
|
+
* Issuer of the Loan asset can submit this. Clawback is limited to the
|
|
6
|
+
* minimum cover required for current loans.
|
|
7
|
+
*
|
|
8
|
+
* import { loanBrokerCoverClawback } from 'xrplt/fp';
|
|
9
|
+
* const tx = loanBrokerCoverClawback({ Account, LoanBrokerID, Amount });
|
|
10
|
+
* const j = tx.toJSON();
|
|
11
|
+
* const tx2 = tx.with({ Amount: { currency: 'USD', issuer, value: '50' } });
|
|
12
|
+
*
|
|
13
|
+
* LoanBrokerCoverClawback has no flags defined by the spec.
|
|
14
|
+
*
|
|
15
|
+
* Affected amendments:
|
|
16
|
+
* - `LendingProtocol` (base LoanBrokerCoverClawback)
|
|
17
|
+
*
|
|
18
|
+
* @see https://xrpl.org/docs/references/protocol/transactions/types/loanbrokercoverclawback
|
|
19
|
+
* @see XLS-66 §3.7 (Transaction: `LoanBrokerCoverClawback`)
|
|
20
|
+
* in `~/.mavis/docs.local/xrpl-standards/repo/XLS-0066-lending-protocol/README.md`
|
|
21
|
+
*
|
|
22
|
+
* ## Divergences
|
|
23
|
+
*
|
|
24
|
+
* The factory enforces five preclaim checks the class API
|
|
25
|
+
* (`src/transactions/loan-broker-cover-clawback.ts`) skips:
|
|
26
|
+
*
|
|
27
|
+
* 1. `LoanBrokerID` must NOT be the all-zeros HASH256 value when present.
|
|
28
|
+
* Source: XLS-66 §3.7.3.1 check 2 — "`LoanBrokerID` is specified and is
|
|
29
|
+
* zero. (`temINVALID`)"
|
|
30
|
+
* The class only validates `isString` + `isHex` + length 64 (i.e.
|
|
31
|
+
* `isLedgerEntryId`), which is satisfied by the all-zeros string.
|
|
32
|
+
* xrpl.js `validateLoanBrokerCoverClawback` has the same gap.
|
|
33
|
+
* (`~/.mavis/docs.local/xrpl.js/repo/packages/xrpl/src/models/transactions/loanBrokerCoverClawback.ts`
|
|
34
|
+
* lines 53-57.)
|
|
35
|
+
*
|
|
36
|
+
* 2. `LoanBrokerID` is required when `Amount` is an MPT, and required
|
|
37
|
+
* when `Amount` is an IOU whose `issuer` matches the submitter
|
|
38
|
+
* `Account`.
|
|
39
|
+
* Source: XLS-66 §3.7.3.1 checks 6 and 7:
|
|
40
|
+
* - "`LoanBrokerID` is not specified and `Amount` specifies an MPT.
|
|
41
|
+
* (`temINVALID`)"
|
|
42
|
+
* - "`LoanBrokerID` is not specified, `Amount` specifies an IOU, and
|
|
43
|
+
* `Amount.issuer` is the submitter `Account` or zero. (`temINVALID`)"
|
|
44
|
+
* The class does not enforce either cross-field dependency; it only
|
|
45
|
+
* requires that at least one of `LoanBrokerID`/`Amount` be present.
|
|
46
|
+
* xrpl.js `validateLoanBrokerCoverClawback` also skips these.
|
|
47
|
+
* (`~/.mavis/docs.local/xrpl.js/repo/packages/xrpl/src/models/transactions/loanBrokerCoverClawback.ts`
|
|
48
|
+
* lines 45-67.)
|
|
49
|
+
*
|
|
50
|
+
* 3. `Amount.value` must be a well-formed non-negative XRPL Number
|
|
51
|
+
* (matches the spec's "legal net amount" requirement of §3.7.3.1
|
|
52
|
+
* check 5). The class uses `Number(value)` and only checks
|
|
53
|
+
* `Number.isNaN` / `< 0`, which silently accepts malformed input
|
|
54
|
+
* like `""`, `" "`, or `"1.2.3"`. The factory accepts the
|
|
55
|
+
* canonical XRPL Number form: decimal strings or scientific
|
|
56
|
+
* mantissa (`1.5e3`), and rejects anything else.
|
|
57
|
+
* Source: xrpl.org generic Amount spec
|
|
58
|
+
* (https://xrpl.org/docs/references/protocol/data-types/basic-data-types#specifying-currency-amounts).
|
|
59
|
+
*
|
|
60
|
+
* 4. `Amount` sub-field shape (`currency`/`issuer` for IOU;
|
|
61
|
+
* `mpt_issuance_id` for MPT) is validated, mirroring the strict
|
|
62
|
+
* policy used by the `vaultClawback` factory. The class only
|
|
63
|
+
* delegates to `isIssuedCurrencyAmount` / `isMPTAmount`, which
|
|
64
|
+
* verify key presence but not the well-formedness of the values.
|
|
65
|
+
* Source: xrpl-dev-portal basic-data-types (currency must be 3 ASCII
|
|
66
|
+
* or 40 hex characters; MPT issuance ID is a 192-bit hex string).
|
|
67
|
+
*
|
|
68
|
+
* 5. `Account` is validated as a classic or X-address. The class does
|
|
69
|
+
* not check `Account` here — this divergence is identical across
|
|
70
|
+
* the loan factories and is documented per-factory.
|
|
71
|
+
*
|
|
72
|
+
* Note: the factory accepts `Amount.value === '0'` because the spec
|
|
73
|
+
* explicitly defines zero as the "clawback down to minimum cover" signal
|
|
74
|
+
* (XLS-66 §3.7.4 state change 2). xrpl.js and the class agree.
|
|
75
|
+
*/
|
|
76
|
+
import type { ClawbackAmount } from '../../types/amounts.js';
|
|
77
|
+
export interface LoanBrokerCoverClawbackProps {
|
|
78
|
+
/** The unique address of the transaction sender (must be the Loan asset's Issuer). */
|
|
79
|
+
Account: string;
|
|
80
|
+
/**
|
|
81
|
+
* Optional. The ID of the `LoanBroker` ledger entry to claw back from.
|
|
82
|
+
* 64-char hex. Required if Amount is MPT or Amount is IOU and
|
|
83
|
+
* `Amount.issuer === Account`.
|
|
84
|
+
*/
|
|
85
|
+
LoanBrokerID?: string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Optional First-Loss Capital amount to claw back. IOU or MPT form
|
|
88
|
+
* (NOT XRP). If `0` or omitted, claws back up to
|
|
89
|
+
* `LoanBroker.DebtTotal * LoanBroker.CoverRateMinimum`.
|
|
90
|
+
*/
|
|
91
|
+
Amount?: ClawbackAmount | undefined;
|
|
92
|
+
/** No flags defined by the spec; permitted for base-tx parity. */
|
|
93
|
+
Flags?: number | undefined;
|
|
94
|
+
/** Fee in XRP (drops), base-10 integer string. */
|
|
95
|
+
Fee?: string | undefined;
|
|
96
|
+
/** Account sequence number. */
|
|
97
|
+
Sequence?: number | undefined;
|
|
98
|
+
}
|
|
99
|
+
export interface LoanBrokerCoverClawback extends Readonly<LoanBrokerCoverClawbackProps> {
|
|
100
|
+
readonly TransactionType: 'LoanBrokerCoverClawback';
|
|
101
|
+
validate(): void;
|
|
102
|
+
toJSON(): Record<string, unknown>;
|
|
103
|
+
with(overrides: Partial<LoanBrokerCoverClawbackProps>): LoanBrokerCoverClawback;
|
|
104
|
+
}
|
|
105
|
+
export declare function loanBrokerCoverClawback(props: LoanBrokerCoverClawbackProps): LoanBrokerCoverClawback;
|
|
106
|
+
//# sourceMappingURL=loan-broker-cover-clawback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-broker-cover-clawback.d.ts","sourceRoot":"","sources":["../../../src/fp/factories/loan-broker-cover-clawback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA+B7D,MAAM,WAAW,4BAA4B;IAC3C,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACpC,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,uBACf,SAAQ,QAAQ,CAAC,4BAA4B,CAAC;IAC9C,QAAQ,CAAC,eAAe,EAAE,yBAAyB,CAAC;IACpD,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,CACF,SAAS,EAAE,OAAO,CAAC,4BAA4B,CAAC,GAC/C,uBAAuB,CAAC;CAC5B;AAoBD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,uBAAuB,CAuIzB"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { isAccount, isHex, isIssuedCurrencyAmount, isMPTAmount, isString, } from '../../validation/helpers.js';
|
|
2
|
+
import { ValidationError } from '../../errors.js';
|
|
3
|
+
import { buildFrozenTx, mergeForWith, require } from '../shape.js';
|
|
4
|
+
// ─── Spec constants ──────────────────────────────────────────────────
|
|
5
|
+
// LoanBrokerID is a HASH256 = 32 bytes = 64 hex chars.
|
|
6
|
+
const LOAN_BROKER_ID_LENGTH = 64;
|
|
7
|
+
// All-zeros HASH256 is reserved / malformed per XLS-66 §3.7.3.1 check 2.
|
|
8
|
+
const LOAN_BROKER_ID_ZERO = '0000000000000000000000000000000000000000000000000000000000000000';
|
|
9
|
+
// Currency codes are either 3 ASCII characters or 40 hex characters.
|
|
10
|
+
const CURRENCY_ASCII_LENGTH = 3;
|
|
11
|
+
const CURRENCY_HEX_LENGTH = 40;
|
|
12
|
+
// MPT issuance IDs are 192-bit, hex-encoded (≤ 48 chars).
|
|
13
|
+
// We accept 24..48 to leave slack for future widenings / leading-zero
|
|
14
|
+
// encoders. Empty strings are rejected.
|
|
15
|
+
const MPT_ISSUANCE_ID_MIN = 24;
|
|
16
|
+
const MPT_ISSUANCE_ID_MAX = 48;
|
|
17
|
+
// ─── Helpers ─────────────────────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* Per XLS-66 §3.7.3.1 check 3 (`Amount < 0` rejected, `Amount >= 0`
|
|
20
|
+
* accepted) and check 5 ("legal net amount"). Accepts the canonical
|
|
21
|
+
* XRPL Number form: decimal strings or scientific mantissa (`1.5e3`).
|
|
22
|
+
*
|
|
23
|
+
* Zero is explicitly allowed per §3.7.4 state change 2 (clawback down
|
|
24
|
+
* to minimum cover).
|
|
25
|
+
*/
|
|
26
|
+
function isNonNegativeAmountValue(value) {
|
|
27
|
+
if (typeof value !== 'string')
|
|
28
|
+
return false;
|
|
29
|
+
if (!/^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u.test(value))
|
|
30
|
+
return false;
|
|
31
|
+
return parseFloat(value) >= 0;
|
|
32
|
+
}
|
|
33
|
+
// ─── Factory ─────────────────────────────────────────────────────────
|
|
34
|
+
export function loanBrokerCoverClawback(props) {
|
|
35
|
+
// ── Account ── required, must be a valid XRPL classic or X-address.
|
|
36
|
+
require(props.Account, 'LoanBrokerCoverClawback: Account is required', isAccount);
|
|
37
|
+
// ── LoanBrokerID ── optional, but if present: 64-char hex AND non-zero.
|
|
38
|
+
if (props.LoanBrokerID !== undefined) {
|
|
39
|
+
if (!isString(props.LoanBrokerID) ||
|
|
40
|
+
!isHex(props.LoanBrokerID) ||
|
|
41
|
+
props.LoanBrokerID.length !== LOAN_BROKER_ID_LENGTH) {
|
|
42
|
+
throw new ValidationError('LoanBrokerCoverClawback: LoanBrokerID must be a 64-character hex string');
|
|
43
|
+
}
|
|
44
|
+
if (props.LoanBrokerID === LOAN_BROKER_ID_ZERO) {
|
|
45
|
+
throw new ValidationError('LoanBrokerCoverClawback: LoanBrokerID must not be the all-zeros HASH256 value');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// ── Amount ── optional, but if present: must be a valid ClawbackAmount
|
|
49
|
+
// (IOU/MPT, NOT XRP), with well-formed sub-fields and value >= 0.
|
|
50
|
+
if (props.Amount !== undefined) {
|
|
51
|
+
if (!isIssuedCurrencyAmount(props.Amount) &&
|
|
52
|
+
!isMPTAmount(props.Amount)) {
|
|
53
|
+
throw new ValidationError('LoanBrokerCoverClawback: Amount must be a valid ClawbackAmount (trust line / MPT form, NOT XRP)');
|
|
54
|
+
}
|
|
55
|
+
if (isIssuedCurrencyAmount(props.Amount)) {
|
|
56
|
+
// Currency: 3 ASCII or 40 hex characters.
|
|
57
|
+
const ccy = props.Amount.currency;
|
|
58
|
+
if (ccy.length !== CURRENCY_ASCII_LENGTH &&
|
|
59
|
+
ccy.length !== CURRENCY_HEX_LENGTH) {
|
|
60
|
+
throw new ValidationError(`LoanBrokerCoverClawback: Amount.currency must be ${CURRENCY_ASCII_LENGTH} ASCII characters or ${CURRENCY_HEX_LENGTH} hex characters (actual: ${ccy.length})`);
|
|
61
|
+
}
|
|
62
|
+
if (ccy.length === CURRENCY_HEX_LENGTH && !isHex(ccy)) {
|
|
63
|
+
throw new ValidationError('LoanBrokerCoverClawback: Amount.currency (40-char form) must be hex');
|
|
64
|
+
}
|
|
65
|
+
// Issuer must be a valid XRPL account.
|
|
66
|
+
if (!isAccount(props.Amount.issuer)) {
|
|
67
|
+
throw new ValidationError('LoanBrokerCoverClawback: Amount.issuer must be a valid XRPL account address');
|
|
68
|
+
}
|
|
69
|
+
// Value: legal non-negative XRPL Number.
|
|
70
|
+
if (!isNonNegativeAmountValue(props.Amount.value)) {
|
|
71
|
+
throw new ValidationError('LoanBrokerCoverClawback: Amount.value must be a non-negative numeric string (decimal or scientific mantissa)');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
// MPT amount.
|
|
76
|
+
const mptid = props.Amount.mpt_issuance_id;
|
|
77
|
+
if (mptid.length < MPT_ISSUANCE_ID_MIN ||
|
|
78
|
+
mptid.length > MPT_ISSUANCE_ID_MAX ||
|
|
79
|
+
!isHex(mptid)) {
|
|
80
|
+
throw new ValidationError(`LoanBrokerCoverClawback: Amount.mpt_issuance_id must be a ${MPT_ISSUANCE_ID_MIN}-${MPT_ISSUANCE_ID_MAX} character hex string`);
|
|
81
|
+
}
|
|
82
|
+
if (!isNonNegativeAmountValue(props.Amount.value)) {
|
|
83
|
+
throw new ValidationError('LoanBrokerCoverClawback: Amount.value must be a non-negative numeric string (decimal or scientific mantissa)');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// ── At-least-one rule ── XLS-66 §3.7.3.1 check 1.
|
|
88
|
+
if (props.LoanBrokerID === undefined && props.Amount === undefined) {
|
|
89
|
+
throw new ValidationError('LoanBrokerCoverClawback: Either LoanBrokerID or Amount is required');
|
|
90
|
+
}
|
|
91
|
+
// ── Cross-field rule: LoanBrokerID missing + MPT Amount ── §3.7.3.1 check 6.
|
|
92
|
+
if (props.LoanBrokerID === undefined && props.Amount !== undefined) {
|
|
93
|
+
if (isMPTAmount(props.Amount)) {
|
|
94
|
+
throw new ValidationError('LoanBrokerCoverClawback: LoanBrokerID is required when Amount is an MPT');
|
|
95
|
+
}
|
|
96
|
+
// ── Cross-field rule: LoanBrokerID missing + IOU issuer == Account ── §3.7.3.1 check 7.
|
|
97
|
+
if (isIssuedCurrencyAmount(props.Amount) &&
|
|
98
|
+
props.Amount.issuer === props.Account) {
|
|
99
|
+
throw new ValidationError('LoanBrokerCoverClawback: LoanBrokerID is required when Amount is an IOU whose issuer is the submitter Account');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return buildFrozenTx('LoanBrokerCoverClawback', props, {
|
|
103
|
+
validate() {
|
|
104
|
+
// Validated at construction.
|
|
105
|
+
},
|
|
106
|
+
toJSON() {
|
|
107
|
+
const json = {};
|
|
108
|
+
for (const k of Object.keys(this)) {
|
|
109
|
+
if (k === 'validate' || k === 'toJSON' || k === 'with')
|
|
110
|
+
continue;
|
|
111
|
+
const v = this[k];
|
|
112
|
+
if (v !== undefined)
|
|
113
|
+
json[k] = v;
|
|
114
|
+
}
|
|
115
|
+
return json;
|
|
116
|
+
},
|
|
117
|
+
with(overrides) {
|
|
118
|
+
return loanBrokerCoverClawback(mergeForWith(this, overrides));
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=loan-broker-cover-clawback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-broker-cover-clawback.js","sourceRoot":"","sources":["../../../src/fp/factories/loan-broker-cover-clawback.ts"],"names":[],"mappings":"AA4EA,OAAO,EACL,SAAS,EACT,KAAK,EACL,sBAAsB,EACtB,WAAW,EACX,QAAQ,GACT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEnE,wEAAwE;AAExE,uDAAuD;AACvD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,yEAAyE;AACzE,MAAM,mBAAmB,GACvB,kEAAkE,CAAC;AAErE,qEAAqE;AACrE,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,0DAA0D;AAC1D,sEAAsE;AACtE,wCAAwC;AACxC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAqC/B,wEAAwE;AAExE;;;;;;;GAOG;AACH,SAAS,wBAAwB,CAAC,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC,8CAA8C,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9E,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,wEAAwE;AAExE,MAAM,UAAU,uBAAuB,CACrC,KAAmC;IAEnC,qEAAqE;IACrE,OAAO,CACL,KAAK,CAAC,OAAO,EACb,8CAA8C,EAC9C,SAAS,CACV,CAAC;IAEF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K,CAAC,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,OAAO,EACrC,CAAC;YACD,MAAM,IAAI,eAAe,CACvB,+GAA+G,CAChH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAClB,yBAAyB,EACzB,KAAK,EACL;QACE,QAAQ;YACN,6BAA6B;QAC/B,CAAC;QACD,MAAM;YACJ,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,MAAM;oBAAE,SAAS;gBACjE,MAAM,CAAC,GAAI,IAA2C,CAAC,CAAC,CAAC,CAAC;gBAC1D,IAAI,CAAC,KAAK,SAAS;oBAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAEF,SAAgD;YAEhD,OAAO,uBAAuB,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAChE,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Functional LoanBrokerCoverDeposit factory — frozen-object style.
|
|
3
|
+
*
|
|
4
|
+
* The Loan Broker owner deposits First-Loss Capital into a `LoanBroker`
|
|
5
|
+
* ledger entry to back the vault against loan defaults. Validation happens
|
|
6
|
+
* at construction; there is no way to construct an invalid tx.
|
|
7
|
+
*
|
|
8
|
+
* import { loanBrokerCoverDeposit } from 'xrplt/fp';
|
|
9
|
+
* const tx = loanBrokerCoverDeposit({ Account, LoanBrokerID, Amount });
|
|
10
|
+
* const j = tx.toJSON();
|
|
11
|
+
* const tx2 = tx.with({ Amount: { currency: 'USD', issuer, value: '1500' } });
|
|
12
|
+
*
|
|
13
|
+
* LoanBrokerCoverDeposit has no flags defined by the spec.
|
|
14
|
+
*
|
|
15
|
+
* Affected amendments:
|
|
16
|
+
* - `LendingProtocol` (base LoanBrokerCoverDeposit)
|
|
17
|
+
*
|
|
18
|
+
* @see https://xrpl.org/docs/references/protocol/transactions/types/loanbrokercoverdeposit
|
|
19
|
+
* @see https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0066-lending-protocol
|
|
20
|
+
*
|
|
21
|
+
* ## Divergences
|
|
22
|
+
*
|
|
23
|
+
* The factory enforces two preclaim checks that the class API
|
|
24
|
+
* (`src/transactions/loan-broker-cover-deposit.ts`) skips:
|
|
25
|
+
*
|
|
26
|
+
* 1. `LoanBrokerID` must not be the all-zeros HASH256 value.
|
|
27
|
+
* Source: XLS-66 §3.5.3.1 check 1 — "`LoanBrokerID` is zero (`temINVALID`)"
|
|
28
|
+
* (`~/.mavis/docs.local/xrpl-standards/repo/XLS-0066-lending-protocol/README.md`
|
|
29
|
+
* line 755).
|
|
30
|
+
* xrpl.js `validateLoanBrokerCoverDeposit` only checks `isLedgerEntryId`,
|
|
31
|
+
* which is satisfied by the all-zeros string
|
|
32
|
+
* (`~/.mavis/docs.local/xrpl.js/repo/packages/xrpl/src/models/transactions/loanBrokerCoverDeposit.ts`
|
|
33
|
+
* lines 46-50).
|
|
34
|
+
*
|
|
35
|
+
* 2. `Amount` must be strictly positive (non-zero, non-negative) in
|
|
36
|
+
* all three forms (XRP drops string, `IssuedCurrencyAmount.value`,
|
|
37
|
+
* `MPTAmount.value`).
|
|
38
|
+
* Source: XLS-66 §3.5.3.1 check 2 — "`Amount <= 0` (`temBAD_AMOUNT`)"
|
|
39
|
+
* (`~/.mavis/docs.local/xrpl-standards/repo/XLS-0066-lending-protocol/README.md`
|
|
40
|
+
* line 756).
|
|
41
|
+
* xrpl.js `validateLoanBrokerCoverDeposit` only checks `isAmount`, which
|
|
42
|
+
* accepts any numeric string regardless of sign; the local
|
|
43
|
+
* `validation/helpers.isAmount` has the same gap.
|
|
44
|
+
*/
|
|
45
|
+
import type { Amount, MPTAmount } from '../../types/amounts.js';
|
|
46
|
+
export interface LoanBrokerCoverDepositProps {
|
|
47
|
+
/** The unique address of the transaction sender (must be `LoanBroker.Owner`). */
|
|
48
|
+
Account: string;
|
|
49
|
+
/** The ID of the `LoanBroker` ledger entry to deposit First-Loss Capital into. 64-char hex. */
|
|
50
|
+
LoanBrokerID: string;
|
|
51
|
+
/** First-Loss Capital amount to deposit (XRP / trust line / MPT). */
|
|
52
|
+
Amount: Amount | MPTAmount;
|
|
53
|
+
/** Fee in XRP (drops), base-10 integer string. */
|
|
54
|
+
Fee?: string | undefined;
|
|
55
|
+
/** Account sequence number. */
|
|
56
|
+
Sequence?: number | undefined;
|
|
57
|
+
}
|
|
58
|
+
export interface LoanBrokerCoverDeposit extends Readonly<LoanBrokerCoverDepositProps> {
|
|
59
|
+
readonly TransactionType: 'LoanBrokerCoverDeposit';
|
|
60
|
+
validate(): void;
|
|
61
|
+
toJSON(): Record<string, unknown>;
|
|
62
|
+
with(overrides: Partial<LoanBrokerCoverDepositProps>): LoanBrokerCoverDeposit;
|
|
63
|
+
}
|
|
64
|
+
export declare function loanBrokerCoverDeposit(props: LoanBrokerCoverDepositProps): LoanBrokerCoverDeposit;
|
|
65
|
+
//# sourceMappingURL=loan-broker-cover-deposit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-broker-cover-deposit.d.ts","sourceRoot":"","sources":["../../../src/fp/factories/loan-broker-cover-deposit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAehE,MAAM,WAAW,2BAA2B;IAC1C,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,sBACf,SAAQ,QAAQ,CAAC,2BAA2B,CAAC;IAC7C,QAAQ,CAAC,eAAe,EAAE,wBAAwB,CAAC;IACnD,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAAG,sBAAsB,CAAC;CAC/E;AAoCD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,GACjC,sBAAsB,CA4DxB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { isAccount, isAmount, isHex, isString } from '../../validation/helpers.js';
|
|
2
|
+
import { ValidationError } from '../../errors.js';
|
|
3
|
+
import { buildFrozenTx, mergeForWith, require } from '../shape.js';
|
|
4
|
+
// ─── Spec constants ──────────────────────────────────────────────────
|
|
5
|
+
// LoanBrokerID is a HASH256 = 32 bytes = 64 hex chars.
|
|
6
|
+
const LOAN_BROKER_ID_LENGTH = 64;
|
|
7
|
+
// All-zeros HASH256 is reserved / malformed per spec.
|
|
8
|
+
const LOAN_BROKER_ID_ZERO = '0000000000000000000000000000000000000000000000000000000000000000';
|
|
9
|
+
// ─── Helpers ─────────────────────────────────────────────────────────
|
|
10
|
+
/**
|
|
11
|
+
* Per XLS-66 §3.5.3.1 check 2: "`Amount <= 0` (`temBAD_AMOUNT`)".
|
|
12
|
+
* Validates the sign of an Amount in all three accepted forms.
|
|
13
|
+
*
|
|
14
|
+
* - XRP form: a decimal-string of drops (e.g. "1000000").
|
|
15
|
+
* - IssuedCurrency form: object with a `value` sub-string.
|
|
16
|
+
* - MPT form: object with a `value` sub-string.
|
|
17
|
+
*
|
|
18
|
+
* Accepts the canonical scientific mantissa form (`1.5e3`) so this
|
|
19
|
+
* stays compatible with the XRPL serialization layer. Negative or
|
|
20
|
+
* zero mantissas are rejected.
|
|
21
|
+
*/
|
|
22
|
+
function isPositiveAmount(amount) {
|
|
23
|
+
// XRP drops — a decimal or scientific-mantissa string.
|
|
24
|
+
if (typeof amount === 'string') {
|
|
25
|
+
if (!/^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u.test(amount)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return parseFloat(amount) > 0;
|
|
29
|
+
}
|
|
30
|
+
// Object form (IssuedCurrency or MPT).
|
|
31
|
+
if (typeof amount !== 'object' || amount === null)
|
|
32
|
+
return false;
|
|
33
|
+
const value = amount.value;
|
|
34
|
+
if (typeof value !== 'string')
|
|
35
|
+
return false;
|
|
36
|
+
if (!/^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u.test(value)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return parseFloat(value) > 0;
|
|
40
|
+
}
|
|
41
|
+
// ─── Factory ─────────────────────────────────────────────────────────
|
|
42
|
+
export function loanBrokerCoverDeposit(props) {
|
|
43
|
+
// ── Account ── required, must be a valid XRPL classic address.
|
|
44
|
+
require(props.Account, 'LoanBrokerCoverDeposit: Account is required', isAccount);
|
|
45
|
+
// ── LoanBrokerID ── required, 64-char hex AND non-zero.
|
|
46
|
+
if (!isString(props.LoanBrokerID) ||
|
|
47
|
+
!isHex(props.LoanBrokerID) ||
|
|
48
|
+
props.LoanBrokerID.length !== LOAN_BROKER_ID_LENGTH) {
|
|
49
|
+
throw new ValidationError('LoanBrokerCoverDeposit: LoanBrokerID must be a 64-character hex string');
|
|
50
|
+
}
|
|
51
|
+
if (props.LoanBrokerID === LOAN_BROKER_ID_ZERO) {
|
|
52
|
+
throw new ValidationError('LoanBrokerCoverDeposit: LoanBrokerID must not be the all-zeros HASH256 value');
|
|
53
|
+
}
|
|
54
|
+
// ── Amount ── required, must be a valid Amount AND strictly positive.
|
|
55
|
+
if (!isAmount(props.Amount)) {
|
|
56
|
+
throw new ValidationError('LoanBrokerCoverDeposit: Amount must be a valid Amount (XRP / trust line / MPT form)');
|
|
57
|
+
}
|
|
58
|
+
if (!isPositiveAmount(props.Amount)) {
|
|
59
|
+
throw new ValidationError('LoanBrokerCoverDeposit: Amount must be strictly positive (non-zero, non-negative)');
|
|
60
|
+
}
|
|
61
|
+
return buildFrozenTx('LoanBrokerCoverDeposit', props, {
|
|
62
|
+
validate() {
|
|
63
|
+
// Validated at construction.
|
|
64
|
+
},
|
|
65
|
+
toJSON() {
|
|
66
|
+
const json = {};
|
|
67
|
+
for (const k of Object.keys(this)) {
|
|
68
|
+
if (k === 'validate' || k === 'toJSON' || k === 'with')
|
|
69
|
+
continue;
|
|
70
|
+
const v = this[k];
|
|
71
|
+
if (v !== undefined)
|
|
72
|
+
json[k] = v;
|
|
73
|
+
}
|
|
74
|
+
return json;
|
|
75
|
+
},
|
|
76
|
+
with(overrides) {
|
|
77
|
+
return loanBrokerCoverDeposit(mergeForWith(this, overrides));
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=loan-broker-cover-deposit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-broker-cover-deposit.js","sourceRoot":"","sources":["../../../src/fp/factories/loan-broker-cover-deposit.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEnE,wEAAwE;AAExE,uDAAuD;AACvD,MAAM,qBAAqB,GAAG,EAAE,CAAC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C;IACJ,CAAC;IAED,uEAAuE;IACvE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,eAAe,CACvB,qFAAqF,CACtF,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,eAAe,CACvB,mFAAmF,CACpF,CAAC;IACJ,CAAC;IAED,OAAO,aAAa,CAClB,wBAAwB,EACxB,KAAK,EACL;QACE,QAAQ;YACN,6BAA6B;QAC/B,CAAC;QACD,MAAM;YACJ,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,MAAM;oBAAE,SAAS;gBACjE,MAAM,CAAC,GAAI,IAA2C,CAAC,CAAC,CAAC,CAAC;gBAC1D,IAAI,CAAC,KAAK,SAAS;oBAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAEF,SAA+C;YAE/C,OAAO,sBAAsB,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAC/D,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Functional LoanBrokerCoverWithdraw factory — frozen-object style.
|
|
3
|
+
*
|
|
4
|
+
* Withdraws First-Loss Capital from a `LoanBroker` ledger entry. Validation
|
|
5
|
+
* happens at construction; there is no way to construct an invalid tx.
|
|
6
|
+
*
|
|
7
|
+
* import { loanBrokerCoverWithdraw } from 'xrplt/fp';
|
|
8
|
+
* const tx = loanBrokerCoverWithdraw({
|
|
9
|
+
* Account: 'rMX...', // LoanBroker.Owner
|
|
10
|
+
* LoanBrokerID: 'A947...614',
|
|
11
|
+
* Amount: '5000000',
|
|
12
|
+
* Destination: 'rPT1...', // optional
|
|
13
|
+
* DestinationTag: 42, // optional
|
|
14
|
+
* CredentialIDs: ['A7B7...'], // optional
|
|
15
|
+
* });
|
|
16
|
+
* const j = tx.toJSON();
|
|
17
|
+
* const tx2 = tx.with({ Destination: 'rXY...' });
|
|
18
|
+
*
|
|
19
|
+
* Affected amendments:
|
|
20
|
+
* - `LendingProtocolV1_1` (base LoanBrokerCoverWithdraw)
|
|
21
|
+
* - `Credentials` (CredentialIDs for permissioned-domain authorization)
|
|
22
|
+
*
|
|
23
|
+
* @see https://xrpl.org/docs/references/protocol/transactions/types/loanbrokercoverwithdraw
|
|
24
|
+
* @see https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0066-lending-protocol
|
|
25
|
+
*
|
|
26
|
+
* ## Divergences
|
|
27
|
+
*
|
|
28
|
+
* Compared with `src/transactions/loan-broker-cover-withdraw.ts`, this
|
|
29
|
+
* factory enforces preclaim guards the class API skips:
|
|
30
|
+
*
|
|
31
|
+
* 1. **`LoanBrokerID` must not be the all-zeros HASH256 value.**
|
|
32
|
+
* Source: XLS-66 §3.6.3.1 check 1 — "`LoanBrokerID` is zero
|
|
33
|
+
* (`temINVALID`)" (`~/.mavis/docs.local/xrpl-standards/repo/
|
|
34
|
+
* XLS-0066-lending-protocol/README.md` line 827). The class only
|
|
35
|
+
* checks `isString && isHex && length === 64`, which the all-zeros
|
|
36
|
+
* string satisfies. xrpl.js `validateLoanBrokerCoverWithdraw` only
|
|
37
|
+
* checks `isLedgerEntryId`, which also accepts the all-zeros string
|
|
38
|
+
* (`~/.mavis/docs.local/xrpl.js/repo/packages/xrpl/src/models/
|
|
39
|
+
* transactions/loanBrokerCoverWithdraw.ts` lines 77–81).
|
|
40
|
+
*
|
|
41
|
+
* 2. **`Amount` must be strictly positive (non-zero, non-negative).**
|
|
42
|
+
* Source: XLS-66 §3.6.3.1 check 2 — "`Amount <= 0` (`temBAD_AMOUNT`)"
|
|
43
|
+
* (line 828). The class only delegates to `isAmount`, which accepts
|
|
44
|
+
* any numeric string including `'0'` and `'-1'`. The local helper
|
|
45
|
+
* `validation/helpers.isAmount` has the same gap. xrpl.js `isAmount`
|
|
46
|
+
* likewise does not check sign. The factory adds an
|
|
47
|
+
* `isPositiveAmount` helper covering all three Amount forms
|
|
48
|
+
* (XRP drops, IssuedCurrency `value`, MPT `value`).
|
|
49
|
+
*
|
|
50
|
+
* 3. **`Destination` must not be the all-zeros AccountID.**
|
|
51
|
+
* Source: XLS-66 §3.6.3.1 check 3 — "`Destination` is specified and is
|
|
52
|
+
* zero (`temMALFORMED`)" (line 829). The class calls `isAccount` on
|
|
53
|
+
* `Destination`, which would reject the all-zeros 40-char hex string
|
|
54
|
+
* because it lacks the `r…` / `X…` prefix. The factory relies on the
|
|
55
|
+
* same implicit gate but documents it as a divergence so the behaviour
|
|
56
|
+
* is auditable.
|
|
57
|
+
*
|
|
58
|
+
* 4. **`CredentialIDs` must have length in [1, MAX_AUTHORIZED_CREDENTIALS].**
|
|
59
|
+
* Source: xrpl.js `MAX_AUTHORIZED_CREDENTIALS = 8` for non-DomainSet
|
|
60
|
+
* transactions (`~/.mavis/docs.local/xrpl.js/repo/packages/xrpl/src/
|
|
61
|
+
* models/transactions/common.ts:28`), and `validateCredentialsList`
|
|
62
|
+
* rejects both empty arrays and arrays that exceed `maxCredentials`
|
|
63
|
+
* (`loanBrokerCoverWithdraw.ts` lines 70–75; `common.ts:1120-1128`).
|
|
64
|
+
* The class only validates the shape of each entry, not the array
|
|
65
|
+
* length bounds.
|
|
66
|
+
*/
|
|
67
|
+
import type { Amount, MPTAmount } from '../../types/amounts.js';
|
|
68
|
+
export interface LoanBrokerCoverWithdrawProps {
|
|
69
|
+
/** The unique address of the transaction sender (`LoanBroker.Owner`). */
|
|
70
|
+
Account: string;
|
|
71
|
+
/** The ID of the `LoanBroker` to withdraw First-Loss Capital from. 64-char hex. */
|
|
72
|
+
LoanBrokerID: string;
|
|
73
|
+
/** First-Loss Capital amount to withdraw. XRP drops / trust line / MPT. */
|
|
74
|
+
Amount: Amount | MPTAmount;
|
|
75
|
+
/** Optional destination account. Must be able to receive the asset. */
|
|
76
|
+
Destination?: string | undefined;
|
|
77
|
+
/** Optional destination tag. UINT32. */
|
|
78
|
+
DestinationTag?: number | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Optional array of credential IDs authorizing the withdrawal when the
|
|
81
|
+
* destination is gated by a permissioned domain (Credentials amendment).
|
|
82
|
+
*/
|
|
83
|
+
CredentialIDs?: string[] | undefined;
|
|
84
|
+
/** LoanBrokerCoverWithdraw has no defined flags; permitted for base-tx parity. */
|
|
85
|
+
Flags?: number | undefined;
|
|
86
|
+
Fee?: string | undefined;
|
|
87
|
+
Sequence?: number | undefined;
|
|
88
|
+
}
|
|
89
|
+
export interface LoanBrokerCoverWithdraw extends Readonly<LoanBrokerCoverWithdrawProps> {
|
|
90
|
+
readonly TransactionType: 'LoanBrokerCoverWithdraw';
|
|
91
|
+
validate(): void;
|
|
92
|
+
toJSON(): Record<string, unknown>;
|
|
93
|
+
with(overrides: Partial<LoanBrokerCoverWithdrawProps>): LoanBrokerCoverWithdraw;
|
|
94
|
+
}
|
|
95
|
+
export declare function loanBrokerCoverWithdraw(props: LoanBrokerCoverWithdrawProps): LoanBrokerCoverWithdraw;
|
|
96
|
+
//# sourceMappingURL=loan-broker-cover-withdraw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-broker-cover-withdraw.d.ts","sourceRoot":"","sources":["../../../src/fp/factories/loan-broker-cover-withdraw.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA6BhE,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,YAAY,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,uBACf,SAAQ,QAAQ,CAAC,4BAA4B,CAAC;IAC9C,QAAQ,CAAC,eAAe,EAAE,yBAAyB,CAAC;IACpD,QAAQ,IAAI,IAAI,CAAC;IACjB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,CACF,SAAS,EAAE,OAAO,CAAC,4BAA4B,CAAC,GAC/C,uBAAuB,CAAC;CAC5B;AAkCD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,uBAAuB,CAiHzB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { isAccount, isAmount, isArray, isHex, isNumber, isString, } from '../../validation/helpers.js';
|
|
2
|
+
import { ValidationError } from '../../errors.js';
|
|
3
|
+
import { buildFrozenTx, mergeForWith, require } from '../shape.js';
|
|
4
|
+
// ─── Spec constants ──────────────────────────────────────────────────
|
|
5
|
+
// HASH256 in hex is 64 characters. (XLS-66 §3.6.1: LoanBrokerID is HASH256.)
|
|
6
|
+
const HASH256_HEX_LENGTH = 64;
|
|
7
|
+
// All-zeros HASH256 is reserved / malformed per spec.
|
|
8
|
+
const LOAN_BROKER_ID_ZERO = '0000000000000000000000000000000000000000000000000000000000000000';
|
|
9
|
+
// Credential IDs are 64-char hex (same as ledger entry IDs / HASH256).
|
|
10
|
+
const CREDENTIAL_ID_LENGTH = 64;
|
|
11
|
+
// xrpl.js caps non-DomainSet credential arrays at 8 entries.
|
|
12
|
+
const MAX_CREDENTIAL_IDS = 8;
|
|
13
|
+
// ─── Helpers ─────────────────────────────────────────────────────────
|
|
14
|
+
/**
|
|
15
|
+
* Per XLS-66 §3.6.3.1 check 2: "`Amount <= 0` (`temBAD_AMOUNT`)".
|
|
16
|
+
* Validates the sign of an Amount in all three accepted forms.
|
|
17
|
+
*
|
|
18
|
+
* - XRP form: a decimal-string of drops (e.g. "1000000").
|
|
19
|
+
* - IssuedCurrency form: object with a `value` sub-string.
|
|
20
|
+
* - MPT form: object with a `value` sub-string.
|
|
21
|
+
*
|
|
22
|
+
* Accepts the canonical scientific mantissa form (`1.5e3`) so this stays
|
|
23
|
+
* compatible with the XRPL serialization layer. Negative or zero
|
|
24
|
+
* mantissas are rejected.
|
|
25
|
+
*/
|
|
26
|
+
function isPositiveAmount(amount) {
|
|
27
|
+
if (typeof amount === 'string') {
|
|
28
|
+
if (!/^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u.test(amount)) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return parseFloat(amount) > 0;
|
|
32
|
+
}
|
|
33
|
+
if (typeof amount !== 'object' || amount === null)
|
|
34
|
+
return false;
|
|
35
|
+
const value = amount.value;
|
|
36
|
+
if (typeof value !== 'string')
|
|
37
|
+
return false;
|
|
38
|
+
if (!/^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u.test(value)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return parseFloat(value) > 0;
|
|
42
|
+
}
|
|
43
|
+
// ─── Factory ─────────────────────────────────────────────────────────
|
|
44
|
+
export function loanBrokerCoverWithdraw(props) {
|
|
45
|
+
// ── Account ── required, must be a valid XRPL classic / X-address.
|
|
46
|
+
require(props.Account, 'LoanBrokerCoverWithdraw: Account is required', isAccount);
|
|
47
|
+
// ── LoanBrokerID ── required, 64-char hex (HASH256) AND non-zero.
|
|
48
|
+
if (!isString(props.LoanBrokerID) ||
|
|
49
|
+
!isHex(props.LoanBrokerID) ||
|
|
50
|
+
props.LoanBrokerID.length !== HASH256_HEX_LENGTH) {
|
|
51
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: LoanBrokerID must be a 64-character hex string (HASH256)');
|
|
52
|
+
}
|
|
53
|
+
if (props.LoanBrokerID === LOAN_BROKER_ID_ZERO) {
|
|
54
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: LoanBrokerID must not be the all-zeros HASH256 value');
|
|
55
|
+
}
|
|
56
|
+
// ── Amount ── required, must be a valid Amount AND strictly positive.
|
|
57
|
+
if (!isAmount(props.Amount)) {
|
|
58
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: Amount must be a valid Amount (XRP / trust line / MPT form)');
|
|
59
|
+
}
|
|
60
|
+
if (!isPositiveAmount(props.Amount)) {
|
|
61
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: Amount must be strictly positive (non-zero, non-negative)');
|
|
62
|
+
}
|
|
63
|
+
// ── Destination ── optional, but if provided must be a valid XRPL
|
|
64
|
+
// account. The XLS-66 §3.6.3.1 check 3 "Destination is zero" case is
|
|
65
|
+
// covered implicitly: the all-zeros 40-char hex string fails
|
|
66
|
+
// `isAccount`, which requires a classic `r…` or X-address prefix.
|
|
67
|
+
if (props.Destination !== undefined && !isAccount(props.Destination)) {
|
|
68
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: Destination must be a valid XRPL account address');
|
|
69
|
+
}
|
|
70
|
+
// ── DestinationTag ── optional, must be a number if present.
|
|
71
|
+
if (props.DestinationTag !== undefined && !isNumber(props.DestinationTag)) {
|
|
72
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: DestinationTag must be a number');
|
|
73
|
+
}
|
|
74
|
+
// ── CredentialIDs ── optional array, but bounds + entry-shape enforced
|
|
75
|
+
// when present. Per xrpl.js: length in [1, MAX_AUTHORIZED_CREDENTIALS];
|
|
76
|
+
// each entry is a 64-char hex string.
|
|
77
|
+
if (props.CredentialIDs !== undefined) {
|
|
78
|
+
if (!isArray(props.CredentialIDs)) {
|
|
79
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: CredentialIDs must be an array of credential ID strings');
|
|
80
|
+
}
|
|
81
|
+
if (props.CredentialIDs.length === 0) {
|
|
82
|
+
throw new ValidationError('LoanBrokerCoverWithdraw: CredentialIDs must not be an empty array');
|
|
83
|
+
}
|
|
84
|
+
if (props.CredentialIDs.length > MAX_CREDENTIAL_IDS) {
|
|
85
|
+
throw new ValidationError(`LoanBrokerCoverWithdraw: CredentialIDs length cannot exceed ${MAX_CREDENTIAL_IDS} elements (actual: ${props.CredentialIDs.length})`);
|
|
86
|
+
}
|
|
87
|
+
for (let i = 0; i < props.CredentialIDs.length; i++) {
|
|
88
|
+
const cid = props.CredentialIDs[i];
|
|
89
|
+
if (!isString(cid) ||
|
|
90
|
+
!isHex(cid) ||
|
|
91
|
+
cid.length !== CREDENTIAL_ID_LENGTH) {
|
|
92
|
+
throw new ValidationError(`LoanBrokerCoverWithdraw: CredentialIDs[${i}] must be a ${CREDENTIAL_ID_LENGTH}-character hex string`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return buildFrozenTx('LoanBrokerCoverWithdraw', props, {
|
|
97
|
+
validate() {
|
|
98
|
+
// Validated at construction.
|
|
99
|
+
},
|
|
100
|
+
toJSON() {
|
|
101
|
+
const json = {};
|
|
102
|
+
for (const k of Object.keys(this)) {
|
|
103
|
+
if (k === 'validate' || k === 'toJSON' || k === 'with')
|
|
104
|
+
continue;
|
|
105
|
+
const v = this[k];
|
|
106
|
+
if (v !== undefined)
|
|
107
|
+
json[k] = v;
|
|
108
|
+
}
|
|
109
|
+
return json;
|
|
110
|
+
},
|
|
111
|
+
with(overrides) {
|
|
112
|
+
return loanBrokerCoverWithdraw(mergeForWith(this, overrides));
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=loan-broker-cover-withdraw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-broker-cover-withdraw.js","sourceRoot":"","sources":["../../../src/fp/factories/loan-broker-cover-withdraw.ts"],"names":[],"mappings":"AAmEA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEnE,wEAAwE;AAExE,6EAA6E;AAC7E,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,sDAAsD;AACtD,MAAM,mBAAmB,GACvB,kEAAkE,CAAC;AAErE,uEAAuE;AACvE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,6DAA6D;AAC7D,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAoC7B,wEAAwE;AAExE;;;;;;;;;;;GAWG;AACH,SAAS,gBAAgB,CAAC,MAA0B;IAClD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,8CAA8C,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACjE,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAChE,MAAM,KAAK,GAAI,MA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AA6B;QAC/B,CAAC;QACD,MAAM;YACJ,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,MAAM;oBAAE,SAAS;gBACjE,MAAM,CAAC,GAAI,IAA2C,CAAC,CAAC,CAAC,CAAC;gBAC1D,IAAI,CAAC,KAAK,SAAS;oBAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAEF,SAAgD;YAEhD,OAAO,uBAAuB,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAChE,CAAC;KACF,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface LoanBrokerDeleteProps {
|
|
2
|
+
/** The unique address of the transaction sender (must be `LoanBroker.Owner`). */
|
|
3
|
+
Account: string;
|
|
4
|
+
/** The ID of the `LoanBroker` ledger entry to delete. 64-char hex, non-zero. */
|
|
5
|
+
LoanBrokerID: string;
|
|
6
|
+
/** Bit-flags for this transaction. The spec defines none — must be 0. */
|
|
7
|
+
Flags?: number | undefined;
|
|
8
|
+
/** Fee in XRP (drops), base-10 integer string. */
|
|
9
|
+
Fee?: string | undefined;
|
|
10
|
+
/** Account sequence number. */
|
|
11
|
+
Sequence?: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface LoanBrokerDelete extends Readonly<LoanBrokerDeleteProps> {
|
|
14
|
+
readonly TransactionType: 'LoanBrokerDelete';
|
|
15
|
+
validate(): void;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
with(overrides: Partial<LoanBrokerDeleteProps>): LoanBrokerDelete;
|
|
18
|
+
}
|
|
19
|
+
export declare function loanBrokerDelete(props: LoanBrokerDeleteProps): LoanBrokerDelete;
|
|
20
|
+
//# sourceMappingURL=loan-broker-delete.d.ts.map
|