xrpl 3.0.0 → 4.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/README.md +3 -3
- package/build/xrpl-latest-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +424 -893
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.d.ts +1 -2
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +0 -5
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/Wallet/fundWallet.js +1 -5
- package/dist/npm/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/client/RequestManager.d.ts +5 -4
- package/dist/npm/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/client/RequestManager.js.map +1 -1
- package/dist/npm/client/connection.d.ts +2 -2
- package/dist/npm/client/connection.d.ts.map +1 -1
- package/dist/npm/client/connection.js.map +1 -1
- package/dist/npm/client/index.d.ts +4 -3
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js +17 -10
- package/dist/npm/client/index.js.map +1 -1
- package/dist/npm/client/partialPayment.d.ts +2 -1
- package/dist/npm/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/client/partialPayment.js +10 -3
- package/dist/npm/client/partialPayment.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +13 -0
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/common/index.js +4 -0
- package/dist/npm/models/common/index.js.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +2 -2
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/models/ledger/Amendments.d.ts +2 -2
- package/dist/npm/models/ledger/Amendments.d.ts.map +1 -1
- package/dist/npm/models/ledger/BaseLedgerEntry.d.ts +3 -3
- package/dist/npm/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/DirectoryNode.d.ts +2 -2
- package/dist/npm/models/ledger/DirectoryNode.d.ts.map +1 -1
- package/dist/npm/models/ledger/FeeSettings.d.ts +2 -2
- package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/models/ledger/Ledger.d.ts +11 -2
- package/dist/npm/models/ledger/Ledger.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts +3 -2
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/ledger/LedgerHashes.d.ts +2 -2
- package/dist/npm/models/ledger/LedgerHashes.d.ts.map +1 -1
- package/dist/npm/models/ledger/NegativeUNL.d.ts +2 -2
- package/dist/npm/models/ledger/NegativeUNL.d.ts.map +1 -1
- package/dist/npm/models/ledger/Oracle.d.ts +12 -0
- package/dist/npm/models/ledger/Oracle.d.ts.map +1 -0
- package/dist/npm/models/ledger/Oracle.js +3 -0
- package/dist/npm/models/ledger/Oracle.js.map +1 -0
- package/dist/npm/models/ledger/RippleState.d.ts +2 -1
- package/dist/npm/models/ledger/RippleState.d.ts.map +1 -1
- package/dist/npm/models/ledger/RippleState.js +1 -0
- package/dist/npm/models/ledger/RippleState.js.map +1 -1
- package/dist/npm/models/ledger/index.d.ts +3 -2
- package/dist/npm/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/models/ledger/index.js.map +1 -1
- package/dist/npm/models/methods/accountChannels.d.ts +1 -1
- package/dist/npm/models/methods/accountChannels.d.ts.map +1 -1
- package/dist/npm/models/methods/accountInfo.d.ts +17 -4
- package/dist/npm/models/methods/accountInfo.d.ts.map +1 -1
- package/dist/npm/models/methods/accountTx.d.ts +11 -5
- package/dist/npm/models/methods/accountTx.d.ts.map +1 -1
- package/dist/npm/models/methods/feature.d.ts +28 -0
- package/dist/npm/models/methods/feature.d.ts.map +1 -0
- package/dist/npm/models/methods/feature.js +3 -0
- package/dist/npm/models/methods/feature.js.map +1 -0
- package/dist/npm/models/methods/getAggregatePrice.d.ts +31 -0
- package/dist/npm/models/methods/getAggregatePrice.d.ts.map +1 -0
- package/dist/npm/models/methods/getAggregatePrice.js +3 -0
- package/dist/npm/models/methods/getAggregatePrice.js.map +1 -0
- package/dist/npm/models/methods/index.d.ts +15 -11
- package/dist/npm/models/methods/index.d.ts.map +1 -1
- package/dist/npm/models/methods/ledger.d.ts +17 -5
- package/dist/npm/models/methods/ledger.d.ts.map +1 -1
- package/dist/npm/models/methods/nftsByIssuer.d.ts +19 -0
- package/dist/npm/models/methods/nftsByIssuer.d.ts.map +1 -0
- package/dist/npm/models/methods/nftsByIssuer.js +3 -0
- package/dist/npm/models/methods/nftsByIssuer.js.map +1 -0
- package/dist/npm/models/methods/submitMultisigned.d.ts +16 -5
- package/dist/npm/models/methods/submitMultisigned.d.ts.map +1 -1
- package/dist/npm/models/methods/tx.d.ts +20 -8
- package/dist/npm/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.d.ts +3 -1
- package/dist/npm/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/models/transactions/AMMDeposit.js +1 -0
- package/dist/npm/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/models/transactions/index.d.ts +2 -0
- package/dist/npm/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/models/transactions/index.js.map +1 -1
- package/dist/npm/models/transactions/metadata.d.ts +3 -0
- package/dist/npm/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/models/transactions/metadata.js.map +1 -1
- package/dist/npm/models/transactions/oracleDelete.d.ts +7 -0
- package/dist/npm/models/transactions/oracleDelete.d.ts.map +1 -0
- package/dist/npm/models/transactions/oracleDelete.js +10 -0
- package/dist/npm/models/transactions/oracleDelete.js.map +1 -0
- package/dist/npm/models/transactions/oracleSet.d.ts +13 -0
- package/dist/npm/models/transactions/oracleSet.d.ts.map +1 -0
- package/dist/npm/models/transactions/oracleSet.js +59 -0
- package/dist/npm/models/transactions/oracleSet.js.map +1 -0
- package/dist/npm/models/transactions/payment.d.ts +2 -2
- package/dist/npm/models/transactions/payment.js +1 -1
- package/dist/npm/models/transactions/transaction.d.ts +3 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +8 -0
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/snippets/src/claimPayChannel.js +1 -1
- package/dist/npm/snippets/src/claimPayChannel.js.map +1 -1
- package/dist/npm/snippets/src/sendEscrow.js +1 -1
- package/dist/npm/snippets/src/sendEscrow.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.d.ts +1 -2
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +0 -5
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.js +1 -5
- package/dist/npm/src/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/src/client/RequestManager.d.ts +5 -4
- package/dist/npm/src/client/RequestManager.d.ts.map +1 -1
- package/dist/npm/src/client/RequestManager.js.map +1 -1
- package/dist/npm/src/client/connection.d.ts +2 -2
- package/dist/npm/src/client/connection.d.ts.map +1 -1
- package/dist/npm/src/client/connection.js.map +1 -1
- package/dist/npm/src/client/index.d.ts +4 -3
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js +17 -10
- package/dist/npm/src/client/index.js.map +1 -1
- package/dist/npm/src/client/partialPayment.d.ts +2 -1
- package/dist/npm/src/client/partialPayment.d.ts.map +1 -1
- package/dist/npm/src/client/partialPayment.js +10 -3
- package/dist/npm/src/client/partialPayment.js.map +1 -1
- package/dist/npm/src/models/common/index.d.ts +13 -0
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/common/index.js +4 -0
- package/dist/npm/src/models/common/index.js.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +2 -2
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Amendments.d.ts +2 -2
- package/dist/npm/src/models/ledger/Amendments.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts +3 -3
- package/dist/npm/src/models/ledger/BaseLedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/DirectoryNode.d.ts +2 -2
- package/dist/npm/src/models/ledger/DirectoryNode.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -2
- package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Ledger.d.ts +11 -2
- package/dist/npm/src/models/ledger/Ledger.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +3 -2
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/LedgerHashes.d.ts +2 -2
- package/dist/npm/src/models/ledger/LedgerHashes.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/NegativeUNL.d.ts +2 -2
- package/dist/npm/src/models/ledger/NegativeUNL.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/Oracle.d.ts +12 -0
- package/dist/npm/src/models/ledger/Oracle.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/Oracle.js +3 -0
- package/dist/npm/src/models/ledger/Oracle.js.map +1 -0
- package/dist/npm/src/models/ledger/RippleState.d.ts +2 -1
- package/dist/npm/src/models/ledger/RippleState.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/RippleState.js +1 -0
- package/dist/npm/src/models/ledger/RippleState.js.map +1 -1
- package/dist/npm/src/models/ledger/index.d.ts +3 -2
- package/dist/npm/src/models/ledger/index.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/index.js.map +1 -1
- package/dist/npm/src/models/methods/accountChannels.d.ts +1 -1
- package/dist/npm/src/models/methods/accountChannels.d.ts.map +1 -1
- package/dist/npm/src/models/methods/accountInfo.d.ts +17 -4
- package/dist/npm/src/models/methods/accountInfo.d.ts.map +1 -1
- package/dist/npm/src/models/methods/accountTx.d.ts +11 -5
- package/dist/npm/src/models/methods/accountTx.d.ts.map +1 -1
- package/dist/npm/src/models/methods/feature.d.ts +28 -0
- package/dist/npm/src/models/methods/feature.d.ts.map +1 -0
- package/dist/npm/src/models/methods/feature.js +3 -0
- package/dist/npm/src/models/methods/feature.js.map +1 -0
- package/dist/npm/src/models/methods/getAggregatePrice.d.ts +31 -0
- package/dist/npm/src/models/methods/getAggregatePrice.d.ts.map +1 -0
- package/dist/npm/src/models/methods/getAggregatePrice.js +3 -0
- package/dist/npm/src/models/methods/getAggregatePrice.js.map +1 -0
- package/dist/npm/src/models/methods/index.d.ts +15 -11
- package/dist/npm/src/models/methods/index.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledger.d.ts +17 -5
- package/dist/npm/src/models/methods/ledger.d.ts.map +1 -1
- package/dist/npm/src/models/methods/nftsByIssuer.d.ts +19 -0
- package/dist/npm/src/models/methods/nftsByIssuer.d.ts.map +1 -0
- package/dist/npm/src/models/methods/nftsByIssuer.js +3 -0
- package/dist/npm/src/models/methods/nftsByIssuer.js.map +1 -0
- package/dist/npm/src/models/methods/submitMultisigned.d.ts +16 -5
- package/dist/npm/src/models/methods/submitMultisigned.d.ts.map +1 -1
- package/dist/npm/src/models/methods/tx.d.ts +20 -8
- package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts +3 -1
- package/dist/npm/src/models/transactions/AMMDeposit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/AMMDeposit.js +1 -0
- package/dist/npm/src/models/transactions/AMMDeposit.js.map +1 -1
- package/dist/npm/src/models/transactions/index.d.ts +2 -0
- package/dist/npm/src/models/transactions/index.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/index.js.map +1 -1
- package/dist/npm/src/models/transactions/metadata.d.ts +3 -0
- package/dist/npm/src/models/transactions/metadata.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/metadata.js.map +1 -1
- package/dist/npm/src/models/transactions/oracleDelete.d.ts +7 -0
- package/dist/npm/src/models/transactions/oracleDelete.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/oracleDelete.js +10 -0
- package/dist/npm/src/models/transactions/oracleDelete.js.map +1 -0
- package/dist/npm/src/models/transactions/oracleSet.d.ts +13 -0
- package/dist/npm/src/models/transactions/oracleSet.d.ts.map +1 -0
- package/dist/npm/src/models/transactions/oracleSet.js +59 -0
- package/dist/npm/src/models/transactions/oracleSet.js.map +1 -0
- package/dist/npm/src/models/transactions/payment.d.ts +2 -2
- package/dist/npm/src/models/transactions/payment.js +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts +3 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +8 -0
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts +1 -1
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js +2 -4
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/sugar/getFeeXrp.d.ts +1 -1
- package/dist/npm/src/sugar/getFeeXrp.d.ts.map +1 -1
- package/dist/npm/src/sugar/getFeeXrp.js +3 -2
- package/dist/npm/src/sugar/getFeeXrp.js.map +1 -1
- package/dist/npm/src/sugar/submit.d.ts.map +1 -1
- package/dist/npm/src/sugar/submit.js.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.d.ts +4 -3
- package/dist/npm/src/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/src/utils/hashes/hashLedger.js.map +1 -1
- package/dist/npm/src/utils/index.d.ts +2 -1
- package/dist/npm/src/utils/index.d.ts.map +1 -1
- package/dist/npm/src/utils/index.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts +1 -1
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js +2 -4
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/getFeeXrp.d.ts +1 -1
- package/dist/npm/sugar/getFeeXrp.d.ts.map +1 -1
- package/dist/npm/sugar/getFeeXrp.js +3 -2
- package/dist/npm/sugar/getFeeXrp.js.map +1 -1
- package/dist/npm/sugar/submit.d.ts.map +1 -1
- package/dist/npm/sugar/submit.js.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.d.ts +4 -3
- package/dist/npm/utils/hashes/hashLedger.d.ts.map +1 -1
- package/dist/npm/utils/hashes/hashLedger.js.map +1 -1
- package/dist/npm/utils/index.d.ts +2 -1
- package/dist/npm/utils/index.d.ts.map +1 -1
- package/dist/npm/utils/index.js.map +1 -1
- package/package.json +7 -8
- package/src/Wallet/defaultFaucets.ts +0 -6
- package/src/Wallet/fundWallet.ts +0 -1
- package/src/client/RequestManager.ts +17 -12
- package/src/client/connection.ts +7 -5
- package/src/client/index.ts +79 -21
- package/src/client/partialPayment.ts +34 -13
- package/src/models/common/index.ts +41 -0
- package/src/models/ledger/AMM.ts +2 -2
- package/src/models/ledger/Amendments.ts +2 -2
- package/src/models/ledger/BaseLedgerEntry.ts +9 -5
- package/src/models/ledger/DirectoryNode.ts +2 -2
- package/src/models/ledger/FeeSettings.ts +4 -2
- package/src/models/ledger/Ledger.ts +46 -9
- package/src/models/ledger/LedgerEntry.ts +3 -0
- package/src/models/ledger/LedgerHashes.ts +2 -4
- package/src/models/ledger/NegativeUNL.ts +2 -2
- package/src/models/ledger/Oracle.ts +43 -0
- package/src/models/ledger/RippleState.ts +2 -0
- package/src/models/ledger/index.ts +4 -1
- package/src/models/methods/accountChannels.ts +64 -1
- package/src/models/methods/accountInfo.ts +58 -12
- package/src/models/methods/accountTx.ts +49 -8
- package/src/models/methods/feature.ts +68 -0
- package/src/models/methods/getAggregatePrice.ts +119 -0
- package/src/models/methods/index.ts +79 -23
- package/src/models/methods/ledger.ts +41 -5
- package/src/models/methods/nftsByIssuer.ts +68 -0
- package/src/models/methods/submitMultisigned.ts +48 -16
- package/src/models/methods/tx.ts +74 -22
- package/src/models/transactions/AMMDeposit.ts +2 -0
- package/src/models/transactions/index.ts +2 -0
- package/src/models/transactions/metadata.ts +1 -0
- package/src/models/transactions/oracleDelete.ts +32 -0
- package/src/models/transactions/oracleSet.ts +176 -0
- package/src/models/transactions/payment.ts +2 -2
- package/src/models/transactions/transaction.ts +12 -0
- package/src/sugar/autofill.ts +4 -10
- package/src/sugar/getFeeXrp.ts +6 -3
- package/src/sugar/submit.ts +5 -3
- package/src/utils/hashes/hashLedger.ts +8 -5
- package/src/utils/index.ts +2 -1
package/build/xrpl-latest.js
CHANGED
@@ -656,13 +656,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
656
656
|
exports.createHasher = exports.isogenyMap = exports.hash_to_field = exports.expand_message_xof = exports.expand_message_xmd = void 0;
|
657
657
|
const modular_js_1 = __webpack_require__(/*! ./modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
658
658
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
659
|
-
function validateDST(dst) {
|
660
|
-
if (dst instanceof Uint8Array)
|
661
|
-
return dst;
|
662
|
-
if (typeof dst === 'string')
|
663
|
-
return (0, utils_js_1.utf8ToBytes)(dst);
|
664
|
-
throw new Error('DST must be Uint8Array or string');
|
665
|
-
}
|
666
659
|
// Octet Stream to Integer. "spec" implementation of os2ip is 2.5x slower vs bytesToNumberBE.
|
667
660
|
const os2ip = utils_js_1.bytesToNumberBE;
|
668
661
|
// Integer to Octet Stream (numberToBytesBE)
|
@@ -684,20 +677,16 @@ function strxor(a, b) {
|
|
684
677
|
}
|
685
678
|
return arr;
|
686
679
|
}
|
687
|
-
function
|
688
|
-
if (!(item instanceof Uint8Array))
|
689
|
-
throw new Error('Uint8Array expected');
|
690
|
-
}
|
691
|
-
function isNum(item) {
|
680
|
+
function anum(item) {
|
692
681
|
if (!Number.isSafeInteger(item))
|
693
682
|
throw new Error('number expected');
|
694
683
|
}
|
695
684
|
// Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits
|
696
685
|
// https://www.rfc-editor.org/rfc/rfc9380#section-5.3.1
|
697
686
|
function expand_message_xmd(msg, DST, lenInBytes, H) {
|
698
|
-
|
699
|
-
|
700
|
-
|
687
|
+
(0, utils_js_1.abytes)(msg);
|
688
|
+
(0, utils_js_1.abytes)(DST);
|
689
|
+
anum(lenInBytes);
|
701
690
|
// https://www.rfc-editor.org/rfc/rfc9380#section-5.3.3
|
702
691
|
if (DST.length > 255)
|
703
692
|
DST = H((0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)('H2C-OVERSIZE-DST-'), DST));
|
@@ -725,9 +714,9 @@ exports.expand_message_xmd = expand_message_xmd;
|
|
725
714
|
// a random oracle under a reasonable cryptographic assumption.
|
726
715
|
// https://www.rfc-editor.org/rfc/rfc9380#section-5.3.2
|
727
716
|
function expand_message_xof(msg, DST, lenInBytes, k, H) {
|
728
|
-
|
729
|
-
|
730
|
-
|
717
|
+
(0, utils_js_1.abytes)(msg);
|
718
|
+
(0, utils_js_1.abytes)(DST);
|
719
|
+
anum(lenInBytes);
|
731
720
|
// https://www.rfc-editor.org/rfc/rfc9380#section-5.3.3
|
732
721
|
// DST = H('H2C-OVERSIZE-DST-' || a_very_long_DST, Math.ceil((lenInBytes * k) / 8));
|
733
722
|
if (DST.length > 255) {
|
@@ -762,9 +751,9 @@ function hash_to_field(msg, count, options) {
|
|
762
751
|
hash: 'hash',
|
763
752
|
});
|
764
753
|
const { p, k, m, hash, expand, DST: _DST } = options;
|
765
|
-
|
766
|
-
|
767
|
-
const DST =
|
754
|
+
(0, utils_js_1.abytes)(msg);
|
755
|
+
anum(count);
|
756
|
+
const DST = typeof _DST === 'string' ? (0, utils_js_1.utf8ToBytes)(_DST) : _DST;
|
768
757
|
const log2p = p.toString(2).length;
|
769
758
|
const L = Math.ceil((log2p + k) / 8); // section 5.1 of ietf draft link above
|
770
759
|
const len_in_bytes = count * m * L;
|
@@ -1412,18 +1401,16 @@ function montgomery(curveDef) {
|
|
1412
1401
|
function decodeUCoordinate(uEnc) {
|
1413
1402
|
// Section 5: When receiving such an array, implementations of X25519
|
1414
1403
|
// MUST mask the most significant bit in the final byte.
|
1415
|
-
// This is very ugly way, but it works because fieldLen-1 is outside of bounds for X448, so this becomes NOOP
|
1416
|
-
// fieldLen - scalaryBytes = 1 for X448 and = 0 for X25519
|
1417
1404
|
const u = (0, utils_js_1.ensureBytes)('u coordinate', uEnc, montgomeryBytes);
|
1418
|
-
|
1419
|
-
|
1420
|
-
u[fieldLen - 1] &= 127; // 0b0111_1111
|
1405
|
+
if (fieldLen === 32)
|
1406
|
+
u[31] &= 127; // 0b0111_1111
|
1421
1407
|
return (0, utils_js_1.bytesToNumberLE)(u);
|
1422
1408
|
}
|
1423
1409
|
function decodeScalar(n) {
|
1424
1410
|
const bytes = (0, utils_js_1.ensureBytes)('scalar', n);
|
1425
|
-
|
1426
|
-
|
1411
|
+
const len = bytes.length;
|
1412
|
+
if (len !== montgomeryBytes && len !== fieldLen)
|
1413
|
+
throw new Error(`Expected ${montgomeryBytes} or ${fieldLen} bytes, got ${len}`);
|
1427
1414
|
return (0, utils_js_1.bytesToNumberLE)(adjustScalarBytes(bytes));
|
1428
1415
|
}
|
1429
1416
|
function scalarMult(scalar, u) {
|
@@ -1464,7 +1451,7 @@ exports.montgomery = montgomery;
|
|
1464
1451
|
"use strict";
|
1465
1452
|
|
1466
1453
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1467
|
-
exports.validateObject = exports.createHmacDrbg = exports.bitMask = exports.bitSet = exports.bitGet = exports.bitLen = exports.utf8ToBytes = exports.equalBytes = exports.concatBytes = exports.ensureBytes = exports.numberToVarBytesBE = exports.numberToBytesLE = exports.numberToBytesBE = exports.bytesToNumberLE = exports.bytesToNumberBE = exports.hexToBytes = exports.hexToNumber = exports.numberToHexUnpadded = exports.bytesToHex = void 0;
|
1454
|
+
exports.validateObject = exports.createHmacDrbg = exports.bitMask = exports.bitSet = exports.bitGet = exports.bitLen = exports.utf8ToBytes = exports.equalBytes = exports.concatBytes = exports.ensureBytes = exports.numberToVarBytesBE = exports.numberToBytesLE = exports.numberToBytesBE = exports.bytesToNumberLE = exports.bytesToNumberBE = exports.hexToBytes = exports.hexToNumber = exports.numberToHexUnpadded = exports.bytesToHex = exports.abytes = exports.isBytes = void 0;
|
1468
1455
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
1469
1456
|
// 100 lines of code in the file are duplicated from noble-hashes (utils).
|
1470
1457
|
// This is OK: `abstract` directory does not use noble-hashes.
|
@@ -1473,14 +1460,23 @@ exports.validateObject = exports.createHmacDrbg = exports.bitMask = exports.bitS
|
|
1473
1460
|
const _0n = BigInt(0);
|
1474
1461
|
const _1n = BigInt(1);
|
1475
1462
|
const _2n = BigInt(2);
|
1476
|
-
|
1463
|
+
function isBytes(a) {
|
1464
|
+
return (a instanceof Uint8Array ||
|
1465
|
+
(a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));
|
1466
|
+
}
|
1467
|
+
exports.isBytes = isBytes;
|
1468
|
+
function abytes(item) {
|
1469
|
+
if (!isBytes(item))
|
1470
|
+
throw new Error('Uint8Array expected');
|
1471
|
+
}
|
1472
|
+
exports.abytes = abytes;
|
1473
|
+
// Array where index 0xf0 (240) is mapped to string 'f0'
|
1477
1474
|
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));
|
1478
1475
|
/**
|
1479
1476
|
* @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
|
1480
1477
|
*/
|
1481
1478
|
function bytesToHex(bytes) {
|
1482
|
-
|
1483
|
-
throw new Error('Uint8Array expected');
|
1479
|
+
abytes(bytes);
|
1484
1480
|
// pre-caching improves the speed 6x
|
1485
1481
|
let hex = '';
|
1486
1482
|
for (let i = 0; i < bytes.length; i++) {
|
@@ -1501,23 +1497,36 @@ function hexToNumber(hex) {
|
|
1501
1497
|
return BigInt(hex === '' ? '0' : `0x${hex}`);
|
1502
1498
|
}
|
1503
1499
|
exports.hexToNumber = hexToNumber;
|
1500
|
+
// We use optimized technique to convert hex string to byte array
|
1501
|
+
const asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
|
1502
|
+
function asciiToBase16(char) {
|
1503
|
+
if (char >= asciis._0 && char <= asciis._9)
|
1504
|
+
return char - asciis._0;
|
1505
|
+
if (char >= asciis._A && char <= asciis._F)
|
1506
|
+
return char - (asciis._A - 10);
|
1507
|
+
if (char >= asciis._a && char <= asciis._f)
|
1508
|
+
return char - (asciis._a - 10);
|
1509
|
+
return;
|
1510
|
+
}
|
1504
1511
|
/**
|
1505
1512
|
* @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
|
1506
1513
|
*/
|
1507
1514
|
function hexToBytes(hex) {
|
1508
1515
|
if (typeof hex !== 'string')
|
1509
1516
|
throw new Error('hex string expected, got ' + typeof hex);
|
1510
|
-
const
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
const
|
1517
|
-
const
|
1518
|
-
if (
|
1519
|
-
|
1520
|
-
|
1517
|
+
const hl = hex.length;
|
1518
|
+
const al = hl / 2;
|
1519
|
+
if (hl % 2)
|
1520
|
+
throw new Error('padded hex string expected, got unpadded hex of length ' + hl);
|
1521
|
+
const array = new Uint8Array(al);
|
1522
|
+
for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
|
1523
|
+
const n1 = asciiToBase16(hex.charCodeAt(hi));
|
1524
|
+
const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
|
1525
|
+
if (n1 === undefined || n2 === undefined) {
|
1526
|
+
const char = hex[hi] + hex[hi + 1];
|
1527
|
+
throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
|
1528
|
+
}
|
1529
|
+
array[ai] = n1 * 16 + n2;
|
1521
1530
|
}
|
1522
1531
|
return array;
|
1523
1532
|
}
|
@@ -1528,8 +1537,7 @@ function bytesToNumberBE(bytes) {
|
|
1528
1537
|
}
|
1529
1538
|
exports.bytesToNumberBE = bytesToNumberBE;
|
1530
1539
|
function bytesToNumberLE(bytes) {
|
1531
|
-
|
1532
|
-
throw new Error('Uint8Array expected');
|
1540
|
+
abytes(bytes);
|
1533
1541
|
return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));
|
1534
1542
|
}
|
1535
1543
|
exports.bytesToNumberLE = bytesToNumberLE;
|
@@ -1565,7 +1573,7 @@ function ensureBytes(title, hex, expectedLength) {
|
|
1565
1573
|
throw new Error(`${title} must be valid hex string, got "${hex}". Cause: ${e}`);
|
1566
1574
|
}
|
1567
1575
|
}
|
1568
|
-
else if (
|
1576
|
+
else if (isBytes(hex)) {
|
1569
1577
|
// Uint8Array.from() instead of hash.slice() because node.js Buffer
|
1570
1578
|
// is instance of Uint8Array, and its slice() creates **mutable** copy
|
1571
1579
|
res = Uint8Array.from(hex);
|
@@ -1583,25 +1591,29 @@ exports.ensureBytes = ensureBytes;
|
|
1583
1591
|
* Copies several Uint8Arrays into one.
|
1584
1592
|
*/
|
1585
1593
|
function concatBytes(...arrays) {
|
1586
|
-
|
1587
|
-
let
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1594
|
+
let sum = 0;
|
1595
|
+
for (let i = 0; i < arrays.length; i++) {
|
1596
|
+
const a = arrays[i];
|
1597
|
+
abytes(a);
|
1598
|
+
sum += a.length;
|
1599
|
+
}
|
1600
|
+
const res = new Uint8Array(sum);
|
1601
|
+
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
1602
|
+
const a = arrays[i];
|
1603
|
+
res.set(a, pad);
|
1592
1604
|
pad += a.length;
|
1593
|
-
}
|
1594
|
-
return
|
1605
|
+
}
|
1606
|
+
return res;
|
1595
1607
|
}
|
1596
1608
|
exports.concatBytes = concatBytes;
|
1597
|
-
|
1598
|
-
|
1599
|
-
if (
|
1609
|
+
// Compares 2 u8a-s in kinda constant time
|
1610
|
+
function equalBytes(a, b) {
|
1611
|
+
if (a.length !== b.length)
|
1600
1612
|
return false;
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
return
|
1613
|
+
let diff = 0;
|
1614
|
+
for (let i = 0; i < a.length; i++)
|
1615
|
+
diff |= a[i] ^ b[i];
|
1616
|
+
return diff === 0;
|
1605
1617
|
}
|
1606
1618
|
exports.equalBytes = equalBytes;
|
1607
1619
|
/**
|
@@ -1637,9 +1649,9 @@ exports.bitGet = bitGet;
|
|
1637
1649
|
/**
|
1638
1650
|
* Sets single bit at position.
|
1639
1651
|
*/
|
1640
|
-
|
1652
|
+
function bitSet(n, pos, value) {
|
1641
1653
|
return n | ((value ? _1n : _0n) << BigInt(pos));
|
1642
|
-
}
|
1654
|
+
}
|
1643
1655
|
exports.bitSet = bitSet;
|
1644
1656
|
/**
|
1645
1657
|
* Calculate mask for N bits. Not using ** operator with bigints because of old engines.
|
@@ -1715,7 +1727,7 @@ const validatorFns = {
|
|
1715
1727
|
function: (val) => typeof val === 'function',
|
1716
1728
|
boolean: (val) => typeof val === 'boolean',
|
1717
1729
|
string: (val) => typeof val === 'string',
|
1718
|
-
stringOrUint8Array: (val) => typeof val === 'string' || val
|
1730
|
+
stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),
|
1719
1731
|
isSafeInteger: (val) => Number.isSafeInteger(val),
|
1720
1732
|
array: (val) => Array.isArray(val),
|
1721
1733
|
field: (val, object) => object.Fp.isValid(val),
|
@@ -1827,8 +1839,7 @@ exports.DER = {
|
|
1827
1839
|
// parse DER signature
|
1828
1840
|
const { Err: E } = exports.DER;
|
1829
1841
|
const data = typeof hex === 'string' ? h2b(hex) : hex;
|
1830
|
-
|
1831
|
-
throw new Error('ui8a expected');
|
1842
|
+
ut.abytes(data);
|
1832
1843
|
let l = data.length;
|
1833
1844
|
if (l < 2 || data[0] != 0x30)
|
1834
1845
|
throw new E('Invalid signature tag');
|
@@ -1905,7 +1916,7 @@ function weierstrassPoints(opts) {
|
|
1905
1916
|
function normPrivateKeyToScalar(key) {
|
1906
1917
|
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;
|
1907
1918
|
if (lengths && typeof key !== 'bigint') {
|
1908
|
-
if (key
|
1919
|
+
if (ut.isBytes(key))
|
1909
1920
|
key = ut.bytesToHex(key);
|
1910
1921
|
// Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes
|
1911
1922
|
if (typeof key !== 'string' || !lengths.includes(key.length))
|
@@ -2337,7 +2348,14 @@ function weierstrass(curveDef) {
|
|
2337
2348
|
if (!isValidFieldElement(x))
|
2338
2349
|
throw new Error('Point is not on curve');
|
2339
2350
|
const y2 = weierstrassEquation(x); // y² = x³ + ax + b
|
2340
|
-
let y
|
2351
|
+
let y;
|
2352
|
+
try {
|
2353
|
+
y = Fp.sqrt(y2); // y = y² ^ (p+1)/4
|
2354
|
+
}
|
2355
|
+
catch (sqrtError) {
|
2356
|
+
const suffix = sqrtError instanceof Error ? ': ' + sqrtError.message : '';
|
2357
|
+
throw new Error('Point is not on curve' + suffix);
|
2358
|
+
}
|
2341
2359
|
const isYOdd = (y & _1n) === _1n;
|
2342
2360
|
// ECDSA
|
2343
2361
|
const isHeadOdd = (head & 1) === 1;
|
@@ -2484,7 +2502,7 @@ function weierstrass(curveDef) {
|
|
2484
2502
|
* Quick and dirty check for item being public key. Does not validate hex, or being on-curve.
|
2485
2503
|
*/
|
2486
2504
|
function isProbPub(item) {
|
2487
|
-
const arr = item
|
2505
|
+
const arr = ut.isBytes(item);
|
2488
2506
|
const str = typeof item === 'string';
|
2489
2507
|
const len = (arr || str) && item.length;
|
2490
2508
|
if (arr)
|
@@ -2564,7 +2582,7 @@ function weierstrass(curveDef) {
|
|
2564
2582
|
const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint
|
2565
2583
|
const seedArgs = [int2octets(d), int2octets(h1int)];
|
2566
2584
|
// extraEntropy. RFC6979 3.6: additional k' (optional).
|
2567
|
-
if (ent != null) {
|
2585
|
+
if (ent != null && ent !== false) {
|
2568
2586
|
// K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')
|
2569
2587
|
const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is
|
2570
2588
|
seedArgs.push((0, utils_js_1.ensureBytes)('extraEntropy', e)); // check for being bytes
|
@@ -2645,7 +2663,7 @@ function weierstrass(curveDef) {
|
|
2645
2663
|
let _sig = undefined;
|
2646
2664
|
let P;
|
2647
2665
|
try {
|
2648
|
-
if (typeof sg === 'string' || sg
|
2666
|
+
if (typeof sg === 'string' || ut.isBytes(sg)) {
|
2649
2667
|
// Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).
|
2650
2668
|
// Since DER can also be 2*nByteLength bytes, we check for it first.
|
2651
2669
|
try {
|
@@ -2920,7 +2938,7 @@ exports.ED25519_TORSION_SUBGROUP = [
|
|
2920
2938
|
const Fp = (0, modular_js_1.Field)(ED25519_P, undefined, true);
|
2921
2939
|
const ed25519Defaults = {
|
2922
2940
|
// Param: a
|
2923
|
-
a: BigInt(-1),
|
2941
|
+
a: BigInt(-1), // Fp.create(-1) is proper; our way still works and is faster
|
2924
2942
|
// d is equal to -121665/121666 over finite field.
|
2925
2943
|
// Negative number is P - number, and division is invert(number, P)
|
2926
2944
|
d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),
|
@@ -2960,7 +2978,7 @@ exports.ed25519ph = (0, edwards_js_1.twistedEdwards)({
|
|
2960
2978
|
exports.x25519 = (() => (0, montgomery_js_1.montgomery)({
|
2961
2979
|
P: ED25519_P,
|
2962
2980
|
a: BigInt(486662),
|
2963
|
-
montgomeryBits: 255,
|
2981
|
+
montgomeryBits: 255, // n is 253 bits
|
2964
2982
|
nByteLength: 32,
|
2965
2983
|
Gu: BigInt(9),
|
2966
2984
|
powPminus2: (x) => {
|
@@ -3253,6 +3271,12 @@ class RistPoint {
|
|
3253
3271
|
multiplyUnsafe(scalar) {
|
3254
3272
|
return new RistPoint(this.ep.multiplyUnsafe(scalar));
|
3255
3273
|
}
|
3274
|
+
double() {
|
3275
|
+
return new RistPoint(this.ep.double());
|
3276
|
+
}
|
3277
|
+
negate() {
|
3278
|
+
return new RistPoint(this.ep.negate());
|
3279
|
+
}
|
3256
3280
|
}
|
3257
3281
|
exports.RistrettoPoint = (() => {
|
3258
3282
|
if (!RistPoint.BASE)
|
@@ -3328,15 +3352,15 @@ function sqrtMod(y) {
|
|
3328
3352
|
}
|
3329
3353
|
const Fp = (0, modular_js_1.Field)(secp256k1P, undefined, undefined, { sqrt: sqrtMod });
|
3330
3354
|
exports.secp256k1 = (0, _shortw_utils_js_1.createCurve)({
|
3331
|
-
a: BigInt(0),
|
3332
|
-
b: BigInt(7),
|
3333
|
-
Fp,
|
3334
|
-
n: secp256k1N,
|
3355
|
+
a: BigInt(0), // equation params: a, b
|
3356
|
+
b: BigInt(7), // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975
|
3357
|
+
Fp, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n
|
3358
|
+
n: secp256k1N, // Curve order, total count of valid points in the field
|
3335
3359
|
// Base point (x, y) aka generator point
|
3336
3360
|
Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),
|
3337
3361
|
Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),
|
3338
|
-
h: BigInt(1),
|
3339
|
-
lowS: true,
|
3362
|
+
h: BigInt(1), // Cofactor
|
3363
|
+
lowS: true, // Allow only low-S signatures by default in sign() and verify()
|
3340
3364
|
/**
|
3341
3365
|
* secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.
|
3342
3366
|
* Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.
|
@@ -3551,29 +3575,35 @@ exports.encodeToCurve = (() => htf.encodeToCurve)();
|
|
3551
3575
|
"use strict";
|
3552
3576
|
|
3553
3577
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3554
|
-
exports.output = exports.exists = exports.hash = exports.bytes = exports.bool = exports.number = void 0;
|
3578
|
+
exports.output = exports.exists = exports.hash = exports.bytes = exports.bool = exports.number = exports.isBytes = void 0;
|
3555
3579
|
function number(n) {
|
3556
3580
|
if (!Number.isSafeInteger(n) || n < 0)
|
3557
|
-
throw new Error(`
|
3581
|
+
throw new Error(`positive integer expected, not ${n}`);
|
3558
3582
|
}
|
3559
3583
|
exports.number = number;
|
3560
3584
|
function bool(b) {
|
3561
3585
|
if (typeof b !== 'boolean')
|
3562
|
-
throw new Error(`
|
3586
|
+
throw new Error(`boolean expected, not ${b}`);
|
3563
3587
|
}
|
3564
3588
|
exports.bool = bool;
|
3589
|
+
// copied from utils
|
3590
|
+
function isBytes(a) {
|
3591
|
+
return (a instanceof Uint8Array ||
|
3592
|
+
(a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));
|
3593
|
+
}
|
3594
|
+
exports.isBytes = isBytes;
|
3565
3595
|
function bytes(b, ...lengths) {
|
3566
|
-
if (!(b
|
3567
|
-
throw new Error('
|
3596
|
+
if (!isBytes(b))
|
3597
|
+
throw new Error('Uint8Array expected');
|
3568
3598
|
if (lengths.length > 0 && !lengths.includes(b.length))
|
3569
|
-
throw new Error(`
|
3599
|
+
throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);
|
3570
3600
|
}
|
3571
3601
|
exports.bytes = bytes;
|
3572
|
-
function hash(
|
3573
|
-
if (typeof
|
3602
|
+
function hash(h) {
|
3603
|
+
if (typeof h !== 'function' || typeof h.create !== 'function')
|
3574
3604
|
throw new Error('Hash should be wrapped by utils.wrapConstructor');
|
3575
|
-
number(
|
3576
|
-
number(
|
3605
|
+
number(h.outputLen);
|
3606
|
+
number(h.blockLen);
|
3577
3607
|
}
|
3578
3608
|
exports.hash = hash;
|
3579
3609
|
function exists(instance, checkFinished = true) {
|
@@ -3597,16 +3627,16 @@ exports["default"] = assert;
|
|
3597
3627
|
|
3598
3628
|
/***/ }),
|
3599
3629
|
|
3600
|
-
/***/ "../../node_modules/@noble/hashes/
|
3601
|
-
|
3602
|
-
!*** ../../node_modules/@noble/hashes/
|
3603
|
-
|
3630
|
+
/***/ "../../node_modules/@noble/hashes/_md.js":
|
3631
|
+
/*!***********************************************!*\
|
3632
|
+
!*** ../../node_modules/@noble/hashes/_md.js ***!
|
3633
|
+
\***********************************************/
|
3604
3634
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
3605
3635
|
|
3606
3636
|
"use strict";
|
3607
3637
|
|
3608
3638
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3609
|
-
exports.
|
3639
|
+
exports.HashMD = exports.Maj = exports.Chi = void 0;
|
3610
3640
|
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
3611
3641
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
3612
3642
|
// Polyfill for Safari 14
|
@@ -3622,8 +3652,17 @@ function setBigUint64(view, byteOffset, value, isLE) {
|
|
3622
3652
|
view.setUint32(byteOffset + h, wh, isLE);
|
3623
3653
|
view.setUint32(byteOffset + l, wl, isLE);
|
3624
3654
|
}
|
3625
|
-
//
|
3626
|
-
|
3655
|
+
// Choice: a ? b : c
|
3656
|
+
const Chi = (a, b, c) => (a & b) ^ (~a & c);
|
3657
|
+
exports.Chi = Chi;
|
3658
|
+
// Majority function, true if any two inpust is true
|
3659
|
+
const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);
|
3660
|
+
exports.Maj = Maj;
|
3661
|
+
/**
|
3662
|
+
* Merkle-Damgard hash construction base class.
|
3663
|
+
* Could be used to create MD5, RIPEMD, SHA1, SHA2.
|
3664
|
+
*/
|
3665
|
+
class HashMD extends utils_js_1.Hash {
|
3627
3666
|
constructor(blockLen, outputLen, padOffset, isLE) {
|
3628
3667
|
super();
|
3629
3668
|
this.blockLen = blockLen;
|
@@ -3675,7 +3714,8 @@ class SHA2 extends utils_js_1.Hash {
|
|
3675
3714
|
// append the bit '1' to the message
|
3676
3715
|
buffer[pos++] = 0b10000000;
|
3677
3716
|
this.buffer.subarray(pos).fill(0);
|
3678
|
-
// we have less than padOffset left in buffer, so we cannot put length in
|
3717
|
+
// we have less than padOffset left in buffer, so we cannot put length in
|
3718
|
+
// current block, need process it and pad again
|
3679
3719
|
if (this.padOffset > blockLen - pos) {
|
3680
3720
|
this.process(view, 0);
|
3681
3721
|
pos = 0;
|
@@ -3720,7 +3760,7 @@ class SHA2 extends utils_js_1.Hash {
|
|
3720
3760
|
return to;
|
3721
3761
|
}
|
3722
3762
|
}
|
3723
|
-
exports.
|
3763
|
+
exports.HashMD = HashMD;
|
3724
3764
|
|
3725
3765
|
|
3726
3766
|
/***/ }),
|
@@ -4038,12 +4078,12 @@ exports.pbkdf2Async = pbkdf2Async;
|
|
4038
4078
|
|
4039
4079
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4040
4080
|
exports.ripemd160 = exports.RIPEMD160 = void 0;
|
4041
|
-
const
|
4081
|
+
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/hashes/_md.js");
|
4042
4082
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
4043
4083
|
// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
|
4044
4084
|
// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf
|
4045
4085
|
const Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);
|
4046
|
-
const Id = /* @__PURE__ */ Uint8Array
|
4086
|
+
const Id = /* @__PURE__ */ new Uint8Array(new Array(16).fill(0).map((_, i) => i));
|
4047
4087
|
const Pi = /* @__PURE__ */ Id.map((i) => (9 * i + 5) % 16);
|
4048
4088
|
let idxL = [Id];
|
4049
4089
|
let idxR = [Pi];
|
@@ -4065,8 +4105,6 @@ const Kl = /* @__PURE__ */ new Uint32Array([
|
|
4065
4105
|
const Kr = /* @__PURE__ */ new Uint32Array([
|
4066
4106
|
0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000,
|
4067
4107
|
]);
|
4068
|
-
// The rotate left (circular left shift) operation for uint32
|
4069
|
-
const rotl = (word, shift) => (word << shift) | (word >>> (32 - shift));
|
4070
4108
|
// It's called f() in spec.
|
4071
4109
|
function f(group, x, y, z) {
|
4072
4110
|
if (group === 0)
|
@@ -4081,8 +4119,8 @@ function f(group, x, y, z) {
|
|
4081
4119
|
return x ^ (y | ~z);
|
4082
4120
|
}
|
4083
4121
|
// Temporary buffer, not used to store anything between runs
|
4084
|
-
const
|
4085
|
-
class RIPEMD160 extends
|
4122
|
+
const R_BUF = /* @__PURE__ */ new Uint32Array(16);
|
4123
|
+
class RIPEMD160 extends _md_js_1.HashMD {
|
4086
4124
|
constructor() {
|
4087
4125
|
super(64, 20, 8, true);
|
4088
4126
|
this.h0 = 0x67452301 | 0;
|
@@ -4104,7 +4142,7 @@ class RIPEMD160 extends _sha2_js_1.SHA2 {
|
|
4104
4142
|
}
|
4105
4143
|
process(view, offset) {
|
4106
4144
|
for (let i = 0; i < 16; i++, offset += 4)
|
4107
|
-
|
4145
|
+
R_BUF[i] = view.getUint32(offset, true);
|
4108
4146
|
// prettier-ignore
|
4109
4147
|
let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;
|
4110
4148
|
// Instead of iterating 0 to 80, we split it into 5 groups
|
@@ -4115,20 +4153,20 @@ class RIPEMD160 extends _sha2_js_1.SHA2 {
|
|
4115
4153
|
const rl = idxL[group], rr = idxR[group]; // prettier-ignore
|
4116
4154
|
const sl = shiftsL[group], sr = shiftsR[group]; // prettier-ignore
|
4117
4155
|
for (let i = 0; i < 16; i++) {
|
4118
|
-
const tl = (rotl(al + f(group, bl, cl, dl) +
|
4119
|
-
al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl; // prettier-ignore
|
4156
|
+
const tl = ((0, utils_js_1.rotl)(al + f(group, bl, cl, dl) + R_BUF[rl[i]] + hbl, sl[i]) + el) | 0;
|
4157
|
+
al = el, el = dl, dl = (0, utils_js_1.rotl)(cl, 10) | 0, cl = bl, bl = tl; // prettier-ignore
|
4120
4158
|
}
|
4121
4159
|
// 2 loops are 10% faster
|
4122
4160
|
for (let i = 0; i < 16; i++) {
|
4123
|
-
const tr = (rotl(ar + f(rGroup, br, cr, dr) +
|
4124
|
-
ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr; // prettier-ignore
|
4161
|
+
const tr = ((0, utils_js_1.rotl)(ar + f(rGroup, br, cr, dr) + R_BUF[rr[i]] + hbr, sr[i]) + er) | 0;
|
4162
|
+
ar = er, er = dr, dr = (0, utils_js_1.rotl)(cr, 10) | 0, cr = br, br = tr; // prettier-ignore
|
4125
4163
|
}
|
4126
4164
|
}
|
4127
4165
|
// Add the compressed chunk to the current hash value
|
4128
4166
|
this.set((this.h1 + cl + dr) | 0, (this.h2 + dl + er) | 0, (this.h3 + el + ar) | 0, (this.h4 + al + br) | 0, (this.h0 + bl + cr) | 0);
|
4129
4167
|
}
|
4130
4168
|
roundClean() {
|
4131
|
-
|
4169
|
+
R_BUF.fill(0);
|
4132
4170
|
}
|
4133
4171
|
destroy() {
|
4134
4172
|
this.destroyed = true;
|
@@ -4156,14 +4194,10 @@ exports.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD160());
|
|
4156
4194
|
|
4157
4195
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4158
4196
|
exports.sha224 = exports.sha256 = void 0;
|
4159
|
-
const
|
4197
|
+
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/hashes/_md.js");
|
4160
4198
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
4161
4199
|
// SHA2-256 need to try 2^128 hashes to execute birthday attack.
|
4162
4200
|
// BTC network is doing 2^67 hashes/sec as per early 2023.
|
4163
|
-
// Choice: a ? b : c
|
4164
|
-
const Chi = (a, b, c) => (a & b) ^ (~a & c);
|
4165
|
-
// Majority function, true if any two inpust is true
|
4166
|
-
const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);
|
4167
4201
|
// Round constants:
|
4168
4202
|
// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)
|
4169
4203
|
// prettier-ignore
|
@@ -4177,27 +4211,28 @@ const SHA256_K = /* @__PURE__ */ new Uint32Array([
|
|
4177
4211
|
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
4178
4212
|
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
4179
4213
|
]);
|
4180
|
-
// Initial state
|
4214
|
+
// Initial state:
|
4215
|
+
// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19
|
4181
4216
|
// prettier-ignore
|
4182
|
-
const
|
4217
|
+
const SHA256_IV = /* @__PURE__ */ new Uint32Array([
|
4183
4218
|
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
|
4184
4219
|
]);
|
4185
4220
|
// Temporary buffer, not used to store anything between runs
|
4186
4221
|
// Named this way because it matches specification.
|
4187
4222
|
const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
4188
|
-
class SHA256 extends
|
4223
|
+
class SHA256 extends _md_js_1.HashMD {
|
4189
4224
|
constructor() {
|
4190
4225
|
super(64, 32, 8, false);
|
4191
4226
|
// We cannot use array here since array allows indexing by variable
|
4192
4227
|
// which means optimizer/compiler cannot use registers.
|
4193
|
-
this.A =
|
4194
|
-
this.B =
|
4195
|
-
this.C =
|
4196
|
-
this.D =
|
4197
|
-
this.E =
|
4198
|
-
this.F =
|
4199
|
-
this.G =
|
4200
|
-
this.H =
|
4228
|
+
this.A = SHA256_IV[0] | 0;
|
4229
|
+
this.B = SHA256_IV[1] | 0;
|
4230
|
+
this.C = SHA256_IV[2] | 0;
|
4231
|
+
this.D = SHA256_IV[3] | 0;
|
4232
|
+
this.E = SHA256_IV[4] | 0;
|
4233
|
+
this.F = SHA256_IV[5] | 0;
|
4234
|
+
this.G = SHA256_IV[6] | 0;
|
4235
|
+
this.H = SHA256_IV[7] | 0;
|
4201
4236
|
}
|
4202
4237
|
get() {
|
4203
4238
|
const { A, B, C, D, E, F, G, H } = this;
|
@@ -4229,9 +4264,9 @@ class SHA256 extends _sha2_js_1.SHA2 {
|
|
4229
4264
|
let { A, B, C, D, E, F, G, H } = this;
|
4230
4265
|
for (let i = 0; i < 64; i++) {
|
4231
4266
|
const sigma1 = (0, utils_js_1.rotr)(E, 6) ^ (0, utils_js_1.rotr)(E, 11) ^ (0, utils_js_1.rotr)(E, 25);
|
4232
|
-
const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
4267
|
+
const T1 = (H + sigma1 + (0, _md_js_1.Chi)(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
4233
4268
|
const sigma0 = (0, utils_js_1.rotr)(A, 2) ^ (0, utils_js_1.rotr)(A, 13) ^ (0, utils_js_1.rotr)(A, 22);
|
4234
|
-
const T2 = (sigma0 + Maj(A, B, C)) | 0;
|
4269
|
+
const T2 = (sigma0 + (0, _md_js_1.Maj)(A, B, C)) | 0;
|
4235
4270
|
H = G;
|
4236
4271
|
G = F;
|
4237
4272
|
F = E;
|
@@ -4295,7 +4330,7 @@ exports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());
|
|
4295
4330
|
|
4296
4331
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4297
4332
|
exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA512 = void 0;
|
4298
|
-
const
|
4333
|
+
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/hashes/_md.js");
|
4299
4334
|
const _u64_js_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@noble/hashes/_u64.js");
|
4300
4335
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
4301
4336
|
// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
|
@@ -4325,7 +4360,7 @@ const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_js_1.default.split([
|
|
4325
4360
|
// Temporary buffer, not used to store anything between runs
|
4326
4361
|
const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
|
4327
4362
|
const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
|
4328
|
-
class SHA512 extends
|
4363
|
+
class SHA512 extends _md_js_1.HashMD {
|
4329
4364
|
constructor() {
|
4330
4365
|
super(128, 64, 16, false);
|
4331
4366
|
// We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.
|
@@ -4540,15 +4575,22 @@ exports.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384());
|
|
4540
4575
|
|
4541
4576
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4542
4577
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4543
|
-
exports.randomBytes = exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.checkOpts = exports.Hash = exports.concatBytes = exports.toBytes = exports.utf8ToBytes = exports.asyncLoop = exports.nextTick = exports.hexToBytes = exports.bytesToHex = exports.isLE = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;
|
4578
|
+
exports.randomBytes = exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.checkOpts = exports.Hash = exports.concatBytes = exports.toBytes = exports.utf8ToBytes = exports.asyncLoop = exports.nextTick = exports.hexToBytes = exports.bytesToHex = exports.byteSwap32 = exports.byteSwapIfBE = exports.byteSwap = exports.isLE = exports.rotl = exports.rotr = exports.createView = exports.u32 = exports.u8 = exports.isBytes = void 0;
|
4544
4579
|
// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.
|
4545
4580
|
// node.js versions earlier than v19 don't declare it in global scope.
|
4546
4581
|
// For node.js, package.json#exports field mapping rewrites import
|
4547
4582
|
// from `crypto` to `cryptoNode`, which imports native module.
|
4548
4583
|
// Makes the utils un-importable in browsers without a bundler.
|
4549
|
-
// Once node.js 18 is deprecated, we can just drop the import.
|
4584
|
+
// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.
|
4550
4585
|
const crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ "../../node_modules/@noble/hashes/crypto.js");
|
4551
|
-
const
|
4586
|
+
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
4587
|
+
// export { isBytes } from './_assert.js';
|
4588
|
+
// We can't reuse isBytes from _assert, because somehow this causes huge perf issues
|
4589
|
+
function isBytes(a) {
|
4590
|
+
return (a instanceof Uint8Array ||
|
4591
|
+
(a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));
|
4592
|
+
}
|
4593
|
+
exports.isBytes = isBytes;
|
4552
4594
|
// Cast array to different type
|
4553
4595
|
const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
4554
4596
|
exports.u8 = u8;
|
@@ -4560,18 +4602,32 @@ exports.createView = createView;
|
|
4560
4602
|
// The rotate right (circular right shift) operation for uint32
|
4561
4603
|
const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);
|
4562
4604
|
exports.rotr = rotr;
|
4563
|
-
//
|
4564
|
-
|
4605
|
+
// The rotate left (circular left shift) operation for uint32
|
4606
|
+
const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);
|
4607
|
+
exports.rotl = rotl;
|
4565
4608
|
exports.isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;
|
4566
|
-
|
4567
|
-
|
4609
|
+
// The byte swap operation for uint32
|
4610
|
+
const byteSwap = (word) => ((word << 24) & 0xff000000) |
|
4611
|
+
((word << 8) & 0xff0000) |
|
4612
|
+
((word >>> 8) & 0xff00) |
|
4613
|
+
((word >>> 24) & 0xff);
|
4614
|
+
exports.byteSwap = byteSwap;
|
4615
|
+
// Conditionally byte swap if on a big-endian platform
|
4616
|
+
exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => (0, exports.byteSwap)(n);
|
4617
|
+
// In place byte swap for Uint32Array
|
4618
|
+
function byteSwap32(arr) {
|
4619
|
+
for (let i = 0; i < arr.length; i++) {
|
4620
|
+
arr[i] = (0, exports.byteSwap)(arr[i]);
|
4621
|
+
}
|
4622
|
+
}
|
4623
|
+
exports.byteSwap32 = byteSwap32;
|
4624
|
+
// Array where index 0xf0 (240) is mapped to string 'f0'
|
4568
4625
|
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));
|
4569
4626
|
/**
|
4570
4627
|
* @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
|
4571
4628
|
*/
|
4572
4629
|
function bytesToHex(bytes) {
|
4573
|
-
|
4574
|
-
throw new Error('Uint8Array expected');
|
4630
|
+
(0, _assert_js_1.bytes)(bytes);
|
4575
4631
|
// pre-caching improves the speed 6x
|
4576
4632
|
let hex = '';
|
4577
4633
|
for (let i = 0; i < bytes.length; i++) {
|
@@ -4580,23 +4636,36 @@ function bytesToHex(bytes) {
|
|
4580
4636
|
return hex;
|
4581
4637
|
}
|
4582
4638
|
exports.bytesToHex = bytesToHex;
|
4639
|
+
// We use optimized technique to convert hex string to byte array
|
4640
|
+
const asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };
|
4641
|
+
function asciiToBase16(char) {
|
4642
|
+
if (char >= asciis._0 && char <= asciis._9)
|
4643
|
+
return char - asciis._0;
|
4644
|
+
if (char >= asciis._A && char <= asciis._F)
|
4645
|
+
return char - (asciis._A - 10);
|
4646
|
+
if (char >= asciis._a && char <= asciis._f)
|
4647
|
+
return char - (asciis._a - 10);
|
4648
|
+
return;
|
4649
|
+
}
|
4583
4650
|
/**
|
4584
4651
|
* @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
|
4585
4652
|
*/
|
4586
4653
|
function hexToBytes(hex) {
|
4587
4654
|
if (typeof hex !== 'string')
|
4588
4655
|
throw new Error('hex string expected, got ' + typeof hex);
|
4589
|
-
const
|
4590
|
-
|
4591
|
-
|
4592
|
-
|
4593
|
-
|
4594
|
-
|
4595
|
-
const
|
4596
|
-
const
|
4597
|
-
if (
|
4598
|
-
|
4599
|
-
|
4656
|
+
const hl = hex.length;
|
4657
|
+
const al = hl / 2;
|
4658
|
+
if (hl % 2)
|
4659
|
+
throw new Error('padded hex string expected, got unpadded hex of length ' + hl);
|
4660
|
+
const array = new Uint8Array(al);
|
4661
|
+
for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
|
4662
|
+
const n1 = asciiToBase16(hex.charCodeAt(hi));
|
4663
|
+
const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
|
4664
|
+
if (n1 === undefined || n2 === undefined) {
|
4665
|
+
const char = hex[hi] + hex[hi + 1];
|
4666
|
+
throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
|
4667
|
+
}
|
4668
|
+
array[ai] = n1 * 16 + n2;
|
4600
4669
|
}
|
4601
4670
|
return array;
|
4602
4671
|
}
|
@@ -4637,8 +4706,7 @@ exports.utf8ToBytes = utf8ToBytes;
|
|
4637
4706
|
function toBytes(data) {
|
4638
4707
|
if (typeof data === 'string')
|
4639
4708
|
data = utf8ToBytes(data);
|
4640
|
-
|
4641
|
-
throw new Error(`expected Uint8Array, got ${typeof data}`);
|
4709
|
+
(0, _assert_js_1.bytes)(data);
|
4642
4710
|
return data;
|
4643
4711
|
}
|
4644
4712
|
exports.toBytes = toBytes;
|
@@ -4646,15 +4714,19 @@ exports.toBytes = toBytes;
|
|
4646
4714
|
* Copies several Uint8Arrays into one.
|
4647
4715
|
*/
|
4648
4716
|
function concatBytes(...arrays) {
|
4649
|
-
|
4650
|
-
let
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4717
|
+
let sum = 0;
|
4718
|
+
for (let i = 0; i < arrays.length; i++) {
|
4719
|
+
const a = arrays[i];
|
4720
|
+
(0, _assert_js_1.bytes)(a);
|
4721
|
+
sum += a.length;
|
4722
|
+
}
|
4723
|
+
const res = new Uint8Array(sum);
|
4724
|
+
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
4725
|
+
const a = arrays[i];
|
4726
|
+
res.set(a, pad);
|
4655
4727
|
pad += a.length;
|
4656
|
-
}
|
4657
|
-
return
|
4728
|
+
}
|
4729
|
+
return res;
|
4658
4730
|
}
|
4659
4731
|
exports.concatBytes = concatBytes;
|
4660
4732
|
// For runtime check if class implements interface
|
@@ -4724,7 +4796,7 @@ exports.randomBytes = randomBytes;
|
|
4724
4796
|
|
4725
4797
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4726
4798
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4727
|
-
exports.bytes = exports.stringToBytes = exports.str = exports.bytesToString = exports.hex = exports.utf8 = exports.bech32m = exports.bech32 = exports.base58check = exports.base58xmr = exports.base58xrp = exports.base58flickr = exports.base58 = exports.base64urlnopad = exports.base64url = exports.base64 = exports.base32crockford = exports.base32hex = exports.base32 = exports.base16 = exports.utils = exports.assertNumber = void 0;
|
4799
|
+
exports.bytes = exports.stringToBytes = exports.str = exports.bytesToString = exports.hex = exports.utf8 = exports.bech32m = exports.bech32 = exports.base58check = exports.createBase58check = exports.base58xmr = exports.base58xrp = exports.base58flickr = exports.base58 = exports.base64urlnopad = exports.base64url = exports.base64nopad = exports.base64 = exports.base32crockford = exports.base32hex = exports.base32 = exports.base16 = exports.utils = exports.assertNumber = void 0;
|
4728
4800
|
// Utilities
|
4729
4801
|
/**
|
4730
4802
|
* @__NO_SIDE_EFFECTS__
|
@@ -4734,18 +4806,21 @@ function assertNumber(n) {
|
|
4734
4806
|
throw new Error(`Wrong integer: ${n}`);
|
4735
4807
|
}
|
4736
4808
|
exports.assertNumber = assertNumber;
|
4809
|
+
function isBytes(a) {
|
4810
|
+
return (a instanceof Uint8Array ||
|
4811
|
+
(a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));
|
4812
|
+
}
|
4737
4813
|
/**
|
4738
4814
|
* @__NO_SIDE_EFFECTS__
|
4739
4815
|
*/
|
4740
4816
|
function chain(...args) {
|
4817
|
+
const id = (a) => a;
|
4741
4818
|
// Wrap call in closure so JIT can inline calls
|
4742
4819
|
const wrap = (a, b) => (c) => a(b(c));
|
4743
4820
|
// Construct chain of args[-1].encode(args[-2].encode([...]))
|
4744
|
-
const encode =
|
4745
|
-
.reverse()
|
4746
|
-
.reduce((acc, i) => (acc ? wrap(acc, i.encode) : i.encode), undefined);
|
4821
|
+
const encode = args.map((x) => x.encode).reduceRight(wrap, id);
|
4747
4822
|
// Construct chain of args[0].decode(args[1].decode(...))
|
4748
|
-
const decode = args.
|
4823
|
+
const decode = args.map((x) => x.decode).reduce(wrap, id);
|
4749
4824
|
return { encode, decode };
|
4750
4825
|
}
|
4751
4826
|
/**
|
@@ -4945,13 +5020,13 @@ function radix(num) {
|
|
4945
5020
|
assertNumber(num);
|
4946
5021
|
return {
|
4947
5022
|
encode: (bytes) => {
|
4948
|
-
if (!(bytes
|
5023
|
+
if (!isBytes(bytes))
|
4949
5024
|
throw new Error('radix.encode input should be Uint8Array');
|
4950
5025
|
return convertRadix(Array.from(bytes), 2 ** 8, num);
|
4951
5026
|
},
|
4952
5027
|
decode: (digits) => {
|
4953
5028
|
if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))
|
4954
|
-
throw new Error('radix.decode input should be array of
|
5029
|
+
throw new Error('radix.decode input should be array of numbers');
|
4955
5030
|
return Uint8Array.from(convertRadix(digits, num, 2 ** 8));
|
4956
5031
|
},
|
4957
5032
|
};
|
@@ -4969,13 +5044,13 @@ function radix2(bits, revPadding = false) {
|
|
4969
5044
|
throw new Error('radix2: carry overflow');
|
4970
5045
|
return {
|
4971
5046
|
encode: (bytes) => {
|
4972
|
-
if (!(bytes
|
5047
|
+
if (!isBytes(bytes))
|
4973
5048
|
throw new Error('radix2.encode input should be Uint8Array');
|
4974
5049
|
return convertRadix2(Array.from(bytes), 8, bits, !revPadding);
|
4975
5050
|
},
|
4976
5051
|
decode: (digits) => {
|
4977
5052
|
if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))
|
4978
|
-
throw new Error('radix2.decode input should be array of
|
5053
|
+
throw new Error('radix2.decode input should be array of numbers');
|
4979
5054
|
return Uint8Array.from(convertRadix2(digits, bits, 8, revPadding));
|
4980
5055
|
},
|
4981
5056
|
};
|
@@ -5002,7 +5077,7 @@ function checksum(len, fn) {
|
|
5002
5077
|
throw new Error('checksum fn should be function');
|
5003
5078
|
return {
|
5004
5079
|
encode(data) {
|
5005
|
-
if (!(data
|
5080
|
+
if (!isBytes(data))
|
5006
5081
|
throw new Error('checksum.encode: input should be Uint8Array');
|
5007
5082
|
const checksum = fn(data).slice(0, len);
|
5008
5083
|
const res = new Uint8Array(data.length + len);
|
@@ -5011,7 +5086,7 @@ function checksum(len, fn) {
|
|
5011
5086
|
return res;
|
5012
5087
|
},
|
5013
5088
|
decode(data) {
|
5014
|
-
if (!(data
|
5089
|
+
if (!isBytes(data))
|
5015
5090
|
throw new Error('checksum.decode: input should be Uint8Array');
|
5016
5091
|
const payload = data.slice(0, -len);
|
5017
5092
|
const newChecksum = fn(payload).slice(0, len);
|
@@ -5023,7 +5098,10 @@ function checksum(len, fn) {
|
|
5023
5098
|
},
|
5024
5099
|
};
|
5025
5100
|
}
|
5026
|
-
|
5101
|
+
// prettier-ignore
|
5102
|
+
exports.utils = {
|
5103
|
+
alphabet, chain, checksum, convertRadix, convertRadix2, radix, radix2, join, padding,
|
5104
|
+
};
|
5027
5105
|
// RFC 4648 aka RFC 3548
|
5028
5106
|
// ---------------------
|
5029
5107
|
exports.base16 = chain(radix2(4), alphabet('0123456789ABCDEF'), join(''));
|
@@ -5031,6 +5109,7 @@ exports.base32 = chain(radix2(5), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'),
|
|
5031
5109
|
exports.base32hex = chain(radix2(5), alphabet('0123456789ABCDEFGHIJKLMNOPQRSTUV'), padding(5), join(''));
|
5032
5110
|
exports.base32crockford = chain(radix2(5), alphabet('0123456789ABCDEFGHJKMNPQRSTVWXYZ'), join(''), normalize((s) => s.toUpperCase().replace(/O/g, '0').replace(/[IL]/g, '1')));
|
5033
5111
|
exports.base64 = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), padding(6), join(''));
|
5112
|
+
exports.base64nopad = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), join(''));
|
5034
5113
|
exports.base64url = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), padding(6), join(''));
|
5035
5114
|
exports.base64urlnopad = chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), join(''));
|
5036
5115
|
// base58 code
|
@@ -5067,8 +5146,10 @@ exports.base58xmr = {
|
|
5067
5146
|
return Uint8Array.from(res);
|
5068
5147
|
},
|
5069
5148
|
};
|
5070
|
-
const
|
5071
|
-
exports.
|
5149
|
+
const createBase58check = (sha256) => chain(checksum(4, (data) => sha256(sha256(data))), exports.base58);
|
5150
|
+
exports.createBase58check = createBase58check;
|
5151
|
+
// legacy export, bad name
|
5152
|
+
exports.base58check = exports.createBase58check;
|
5072
5153
|
const BECH_ALPHABET = /* @__PURE__ */ chain(alphabet('qpzry9x8gf2tvdw0s3jn54khce6mua7l'), join(''));
|
5073
5154
|
const POLYMOD_GENERATORS = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3];
|
5074
5155
|
/**
|
@@ -5119,6 +5200,8 @@ function genBech32(encoding) {
|
|
5119
5200
|
throw new Error(`bech32.encode prefix should be string, not ${typeof prefix}`);
|
5120
5201
|
if (!Array.isArray(words) || (words.length && typeof words[0] !== 'number'))
|
5121
5202
|
throw new Error(`bech32.encode words should be array of numbers, not ${typeof words}`);
|
5203
|
+
if (prefix.length === 0)
|
5204
|
+
throw new TypeError(`Invalid prefix length ${prefix.length}`);
|
5122
5205
|
const actualLength = prefix.length + 7 + words.length;
|
5123
5206
|
if (limit !== false && actualLength > limit)
|
5124
5207
|
throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);
|
@@ -5135,17 +5218,16 @@ function genBech32(encoding) {
|
|
5135
5218
|
const lowered = str.toLowerCase();
|
5136
5219
|
if (str !== lowered && str !== str.toUpperCase())
|
5137
5220
|
throw new Error(`String must be lowercase or uppercase`);
|
5138
|
-
|
5139
|
-
const sepIndex = str.lastIndexOf('1');
|
5221
|
+
const sepIndex = lowered.lastIndexOf('1');
|
5140
5222
|
if (sepIndex === 0 || sepIndex === -1)
|
5141
5223
|
throw new Error(`Letter "1" must be present between prefix and data only`);
|
5142
|
-
const prefix =
|
5143
|
-
const
|
5144
|
-
if (
|
5224
|
+
const prefix = lowered.slice(0, sepIndex);
|
5225
|
+
const data = lowered.slice(sepIndex + 1);
|
5226
|
+
if (data.length < 6)
|
5145
5227
|
throw new Error('Data must be at least 6 characters long');
|
5146
|
-
const words = BECH_ALPHABET.decode(
|
5228
|
+
const words = BECH_ALPHABET.decode(data).slice(0, -6);
|
5147
5229
|
const sum = bechChecksum(prefix, words, ENCODING_CONST);
|
5148
|
-
if (!
|
5230
|
+
if (!data.endsWith(sum))
|
5149
5231
|
throw new Error(`Invalid checksum in ${str}: expected "${sum}"`);
|
5150
5232
|
return { prefix, words };
|
5151
5233
|
}
|
@@ -5175,7 +5257,7 @@ const coderTypeError = 'Invalid encoding type. Available types: utf8, hex, base1
|
|
5175
5257
|
const bytesToString = (type, bytes) => {
|
5176
5258
|
if (typeof type !== 'string' || !CODERS.hasOwnProperty(type))
|
5177
5259
|
throw new TypeError(coderTypeError);
|
5178
|
-
if (!(bytes
|
5260
|
+
if (!isBytes(bytes))
|
5179
5261
|
throw new TypeError('bytesToString() expects Uint8Array');
|
5180
5262
|
return CODERS[type].encode(bytes);
|
5181
5263
|
};
|
@@ -5190,7 +5272,7 @@ const stringToBytes = (type, str) => {
|
|
5190
5272
|
};
|
5191
5273
|
exports.stringToBytes = stringToBytes;
|
5192
5274
|
exports.bytes = exports.stringToBytes;
|
5193
|
-
|
5275
|
+
//# sourceMappingURL=index.js.map
|
5194
5276
|
|
5195
5277
|
/***/ }),
|
5196
5278
|
|
@@ -5215,7 +5297,7 @@ const secp256k1_1 = __webpack_require__(/*! @noble/curves/secp256k1 */ "../../no
|
|
5215
5297
|
const modular_1 = __webpack_require__(/*! @noble/curves/abstract/modular */ "../../node_modules/@noble/curves/abstract/modular.js");
|
5216
5298
|
const base_1 = __webpack_require__(/*! @scure/base */ "../../node_modules/@scure/base/lib/index.js");
|
5217
5299
|
const Point = secp256k1_1.secp256k1.ProjectivePoint;
|
5218
|
-
const base58check = (0, base_1.
|
5300
|
+
const base58check = (0, base_1.createBase58check)(sha256_1.sha256);
|
5219
5301
|
function bytesToNumber(bytes) {
|
5220
5302
|
return BigInt(`0x${(0, utils_1.bytesToHex)(bytes)}`);
|
5221
5303
|
}
|
@@ -5317,7 +5399,7 @@ class HDKey {
|
|
5317
5399
|
}
|
5318
5400
|
this.versions = opt.versions || BITCOIN_VERSIONS;
|
5319
5401
|
this.depth = opt.depth || 0;
|
5320
|
-
this.chainCode = opt.chainCode;
|
5402
|
+
this.chainCode = opt.chainCode || null;
|
5321
5403
|
this.index = opt.index || 0;
|
5322
5404
|
this.parentFingerprint = opt.parentFingerprint || 0;
|
5323
5405
|
if (!this.depth) {
|
@@ -5499,6 +5581,7 @@ const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057
|
|
5499
5581
|
// Normalization replaces equivalent sequences of characters
|
5500
5582
|
// so that any two texts that are equivalent will be reduced
|
5501
5583
|
// to the same sequence of code points, called the normal form of the original text.
|
5584
|
+
// https://tonsky.me/blog/unicode/#why-is-a----
|
5502
5585
|
function nfkd(str) {
|
5503
5586
|
if (typeof str !== 'string')
|
5504
5587
|
throw new TypeError(`Invalid mnemonic type: ${typeof str}`);
|
@@ -5512,7 +5595,7 @@ function normalize(str) {
|
|
5512
5595
|
return { nfkd: norm, words };
|
5513
5596
|
}
|
5514
5597
|
function assertEntropy(entropy) {
|
5515
|
-
_assert_1.
|
5598
|
+
(0, _assert_1.bytes)(entropy, 16, 20, 24, 28, 32);
|
5516
5599
|
}
|
5517
5600
|
/**
|
5518
5601
|
* Generate x random words. Uses Cryptographically-Secure Random Number Generator.
|
@@ -5523,7 +5606,7 @@ function assertEntropy(entropy) {
|
|
5523
5606
|
* // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
|
5524
5607
|
*/
|
5525
5608
|
function generateMnemonic(wordlist, strength = 128) {
|
5526
|
-
_assert_1.
|
5609
|
+
(0, _assert_1.number)(strength);
|
5527
5610
|
if (strength % 32 !== 0 || strength > 256)
|
5528
5611
|
throw new TypeError('Invalid entropy');
|
5529
5612
|
return entropyToMnemonic((0, utils_1.randomBytes)(strength / 8), wordlist);
|
@@ -5538,7 +5621,7 @@ const calcChecksum = (entropy) => {
|
|
5538
5621
|
};
|
5539
5622
|
function getCoder(wordlist) {
|
5540
5623
|
if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string')
|
5541
|
-
throw new Error('
|
5624
|
+
throw new Error('Wordlist: expected array of 2048 strings');
|
5542
5625
|
wordlist.forEach((i) => {
|
5543
5626
|
if (typeof i !== 'string')
|
5544
5627
|
throw new Error(`Wordlist: non-string element: ${i}`);
|
@@ -7850,6 +7933,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
7850
7933
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7851
7934
|
exports.randomBytes = exports.stringToHex = exports.hexToString = exports.hexToBytes = exports.bytesToHex = void 0;
|
7852
7935
|
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
|
7936
|
+
const shared_1 = __webpack_require__(/*! ./shared */ "../../node_modules/@xrplf/isomorphic/dist/utils/shared.js");
|
7853
7937
|
/* eslint-disable func-style -- Typed to ensure uniformity between node and browser implementations and docs */
|
7854
7938
|
const bytesToHex = (bytes) => {
|
7855
7939
|
const hex = (0, utils_1.bytesToHex)(bytes instanceof Uint8Array ? bytes : Uint8Array.from(bytes));
|
@@ -7860,6 +7944,9 @@ exports.bytesToHex = bytesToHex;
|
|
7860
7944
|
const hexToBytes = (hex) => {
|
7861
7945
|
const len = hex.length;
|
7862
7946
|
const array = new Uint8Array(len / 2);
|
7947
|
+
if (!shared_1.HEX_REGEX.test(hex)) {
|
7948
|
+
throw new Error('Invalid hex string');
|
7949
|
+
}
|
7863
7950
|
for (let i = 0; i < array.length; i++) {
|
7864
7951
|
const j = i * 2;
|
7865
7952
|
const hexByte = hex.slice(j, j + 2);
|
@@ -7896,8 +7983,9 @@ __exportStar(__webpack_require__(/*! ./shared */ "../../node_modules/@xrplf/isom
|
|
7896
7983
|
"use strict";
|
7897
7984
|
|
7898
7985
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7899
|
-
exports.equal = exports.concat = void 0;
|
7986
|
+
exports.equal = exports.concat = exports.HEX_REGEX = void 0;
|
7900
7987
|
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
|
7988
|
+
exports.HEX_REGEX = /^[A-F0-9]*$/iu;
|
7901
7989
|
function concat(views) {
|
7902
7990
|
return (0, utils_1.concatBytes)(...views);
|
7903
7991
|
}
|
@@ -11123,663 +11211,6 @@ var __WEBPACK_AMD_DEFINE_RESULT__;;(function (globalObject) {
|
|
11123
11211
|
})(this);
|
11124
11212
|
|
11125
11213
|
|
11126
|
-
/***/ }),
|
11127
|
-
|
11128
|
-
/***/ "../../node_modules/cross-fetch/dist/browser-ponyfill.js":
|
11129
|
-
/*!***************************************************************!*\
|
11130
|
-
!*** ../../node_modules/cross-fetch/dist/browser-ponyfill.js ***!
|
11131
|
-
\***************************************************************/
|
11132
|
-
/***/ ((module, exports, __webpack_require__) => {
|
11133
|
-
|
11134
|
-
// Save global object in a variable
|
11135
|
-
var __global__ =
|
11136
|
-
(typeof globalThis !== 'undefined' && globalThis) ||
|
11137
|
-
(typeof self !== 'undefined' && self) ||
|
11138
|
-
(typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g);
|
11139
|
-
// Create an object that extends from __global__ without the fetch function
|
11140
|
-
var __globalThis__ = (function () {
|
11141
|
-
function F() {
|
11142
|
-
this.fetch = false;
|
11143
|
-
this.DOMException = __global__.DOMException
|
11144
|
-
}
|
11145
|
-
F.prototype = __global__; // Needed for feature detection on whatwg-fetch's code
|
11146
|
-
return new F();
|
11147
|
-
})();
|
11148
|
-
// Wraps whatwg-fetch with a function scope to hijack the global object
|
11149
|
-
// "globalThis" that's going to be patched
|
11150
|
-
(function(globalThis) {
|
11151
|
-
|
11152
|
-
var irrelevant = (function (exports) {
|
11153
|
-
|
11154
|
-
var global =
|
11155
|
-
(typeof globalThis !== 'undefined' && globalThis) ||
|
11156
|
-
(typeof self !== 'undefined' && self) ||
|
11157
|
-
(typeof global !== 'undefined' && global);
|
11158
|
-
|
11159
|
-
var support = {
|
11160
|
-
searchParams: 'URLSearchParams' in global,
|
11161
|
-
iterable: 'Symbol' in global && 'iterator' in Symbol,
|
11162
|
-
blob:
|
11163
|
-
'FileReader' in global &&
|
11164
|
-
'Blob' in global &&
|
11165
|
-
(function() {
|
11166
|
-
try {
|
11167
|
-
new Blob();
|
11168
|
-
return true
|
11169
|
-
} catch (e) {
|
11170
|
-
return false
|
11171
|
-
}
|
11172
|
-
})(),
|
11173
|
-
formData: 'FormData' in global,
|
11174
|
-
arrayBuffer: 'ArrayBuffer' in global
|
11175
|
-
};
|
11176
|
-
|
11177
|
-
function isDataView(obj) {
|
11178
|
-
return obj && DataView.prototype.isPrototypeOf(obj)
|
11179
|
-
}
|
11180
|
-
|
11181
|
-
if (support.arrayBuffer) {
|
11182
|
-
var viewClasses = [
|
11183
|
-
'[object Int8Array]',
|
11184
|
-
'[object Uint8Array]',
|
11185
|
-
'[object Uint8ClampedArray]',
|
11186
|
-
'[object Int16Array]',
|
11187
|
-
'[object Uint16Array]',
|
11188
|
-
'[object Int32Array]',
|
11189
|
-
'[object Uint32Array]',
|
11190
|
-
'[object Float32Array]',
|
11191
|
-
'[object Float64Array]'
|
11192
|
-
];
|
11193
|
-
|
11194
|
-
var isArrayBufferView =
|
11195
|
-
ArrayBuffer.isView ||
|
11196
|
-
function(obj) {
|
11197
|
-
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
|
11198
|
-
};
|
11199
|
-
}
|
11200
|
-
|
11201
|
-
function normalizeName(name) {
|
11202
|
-
if (typeof name !== 'string') {
|
11203
|
-
name = String(name);
|
11204
|
-
}
|
11205
|
-
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
|
11206
|
-
throw new TypeError('Invalid character in header field name: "' + name + '"')
|
11207
|
-
}
|
11208
|
-
return name.toLowerCase()
|
11209
|
-
}
|
11210
|
-
|
11211
|
-
function normalizeValue(value) {
|
11212
|
-
if (typeof value !== 'string') {
|
11213
|
-
value = String(value);
|
11214
|
-
}
|
11215
|
-
return value
|
11216
|
-
}
|
11217
|
-
|
11218
|
-
// Build a destructive iterator for the value list
|
11219
|
-
function iteratorFor(items) {
|
11220
|
-
var iterator = {
|
11221
|
-
next: function() {
|
11222
|
-
var value = items.shift();
|
11223
|
-
return {done: value === undefined, value: value}
|
11224
|
-
}
|
11225
|
-
};
|
11226
|
-
|
11227
|
-
if (support.iterable) {
|
11228
|
-
iterator[Symbol.iterator] = function() {
|
11229
|
-
return iterator
|
11230
|
-
};
|
11231
|
-
}
|
11232
|
-
|
11233
|
-
return iterator
|
11234
|
-
}
|
11235
|
-
|
11236
|
-
function Headers(headers) {
|
11237
|
-
this.map = {};
|
11238
|
-
|
11239
|
-
if (headers instanceof Headers) {
|
11240
|
-
headers.forEach(function(value, name) {
|
11241
|
-
this.append(name, value);
|
11242
|
-
}, this);
|
11243
|
-
} else if (Array.isArray(headers)) {
|
11244
|
-
headers.forEach(function(header) {
|
11245
|
-
this.append(header[0], header[1]);
|
11246
|
-
}, this);
|
11247
|
-
} else if (headers) {
|
11248
|
-
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
11249
|
-
this.append(name, headers[name]);
|
11250
|
-
}, this);
|
11251
|
-
}
|
11252
|
-
}
|
11253
|
-
|
11254
|
-
Headers.prototype.append = function(name, value) {
|
11255
|
-
name = normalizeName(name);
|
11256
|
-
value = normalizeValue(value);
|
11257
|
-
var oldValue = this.map[name];
|
11258
|
-
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
11259
|
-
};
|
11260
|
-
|
11261
|
-
Headers.prototype['delete'] = function(name) {
|
11262
|
-
delete this.map[normalizeName(name)];
|
11263
|
-
};
|
11264
|
-
|
11265
|
-
Headers.prototype.get = function(name) {
|
11266
|
-
name = normalizeName(name);
|
11267
|
-
return this.has(name) ? this.map[name] : null
|
11268
|
-
};
|
11269
|
-
|
11270
|
-
Headers.prototype.has = function(name) {
|
11271
|
-
return this.map.hasOwnProperty(normalizeName(name))
|
11272
|
-
};
|
11273
|
-
|
11274
|
-
Headers.prototype.set = function(name, value) {
|
11275
|
-
this.map[normalizeName(name)] = normalizeValue(value);
|
11276
|
-
};
|
11277
|
-
|
11278
|
-
Headers.prototype.forEach = function(callback, thisArg) {
|
11279
|
-
for (var name in this.map) {
|
11280
|
-
if (this.map.hasOwnProperty(name)) {
|
11281
|
-
callback.call(thisArg, this.map[name], name, this);
|
11282
|
-
}
|
11283
|
-
}
|
11284
|
-
};
|
11285
|
-
|
11286
|
-
Headers.prototype.keys = function() {
|
11287
|
-
var items = [];
|
11288
|
-
this.forEach(function(value, name) {
|
11289
|
-
items.push(name);
|
11290
|
-
});
|
11291
|
-
return iteratorFor(items)
|
11292
|
-
};
|
11293
|
-
|
11294
|
-
Headers.prototype.values = function() {
|
11295
|
-
var items = [];
|
11296
|
-
this.forEach(function(value) {
|
11297
|
-
items.push(value);
|
11298
|
-
});
|
11299
|
-
return iteratorFor(items)
|
11300
|
-
};
|
11301
|
-
|
11302
|
-
Headers.prototype.entries = function() {
|
11303
|
-
var items = [];
|
11304
|
-
this.forEach(function(value, name) {
|
11305
|
-
items.push([name, value]);
|
11306
|
-
});
|
11307
|
-
return iteratorFor(items)
|
11308
|
-
};
|
11309
|
-
|
11310
|
-
if (support.iterable) {
|
11311
|
-
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
11312
|
-
}
|
11313
|
-
|
11314
|
-
function consumed(body) {
|
11315
|
-
if (body.bodyUsed) {
|
11316
|
-
return Promise.reject(new TypeError('Already read'))
|
11317
|
-
}
|
11318
|
-
body.bodyUsed = true;
|
11319
|
-
}
|
11320
|
-
|
11321
|
-
function fileReaderReady(reader) {
|
11322
|
-
return new Promise(function(resolve, reject) {
|
11323
|
-
reader.onload = function() {
|
11324
|
-
resolve(reader.result);
|
11325
|
-
};
|
11326
|
-
reader.onerror = function() {
|
11327
|
-
reject(reader.error);
|
11328
|
-
};
|
11329
|
-
})
|
11330
|
-
}
|
11331
|
-
|
11332
|
-
function readBlobAsArrayBuffer(blob) {
|
11333
|
-
var reader = new FileReader();
|
11334
|
-
var promise = fileReaderReady(reader);
|
11335
|
-
reader.readAsArrayBuffer(blob);
|
11336
|
-
return promise
|
11337
|
-
}
|
11338
|
-
|
11339
|
-
function readBlobAsText(blob) {
|
11340
|
-
var reader = new FileReader();
|
11341
|
-
var promise = fileReaderReady(reader);
|
11342
|
-
reader.readAsText(blob);
|
11343
|
-
return promise
|
11344
|
-
}
|
11345
|
-
|
11346
|
-
function readArrayBufferAsText(buf) {
|
11347
|
-
var view = new Uint8Array(buf);
|
11348
|
-
var chars = new Array(view.length);
|
11349
|
-
|
11350
|
-
for (var i = 0; i < view.length; i++) {
|
11351
|
-
chars[i] = String.fromCharCode(view[i]);
|
11352
|
-
}
|
11353
|
-
return chars.join('')
|
11354
|
-
}
|
11355
|
-
|
11356
|
-
function bufferClone(buf) {
|
11357
|
-
if (buf.slice) {
|
11358
|
-
return buf.slice(0)
|
11359
|
-
} else {
|
11360
|
-
var view = new Uint8Array(buf.byteLength);
|
11361
|
-
view.set(new Uint8Array(buf));
|
11362
|
-
return view.buffer
|
11363
|
-
}
|
11364
|
-
}
|
11365
|
-
|
11366
|
-
function Body() {
|
11367
|
-
this.bodyUsed = false;
|
11368
|
-
|
11369
|
-
this._initBody = function(body) {
|
11370
|
-
/*
|
11371
|
-
fetch-mock wraps the Response object in an ES6 Proxy to
|
11372
|
-
provide useful test harness features such as flush. However, on
|
11373
|
-
ES5 browsers without fetch or Proxy support pollyfills must be used;
|
11374
|
-
the proxy-pollyfill is unable to proxy an attribute unless it exists
|
11375
|
-
on the object before the Proxy is created. This change ensures
|
11376
|
-
Response.bodyUsed exists on the instance, while maintaining the
|
11377
|
-
semantic of setting Request.bodyUsed in the constructor before
|
11378
|
-
_initBody is called.
|
11379
|
-
*/
|
11380
|
-
this.bodyUsed = this.bodyUsed;
|
11381
|
-
this._bodyInit = body;
|
11382
|
-
if (!body) {
|
11383
|
-
this._bodyText = '';
|
11384
|
-
} else if (typeof body === 'string') {
|
11385
|
-
this._bodyText = body;
|
11386
|
-
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
11387
|
-
this._bodyBlob = body;
|
11388
|
-
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
11389
|
-
this._bodyFormData = body;
|
11390
|
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
11391
|
-
this._bodyText = body.toString();
|
11392
|
-
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
11393
|
-
this._bodyArrayBuffer = bufferClone(body.buffer);
|
11394
|
-
// IE 10-11 can't handle a DataView body.
|
11395
|
-
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
11396
|
-
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
11397
|
-
this._bodyArrayBuffer = bufferClone(body);
|
11398
|
-
} else {
|
11399
|
-
this._bodyText = body = Object.prototype.toString.call(body);
|
11400
|
-
}
|
11401
|
-
|
11402
|
-
if (!this.headers.get('content-type')) {
|
11403
|
-
if (typeof body === 'string') {
|
11404
|
-
this.headers.set('content-type', 'text/plain;charset=UTF-8');
|
11405
|
-
} else if (this._bodyBlob && this._bodyBlob.type) {
|
11406
|
-
this.headers.set('content-type', this._bodyBlob.type);
|
11407
|
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
11408
|
-
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
11409
|
-
}
|
11410
|
-
}
|
11411
|
-
};
|
11412
|
-
|
11413
|
-
if (support.blob) {
|
11414
|
-
this.blob = function() {
|
11415
|
-
var rejected = consumed(this);
|
11416
|
-
if (rejected) {
|
11417
|
-
return rejected
|
11418
|
-
}
|
11419
|
-
|
11420
|
-
if (this._bodyBlob) {
|
11421
|
-
return Promise.resolve(this._bodyBlob)
|
11422
|
-
} else if (this._bodyArrayBuffer) {
|
11423
|
-
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
|
11424
|
-
} else if (this._bodyFormData) {
|
11425
|
-
throw new Error('could not read FormData body as blob')
|
11426
|
-
} else {
|
11427
|
-
return Promise.resolve(new Blob([this._bodyText]))
|
11428
|
-
}
|
11429
|
-
};
|
11430
|
-
|
11431
|
-
this.arrayBuffer = function() {
|
11432
|
-
if (this._bodyArrayBuffer) {
|
11433
|
-
var isConsumed = consumed(this);
|
11434
|
-
if (isConsumed) {
|
11435
|
-
return isConsumed
|
11436
|
-
}
|
11437
|
-
if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
|
11438
|
-
return Promise.resolve(
|
11439
|
-
this._bodyArrayBuffer.buffer.slice(
|
11440
|
-
this._bodyArrayBuffer.byteOffset,
|
11441
|
-
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
11442
|
-
)
|
11443
|
-
)
|
11444
|
-
} else {
|
11445
|
-
return Promise.resolve(this._bodyArrayBuffer)
|
11446
|
-
}
|
11447
|
-
} else {
|
11448
|
-
return this.blob().then(readBlobAsArrayBuffer)
|
11449
|
-
}
|
11450
|
-
};
|
11451
|
-
}
|
11452
|
-
|
11453
|
-
this.text = function() {
|
11454
|
-
var rejected = consumed(this);
|
11455
|
-
if (rejected) {
|
11456
|
-
return rejected
|
11457
|
-
}
|
11458
|
-
|
11459
|
-
if (this._bodyBlob) {
|
11460
|
-
return readBlobAsText(this._bodyBlob)
|
11461
|
-
} else if (this._bodyArrayBuffer) {
|
11462
|
-
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
|
11463
|
-
} else if (this._bodyFormData) {
|
11464
|
-
throw new Error('could not read FormData body as text')
|
11465
|
-
} else {
|
11466
|
-
return Promise.resolve(this._bodyText)
|
11467
|
-
}
|
11468
|
-
};
|
11469
|
-
|
11470
|
-
if (support.formData) {
|
11471
|
-
this.formData = function() {
|
11472
|
-
return this.text().then(decode)
|
11473
|
-
};
|
11474
|
-
}
|
11475
|
-
|
11476
|
-
this.json = function() {
|
11477
|
-
return this.text().then(JSON.parse)
|
11478
|
-
};
|
11479
|
-
|
11480
|
-
return this
|
11481
|
-
}
|
11482
|
-
|
11483
|
-
// HTTP methods whose capitalization should be normalized
|
11484
|
-
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
11485
|
-
|
11486
|
-
function normalizeMethod(method) {
|
11487
|
-
var upcased = method.toUpperCase();
|
11488
|
-
return methods.indexOf(upcased) > -1 ? upcased : method
|
11489
|
-
}
|
11490
|
-
|
11491
|
-
function Request(input, options) {
|
11492
|
-
if (!(this instanceof Request)) {
|
11493
|
-
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
|
11494
|
-
}
|
11495
|
-
|
11496
|
-
options = options || {};
|
11497
|
-
var body = options.body;
|
11498
|
-
|
11499
|
-
if (input instanceof Request) {
|
11500
|
-
if (input.bodyUsed) {
|
11501
|
-
throw new TypeError('Already read')
|
11502
|
-
}
|
11503
|
-
this.url = input.url;
|
11504
|
-
this.credentials = input.credentials;
|
11505
|
-
if (!options.headers) {
|
11506
|
-
this.headers = new Headers(input.headers);
|
11507
|
-
}
|
11508
|
-
this.method = input.method;
|
11509
|
-
this.mode = input.mode;
|
11510
|
-
this.signal = input.signal;
|
11511
|
-
if (!body && input._bodyInit != null) {
|
11512
|
-
body = input._bodyInit;
|
11513
|
-
input.bodyUsed = true;
|
11514
|
-
}
|
11515
|
-
} else {
|
11516
|
-
this.url = String(input);
|
11517
|
-
}
|
11518
|
-
|
11519
|
-
this.credentials = options.credentials || this.credentials || 'same-origin';
|
11520
|
-
if (options.headers || !this.headers) {
|
11521
|
-
this.headers = new Headers(options.headers);
|
11522
|
-
}
|
11523
|
-
this.method = normalizeMethod(options.method || this.method || 'GET');
|
11524
|
-
this.mode = options.mode || this.mode || null;
|
11525
|
-
this.signal = options.signal || this.signal;
|
11526
|
-
this.referrer = null;
|
11527
|
-
|
11528
|
-
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
11529
|
-
throw new TypeError('Body not allowed for GET or HEAD requests')
|
11530
|
-
}
|
11531
|
-
this._initBody(body);
|
11532
|
-
|
11533
|
-
if (this.method === 'GET' || this.method === 'HEAD') {
|
11534
|
-
if (options.cache === 'no-store' || options.cache === 'no-cache') {
|
11535
|
-
// Search for a '_' parameter in the query string
|
11536
|
-
var reParamSearch = /([?&])_=[^&]*/;
|
11537
|
-
if (reParamSearch.test(this.url)) {
|
11538
|
-
// If it already exists then set the value with the current time
|
11539
|
-
this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
|
11540
|
-
} else {
|
11541
|
-
// Otherwise add a new '_' parameter to the end with the current time
|
11542
|
-
var reQueryString = /\?/;
|
11543
|
-
this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
|
11544
|
-
}
|
11545
|
-
}
|
11546
|
-
}
|
11547
|
-
}
|
11548
|
-
|
11549
|
-
Request.prototype.clone = function() {
|
11550
|
-
return new Request(this, {body: this._bodyInit})
|
11551
|
-
};
|
11552
|
-
|
11553
|
-
function decode(body) {
|
11554
|
-
var form = new FormData();
|
11555
|
-
body
|
11556
|
-
.trim()
|
11557
|
-
.split('&')
|
11558
|
-
.forEach(function(bytes) {
|
11559
|
-
if (bytes) {
|
11560
|
-
var split = bytes.split('=');
|
11561
|
-
var name = split.shift().replace(/\+/g, ' ');
|
11562
|
-
var value = split.join('=').replace(/\+/g, ' ');
|
11563
|
-
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
11564
|
-
}
|
11565
|
-
});
|
11566
|
-
return form
|
11567
|
-
}
|
11568
|
-
|
11569
|
-
function parseHeaders(rawHeaders) {
|
11570
|
-
var headers = new Headers();
|
11571
|
-
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
11572
|
-
// https://tools.ietf.org/html/rfc7230#section-3.2
|
11573
|
-
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
11574
|
-
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
11575
|
-
// https://github.com/github/fetch/issues/748
|
11576
|
-
// https://github.com/zloirock/core-js/issues/751
|
11577
|
-
preProcessedHeaders
|
11578
|
-
.split('\r')
|
11579
|
-
.map(function(header) {
|
11580
|
-
return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
|
11581
|
-
})
|
11582
|
-
.forEach(function(line) {
|
11583
|
-
var parts = line.split(':');
|
11584
|
-
var key = parts.shift().trim();
|
11585
|
-
if (key) {
|
11586
|
-
var value = parts.join(':').trim();
|
11587
|
-
headers.append(key, value);
|
11588
|
-
}
|
11589
|
-
});
|
11590
|
-
return headers
|
11591
|
-
}
|
11592
|
-
|
11593
|
-
Body.call(Request.prototype);
|
11594
|
-
|
11595
|
-
function Response(bodyInit, options) {
|
11596
|
-
if (!(this instanceof Response)) {
|
11597
|
-
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
|
11598
|
-
}
|
11599
|
-
if (!options) {
|
11600
|
-
options = {};
|
11601
|
-
}
|
11602
|
-
|
11603
|
-
this.type = 'default';
|
11604
|
-
this.status = options.status === undefined ? 200 : options.status;
|
11605
|
-
this.ok = this.status >= 200 && this.status < 300;
|
11606
|
-
this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
|
11607
|
-
this.headers = new Headers(options.headers);
|
11608
|
-
this.url = options.url || '';
|
11609
|
-
this._initBody(bodyInit);
|
11610
|
-
}
|
11611
|
-
|
11612
|
-
Body.call(Response.prototype);
|
11613
|
-
|
11614
|
-
Response.prototype.clone = function() {
|
11615
|
-
return new Response(this._bodyInit, {
|
11616
|
-
status: this.status,
|
11617
|
-
statusText: this.statusText,
|
11618
|
-
headers: new Headers(this.headers),
|
11619
|
-
url: this.url
|
11620
|
-
})
|
11621
|
-
};
|
11622
|
-
|
11623
|
-
Response.error = function() {
|
11624
|
-
var response = new Response(null, {status: 0, statusText: ''});
|
11625
|
-
response.type = 'error';
|
11626
|
-
return response
|
11627
|
-
};
|
11628
|
-
|
11629
|
-
var redirectStatuses = [301, 302, 303, 307, 308];
|
11630
|
-
|
11631
|
-
Response.redirect = function(url, status) {
|
11632
|
-
if (redirectStatuses.indexOf(status) === -1) {
|
11633
|
-
throw new RangeError('Invalid status code')
|
11634
|
-
}
|
11635
|
-
|
11636
|
-
return new Response(null, {status: status, headers: {location: url}})
|
11637
|
-
};
|
11638
|
-
|
11639
|
-
exports.DOMException = global.DOMException;
|
11640
|
-
try {
|
11641
|
-
new exports.DOMException();
|
11642
|
-
} catch (err) {
|
11643
|
-
exports.DOMException = function(message, name) {
|
11644
|
-
this.message = message;
|
11645
|
-
this.name = name;
|
11646
|
-
var error = Error(message);
|
11647
|
-
this.stack = error.stack;
|
11648
|
-
};
|
11649
|
-
exports.DOMException.prototype = Object.create(Error.prototype);
|
11650
|
-
exports.DOMException.prototype.constructor = exports.DOMException;
|
11651
|
-
}
|
11652
|
-
|
11653
|
-
function fetch(input, init) {
|
11654
|
-
return new Promise(function(resolve, reject) {
|
11655
|
-
var request = new Request(input, init);
|
11656
|
-
|
11657
|
-
if (request.signal && request.signal.aborted) {
|
11658
|
-
return reject(new exports.DOMException('Aborted', 'AbortError'))
|
11659
|
-
}
|
11660
|
-
|
11661
|
-
var xhr = new XMLHttpRequest();
|
11662
|
-
|
11663
|
-
function abortXhr() {
|
11664
|
-
xhr.abort();
|
11665
|
-
}
|
11666
|
-
|
11667
|
-
xhr.onload = function() {
|
11668
|
-
var options = {
|
11669
|
-
status: xhr.status,
|
11670
|
-
statusText: xhr.statusText,
|
11671
|
-
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
11672
|
-
};
|
11673
|
-
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
11674
|
-
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
11675
|
-
setTimeout(function() {
|
11676
|
-
resolve(new Response(body, options));
|
11677
|
-
}, 0);
|
11678
|
-
};
|
11679
|
-
|
11680
|
-
xhr.onerror = function() {
|
11681
|
-
setTimeout(function() {
|
11682
|
-
reject(new TypeError('Network request failed'));
|
11683
|
-
}, 0);
|
11684
|
-
};
|
11685
|
-
|
11686
|
-
xhr.ontimeout = function() {
|
11687
|
-
setTimeout(function() {
|
11688
|
-
reject(new TypeError('Network request failed'));
|
11689
|
-
}, 0);
|
11690
|
-
};
|
11691
|
-
|
11692
|
-
xhr.onabort = function() {
|
11693
|
-
setTimeout(function() {
|
11694
|
-
reject(new exports.DOMException('Aborted', 'AbortError'));
|
11695
|
-
}, 0);
|
11696
|
-
};
|
11697
|
-
|
11698
|
-
function fixUrl(url) {
|
11699
|
-
try {
|
11700
|
-
return url === '' && global.location.href ? global.location.href : url
|
11701
|
-
} catch (e) {
|
11702
|
-
return url
|
11703
|
-
}
|
11704
|
-
}
|
11705
|
-
|
11706
|
-
xhr.open(request.method, fixUrl(request.url), true);
|
11707
|
-
|
11708
|
-
if (request.credentials === 'include') {
|
11709
|
-
xhr.withCredentials = true;
|
11710
|
-
} else if (request.credentials === 'omit') {
|
11711
|
-
xhr.withCredentials = false;
|
11712
|
-
}
|
11713
|
-
|
11714
|
-
if ('responseType' in xhr) {
|
11715
|
-
if (support.blob) {
|
11716
|
-
xhr.responseType = 'blob';
|
11717
|
-
} else if (
|
11718
|
-
support.arrayBuffer &&
|
11719
|
-
request.headers.get('Content-Type') &&
|
11720
|
-
request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1
|
11721
|
-
) {
|
11722
|
-
xhr.responseType = 'arraybuffer';
|
11723
|
-
}
|
11724
|
-
}
|
11725
|
-
|
11726
|
-
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
|
11727
|
-
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
|
11728
|
-
xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
|
11729
|
-
});
|
11730
|
-
} else {
|
11731
|
-
request.headers.forEach(function(value, name) {
|
11732
|
-
xhr.setRequestHeader(name, value);
|
11733
|
-
});
|
11734
|
-
}
|
11735
|
-
|
11736
|
-
if (request.signal) {
|
11737
|
-
request.signal.addEventListener('abort', abortXhr);
|
11738
|
-
|
11739
|
-
xhr.onreadystatechange = function() {
|
11740
|
-
// DONE (success or failure)
|
11741
|
-
if (xhr.readyState === 4) {
|
11742
|
-
request.signal.removeEventListener('abort', abortXhr);
|
11743
|
-
}
|
11744
|
-
};
|
11745
|
-
}
|
11746
|
-
|
11747
|
-
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
11748
|
-
})
|
11749
|
-
}
|
11750
|
-
|
11751
|
-
fetch.polyfill = true;
|
11752
|
-
|
11753
|
-
if (!global.fetch) {
|
11754
|
-
global.fetch = fetch;
|
11755
|
-
global.Headers = Headers;
|
11756
|
-
global.Request = Request;
|
11757
|
-
global.Response = Response;
|
11758
|
-
}
|
11759
|
-
|
11760
|
-
exports.Headers = Headers;
|
11761
|
-
exports.Request = Request;
|
11762
|
-
exports.Response = Response;
|
11763
|
-
exports.fetch = fetch;
|
11764
|
-
|
11765
|
-
return exports;
|
11766
|
-
|
11767
|
-
})({});
|
11768
|
-
})(__globalThis__);
|
11769
|
-
// This is a ponyfill, so...
|
11770
|
-
__globalThis__.fetch.ponyfill = true;
|
11771
|
-
delete __globalThis__.fetch.polyfill;
|
11772
|
-
// Choose between native implementation (__global__) or custom implementation (__globalThis__)
|
11773
|
-
var ctx = __global__.fetch ? __global__ : __globalThis__;
|
11774
|
-
exports = ctx.fetch // To enable: import fetch from 'cross-fetch'
|
11775
|
-
exports["default"] = ctx.fetch // For TypeScript consumers without esModuleInterop.
|
11776
|
-
exports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'
|
11777
|
-
exports.Headers = ctx.Headers
|
11778
|
-
exports.Request = ctx.Request
|
11779
|
-
exports.Response = ctx.Response
|
11780
|
-
module.exports = exports
|
11781
|
-
|
11782
|
-
|
11783
11214
|
/***/ }),
|
11784
11215
|
|
11785
11216
|
/***/ "../../node_modules/eventemitter3/index.js":
|
@@ -13637,13 +13068,13 @@ class BinaryParser {
|
|
13637
13068
|
if (type === 0) {
|
13638
13069
|
type = this.readUInt8();
|
13639
13070
|
if (type === 0 || type < 16) {
|
13640
|
-
throw new Error(
|
13071
|
+
throw new Error(`Cannot read FieldOrdinal, type_code ${type} out of range`);
|
13641
13072
|
}
|
13642
13073
|
}
|
13643
13074
|
if (nth === 0) {
|
13644
13075
|
nth = this.readUInt8();
|
13645
13076
|
if (nth === 0 || nth < 16) {
|
13646
|
-
throw new Error(
|
13077
|
+
throw new Error(`Cannot read FieldOrdinal, field_code ${nth} out of range`);
|
13647
13078
|
}
|
13648
13079
|
}
|
13649
13080
|
return (type << 16) | nth;
|
@@ -14391,6 +13822,9 @@ class Blob extends serialized_type_1.SerializedType {
|
|
14391
13822
|
return value;
|
14392
13823
|
}
|
14393
13824
|
if (typeof value === 'string') {
|
13825
|
+
if (!/^[A-F0-9]*$/iu.test(value)) {
|
13826
|
+
throw new Error('Cannot construct Blob from a non-hex string');
|
13827
|
+
}
|
14394
13828
|
return new Blob((0, utils_1.hexToBytes)(value));
|
14395
13829
|
}
|
14396
13830
|
throw new Error('Cannot construct Blob from value given');
|
@@ -15260,7 +14694,10 @@ const OBJECT_END_MARKER = Uint8Array.from([0xe1]);
|
|
15260
14694
|
* TypeGuard for Array<JsonObject>
|
15261
14695
|
*/
|
15262
14696
|
function isObjects(args) {
|
15263
|
-
return (Array.isArray(args) &&
|
14697
|
+
return (Array.isArray(args) &&
|
14698
|
+
args.every((arg) => typeof arg === 'object' &&
|
14699
|
+
Object.keys(arg).length === 1 &&
|
14700
|
+
typeof Object.values(arg)[0] === 'object'));
|
15264
14701
|
}
|
15265
14702
|
/**
|
15266
14703
|
* Class for serializing and deserializing Arrays of Objects
|
@@ -16640,18 +16077,13 @@ var FaucetNetwork;
|
|
16640
16077
|
(function (FaucetNetwork) {
|
16641
16078
|
FaucetNetwork["Testnet"] = "faucet.altnet.rippletest.net";
|
16642
16079
|
FaucetNetwork["Devnet"] = "faucet.devnet.rippletest.net";
|
16643
|
-
FaucetNetwork["HooksV3Testnet"] = "hooks-testnet-v3.xrpl-labs.com";
|
16644
16080
|
})(FaucetNetwork || (exports.FaucetNetwork = FaucetNetwork = {}));
|
16645
16081
|
exports.FaucetNetworkPaths = {
|
16646
16082
|
[FaucetNetwork.Testnet]: '/accounts',
|
16647
16083
|
[FaucetNetwork.Devnet]: '/accounts',
|
16648
|
-
[FaucetNetwork.HooksV3Testnet]: '/accounts',
|
16649
16084
|
};
|
16650
16085
|
function getFaucetHost(client) {
|
16651
16086
|
const connectionUrl = client.url;
|
16652
|
-
if (connectionUrl.includes('hooks-testnet-v3')) {
|
16653
|
-
return FaucetNetwork.HooksV3Testnet;
|
16654
|
-
}
|
16655
16087
|
if (connectionUrl.includes('altnet') || connectionUrl.includes('testnet')) {
|
16656
16088
|
return FaucetNetwork.Testnet;
|
16657
16089
|
}
|
@@ -16692,12 +16124,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
16692
16124
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
16693
16125
|
});
|
16694
16126
|
};
|
16695
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
16696
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
16697
|
-
};
|
16698
16127
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
16699
16128
|
exports.requestFunding = exports.getStartingBalance = exports.generateWalletToFund = void 0;
|
16700
|
-
const cross_fetch_1 = __importDefault(__webpack_require__(/*! cross-fetch */ "../../node_modules/cross-fetch/dist/browser-ponyfill.js"));
|
16701
16129
|
const ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js");
|
16702
16130
|
const errors_1 = __webpack_require__(/*! ../errors */ "./dist/npm/errors.js");
|
16703
16131
|
const defaultFaucets_1 = __webpack_require__(/*! ./defaultFaucets */ "./dist/npm/Wallet/defaultFaucets.js");
|
@@ -16731,7 +16159,7 @@ function requestFunding(options, client, startingBalance, walletToFund, postBody
|
|
16731
16159
|
throw new errors_1.XRPLFaucetError('No faucet hostname could be derived');
|
16732
16160
|
}
|
16733
16161
|
const pathname = (_b = options.faucetPath) !== null && _b !== void 0 ? _b : (0, defaultFaucets_1.getDefaultFaucetPath)(hostname);
|
16734
|
-
const response = yield (
|
16162
|
+
const response = yield fetch(`https://${hostname}${pathname}`, {
|
16735
16163
|
method: 'POST',
|
16736
16164
|
headers: {
|
16737
16165
|
'Content-Type': 'application/json',
|
@@ -17804,6 +17232,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
17804
17232
|
exports.Client = void 0;
|
17805
17233
|
const eventemitter3_1 = __webpack_require__(/*! eventemitter3 */ "../../node_modules/eventemitter3/index.js");
|
17806
17234
|
const errors_1 = __webpack_require__(/*! ../errors */ "./dist/npm/errors.js");
|
17235
|
+
const common_1 = __webpack_require__(/*! ../models/common */ "./dist/npm/models/common/index.js");
|
17807
17236
|
const flags_1 = __webpack_require__(/*! ../models/utils/flags */ "./dist/npm/models/utils/flags.js");
|
17808
17237
|
const sugar_1 = __webpack_require__(/*! ../sugar */ "./dist/npm/sugar/index.js");
|
17809
17238
|
const autofill_1 = __webpack_require__(/*! ../sugar/autofill */ "./dist/npm/sugar/autofill.js");
|
@@ -17848,6 +17277,7 @@ class Client extends eventemitter3_1.EventEmitter {
|
|
17848
17277
|
constructor(server, options = {}) {
|
17849
17278
|
var _a, _b;
|
17850
17279
|
super();
|
17280
|
+
this.apiVersion = common_1.DEFAULT_API_VERSION;
|
17851
17281
|
if (typeof server !== 'string' || !/wss?(?:\+unix)?:\/\//u.exec(server)) {
|
17852
17282
|
throw new errors_1.ValidationError('server URI must start with `wss://`, `ws://`, `wss+unix://`, or `ws+unix://`.');
|
17853
17283
|
}
|
@@ -17894,11 +17324,12 @@ class Client extends eventemitter3_1.EventEmitter {
|
|
17894
17324
|
return this.connection.getUrl();
|
17895
17325
|
}
|
17896
17326
|
request(req) {
|
17327
|
+
var _a;
|
17897
17328
|
return __awaiter(this, void 0, void 0, function* () {
|
17898
|
-
const
|
17899
|
-
?
|
17900
|
-
|
17901
|
-
|
17329
|
+
const request = Object.assign(Object.assign({}, req), { account: typeof req.account === 'string'
|
17330
|
+
? (0, sugar_1.ensureClassicAddress)(req.account)
|
17331
|
+
: undefined, api_version: (_a = req.api_version) !== null && _a !== void 0 ? _a : this.apiVersion });
|
17332
|
+
const response = yield this.connection.request(request);
|
17902
17333
|
(0, partialPayment_1.handlePartialPayment)(req.command, response);
|
17903
17334
|
return response;
|
17904
17335
|
});
|
@@ -17924,7 +17355,6 @@ class Client extends eventemitter3_1.EventEmitter {
|
|
17924
17355
|
const countTo = request.limit == null ? Infinity : request.limit;
|
17925
17356
|
let count = 0;
|
17926
17357
|
let marker = request.marker;
|
17927
|
-
let lastBatchLength;
|
17928
17358
|
const results = [];
|
17929
17359
|
do {
|
17930
17360
|
const countRemaining = clamp(countTo - count, MIN_LIMIT, MAX_LIMIT);
|
@@ -17939,12 +17369,8 @@ class Client extends eventemitter3_1.EventEmitter {
|
|
17939
17369
|
results.push(singleResponse);
|
17940
17370
|
if (Array.isArray(collectedData)) {
|
17941
17371
|
count += collectedData.length;
|
17942
|
-
lastBatchLength = collectedData.length;
|
17943
|
-
}
|
17944
|
-
else {
|
17945
|
-
lastBatchLength = 0;
|
17946
17372
|
}
|
17947
|
-
} while (Boolean(marker) && count < countTo
|
17373
|
+
} while (Boolean(marker) && count < countTo);
|
17948
17374
|
return results;
|
17949
17375
|
});
|
17950
17376
|
}
|
@@ -18000,6 +17426,15 @@ class Client extends eventemitter3_1.EventEmitter {
|
|
18000
17426
|
if (tx.TransactionType === 'AccountDelete') {
|
18001
17427
|
promises.push((0, autofill_1.checkAccountDeleteBlockers)(this, tx));
|
18002
17428
|
}
|
17429
|
+
if (tx.TransactionType === 'Payment' && tx.DeliverMax != null) {
|
17430
|
+
if (tx.Amount == null) {
|
17431
|
+
tx.Amount = tx.DeliverMax;
|
17432
|
+
}
|
17433
|
+
if (tx.Amount != null && tx.Amount !== tx.DeliverMax) {
|
17434
|
+
return Promise.reject(new errors_1.ValidationError('PaymentTransaction: Amount and DeliverMax fields must be identical when both are provided'));
|
17435
|
+
}
|
17436
|
+
delete tx.DeliverMax;
|
17437
|
+
}
|
18003
17438
|
return Promise.all(promises).then(() => tx);
|
18004
17439
|
});
|
18005
17440
|
}
|
@@ -18176,21 +17611,28 @@ function isPartialPayment(tx, metadata) {
|
|
18176
17611
|
return false;
|
18177
17612
|
}
|
18178
17613
|
const delivered = meta.delivered_amount;
|
18179
|
-
const amount = tx.
|
17614
|
+
const amount = tx.DeliverMax;
|
18180
17615
|
if (delivered === undefined) {
|
18181
17616
|
return false;
|
18182
17617
|
}
|
18183
17618
|
return !amountsEqual(delivered, amount);
|
18184
17619
|
}
|
18185
17620
|
function txHasPartialPayment(response) {
|
18186
|
-
return isPartialPayment(response.result, response.result.meta);
|
17621
|
+
return isPartialPayment(response.result.tx_json, response.result.meta);
|
18187
17622
|
}
|
18188
17623
|
function txEntryHasPartialPayment(response) {
|
18189
17624
|
return isPartialPayment(response.result.tx_json, response.result.metadata);
|
18190
17625
|
}
|
18191
17626
|
function accountTxHasPartialPayment(response) {
|
18192
17627
|
const { transactions } = response.result;
|
18193
|
-
const foo = transactions.some((tx) =>
|
17628
|
+
const foo = transactions.some((tx) => {
|
17629
|
+
if (tx.tx_json != null) {
|
17630
|
+
const transaction = tx;
|
17631
|
+
return isPartialPayment(transaction.tx_json, transaction.meta);
|
17632
|
+
}
|
17633
|
+
const transaction = tx;
|
17634
|
+
return isPartialPayment(transaction.tx, transaction.meta);
|
17635
|
+
});
|
18194
17636
|
return foo;
|
18195
17637
|
}
|
18196
17638
|
function hasPartialPayment(command, response) {
|
@@ -18364,6 +17806,10 @@ __exportStar(__webpack_require__(/*! ./Wallet/signer */ "./dist/npm/Wallet/signe
|
|
18364
17806
|
"use strict";
|
18365
17807
|
|
18366
17808
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
17809
|
+
exports.DEFAULT_API_VERSION = exports.RIPPLED_API_V2 = exports.RIPPLED_API_V1 = void 0;
|
17810
|
+
exports.RIPPLED_API_V1 = 1;
|
17811
|
+
exports.RIPPLED_API_V2 = 2;
|
17812
|
+
exports.DEFAULT_API_VERSION = exports.RIPPLED_API_V2;
|
18367
17813
|
|
18368
17814
|
|
18369
17815
|
/***/ }),
|
@@ -18531,6 +17977,7 @@ var RippleStateFlags;
|
|
18531
17977
|
RippleStateFlags[RippleStateFlags["lsfHighNoRipple"] = 2097152] = "lsfHighNoRipple";
|
18532
17978
|
RippleStateFlags[RippleStateFlags["lsfLowFreeze"] = 4194304] = "lsfLowFreeze";
|
18533
17979
|
RippleStateFlags[RippleStateFlags["lsfHighFreeze"] = 8388608] = "lsfHighFreeze";
|
17980
|
+
RippleStateFlags[RippleStateFlags["lsfAMMNode"] = 16777216] = "lsfAMMNode";
|
18534
17981
|
})(RippleStateFlags || (exports.RippleStateFlags = RippleStateFlags = {}));
|
18535
17982
|
|
18536
17983
|
|
@@ -18754,6 +18201,7 @@ var AMMDepositFlags;
|
|
18754
18201
|
AMMDepositFlags[AMMDepositFlags["tfTwoAsset"] = 1048576] = "tfTwoAsset";
|
18755
18202
|
AMMDepositFlags[AMMDepositFlags["tfOneAssetLPToken"] = 2097152] = "tfOneAssetLPToken";
|
18756
18203
|
AMMDepositFlags[AMMDepositFlags["tfLimitLPToken"] = 4194304] = "tfLimitLPToken";
|
18204
|
+
AMMDepositFlags[AMMDepositFlags["tfTwoAssetIfEmpty"] = 8388608] = "tfTwoAssetIfEmpty";
|
18757
18205
|
})(AMMDepositFlags || (exports.AMMDepositFlags = AMMDepositFlags = {}));
|
18758
18206
|
function validateAMMDeposit(tx) {
|
18759
18207
|
(0, common_1.validateBaseTransaction)(tx);
|
@@ -20031,6 +19479,95 @@ function validateOfferCreate(tx) {
|
|
20031
19479
|
exports.validateOfferCreate = validateOfferCreate;
|
20032
19480
|
|
20033
19481
|
|
19482
|
+
/***/ }),
|
19483
|
+
|
19484
|
+
/***/ "./dist/npm/models/transactions/oracleDelete.js":
|
19485
|
+
/*!******************************************************!*\
|
19486
|
+
!*** ./dist/npm/models/transactions/oracleDelete.js ***!
|
19487
|
+
\******************************************************/
|
19488
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
19489
|
+
|
19490
|
+
"use strict";
|
19491
|
+
|
19492
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
19493
|
+
exports.validateOracleDelete = void 0;
|
19494
|
+
const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
|
19495
|
+
function validateOracleDelete(tx) {
|
19496
|
+
(0, common_1.validateBaseTransaction)(tx);
|
19497
|
+
(0, common_1.validateRequiredField)(tx, 'OracleDocumentID', common_1.isNumber);
|
19498
|
+
}
|
19499
|
+
exports.validateOracleDelete = validateOracleDelete;
|
19500
|
+
|
19501
|
+
|
19502
|
+
/***/ }),
|
19503
|
+
|
19504
|
+
/***/ "./dist/npm/models/transactions/oracleSet.js":
|
19505
|
+
/*!***************************************************!*\
|
19506
|
+
!*** ./dist/npm/models/transactions/oracleSet.js ***!
|
19507
|
+
\***************************************************/
|
19508
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
19509
|
+
|
19510
|
+
"use strict";
|
19511
|
+
|
19512
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
19513
|
+
exports.validateOracleSet = void 0;
|
19514
|
+
const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js");
|
19515
|
+
const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
|
19516
|
+
const PRICE_DATA_SERIES_MAX_LENGTH = 10;
|
19517
|
+
const SCALE_MAX = 10;
|
19518
|
+
function validateOracleSet(tx) {
|
19519
|
+
(0, common_1.validateBaseTransaction)(tx);
|
19520
|
+
(0, common_1.validateRequiredField)(tx, 'OracleDocumentID', common_1.isNumber);
|
19521
|
+
(0, common_1.validateRequiredField)(tx, 'LastUpdateTime', common_1.isNumber);
|
19522
|
+
(0, common_1.validateOptionalField)(tx, 'Provider', common_1.isString);
|
19523
|
+
(0, common_1.validateOptionalField)(tx, 'URI', common_1.isString);
|
19524
|
+
(0, common_1.validateOptionalField)(tx, 'AssetClass', common_1.isString);
|
19525
|
+
(0, common_1.validateRequiredField)(tx, 'PriceDataSeries', (value) => {
|
19526
|
+
if (!Array.isArray(value)) {
|
19527
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must be an array');
|
19528
|
+
}
|
19529
|
+
if (value.length > PRICE_DATA_SERIES_MAX_LENGTH) {
|
19530
|
+
throw new errors_1.ValidationError(`OracleSet: PriceDataSeries must have at most ${PRICE_DATA_SERIES_MAX_LENGTH} PriceData objects`);
|
19531
|
+
}
|
19532
|
+
for (const priceData of value) {
|
19533
|
+
if (typeof priceData !== 'object') {
|
19534
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must be an array of objects');
|
19535
|
+
}
|
19536
|
+
if (priceData.PriceData == null) {
|
19537
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have a `PriceData` object');
|
19538
|
+
}
|
19539
|
+
if (Object.keys(priceData).length !== 1) {
|
19540
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must only have a single PriceData object');
|
19541
|
+
}
|
19542
|
+
if (typeof priceData.PriceData.BaseAsset !== 'string') {
|
19543
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have a `BaseAsset` string');
|
19544
|
+
}
|
19545
|
+
if (typeof priceData.PriceData.QuoteAsset !== 'string') {
|
19546
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have a `QuoteAsset` string');
|
19547
|
+
}
|
19548
|
+
if ((priceData.PriceData.AssetPrice == null) !==
|
19549
|
+
(priceData.PriceData.Scale == null)) {
|
19550
|
+
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have both `AssetPrice` and `Scale` if any are present');
|
19551
|
+
}
|
19552
|
+
if ('AssetPrice' in priceData.PriceData &&
|
19553
|
+
!(0, common_1.isNumber)(priceData.PriceData.AssetPrice)) {
|
19554
|
+
throw new errors_1.ValidationError('OracleSet: invalid field AssetPrice');
|
19555
|
+
}
|
19556
|
+
if ('Scale' in priceData.PriceData &&
|
19557
|
+
!(0, common_1.isNumber)(priceData.PriceData.Scale)) {
|
19558
|
+
throw new errors_1.ValidationError('OracleSet: invalid field Scale');
|
19559
|
+
}
|
19560
|
+
if (priceData.PriceData.Scale < 0 ||
|
19561
|
+
priceData.PriceData.Scale > SCALE_MAX) {
|
19562
|
+
throw new errors_1.ValidationError(`OracleSet: Scale must be in range 0-${SCALE_MAX}`);
|
19563
|
+
}
|
19564
|
+
}
|
19565
|
+
return true;
|
19566
|
+
});
|
19567
|
+
}
|
19568
|
+
exports.validateOracleSet = validateOracleSet;
|
19569
|
+
|
19570
|
+
|
20034
19571
|
/***/ }),
|
20035
19572
|
|
20036
19573
|
/***/ "./dist/npm/models/transactions/payment.js":
|
@@ -20048,7 +19585,7 @@ const utils_1 = __webpack_require__(/*! ../utils */ "./dist/npm/models/utils/ind
|
|
20048
19585
|
const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
|
20049
19586
|
var PaymentFlags;
|
20050
19587
|
(function (PaymentFlags) {
|
20051
|
-
PaymentFlags[PaymentFlags["
|
19588
|
+
PaymentFlags[PaymentFlags["tfNoRippleDirect"] = 65536] = "tfNoRippleDirect";
|
20052
19589
|
PaymentFlags[PaymentFlags["tfPartialPayment"] = 131072] = "tfPartialPayment";
|
20053
19590
|
PaymentFlags[PaymentFlags["tfLimitQuality"] = 262144] = "tfLimitQuality";
|
20054
19591
|
})(PaymentFlags || (exports.PaymentFlags = PaymentFlags = {}));
|
@@ -20407,6 +19944,8 @@ const NFTokenCreateOffer_1 = __webpack_require__(/*! ./NFTokenCreateOffer */ "./
|
|
20407
19944
|
const NFTokenMint_1 = __webpack_require__(/*! ./NFTokenMint */ "./dist/npm/models/transactions/NFTokenMint.js");
|
20408
19945
|
const offerCancel_1 = __webpack_require__(/*! ./offerCancel */ "./dist/npm/models/transactions/offerCancel.js");
|
20409
19946
|
const offerCreate_1 = __webpack_require__(/*! ./offerCreate */ "./dist/npm/models/transactions/offerCreate.js");
|
19947
|
+
const oracleDelete_1 = __webpack_require__(/*! ./oracleDelete */ "./dist/npm/models/transactions/oracleDelete.js");
|
19948
|
+
const oracleSet_1 = __webpack_require__(/*! ./oracleSet */ "./dist/npm/models/transactions/oracleSet.js");
|
20410
19949
|
const payment_1 = __webpack_require__(/*! ./payment */ "./dist/npm/models/transactions/payment.js");
|
20411
19950
|
const paymentChannelClaim_1 = __webpack_require__(/*! ./paymentChannelClaim */ "./dist/npm/models/transactions/paymentChannelClaim.js");
|
20412
19951
|
const paymentChannelCreate_1 = __webpack_require__(/*! ./paymentChannelCreate */ "./dist/npm/models/transactions/paymentChannelCreate.js");
|
@@ -20544,6 +20083,12 @@ function validate(transaction) {
|
|
20544
20083
|
case 'OfferCreate':
|
20545
20084
|
(0, offerCreate_1.validateOfferCreate)(tx);
|
20546
20085
|
break;
|
20086
|
+
case 'OracleDelete':
|
20087
|
+
(0, oracleDelete_1.validateOracleDelete)(tx);
|
20088
|
+
break;
|
20089
|
+
case 'OracleSet':
|
20090
|
+
(0, oracleSet_1.validateOracleSet)(tx);
|
20091
|
+
break;
|
20547
20092
|
case 'Payment':
|
20548
20093
|
(0, payment_1.validatePayment)(tx);
|
20549
20094
|
break;
|
@@ -20770,7 +20315,6 @@ const getFeeXrp_1 = __importDefault(__webpack_require__(/*! ./getFeeXrp */ "./di
|
|
20770
20315
|
const LEDGER_OFFSET = 20;
|
20771
20316
|
const RESTRICTED_NETWORKS = 1024;
|
20772
20317
|
const REQUIRED_NETWORKID_VERSION = '1.11.0';
|
20773
|
-
const HOOKS_TESTNET_ID = 21338;
|
20774
20318
|
function isNotLaterRippledVersion(source, target) {
|
20775
20319
|
if (source === target) {
|
20776
20320
|
return true;
|
@@ -20813,9 +20357,8 @@ function isNotLaterRippledVersion(source, target) {
|
|
20813
20357
|
function txNeedsNetworkID(client) {
|
20814
20358
|
if (client.networkID !== undefined &&
|
20815
20359
|
client.networkID > RESTRICTED_NETWORKS) {
|
20816
|
-
if (
|
20817
|
-
isNotLaterRippledVersion(REQUIRED_NETWORKID_VERSION, client.buildVersion))
|
20818
|
-
client.networkID === HOOKS_TESTNET_ID) {
|
20360
|
+
if (client.buildVersion &&
|
20361
|
+
isNotLaterRippledVersion(REQUIRED_NETWORKID_VERSION, client.buildVersion)) {
|
20819
20362
|
return true;
|
20820
20363
|
}
|
20821
20364
|
}
|
@@ -20997,8 +20540,9 @@ function getFeeXrp(client, cushion) {
|
|
20997
20540
|
var _a;
|
20998
20541
|
return __awaiter(this, void 0, void 0, function* () {
|
20999
20542
|
const feeCushion = cushion !== null && cushion !== void 0 ? cushion : client.feeCushion;
|
21000
|
-
const serverInfo = (yield client.request({
|
21001
|
-
|
20543
|
+
const serverInfo = (yield client.request({
|
20544
|
+
command: 'server_info',
|
20545
|
+
})).result.info;
|
21002
20546
|
const baseFee = (_a = serverInfo.validated_ledger) === null || _a === void 0 ? void 0 : _a.base_fee_xrp;
|
21003
20547
|
if (baseFee == null) {
|
21004
20548
|
throw new errors_1.XrplError('getFeeXrp: Could not get base_fee_xrp from server_info');
|
@@ -22608,7 +22152,7 @@ exports.xrpToDrops = xrpToDrops;
|
|
22608
22152
|
/***/ ((module) => {
|
22609
22153
|
|
22610
22154
|
"use strict";
|
22611
|
-
module.exports = /*#__PURE__*/JSON.parse('{"TYPES":{"Done":-1,"Unknown":-2,"NotPresent":0,"UInt16":1,"UInt32":2,"UInt64":3,"Hash128":4,"Hash256":5,"Amount":6,"Blob":7,"AccountID":8,"STObject":14,"STArray":15,"UInt8":16,"Hash160":17,"PathSet":18,"Vector256":19,"UInt96":20,"UInt192":21,"UInt384":22,"UInt512":23,"Issue":24,"XChainBridge":25,"Transaction":10001,"LedgerEntry":10002,"Validation":10003,"Metadata":10004},"LEDGER_ENTRY_TYPES":{"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"Bridge":105,"LedgerHashes":104,"Amendments":102,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116,"FeeSettings":115,"Escrow":117,"PayChannel":120,"Check":67,"DepositPreauth":112,"NegativeUNL":78,"NFTokenPage":80,"NFTokenOffer":55,"AMM":121,"DID":73,"Any":-3,"Child":-2,"Nickname":110,"Contract":99,"GeneratorMap":103},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["LedgerEntry",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"LedgerEntry"}],["Transaction",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Transaction"}],["Validation",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Validation"}],["Metadata",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Metadata"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["UNLModifyDisabling",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["HookResult",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["WasLockingChainSend",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransferFee",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TradingFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["DiscountedFee",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Version",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookStateChangeCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookEmitCount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookExecutionIndex",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookApiVersion",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["NetworkID",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketCount",{"nth":40,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketSequence",{"nth":41,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["NFTokenTaxon",{"nth":42,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["MintedNFTokens",{"nth":43,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BurnedNFTokens",{"nth":44,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HookStateCount",{"nth":45,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["EmitGeneration",{"nth":46,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["VoteWeight",{"nth":48,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstNFTokenSequence",{"nth":50,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["Cookie",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ServerVersion",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["NFTokenOfferNode",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmitBurden",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookOn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookInstructionCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookReturnCode",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ReferenceCount",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainClaimID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountCreateCount",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountClaimCount",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenID",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitParentTxnID",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitNonce",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitHookHash",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AMMID",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ValidatedHash",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousPageMin",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NextPageMin",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenBuyOffer",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenSellOffer",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookStateKey",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookHash",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookNamespace",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookSetTxnID",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Amount2",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMin",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMax",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["NFTokenBrokerFee",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BaseFeeDrops",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["ReserveBaseDrops",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["ReserveIncrementDrops",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenOut",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenIn",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["EPrice",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Price",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SignatureReward",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinAccountCreateAmount",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenBalance",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["URI",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["UNLModifyValidator",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToDisable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToReEnable",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookStateData",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookReturnString",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterName",{"nth":24,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterValue",{"nth":25,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["DIDDocument",{"nth":26,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Data",{"nth":27,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["NFTokenMinter",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["EmitCallback",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["HookAccount",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainSource",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainDestination",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationSignerAccount",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationRewardAccount",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["LockingChainDoor",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["IssuingChainDoor",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["NFTokenOffers",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["LockingChainIssue",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["IssuingChainIssue",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset2",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["XChainBridge",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"XChainBridge"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NFToken",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmitDetails",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Hook",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DisabledValidator",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmittedTxn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookExecution",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookDefinition",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookParameter",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookGrant",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["VoteEntry",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuctionSlot",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuthAccount",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimProofSig",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountProofSig",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["NFTokens",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Hooks",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["VoteSlots",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["DisabledValidators",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookExecutions",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookParameters",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookGrants",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainClaimAttestations",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainCreateAccountAttestations",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AuthAccounts",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telWRONG_NETWORK":-386,"telREQUIRES_NETWORK_ID":-385,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temINVALID_COUNT":-266,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temSEQ_AND_TICKET":-263,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_AMM_TOKENS":-261,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temEMPTY_DID":-254,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"tefNO_TICKET":-180,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"terPRE_TICKET":-88,"terNO_AMM":-87,"terSUBMITTED":-86,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152,"tecHOOK_REJECTED":153,"tecMAX_SEQUENCE_REACHED":154,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecINSUFFICIENT_FUNDS":159,"tecOBJECT_NOT_FOUND":160,"tecINSUFFICIENT_PAYMENT":161,"tecUNFUNDED_AMM":162,"tecAMM_BALANCE":163,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_EMPTY":166,"tecAMM_NOT_EMPTY":167,"tecAMM_ACCOUNT":168,"tecINCOMPLETE":169,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_WRONG_CHAIN":176,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecEMPTY_DID":187},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"SetHook":22,"NFTokenMint":25,"NFTokenBurn":26,"NFTokenCreateOffer":27,"NFTokenCancelOffer":28,"NFTokenAcceptOffer":29,"Clawback":30,"AMMCreate":35,"AMMDeposit":36,"AMMWithdraw":37,"AMMVote":38,"AMMBid":39,"AMMDelete":40,"XChainCreateClaimID":41,"XChainCommit":42,"XChainClaim":43,"XChainAccountCreateCommit":44,"XChainAddClaimAttestation":45,"XChainAddAccountCreateAttestation":46,"XChainModifyBridge":47,"XChainCreateBridge":48,"DIDSet":49,"DIDDelete":50,"EnableAmendment":100,"SetFee":101,"UNLModify":102}}');
|
22155
|
+
module.exports = /*#__PURE__*/JSON.parse('{"TYPES":{"Done":-1,"Unknown":-2,"NotPresent":0,"UInt16":1,"UInt32":2,"UInt64":3,"Hash128":4,"Hash256":5,"Amount":6,"Blob":7,"AccountID":8,"STObject":14,"STArray":15,"UInt8":16,"Hash160":17,"PathSet":18,"Vector256":19,"UInt96":20,"UInt192":21,"UInt384":22,"UInt512":23,"Issue":24,"XChainBridge":25,"Currency":26,"Transaction":10001,"LedgerEntry":10002,"Validation":10003,"Metadata":10004},"LEDGER_ENTRY_TYPES":{"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"Bridge":105,"LedgerHashes":104,"Amendments":102,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116,"FeeSettings":115,"Escrow":117,"PayChannel":120,"Check":67,"DepositPreauth":112,"NegativeUNL":78,"NFTokenPage":80,"NFTokenOffer":55,"AMM":121,"DID":73,"Oracle":128,"Any":-3,"Child":-2,"Nickname":110,"Contract":99,"GeneratorMap":103},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["LedgerEntry",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"LedgerEntry"}],["Transaction",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Transaction"}],["Validation",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Validation"}],["Metadata",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Metadata"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Scale",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["UNLModifyDisabling",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["HookResult",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["WasLockingChainSend",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransferFee",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TradingFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["DiscountedFee",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Version",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookStateChangeCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookEmitCount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookExecutionIndex",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookApiVersion",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["NetworkID",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastUpdateTime",{"nth":15,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketCount",{"nth":40,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketSequence",{"nth":41,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["NFTokenTaxon",{"nth":42,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["MintedNFTokens",{"nth":43,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BurnedNFTokens",{"nth":44,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HookStateCount",{"nth":45,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["EmitGeneration",{"nth":46,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["VoteWeight",{"nth":48,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstNFTokenSequence",{"nth":50,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OracleDocumentID",{"nth":51,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["Cookie",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ServerVersion",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["NFTokenOfferNode",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmitBurden",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookOn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookInstructionCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookReturnCode",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ReferenceCount",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainClaimID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountCreateCount",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountClaimCount",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["AssetPrice",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenID",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitParentTxnID",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitNonce",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitHookHash",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AMMID",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ValidatedHash",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousPageMin",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NextPageMin",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenBuyOffer",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenSellOffer",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookStateKey",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookHash",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookNamespace",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookSetTxnID",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Amount2",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMin",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMax",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["NFTokenBrokerFee",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BaseFeeDrops",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["ReserveBaseDrops",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["ReserveIncrementDrops",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenOut",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenIn",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["EPrice",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Price",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SignatureReward",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinAccountCreateAmount",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenBalance",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["URI",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["UNLModifyValidator",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToDisable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToReEnable",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookStateData",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookReturnString",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterName",{"nth":24,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterValue",{"nth":25,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["DIDDocument",{"nth":26,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Data",{"nth":27,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["AssetClass",{"nth":28,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Provider",{"nth":29,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["NFTokenMinter",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["EmitCallback",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["HookAccount",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainSource",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainDestination",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationSignerAccount",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationRewardAccount",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["LockingChainDoor",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["IssuingChainDoor",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["NFTokenOffers",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["BaseAsset",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Currency"}],["QuoteAsset",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Currency"}],["LockingChainIssue",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["IssuingChainIssue",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset2",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["XChainBridge",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"XChainBridge"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NFToken",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmitDetails",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Hook",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DisabledValidator",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmittedTxn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookExecution",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookDefinition",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookParameter",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookGrant",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["VoteEntry",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuctionSlot",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuthAccount",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimProofSig",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountProofSig",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PriceData",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["NFTokens",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Hooks",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["VoteSlots",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["DisabledValidators",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookExecutions",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookParameters",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookGrants",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainClaimAttestations",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainCreateAccountAttestations",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["PriceDataSeries",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AuthAccounts",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telWRONG_NETWORK":-386,"telREQUIRES_NETWORK_ID":-385,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telENV_RPC_FAILED":-383,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temINVALID_COUNT":-266,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temSEQ_AND_TICKET":-263,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_AMM_TOKENS":-261,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temEMPTY_DID":-254,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"tefNO_TICKET":-180,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"terPRE_TICKET":-88,"terNO_AMM":-87,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152,"tecHOOK_REJECTED":153,"tecMAX_SEQUENCE_REACHED":154,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecINSUFFICIENT_FUNDS":159,"tecOBJECT_NOT_FOUND":160,"tecINSUFFICIENT_PAYMENT":161,"tecUNFUNDED_AMM":162,"tecAMM_BALANCE":163,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_EMPTY":166,"tecAMM_NOT_EMPTY":167,"tecAMM_ACCOUNT":168,"tecINCOMPLETE":169,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_WRONG_CHAIN":176,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecEMPTY_DID":187,"tecINVALID_UPDATE_TIME":188,"tecTOKEN_PAIR_NOT_FOUND":189,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"SetHook":22,"NFTokenMint":25,"NFTokenBurn":26,"NFTokenCreateOffer":27,"NFTokenCancelOffer":28,"NFTokenAcceptOffer":29,"Clawback":30,"AMMCreate":35,"AMMDeposit":36,"AMMWithdraw":37,"AMMVote":38,"AMMBid":39,"AMMDelete":40,"XChainCreateClaimID":41,"XChainCommit":42,"XChainClaim":43,"XChainAccountCreateCommit":44,"XChainAddClaimAttestation":45,"XChainAddAccountCreateAttestation":46,"XChainModifyBridge":47,"XChainCreateBridge":48,"DIDSet":49,"DIDDelete":50,"OracleSet":51,"OracleDelete":52,"EnableAmendment":100,"SetFee":101,"UNLModify":102}}');
|
22612
22156
|
|
22613
22157
|
/***/ }),
|
22614
22158
|
|
@@ -22650,19 +22194,6 @@ module.exports = /*#__PURE__*/JSON.parse('["A","ABE","ACE","ACT","AD","ADA","ADD
|
|
22650
22194
|
/******/ }
|
22651
22195
|
/******/
|
22652
22196
|
/************************************************************************/
|
22653
|
-
/******/ /* webpack/runtime/global */
|
22654
|
-
/******/ (() => {
|
22655
|
-
/******/ __webpack_require__.g = (function() {
|
22656
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
22657
|
-
/******/ try {
|
22658
|
-
/******/ return this || new Function('return this')();
|
22659
|
-
/******/ } catch (e) {
|
22660
|
-
/******/ if (typeof window === 'object') return window;
|
22661
|
-
/******/ }
|
22662
|
-
/******/ })();
|
22663
|
-
/******/ })();
|
22664
|
-
/******/
|
22665
|
-
/************************************************************************/
|
22666
22197
|
/******/
|
22667
22198
|
/******/ // startup
|
22668
22199
|
/******/ // Load entry module and return exports
|