From afb9f9a53265ad61b4226d16d8c448f8f4936352 Mon Sep 17 00:00:00 2001 From: ayman Date: Sat, 15 Jun 2024 18:17:35 +0530 Subject: [PATCH 1/9] feat: add hybrid esm and cjs support --- package-lock.json | 2711 ++++++++++++----- package.json | 22 +- src/{ => cjs}/lib/combiner/index.d.ts | 2 +- src/{ => cjs}/lib/combiner/index.js | 8 +- .../lib/converter/global/globalXpub.d.ts | 0 .../lib/converter/global/globalXpub.js | 6 +- .../lib/converter/global/unsignedTx.d.ts | 0 .../lib/converter/global/unsignedTx.js | 4 +- src/cjs/lib/converter/index.d.ts | 109 + src/cjs/lib/converter/index.js | 100 + .../lib/converter/input/finalScriptSig.d.ts | 0 .../lib/converter/input/finalScriptSig.js | 6 +- .../converter/input/finalScriptWitness.d.ts | 0 .../lib/converter/input/finalScriptWitness.js | 6 +- .../lib/converter/input/nonWitnessUtxo.d.ts | 0 .../lib/converter/input/nonWitnessUtxo.js | 6 +- .../lib/converter/input/partialSig.d.ts | 0 .../lib/converter/input/partialSig.js | 6 +- .../lib/converter/input/porCommitment.d.ts | 0 .../lib/converter/input/porCommitment.js | 6 +- .../lib/converter/input/sighashType.d.ts | 0 .../lib/converter/input/sighashType.js | 6 +- .../lib/converter/input/tapKeySig.d.ts | 0 .../lib/converter/input/tapKeySig.js | 6 +- .../lib/converter/input/tapLeafScript.d.ts | 0 .../lib/converter/input/tapLeafScript.js | 6 +- .../lib/converter/input/tapMerkleRoot.d.ts | 0 .../lib/converter/input/tapMerkleRoot.js | 6 +- .../lib/converter/input/tapScriptSig.d.ts | 0 .../lib/converter/input/tapScriptSig.js | 6 +- .../lib/converter/input/witnessUtxo.d.ts | 0 .../lib/converter/input/witnessUtxo.js | 25 +- .../lib/converter/output/tapTree.d.ts | 0 src/{ => cjs}/lib/converter/output/tapTree.js | 19 +- .../lib/converter/shared/bip32Derivation.d.ts | 0 .../lib/converter/shared/bip32Derivation.js | 0 .../lib/converter/shared/checkPubkey.d.ts | 0 .../lib/converter/shared/checkPubkey.js | 0 .../lib/converter/shared/redeemScript.d.ts | 0 .../lib/converter/shared/redeemScript.js | 0 .../converter/shared/tapBip32Derivation.d.ts | 0 .../converter/shared/tapBip32Derivation.js | 64 + .../lib/converter/shared/tapInternalKey.d.ts | 0 .../lib/converter/shared/tapInternalKey.js | 0 .../lib/converter/shared/witnessScript.d.ts | 0 .../lib/converter/shared/witnessScript.js | 0 src/{ => cjs}/lib/converter/tools.d.ts | 0 src/{ => cjs}/lib/converter/tools.js | 13 +- src/{ => cjs}/lib/converter/varint.d.ts | 0 src/{ => cjs}/lib/converter/varint.js | 0 src/{ => cjs}/lib/interfaces.d.ts | 0 src/{ => cjs}/lib/interfaces.js | 0 src/{ => cjs}/lib/parser/fromBuffer.d.ts | 2 +- src/{ => cjs}/lib/parser/fromBuffer.js | 109 +- src/{ => cjs}/lib/parser/index.d.ts | 4 +- src/{ => cjs}/lib/parser/index.js | 4 +- src/{ => cjs}/lib/parser/toBuffer.d.ts | 2 +- src/{ => cjs}/lib/parser/toBuffer.js | 19 +- src/{ => cjs}/lib/psbt.d.ts | 0 src/{ => cjs}/lib/psbt.js | 48 +- src/{ => cjs}/lib/typeFields.d.ts | 0 src/{ => cjs}/lib/typeFields.js | 0 src/{ => cjs}/lib/utils.d.ts | 0 src/{ => cjs}/lib/utils.js | 13 +- src/esm/lib/combiner/index.d.ts | 2 + src/esm/lib/combiner/index.js | 80 + src/esm/lib/converter/global/globalXpub.d.ts | 6 + src/esm/lib/converter/global/globalXpub.js | 77 + src/esm/lib/converter/global/unsignedTx.d.ts | 2 + src/esm/lib/converter/global/unsignedTx.js | 7 + src/esm/lib/converter/index.d.ts | 109 + src/esm/lib/converter/index.js | 63 + .../lib/converter/input/finalScriptSig.d.ts | 6 + src/esm/lib/converter/input/finalScriptSig.js | 24 + .../converter/input/finalScriptWitness.d.ts | 6 + .../lib/converter/input/finalScriptWitness.js | 26 + .../lib/converter/input/nonWitnessUtxo.d.ts | 6 + src/esm/lib/converter/input/nonWitnessUtxo.js | 23 + src/esm/lib/converter/input/partialSig.d.ts | 6 + src/esm/lib/converter/input/partialSig.js | 59 + .../lib/converter/input/porCommitment.d.ts | 6 + src/esm/lib/converter/input/porCommitment.js | 24 + src/esm/lib/converter/input/sighashType.d.ts | 6 + src/esm/lib/converter/input/sighashType.js | 26 + src/esm/lib/converter/input/tapKeySig.d.ts | 6 + src/esm/lib/converter/input/tapKeySig.js | 26 + .../lib/converter/input/tapLeafScript.d.ts | 6 + src/esm/lib/converter/input/tapLeafScript.js | 51 + .../lib/converter/input/tapMerkleRoot.d.ts | 6 + src/esm/lib/converter/input/tapMerkleRoot.js | 24 + src/esm/lib/converter/input/tapScriptSig.d.ts | 6 + src/esm/lib/converter/input/tapScriptSig.js | 58 + src/esm/lib/converter/input/witnessUtxo.d.ts | 6 + src/esm/lib/converter/input/witnessUtxo.js | 42 + src/esm/lib/converter/output/tapTree.d.ts | 6 + src/esm/lib/converter/output/tapTree.js | 56 + .../lib/converter/shared/bip32Derivation.d.ts | 9 + .../lib/converter/shared/bip32Derivation.js | 81 + src/esm/lib/converter/shared/checkPubkey.d.ts | 3 + src/esm/lib/converter/shared/checkPubkey.js | 18 + .../lib/converter/shared/redeemScript.d.ts | 8 + src/esm/lib/converter/shared/redeemScript.js | 32 + .../converter/shared/tapBip32Derivation.d.ts | 8 + .../converter/shared/tapBip32Derivation.js | 9 +- .../lib/converter/shared/tapInternalKey.d.ts | 8 + .../lib/converter/shared/tapInternalKey.js | 36 + .../lib/converter/shared/witnessScript.d.ts | 8 + src/esm/lib/converter/shared/witnessScript.js | 34 + src/esm/lib/converter/tools.d.ts | 8 + src/esm/lib/converter/tools.js | 56 + src/esm/lib/converter/varint.d.ts | 4 + src/esm/lib/converter/varint.js | 72 + src/esm/lib/interfaces.d.ts | 115 + src/esm/lib/interfaces.js | 0 src/esm/lib/parser/fromBuffer.d.ts | 12 + src/esm/lib/parser/fromBuffer.js | 327 ++ src/esm/lib/parser/index.d.ts | 8 + src/esm/lib/parser/index.js | 2 + src/esm/lib/parser/toBuffer.d.ts | 9 + src/esm/lib/parser/toBuffer.js | 58 + src/esm/lib/psbt.d.ts | 25 + src/esm/lib/psbt.js | 148 + src/esm/lib/typeFields.d.ts | 33 + src/esm/lib/typeFields.js | 62 + src/esm/lib/utils.d.ts | 14 + src/esm/lib/utils.js | 127 + src/esm/tests/addInputOutput.d.ts | 1 + src/{ => esm}/tests/addInputOutput.js | 15 +- src/esm/tests/combine.d.ts | 1 + src/{ => esm}/tests/combine.js | 16 +- src/esm/tests/create.d.ts | 1 + src/{ => esm}/tests/create.js | 14 +- src/esm/tests/first.d.ts | 1 + src/{ => esm}/tests/first.js | 21 +- src/esm/tests/fixtures/combine.d.ts | 5 + src/{ => esm}/tests/fixtures/combine.js | 4 +- src/esm/tests/fixtures/create.d.ts | 47 + src/{ => esm}/tests/fixtures/create.js | 4 +- src/esm/tests/fixtures/first.d.ts | 27 + src/{ => esm}/tests/fixtures/first.js | 4 +- src/esm/tests/fixtures/fromBuffer.d.ts | 4 + src/{ => esm}/tests/fixtures/fromBuffer.js | 4 +- src/esm/tests/fixtures/invalid.d.ts | 4 + src/{ => esm}/tests/fixtures/invalid.js | 4 +- src/esm/tests/fixtures/keyValsToPsbt.d.ts | 38 + src/{ => esm}/tests/fixtures/keyValsToPsbt.js | 4 +- src/esm/tests/fixtures/methods.d.ts | 406 +++ src/{ => esm}/tests/fixtures/methods.js | 4 +- src/esm/tests/fixtures/update.d.ts | 87 + src/{ => esm}/tests/fixtures/update.js | 4 +- src/esm/tests/fixtures/valid.d.ts | 1 + src/{ => esm}/tests/fixtures/valid.js | 4 +- src/esm/tests/fixtures/varint.d.ts | 15 + src/{ => esm}/tests/fixtures/varint.js | 4 +- src/esm/tests/fromBIP/invalid.d.ts | 1 + src/{ => esm}/tests/fromBIP/invalid.js | 14 +- src/esm/tests/fromBIP/update.d.ts | 1 + src/{ => esm}/tests/fromBIP/update.js | 17 +- src/esm/tests/fromBIP/valid.d.ts | 1 + src/esm/tests/fromBIP/valid.js | 17 + src/esm/tests/fromBuffer.d.ts | 1 + src/{ => esm}/tests/fromBuffer.js | 12 +- src/esm/tests/keyValsToPsbt.d.ts | 1 + src/esm/tests/keyValsToPsbt.js | 27 + src/esm/tests/methods.d.ts | 1 + src/{ => esm}/tests/methods.js | 18 +- src/esm/tests/utils/txTools.d.ts | 16 + src/{ => esm}/tests/utils/txTools.js | 18 +- src/esm/tests/validation.d.ts | 1 + src/{ => esm}/tests/validation.js | 53 +- src/esm/tests/varint.d.ts | 1 + src/{ => esm}/tests/varint.js | 28 +- src/lib/converter/index.d.ts | 109 - src/lib/converter/index.js | 85 - src/tests/fromBIP/valid.js | 19 - src/tests/keyValsToPsbt.js | 29 - ts_src/lib/combiner/index.ts | 6 +- ts_src/lib/converter/global/globalXpub.ts | 2 +- ts_src/lib/converter/global/unsignedTx.ts | 2 +- ts_src/lib/converter/index.ts | 42 +- ts_src/lib/converter/input/finalScriptSig.ts | 2 +- .../lib/converter/input/finalScriptWitness.ts | 2 +- ts_src/lib/converter/input/nonWitnessUtxo.ts | 2 +- ts_src/lib/converter/input/partialSig.ts | 2 +- ts_src/lib/converter/input/porCommitment.ts | 2 +- ts_src/lib/converter/input/sighashType.ts | 2 +- ts_src/lib/converter/input/tapKeySig.ts | 2 +- ts_src/lib/converter/input/tapLeafScript.ts | 2 +- ts_src/lib/converter/input/tapMerkleRoot.ts | 2 +- ts_src/lib/converter/input/tapScriptSig.ts | 2 +- ts_src/lib/converter/input/witnessUtxo.ts | 6 +- ts_src/lib/converter/output/tapTree.ts | 4 +- .../converter/shared/tapBip32Derivation.ts | 4 +- ts_src/lib/converter/tools.ts | 2 +- ts_src/lib/parser/fromBuffer.ts | 10 +- ts_src/lib/parser/index.ts | 4 +- ts_src/lib/parser/toBuffer.ts | 6 +- ts_src/lib/psbt.ts | 8 +- ts_src/lib/utils.ts | 2 +- ts_src/tests/addInputOutput.ts | 6 +- ts_src/tests/combine.ts | 8 +- ts_src/tests/create.ts | 8 +- ts_src/tests/first.ts | 8 +- ts_src/tests/fromBIP/invalid.ts | 2 +- ts_src/tests/fromBIP/update.ts | 2 +- ts_src/tests/fromBIP/valid.ts | 2 +- ts_src/tests/fromBuffer.ts | 6 +- ts_src/tests/keyValsToPsbt.ts | 10 +- ts_src/tests/methods.ts | 8 +- ts_src/tests/utils/txTools.ts | 2 +- ts_src/tests/validation.ts | 8 +- ts_src/tests/varint.ts | 22 +- tsconfig.base.json | 27 + tsconfig.cjs.json | 10 + tsconfig.json | 33 +- 215 files changed, 5542 insertions(+), 1487 deletions(-) rename src/{ => cjs}/lib/combiner/index.d.ts (58%) rename src/{ => cjs}/lib/combiner/index.js (92%) rename src/{ => cjs}/lib/converter/global/globalXpub.d.ts (100%) rename src/{ => cjs}/lib/converter/global/globalXpub.js (92%) rename src/{ => cjs}/lib/converter/global/unsignedTx.d.ts (100%) rename src/{ => cjs}/lib/converter/global/unsignedTx.js (58%) create mode 100644 src/cjs/lib/converter/index.d.ts create mode 100644 src/cjs/lib/converter/index.js rename src/{ => cjs}/lib/converter/input/finalScriptSig.d.ts (100%) rename src/{ => cjs}/lib/converter/input/finalScriptSig.js (76%) rename src/{ => cjs}/lib/converter/input/finalScriptWitness.d.ts (100%) rename src/{ => cjs}/lib/converter/input/finalScriptWitness.js (76%) rename src/{ => cjs}/lib/converter/input/nonWitnessUtxo.d.ts (100%) rename src/{ => cjs}/lib/converter/input/nonWitnessUtxo.js (76%) rename src/{ => cjs}/lib/converter/input/partialSig.d.ts (100%) rename src/{ => cjs}/lib/converter/input/partialSig.js (90%) rename src/{ => cjs}/lib/converter/input/porCommitment.d.ts (100%) rename src/{ => cjs}/lib/converter/input/porCommitment.js (77%) rename src/{ => cjs}/lib/converter/input/sighashType.d.ts (100%) rename src/{ => cjs}/lib/converter/input/sighashType.js (78%) rename src/{ => cjs}/lib/converter/input/tapKeySig.d.ts (100%) rename src/{ => cjs}/lib/converter/input/tapKeySig.js (81%) rename src/{ => cjs}/lib/converter/input/tapLeafScript.d.ts (100%) rename src/{ => cjs}/lib/converter/input/tapLeafScript.js (89%) rename src/{ => cjs}/lib/converter/input/tapMerkleRoot.d.ts (100%) rename src/{ => cjs}/lib/converter/input/tapMerkleRoot.js (80%) rename src/{ => cjs}/lib/converter/input/tapScriptSig.d.ts (100%) rename src/{ => cjs}/lib/converter/input/tapScriptSig.js (89%) rename src/{ => cjs}/lib/converter/input/witnessUtxo.d.ts (100%) rename src/{ => cjs}/lib/converter/input/witnessUtxo.js (64%) rename src/{ => cjs}/lib/converter/output/tapTree.d.ts (100%) rename src/{ => cjs}/lib/converter/output/tapTree.js (74%) rename src/{ => cjs}/lib/converter/shared/bip32Derivation.d.ts (100%) rename src/{ => cjs}/lib/converter/shared/bip32Derivation.js (100%) rename src/{ => cjs}/lib/converter/shared/checkPubkey.d.ts (100%) rename src/{ => cjs}/lib/converter/shared/checkPubkey.js (100%) rename src/{ => cjs}/lib/converter/shared/redeemScript.d.ts (100%) rename src/{ => cjs}/lib/converter/shared/redeemScript.js (100%) rename src/{ => cjs}/lib/converter/shared/tapBip32Derivation.d.ts (100%) create mode 100644 src/cjs/lib/converter/shared/tapBip32Derivation.js rename src/{ => cjs}/lib/converter/shared/tapInternalKey.d.ts (100%) rename src/{ => cjs}/lib/converter/shared/tapInternalKey.js (100%) rename src/{ => cjs}/lib/converter/shared/witnessScript.d.ts (100%) rename src/{ => cjs}/lib/converter/shared/witnessScript.js (100%) rename src/{ => cjs}/lib/converter/tools.d.ts (100%) rename src/{ => cjs}/lib/converter/tools.js (85%) rename src/{ => cjs}/lib/converter/varint.d.ts (100%) rename src/{ => cjs}/lib/converter/varint.js (100%) rename src/{ => cjs}/lib/interfaces.d.ts (100%) rename src/{ => cjs}/lib/interfaces.js (100%) rename src/{ => cjs}/lib/parser/fromBuffer.d.ts (93%) rename src/{ => cjs}/lib/parser/fromBuffer.js (77%) rename src/{ => cjs}/lib/parser/index.d.ts (73%) rename src/{ => cjs}/lib/parser/index.js (69%) rename src/{ => cjs}/lib/parser/toBuffer.d.ts (88%) rename src/{ => cjs}/lib/parser/toBuffer.js (80%) rename src/{ => cjs}/lib/psbt.d.ts (100%) rename src/{ => cjs}/lib/psbt.js (70%) rename src/{ => cjs}/lib/typeFields.d.ts (100%) rename src/{ => cjs}/lib/typeFields.js (100%) rename src/{ => cjs}/lib/utils.d.ts (100%) rename src/{ => cjs}/lib/utils.js (92%) create mode 100644 src/esm/lib/combiner/index.d.ts create mode 100644 src/esm/lib/combiner/index.js create mode 100644 src/esm/lib/converter/global/globalXpub.d.ts create mode 100644 src/esm/lib/converter/global/globalXpub.js create mode 100644 src/esm/lib/converter/global/unsignedTx.d.ts create mode 100644 src/esm/lib/converter/global/unsignedTx.js create mode 100644 src/esm/lib/converter/index.d.ts create mode 100644 src/esm/lib/converter/index.js create mode 100644 src/esm/lib/converter/input/finalScriptSig.d.ts create mode 100644 src/esm/lib/converter/input/finalScriptSig.js create mode 100644 src/esm/lib/converter/input/finalScriptWitness.d.ts create mode 100644 src/esm/lib/converter/input/finalScriptWitness.js create mode 100644 src/esm/lib/converter/input/nonWitnessUtxo.d.ts create mode 100644 src/esm/lib/converter/input/nonWitnessUtxo.js create mode 100644 src/esm/lib/converter/input/partialSig.d.ts create mode 100644 src/esm/lib/converter/input/partialSig.js create mode 100644 src/esm/lib/converter/input/porCommitment.d.ts create mode 100644 src/esm/lib/converter/input/porCommitment.js create mode 100644 src/esm/lib/converter/input/sighashType.d.ts create mode 100644 src/esm/lib/converter/input/sighashType.js create mode 100644 src/esm/lib/converter/input/tapKeySig.d.ts create mode 100644 src/esm/lib/converter/input/tapKeySig.js create mode 100644 src/esm/lib/converter/input/tapLeafScript.d.ts create mode 100644 src/esm/lib/converter/input/tapLeafScript.js create mode 100644 src/esm/lib/converter/input/tapMerkleRoot.d.ts create mode 100644 src/esm/lib/converter/input/tapMerkleRoot.js create mode 100644 src/esm/lib/converter/input/tapScriptSig.d.ts create mode 100644 src/esm/lib/converter/input/tapScriptSig.js create mode 100644 src/esm/lib/converter/input/witnessUtxo.d.ts create mode 100644 src/esm/lib/converter/input/witnessUtxo.js create mode 100644 src/esm/lib/converter/output/tapTree.d.ts create mode 100644 src/esm/lib/converter/output/tapTree.js create mode 100644 src/esm/lib/converter/shared/bip32Derivation.d.ts create mode 100644 src/esm/lib/converter/shared/bip32Derivation.js create mode 100644 src/esm/lib/converter/shared/checkPubkey.d.ts create mode 100644 src/esm/lib/converter/shared/checkPubkey.js create mode 100644 src/esm/lib/converter/shared/redeemScript.d.ts create mode 100644 src/esm/lib/converter/shared/redeemScript.js create mode 100644 src/esm/lib/converter/shared/tapBip32Derivation.d.ts rename src/{ => esm}/lib/converter/shared/tapBip32Derivation.js (86%) create mode 100644 src/esm/lib/converter/shared/tapInternalKey.d.ts create mode 100644 src/esm/lib/converter/shared/tapInternalKey.js create mode 100644 src/esm/lib/converter/shared/witnessScript.d.ts create mode 100644 src/esm/lib/converter/shared/witnessScript.js create mode 100644 src/esm/lib/converter/tools.d.ts create mode 100644 src/esm/lib/converter/tools.js create mode 100644 src/esm/lib/converter/varint.d.ts create mode 100644 src/esm/lib/converter/varint.js create mode 100644 src/esm/lib/interfaces.d.ts create mode 100644 src/esm/lib/interfaces.js create mode 100644 src/esm/lib/parser/fromBuffer.d.ts create mode 100644 src/esm/lib/parser/fromBuffer.js create mode 100644 src/esm/lib/parser/index.d.ts create mode 100644 src/esm/lib/parser/index.js create mode 100644 src/esm/lib/parser/toBuffer.d.ts create mode 100644 src/esm/lib/parser/toBuffer.js create mode 100644 src/esm/lib/psbt.d.ts create mode 100644 src/esm/lib/psbt.js create mode 100644 src/esm/lib/typeFields.d.ts create mode 100644 src/esm/lib/typeFields.js create mode 100644 src/esm/lib/utils.d.ts create mode 100644 src/esm/lib/utils.js create mode 100644 src/esm/tests/addInputOutput.d.ts rename src/{ => esm}/tests/addInputOutput.js (78%) create mode 100644 src/esm/tests/combine.d.ts rename src/{ => esm}/tests/combine.js (66%) create mode 100644 src/esm/tests/create.d.ts rename src/{ => esm}/tests/create.js (61%) create mode 100644 src/esm/tests/first.d.ts rename src/{ => esm}/tests/first.js (55%) create mode 100644 src/esm/tests/fixtures/combine.d.ts rename src/{ => esm}/tests/fixtures/combine.js (99%) create mode 100644 src/esm/tests/fixtures/create.d.ts rename src/{ => esm}/tests/fixtures/create.js (98%) create mode 100644 src/esm/tests/fixtures/first.d.ts rename src/{ => esm}/tests/fixtures/first.js (96%) create mode 100644 src/esm/tests/fixtures/fromBuffer.d.ts rename src/{ => esm}/tests/fixtures/fromBuffer.js (80%) create mode 100644 src/esm/tests/fixtures/invalid.d.ts rename src/{ => esm}/tests/fixtures/invalid.js (99%) create mode 100644 src/esm/tests/fixtures/keyValsToPsbt.d.ts rename src/{ => esm}/tests/fixtures/keyValsToPsbt.js (98%) create mode 100644 src/esm/tests/fixtures/methods.d.ts rename src/{ => esm}/tests/fixtures/methods.js (99%) create mode 100644 src/esm/tests/fixtures/update.d.ts rename src/{ => esm}/tests/fixtures/update.js (99%) create mode 100644 src/esm/tests/fixtures/valid.d.ts rename src/{ => esm}/tests/fixtures/valid.js (99%) create mode 100644 src/esm/tests/fixtures/varint.d.ts rename src/{ => esm}/tests/fixtures/varint.js (91%) create mode 100644 src/esm/tests/fromBIP/invalid.d.ts rename src/{ => esm}/tests/fromBIP/invalid.js (63%) create mode 100644 src/esm/tests/fromBIP/update.d.ts rename src/{ => esm}/tests/fromBIP/update.js (54%) create mode 100644 src/esm/tests/fromBIP/valid.d.ts create mode 100644 src/esm/tests/fromBIP/valid.js create mode 100644 src/esm/tests/fromBuffer.d.ts rename src/{ => esm}/tests/fromBuffer.js (60%) create mode 100644 src/esm/tests/keyValsToPsbt.d.ts create mode 100644 src/esm/tests/keyValsToPsbt.js create mode 100644 src/esm/tests/methods.d.ts rename src/{ => esm}/tests/methods.js (71%) create mode 100644 src/esm/tests/utils/txTools.d.ts rename src/{ => esm}/tests/utils/txTools.js (58%) create mode 100644 src/esm/tests/validation.d.ts rename src/{ => esm}/tests/validation.js (69%) create mode 100644 src/esm/tests/varint.d.ts rename src/{ => esm}/tests/varint.js (73%) delete mode 100644 src/lib/converter/index.d.ts delete mode 100644 src/lib/converter/index.js delete mode 100644 src/tests/fromBIP/valid.js delete mode 100644 src/tests/keyValsToPsbt.js create mode 100644 tsconfig.base.json create mode 100644 tsconfig.cjs.json diff --git a/package-lock.json b/package-lock.json index c056b9c..4173980 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,95 +1,144 @@ { "name": "bip174", "version": "2.1.1", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@babel/code-frame": { + "packages": { + "": { + "name": "bip174", + "version": "2.1.1", + "license": "MIT", + "devDependencies": { + "@types/node": "12.0.8", + "@types/tape": "4.2.33", + "bitcoinjs-lib": "^5.0.5", + "nyc": "^14.1.1", + "prettier": "^1.18.2", + "rimraf": "^2.6.3", + "tape": "^5.3.0", + "tslint": "5.17.0", + "typescript": "3.5.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@babel/code-frame": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", "dev": true, - "requires": { + "dependencies": { "@babel/highlight": "^7.22.10", "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/generator": { + "node_modules/@babel/generator": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.22.10", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-hoist-variables": { + "node_modules/@babel/helper-hoist-variables": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-split-export-declaration": { + "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-string-parser": { + "node_modules/@babel/helper-string-parser": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helper-validator-identifier": { + "node_modules/@babel/helper-validator-identifier": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/highlight": { + "node_modules/@babel/highlight": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/parser": { + "node_modules/@babel/parser": { "version": "7.22.11", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", - "dev": true + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } }, - "@babel/template": { + "node_modules/@babel/template": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.22.5", "@babel/parser": "^7.22.5", "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/traverse": { + "node_modules/@babel/traverse": { "version": "7.23.2", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.22.13", "@babel/generator": "^7.23.0", "@babel/helper-environment-visitor": "^7.22.20", @@ -101,268 +150,390 @@ "debug": "^4.1.0", "globals": "^11.1.0" }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, "dependencies": { - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - } - }, - "@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "requires": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true - }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - } - }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - } + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/types": { + "node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { "version": "7.22.11", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-string-parser": "^7.22.5", "@babel/helper-validator-identifier": "^7.22.5", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@jridgewell/gen-mapping": { + "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" } }, - "@jridgewell/resolve-uri": { + "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "@jridgewell/set-array": { + "node_modules/@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "@jridgewell/sourcemap-codec": { + "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, - "@jridgewell/trace-mapping": { + "node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "@types/node": { + "node_modules/@ljharb/resumer": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", + "integrity": "sha512-d+tsDgfkj9X5QTriqM4lKesCkMMJC3IrbPKHvayP00ELx2axdXvDfWkqjxrLXIzGcQzmj7VAUT1wopqARTvafw==", + "dev": true, + "dependencies": { + "@ljharb/through": "^2.3.13", + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", + "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@types/node": { "version": "12.0.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.8.tgz", "integrity": "sha512-b8bbUOTwzIY3V5vDTY1fIJ+ePKDUBqt2hC2woVGotdQQhG/2Sh62HOKHrT7ab+VerXAcPyAiTEipPu/FsreUtg==", "dev": true }, - "@types/tape": { + "node_modules/@types/tape": { "version": "4.2.33", "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.2.33.tgz", "integrity": "sha512-ltfyuY5BIkYlGuQfwqzTDT8f0q8Z5DGppvUnWGs39oqDmMd6/UWhNpX3ZMh/VYvfxs3rFGHMrLC/eGRdLiDGuw==", "dev": true, - "requires": { + "dependencies": { "@types/node": "*" } }, - "ansi-regex": { + "node_modules/ansi-regex": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "ansi-styles": { + "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "requires": { + "dependencies": { "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "append-transform": { + "node_modules/append-transform": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", "dev": true, - "requires": { + "dependencies": { "default-require-extensions": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "archy": { + "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, - "argparse": { + "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "requires": { + "dependencies": { "sprintf-js": "~1.0.2" } }, - "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "arraybuffer.prototype.slice": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", - "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "node_modules/array.prototype.every": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.6.tgz", + "integrity": "sha512-gNEqZD97w6bfQRNmHkFv7rNnGM+VWyHZT+h/rf9C+22owcXuENr66Lfo0phItpU5KoXW6Owb34q2+8MnSIZ57w==", "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base-x": { + "node_modules/base-x": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.0.1" } }, - "bech32": { + "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", "dev": true }, - "bindings": { + "node_modules/bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "dev": true, - "requires": { + "dependencies": { "file-uri-to-path": "1.0.0" } }, - "bip174": { + "node_modules/bip174": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.0.tgz", "integrity": "sha512-lkc0XyiX9E9KiVAS1ZiOqK1xfiwvf4FXDDdkDq5crcDzOq+xGytY+14qCsqz7kCiy8rpN1CRNfacRhf9G3JNSA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.0.0" + } }, - "bip32": { + "node_modules/bip32": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", "dev": true, - "requires": { + "dependencies": { "@types/node": "10.12.18", "bs58check": "^2.1.1", "create-hash": "^1.2.0", @@ -371,36 +542,37 @@ "typeforce": "^1.11.5", "wif": "^2.0.6" }, - "dependencies": { - "@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", - "dev": true - } + "engines": { + "node": ">=6.0.0" } }, - "bip66": { + "node_modules/bip32/node_modules/@types/node": { + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", + "dev": true + }, + "node_modules/bip66": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.0.1" } }, - "bitcoin-ops": { + "node_modules/bitcoin-ops": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==", "dev": true }, - "bitcoinjs-lib": { + "node_modules/bitcoinjs-lib": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz", "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==", "dev": true, - "requires": { + "dependencies": { "bech32": "^1.1.2", "bip174": "^2.0.1", "bip32": "^2.0.4", @@ -416,174 +588,201 @@ "typeforce": "^1.11.3", "varuint-bitcoin": "^1.0.4", "wif": "^2.0.1" + }, + "engines": { + "node": ">=8.0.0" } }, - "bn.js": { + "node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "brorand": { + "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", "dev": true }, - "bs58": { + "node_modules/bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, - "requires": { + "dependencies": { "base-x": "^3.0.2" } }, - "bs58check": { + "node_modules/bs58check": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, - "requires": { + "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", "safe-buffer": "^5.1.2" } }, - "builtin-modules": { + "node_modules/builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "caching-transform": { + "node_modules/caching-transform": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", "dev": true, - "requires": { + "dependencies": { "hasha": "^3.0.0", "make-dir": "^2.0.0", "package-hash": "^3.0.0", "write-file-atomic": "^2.4.2" + }, + "engines": { + "node": ">=6" } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "camelcase": { + "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "chalk": { + "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "cipher-base": { + "node_modules/cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, - "requires": { + "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, - "cliui": { + "node_modules/cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, - "requires": { + "dependencies": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", "wrap-ansi": "^5.1.0" } }, - "color-convert": { + "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "requires": { + "dependencies": { "color-name": "1.1.3" } }, - "color-name": { + "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "commander": { + "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "commondir": { + "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "convert-source-map": { + "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "cp-file": { + "node_modules/cp-file": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.2", "make-dir": "^2.0.0", "nested-error-stacks": "^2.0.0", "pify": "^4.0.1", "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=6" } }, - "create-hash": { + "node_modules/create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, - "requires": { + "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", "md5.js": "^1.3.4", @@ -591,12 +790,12 @@ "sha.js": "^2.4.0" } }, - "create-hmac": { + "node_modules/create-hmac": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, - "requires": { + "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", "inherits": "^2.0.1", @@ -605,91 +804,207 @@ "sha.js": "^2.4.8" } }, - "cross-spawn": { + "node_modules/cross-spawn": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", "dev": true, - "requires": { + "dependencies": { "lru-cache": "^4.0.1", "which": "^1.2.9" } }, - "debug": { + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "requires": { + "dependencies": { "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "decamelize": { + "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "default-require-extensions": { + "node_modules/default-require-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", "integrity": "sha512-B0n2zDIXpzLzKeoEozorDSa1cHc1t0NjmxP0zuAxbizNU2MBqYJJKYXrrFdKuQliojXynrxgd7l4ahfg/+aA5g==", "dev": true, - "requires": { + "dependencies": { "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, - "requires": { + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "defined": { + "node_modules/defined": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "diff": { + "node_modules/diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.3.1" + } }, - "dotignore": { + "node_modules/dotignore": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", "dev": true, - "requires": { + "dependencies": { "minimatch": "^3.0.4" + }, + "bin": { + "ignored": "bin/ignored" } }, - "elliptic": { + "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, - "requires": { + "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", "hash.js": "^1.0.0", @@ -699,577 +1014,956 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "emoji-regex": { + "node_modules/emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "error-ex": { + "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "requires": { + "dependencies": { "is-arrayish": "^0.2.1" } }, - "es-abstract": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", - "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.1", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.1", - "get-symbol-description": "^1.0.0", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.0", - "safe-array-concat": "^1.0.0", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.10" + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dev": true, - "requires": { + "dependencies": { + "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "es-to-primitive": { + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "requires": { + "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "es6-error": { + "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, - "escape-string-regexp": { + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, - "esprima": { + "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } }, - "file-uri-to-path": { + "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, - "find-cache-dir": { + "node_modules/find-cache-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, - "requires": { + "dependencies": { "commondir": "^1.0.1", "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "find-up": { + "node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "requires": { + "dependencies": { "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "for-each": { + "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "requires": { + "dependencies": { "is-callable": "^1.1.3" } }, - "foreground-child": { + "node_modules/foreground-child": { "version": "1.5.6", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", "integrity": "sha512-3TOY+4TKV0Ml83PXJQY+JFQaHNV38lzQDIzzXYg1kWdBLenGgoZhAs0CKgzI31vi2pWEpQMq/Yi4bpKwCPkw7g==", "dev": true, - "requires": { + "dependencies": { "cross-spawn": "^4", "signal-exit": "^3.0.0" } }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "functions-have-names": { + "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "get-caller-file": { + "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } }, - "get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "glob": { + "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "requires": { + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "globals": { + "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, - "requires": { - "define-properties": "^1.1.3" + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "gopd": { + "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "requires": { + "dependencies": { "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "graceful-fs": { + "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "has": { + "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "requires": { + "dependencies": { "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" } }, - "has-bigints": { + "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-dynamic-import": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.1.0.tgz", + "integrity": "sha512-su0anMkNEnJKZ/rB99jn3y6lV/J8Ro96hBJ28YAeVzj5rWxH+YL/AdCyiYYA1HDLV9YhmvqpWSJJj2KLo1MX6g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "has-flag": { + "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "has-symbols": { + "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, - "requires": { - "has-symbols": "^1.0.2" + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "hash-base": { + "node_modules/hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, - "requires": { + "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" } }, - "hash.js": { + "node_modules/hash.js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, - "requires": { + "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, - "hasha": { + "node_modules/hasha": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", "integrity": "sha512-w0Kz8lJFBoyaurBiNrIvxPqr/gJ6fOfSkpAPOepN3oECqGJag37xPbOv57izi/KP8auHgNYxn5fXtAb+1LsJ6w==", "dev": true, - "requires": { + "dependencies": { "is-stream": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" } }, - "hmac-drbg": { + "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "dev": true, - "requires": { + "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, - "hosted-git-info": { + "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "html-escaper": { + "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "imurmurhash": { + "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.19" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "requires": { + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, - "requires": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" } }, - "is-arguments": { + "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-arrayish": { + "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, - "is-bigint": { + "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "requires": { + "dependencies": { "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-boolean-object": { + "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-callable": { + "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "is-core-module": { + "node_modules/is-core-module": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, - "requires": { + "dependencies": { "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-date-object": { + "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, - "requires": { + "dependencies": { "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-fullwidth-code-point": { + "node_modules/is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "is-number-object": { + "node_modules/is-number-object": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "requires": { + "dependencies": { "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-regex": { + "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, - "requires": { - "call-bind": "^1.0.2" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-stream": { + "node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "is-string": { + "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "requires": { + "dependencies": { "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-symbol": { + "node_modules/is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "requires": { + "dependencies": { "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, - "requires": { - "which-typed-array": "^1.1.11" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-weakref": { + "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "isarray": { + "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "isexe": { + "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "istanbul-lib-coverage": { + "node_modules/istanbul-lib-coverage": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "istanbul-lib-hook": { + "node_modules/istanbul-lib-hook": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", "dev": true, - "requires": { + "dependencies": { "append-transform": "^1.0.0" + }, + "engines": { + "node": ">=6" } }, - "istanbul-lib-instrument": { + "node_modules/istanbul-lib-instrument": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", "dev": true, - "requires": { + "dependencies": { "@babel/generator": "^7.4.0", "@babel/parser": "^7.4.3", "@babel/template": "^7.4.0", @@ -1278,241 +1972,303 @@ "istanbul-lib-coverage": "^2.0.5", "semver": "^6.0.0" }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, - "istanbul-lib-report": { + "node_modules/istanbul-lib-report": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", "dev": true, - "requires": { + "dependencies": { "istanbul-lib-coverage": "^2.0.5", "make-dir": "^2.1.0", "supports-color": "^6.1.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "istanbul-lib-source-maps": { + "node_modules/istanbul-lib-source-maps": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", "dev": true, - "requires": { + "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^2.0.5", "make-dir": "^2.1.0", "rimraf": "^2.6.3", "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6" } }, - "istanbul-reports": { + "node_modules/istanbul-reports": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", "dev": true, - "requires": { + "dependencies": { "html-escaper": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "js-tokens": { + "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { + "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "requires": { + "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "jsesc": { + "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } }, - "json-parse-better-errors": { + "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "load-json-file": { + "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^4.0.0", "pify": "^3.0.0", "strip-bom": "^3.0.0" }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - } + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" } }, - "locate-path": { + "node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "requires": { + "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "lodash.flattendeep": { + "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, - "lru-cache": { + "node_modules/lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, - "requires": { + "dependencies": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" } }, - "make-dir": { + "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, - "requires": { + "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" } }, - "md5.js": { + "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, - "requires": { + "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", "safe-buffer": "^5.1.2" } }, - "merge-source-map": { + "node_modules/merge-source-map": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", "dev": true, - "requires": { + "dependencies": { "source-map": "^0.6.1" } }, - "merkle-lib": { + "node_modules/merkle-lib": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz", "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA==", "dev": true }, - "minimalistic-assert": { + "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, - "minimalistic-crypto-utils": { + "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", "dev": true }, - "minimatch": { + "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "requires": { + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "minimist": { + "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "mkdirp": { + "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, - "requires": { + "dependencies": { "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mock-property": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.0.3.tgz", + "integrity": "sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "functions-have-names": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "hasown": "^2.0.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "ms": { + "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nan": { + "node_modules/nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", "dev": true }, - "nested-error-stacks": { + "node_modules/nested-error-stacks": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", "dev": true }, - "normalize-package-data": { + "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "requires": { + "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, - "nyc": { + "node_modules/nyc": { "version": "14.1.1", "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", "dev": true, - "requires": { + "dependencies": { "archy": "^1.0.0", "caching-transform": "^3.0.2", "convert-source-map": "^1.6.0", @@ -1538,372 +2294,548 @@ "uuid": "^3.3.2", "yargs": "^13.2.2", "yargs-parser": "^13.0.0" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=6" } }, - "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "object-keys": { + "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + } }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": { + "dependencies": { "wrappy": "1" } }, - "os-homedir": { + "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "p-limit": { + "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "requires": { + "dependencies": { "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "node_modules/p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "requires": { + "dependencies": { "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "p-try": { + "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "package-hash": { + "node_modules/package-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.15", "hasha": "^3.0.0", "lodash.flattendeep": "^4.4.0", "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=6" } }, - "parse-json": { + "node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, - "requires": { + "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" } }, - "path-exists": { + "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-type": { + "node_modules/path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, - "requires": { + "dependencies": { "pify": "^3.0.0" }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - } + "engines": { + "node": ">=4" + } + }, + "node_modules/path-type/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" } }, - "pify": { + "node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "pkg-dir": { + "node_modules/pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, - "requires": { + "dependencies": { "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" } }, - "prettier": { + "node_modules/prettier": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } }, - "pseudomap": { + "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "pushdata-bitcoin": { + "node_modules/pushdata-bitcoin": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==", "dev": true, - "requires": { + "dependencies": { "bitcoin-ops": "^1.3.0" } }, - "randombytes": { + "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.1.0" } }, - "read-pkg": { + "node_modules/read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", "dev": true, - "requires": { + "dependencies": { "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "read-pkg-up": { + "node_modules/read-pkg-up": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", "dev": true, - "requires": { + "dependencies": { "find-up": "^3.0.0", "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "readable-stream": { + "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, - "requires": { + "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, - "regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "release-zalgo": { + "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, - "requires": { + "dependencies": { "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "require-main-filename": { + "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "resolve": { + "node_modules/resolve": { "version": "1.22.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dev": true, - "requires": { + "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "resolve-from": { + "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha512-Fn9X8rX8yYF4m81rZCK/5VmrmsSbqS/i3rDLl6ZZHAXgC2nTAx3dhwG8q8odP/RmdLa2YrybDJaAMg+X1ajY3w==", "dev": true, - "requires": { - "through": "~2.3.4" + "engines": { + "node": ">=4" } }, - "rimraf": { + "node_modules/rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "requires": { + "dependencies": { "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" } }, - "ripemd160": { + "node_modules/ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, - "requires": { + "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, - "safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "safe-buffer": { + "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "semver": { + "node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true + "dev": true, + "bin": { + "semver": "bin/semver" + } }, - "set-blocking": { + "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, - "sha.js": { + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, - "requires": { + "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" } }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "signal-exit": { + "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "source-map": { + "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "spawn-wrap": { + "node_modules/spawn-wrap": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", "dev": true, - "requires": { + "dependencies": { "foreground-child": "^1.5.6", "mkdirp": "^0.5.0", "os-homedir": "^1.0.1", @@ -1912,199 +2844,279 @@ "which": "^1.3.0" } }, - "spdx-correct": { + "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, - "requires": { + "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-exceptions": { + "node_modules/spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, - "spdx-expression-parse": { + "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "requires": { + "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-license-ids": { + "node_modules/spdx-license-ids": { "version": "3.0.13", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "string-width": { + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "requires": { + "dependencies": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" } }, - "string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, - "requires": { - "safe-buffer": "~5.2.0" + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, - "requires": { + "dependencies": { "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" } }, - "strip-bom": { + "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "requires": { + "dependencies": { "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "supports-preserve-symlinks-flag": { + "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "tape": { - "version": "4.15.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.15.0.tgz", - "integrity": "sha512-SfRmG2I8QGGgJE/MCiLH8c11L5XxyUXxwK9xLRD0uiK5fehRkkSZGmR6Y1pxOt8vJ19m3sY+POTQpiaVv45/LQ==", - "dev": true, - "requires": { - "call-bind": "~1.0.2", - "deep-equal": "~1.1.1", - "defined": "~1.0.0", - "dotignore": "~0.1.2", - "for-each": "~0.3.3", - "glob": "~7.2.0", - "has": "~1.0.3", - "inherits": "~2.0.4", - "is-regex": "~1.1.4", - "minimist": "~1.2.5", - "object-inspect": "~1.12.0", - "resolve": "~1.22.0", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.2.5", - "through": "~2.3.8" - } - }, - "test-exclude": { + "node_modules/tape": { + "version": "5.7.5", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.5.tgz", + "integrity": "sha512-C5Gm1MR8ujZmNrsmOiHSkKFfY2thrnUrFw/fFtcva9FABbN7LrHuQPi3MTS0Z0i/SLfYSJtRIcJYDUpwPsQ8yA==", + "dev": true, + "dependencies": { + "@ljharb/resumer": "^0.1.2", + "@ljharb/through": "^2.3.12", + "array.prototype.every": "^1.1.5", + "call-bind": "^1.0.7", + "deep-equal": "^2.2.3", + "defined": "^1.0.1", + "dotignore": "^0.1.2", + "for-each": "^0.3.3", + "get-package-type": "^0.1.0", + "glob": "^7.2.3", + "has-dynamic-import": "^2.1.0", + "hasown": "^2.0.1", + "inherits": "^2.0.4", + "is-regex": "^1.1.4", + "minimist": "^1.2.8", + "mock-property": "^1.0.3", + "object-inspect": "^1.13.1", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "resolve": "^2.0.0-next.5", + "string.prototype.trim": "^1.2.8" + }, + "bin": { + "tape": "bin/tape" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tape/node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", "dev": true, - "requires": { + "dependencies": { "glob": "^7.1.3", "minimatch": "^3.0.4", "read-pkg-up": "^4.0.0", "require-main-filename": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true - }, - "tiny-secp256k1": { + "node_modules/tiny-secp256k1": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", "dev": true, - "requires": { + "hasInstallScript": true, + "dependencies": { "bindings": "^1.3.0", "bn.js": "^4.11.8", "create-hmac": "^1.1.7", "elliptic": "^6.4.0", "nan": "^2.13.2" + }, + "engines": { + "node": ">=6.0.0" } }, - "to-fast-properties": { + "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "tslib": { + "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "tslint": { + "node_modules/tslint": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", @@ -2118,215 +3130,300 @@ "semver": "^5.3.0", "tslib": "^1.8.0", "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" } }, - "tsutils": { + "node_modules/tsutils": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, - "requires": { + "dependencies": { "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, - "typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" } }, - "typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, - "requires": { - "call-bind": "^1.0.2", + "dependencies": { + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, - "requires": { - "call-bind": "^1.0.2", + "dependencies": { + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "typeforce": { + "node_modules/typeforce": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", "dev": true }, - "typescript": { + "node_modules/typescript": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz", "integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==", - "dev": true + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "unbox-primitive": { + "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "util-deprecate": { + "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "uuid": { + "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } }, - "validate-npm-package-license": { + "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "requires": { + "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, - "varuint-bitcoin": { + "node_modules/varuint-bitcoin": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.1.1" } }, - "which": { + "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "which-boxed-primitive": { + "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "requires": { + "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "which-module": { + "node_modules/which-module": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true }, - "which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "wif": { + "node_modules/wif": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", "dev": true, - "requires": { + "dependencies": { "bs58check": "<3.0.0" } }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "write-file-atomic": { + "node_modules/write-file-atomic": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", "signal-exit": "^3.0.2" } }, - "y18n": { + "node_modules/y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, - "yallist": { + "node_modules/yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, - "requires": { + "dependencies": { "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", @@ -2339,12 +3436,12 @@ "yargs-parser": "^13.1.2" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "13.1.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } diff --git a/package.json b/package.json index 31682f9..6b3ed47 100644 --- a/package.json +++ b/package.json @@ -2,16 +2,26 @@ "name": "bip174", "version": "2.1.1", "description": "", - "main": "src/lib/psbt.js", - "types": "src/lib/psbt.d.ts", + "main": "src/cjs/lib/psbt.js", + "module": "src/esm/lib/psbt.js", + "types": "src/cjs/lib/psbt.d.ts", + "exports": { + ".": { + "types": "./src/cjs/lib/psbt.d.ts", + "import": "./src/esm/lib/psbt.js", + "require": "./src/cjs/lib/psbt.js" + } + }, + "type": "module", "files": [ - "src/lib" + "src/cjs/lib", + "src/esm/lib" ], "engines": { "node": ">=8.0.0" }, "scripts": { - "build": "npm run clean && tsc -p ./tsconfig.json && rimraf 'src/tests/**/*.d.ts' && npm run formatjs", + "build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json && npm run formatjs", "clean": "rimraf src types", "coverage": "nyc --check-coverage --exclude='src/tests/**/*.js' --reporter=lcov --reporter=text --branches 90 --functions 90 --lines 90 npm run unit", "flb": "npm run format && npm run lint && npm run build", @@ -23,7 +33,7 @@ "prettier": "prettier 'ts_src/**/*.ts' --ignore-path ./.prettierignore", "prettierjs": "prettier 'src/**/*.js' --ignore-path ./.prettierignore", "test": "npm run format:ci && npm run lint && npm run build && npm run coverage", - "unit": "tape src/tests/*.js src/tests/fromBIP/*.js" + "unit": "tape src/esm/tests/*.js src/tests/fromBIP/*.js" }, "repository": { "type": "git", @@ -36,7 +46,7 @@ "nyc": "^14.1.1", "prettier": "^1.18.2", "rimraf": "^2.6.3", - "tape": "^4.10.2", + "tape": "^5.3.0", "tslint": "5.17.0", "typescript": "3.5.2" }, diff --git a/src/lib/combiner/index.d.ts b/src/cjs/lib/combiner/index.d.ts similarity index 58% rename from src/lib/combiner/index.d.ts rename to src/cjs/lib/combiner/index.d.ts index 386685a..f4ebd8c 100644 --- a/src/lib/combiner/index.d.ts +++ b/src/cjs/lib/combiner/index.d.ts @@ -1,2 +1,2 @@ -import { PsbtAttributes } from '../parser'; +import { PsbtAttributes } from '../parser/index.js'; export declare function combine(psbts: PsbtAttributes[]): PsbtAttributes; diff --git a/src/lib/combiner/index.js b/src/cjs/lib/combiner/index.js similarity index 92% rename from src/lib/combiner/index.js rename to src/cjs/lib/combiner/index.js index 6206421..3b29f66 100644 --- a/src/lib/combiner/index.js +++ b/src/cjs/lib/combiner/index.js @@ -1,9 +1,9 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const parser_1 = require('../parser'); +const index_js_1 = require('../parser/index.js'); function combine(psbts) { const self = psbts[0]; - const selfKeyVals = parser_1.psbtToKeyVals(self); + const selfKeyVals = index_js_1.psbtToKeyVals(self); const others = psbts.slice(1); if (others.length === 0) throw new Error('Combine: Nothing to combine'); const selfTx = getTx(self); @@ -23,7 +23,7 @@ function combine(psbts) { 'Combine: One of the Psbts does not have the same transaction.', ); } - const otherKeyVals = parser_1.psbtToKeyVals(other); + const otherKeyVals = index_js_1.psbtToKeyVals(other); const otherGlobalSet = getKeySet(otherKeyVals.globalKeyVals); otherGlobalSet.forEach( keyPusher( @@ -53,7 +53,7 @@ function combine(psbts) { ), ); } - return parser_1.psbtFromKeyVals(selfTx, { + return index_js_1.psbtFromKeyVals(selfTx, { globalMapKeyVals: selfKeyVals.globalKeyVals, inputKeyVals: selfKeyVals.inputKeyVals, outputKeyVals: selfKeyVals.outputKeyVals, diff --git a/src/lib/converter/global/globalXpub.d.ts b/src/cjs/lib/converter/global/globalXpub.d.ts similarity index 100% rename from src/lib/converter/global/globalXpub.d.ts rename to src/cjs/lib/converter/global/globalXpub.d.ts diff --git a/src/lib/converter/global/globalXpub.js b/src/cjs/lib/converter/global/globalXpub.js similarity index 92% rename from src/lib/converter/global/globalXpub.js rename to src/cjs/lib/converter/global/globalXpub.js index 1d4b9c8..d661413 100644 --- a/src/lib/converter/global/globalXpub.js +++ b/src/cjs/lib/converter/global/globalXpub.js @@ -1,9 +1,9 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); const range = n => [...Array(n).keys()]; function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.GlobalTypes.GLOBAL_XPUB) { + if (keyVal.key[0] !== typeFields_js_1.GlobalTypes.GLOBAL_XPUB) { throw new Error( 'Decode Error: could not decode globalXpub with key 0x' + keyVal.key.toString('hex'), @@ -36,7 +36,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(data) { - const head = Buffer.from([typeFields_1.GlobalTypes.GLOBAL_XPUB]); + const head = Buffer.from([typeFields_js_1.GlobalTypes.GLOBAL_XPUB]); const key = Buffer.concat([head, data.extendedPubkey]); const splitPath = data.path.split('/'); const value = Buffer.allocUnsafe(splitPath.length * 4); diff --git a/src/lib/converter/global/unsignedTx.d.ts b/src/cjs/lib/converter/global/unsignedTx.d.ts similarity index 100% rename from src/lib/converter/global/unsignedTx.d.ts rename to src/cjs/lib/converter/global/unsignedTx.d.ts diff --git a/src/lib/converter/global/unsignedTx.js b/src/cjs/lib/converter/global/unsignedTx.js similarity index 58% rename from src/lib/converter/global/unsignedTx.js rename to src/cjs/lib/converter/global/unsignedTx.js index cf273c4..ed998b2 100644 --- a/src/lib/converter/global/unsignedTx.js +++ b/src/cjs/lib/converter/global/unsignedTx.js @@ -1,9 +1,9 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function encode(data) { return { - key: Buffer.from([typeFields_1.GlobalTypes.UNSIGNED_TX]), + key: Buffer.from([typeFields_js_1.GlobalTypes.UNSIGNED_TX]), value: data.toBuffer(), }; } diff --git a/src/cjs/lib/converter/index.d.ts b/src/cjs/lib/converter/index.d.ts new file mode 100644 index 0000000..e6ff4c0 --- /dev/null +++ b/src/cjs/lib/converter/index.d.ts @@ -0,0 +1,109 @@ +/// +import * as globalXpub from './global/globalXpub.js'; +import * as unsignedTx from './global/unsignedTx.js'; +import * as finalScriptSig from './input/finalScriptSig.js'; +import * as finalScriptWitness from './input/finalScriptWitness.js'; +import * as nonWitnessUtxo from './input/nonWitnessUtxo.js'; +import * as partialSig from './input/partialSig.js'; +import * as porCommitment from './input/porCommitment.js'; +import * as sighashType from './input/sighashType.js'; +import * as tapKeySig from './input/tapKeySig.js'; +import * as tapLeafScript from './input/tapLeafScript.js'; +import * as tapMerkleRoot from './input/tapMerkleRoot.js'; +import * as tapScriptSig from './input/tapScriptSig.js'; +import * as witnessUtxo from './input/witnessUtxo.js'; +import * as tapTree from './output/tapTree.js'; +declare const globals: { + unsignedTx: typeof unsignedTx; + globalXpub: typeof globalXpub; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; +}; +declare const inputs: { + nonWitnessUtxo: typeof nonWitnessUtxo; + partialSig: typeof partialSig; + sighashType: typeof sighashType; + finalScriptSig: typeof finalScriptSig; + finalScriptWitness: typeof finalScriptWitness; + porCommitment: typeof porCommitment; + witnessUtxo: typeof witnessUtxo; + bip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").Bip32Derivation; + encode: (data: import("../interfaces.js").Bip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").Bip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; + }; + redeemScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + witnessScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + tapKeySig: typeof tapKeySig; + tapScriptSig: typeof tapScriptSig; + tapLeafScript: typeof tapLeafScript; + tapBip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").TapBip32Derivation; + encode: (data: import("../interfaces.js").TapBip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").TapBip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").TapBip32Derivation[], item: import("../interfaces.js").TapBip32Derivation, dupeSet: Set) => boolean; + }; + tapInternalKey: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + tapMerkleRoot: typeof tapMerkleRoot; +}; +declare const outputs: { + bip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").Bip32Derivation; + encode: (data: import("../interfaces.js").Bip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").Bip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; + }; + redeemScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + witnessScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + tapBip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").TapBip32Derivation; + encode: (data: import("../interfaces.js").TapBip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").TapBip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").TapBip32Derivation[], item: import("../interfaces.js").TapBip32Derivation, dupeSet: Set) => boolean; + }; + tapTree: typeof tapTree; + tapInternalKey: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; +}; +export { globals, inputs, outputs }; diff --git a/src/cjs/lib/converter/index.js b/src/cjs/lib/converter/index.js new file mode 100644 index 0000000..16c908e --- /dev/null +++ b/src/cjs/lib/converter/index.js @@ -0,0 +1,100 @@ +'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; +Object.defineProperty(exports, '__esModule', { value: true }); +const typeFields_js_1 = require('../typeFields.js'); +const globalXpub = __importStar(require('./global/globalXpub.js')); +const unsignedTx = __importStar(require('./global/unsignedTx.js')); +const finalScriptSig = __importStar(require('./input/finalScriptSig.js')); +const finalScriptWitness = __importStar( + require('./input/finalScriptWitness.js'), +); +const nonWitnessUtxo = __importStar(require('./input/nonWitnessUtxo.js')); +const partialSig = __importStar(require('./input/partialSig.js')); +const porCommitment = __importStar(require('./input/porCommitment.js')); +const sighashType = __importStar(require('./input/sighashType.js')); +const tapKeySig = __importStar(require('./input/tapKeySig.js')); +const tapLeafScript = __importStar(require('./input/tapLeafScript.js')); +const tapMerkleRoot = __importStar(require('./input/tapMerkleRoot.js')); +const tapScriptSig = __importStar(require('./input/tapScriptSig.js')); +const witnessUtxo = __importStar(require('./input/witnessUtxo.js')); +const tapTree = __importStar(require('./output/tapTree.js')); +const bip32Derivation = __importStar(require('./shared/bip32Derivation.js')); +const checkPubkey = __importStar(require('./shared/checkPubkey.js')); +const redeemScript = __importStar(require('./shared/redeemScript.js')); +const tapBip32Derivation = __importStar( + require('./shared/tapBip32Derivation.js'), +); +const tapInternalKey = __importStar(require('./shared/tapInternalKey.js')); +const witnessScript = __importStar(require('./shared/witnessScript.js')); +const globals = { + unsignedTx, + globalXpub, + // pass an Array of key bytes that require pubkey beside the key + checkPubkey: checkPubkey.makeChecker([]), +}; +exports.globals = globals; +const inputs = { + nonWitnessUtxo, + partialSig, + sighashType, + finalScriptSig, + finalScriptWitness, + porCommitment, + witnessUtxo, + bip32Derivation: bip32Derivation.makeConverter( + typeFields_js_1.InputTypes.BIP32_DERIVATION, + ), + redeemScript: redeemScript.makeConverter( + typeFields_js_1.InputTypes.REDEEM_SCRIPT, + ), + witnessScript: witnessScript.makeConverter( + typeFields_js_1.InputTypes.WITNESS_SCRIPT, + ), + checkPubkey: checkPubkey.makeChecker([ + typeFields_js_1.InputTypes.PARTIAL_SIG, + typeFields_js_1.InputTypes.BIP32_DERIVATION, + ]), + tapKeySig, + tapScriptSig, + tapLeafScript, + tapBip32Derivation: tapBip32Derivation.makeConverter( + typeFields_js_1.InputTypes.TAP_BIP32_DERIVATION, + ), + tapInternalKey: tapInternalKey.makeConverter( + typeFields_js_1.InputTypes.TAP_INTERNAL_KEY, + ), + tapMerkleRoot, +}; +exports.inputs = inputs; +const outputs = { + bip32Derivation: bip32Derivation.makeConverter( + typeFields_js_1.OutputTypes.BIP32_DERIVATION, + ), + redeemScript: redeemScript.makeConverter( + typeFields_js_1.OutputTypes.REDEEM_SCRIPT, + ), + witnessScript: witnessScript.makeConverter( + typeFields_js_1.OutputTypes.WITNESS_SCRIPT, + ), + checkPubkey: checkPubkey.makeChecker([ + typeFields_js_1.OutputTypes.BIP32_DERIVATION, + ]), + tapBip32Derivation: tapBip32Derivation.makeConverter( + typeFields_js_1.OutputTypes.TAP_BIP32_DERIVATION, + ), + tapTree, + tapInternalKey: tapInternalKey.makeConverter( + typeFields_js_1.OutputTypes.TAP_INTERNAL_KEY, + ), +}; +exports.outputs = outputs; diff --git a/src/lib/converter/input/finalScriptSig.d.ts b/src/cjs/lib/converter/input/finalScriptSig.d.ts similarity index 100% rename from src/lib/converter/input/finalScriptSig.d.ts rename to src/cjs/lib/converter/input/finalScriptSig.d.ts diff --git a/src/lib/converter/input/finalScriptSig.js b/src/cjs/lib/converter/input/finalScriptSig.js similarity index 76% rename from src/lib/converter/input/finalScriptSig.js rename to src/cjs/lib/converter/input/finalScriptSig.js index d41e7b1..17ba530 100644 --- a/src/lib/converter/input/finalScriptSig.js +++ b/src/cjs/lib/converter/input/finalScriptSig.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.FINAL_SCRIPTSIG) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.FINAL_SCRIPTSIG) { throw new Error( 'Decode Error: could not decode finalScriptSig with key 0x' + keyVal.key.toString('hex'), @@ -12,7 +12,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_1.InputTypes.FINAL_SCRIPTSIG]); + const key = Buffer.from([typeFields_js_1.InputTypes.FINAL_SCRIPTSIG]); return { key, value: data, diff --git a/src/lib/converter/input/finalScriptWitness.d.ts b/src/cjs/lib/converter/input/finalScriptWitness.d.ts similarity index 100% rename from src/lib/converter/input/finalScriptWitness.d.ts rename to src/cjs/lib/converter/input/finalScriptWitness.d.ts diff --git a/src/lib/converter/input/finalScriptWitness.js b/src/cjs/lib/converter/input/finalScriptWitness.js similarity index 76% rename from src/lib/converter/input/finalScriptWitness.js rename to src/cjs/lib/converter/input/finalScriptWitness.js index 450c71d..f45418e 100644 --- a/src/lib/converter/input/finalScriptWitness.js +++ b/src/cjs/lib/converter/input/finalScriptWitness.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.FINAL_SCRIPTWITNESS) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS) { throw new Error( 'Decode Error: could not decode finalScriptWitness with key 0x' + keyVal.key.toString('hex'), @@ -12,7 +12,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_1.InputTypes.FINAL_SCRIPTWITNESS]); + const key = Buffer.from([typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS]); return { key, value: data, diff --git a/src/lib/converter/input/nonWitnessUtxo.d.ts b/src/cjs/lib/converter/input/nonWitnessUtxo.d.ts similarity index 100% rename from src/lib/converter/input/nonWitnessUtxo.d.ts rename to src/cjs/lib/converter/input/nonWitnessUtxo.d.ts diff --git a/src/lib/converter/input/nonWitnessUtxo.js b/src/cjs/lib/converter/input/nonWitnessUtxo.js similarity index 76% rename from src/lib/converter/input/nonWitnessUtxo.js rename to src/cjs/lib/converter/input/nonWitnessUtxo.js index c69bc6c..1b9d4ff 100644 --- a/src/lib/converter/input/nonWitnessUtxo.js +++ b/src/cjs/lib/converter/input/nonWitnessUtxo.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.NON_WITNESS_UTXO) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.NON_WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode nonWitnessUtxo with key 0x' + keyVal.key.toString('hex'), @@ -13,7 +13,7 @@ function decode(keyVal) { exports.decode = decode; function encode(data) { return { - key: Buffer.from([typeFields_1.InputTypes.NON_WITNESS_UTXO]), + key: Buffer.from([typeFields_js_1.InputTypes.NON_WITNESS_UTXO]), value: data, }; } diff --git a/src/lib/converter/input/partialSig.d.ts b/src/cjs/lib/converter/input/partialSig.d.ts similarity index 100% rename from src/lib/converter/input/partialSig.d.ts rename to src/cjs/lib/converter/input/partialSig.d.ts diff --git a/src/lib/converter/input/partialSig.js b/src/cjs/lib/converter/input/partialSig.js similarity index 90% rename from src/lib/converter/input/partialSig.js rename to src/cjs/lib/converter/input/partialSig.js index 50a1090..7185de6 100644 --- a/src/lib/converter/input/partialSig.js +++ b/src/cjs/lib/converter/input/partialSig.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.PARTIAL_SIG) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.PARTIAL_SIG) { throw new Error( 'Decode Error: could not decode partialSig with key 0x' + keyVal.key.toString('hex'), @@ -25,7 +25,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(pSig) { - const head = Buffer.from([typeFields_1.InputTypes.PARTIAL_SIG]); + const head = Buffer.from([typeFields_js_1.InputTypes.PARTIAL_SIG]); return { key: Buffer.concat([head, pSig.pubkey]), value: pSig.signature, diff --git a/src/lib/converter/input/porCommitment.d.ts b/src/cjs/lib/converter/input/porCommitment.d.ts similarity index 100% rename from src/lib/converter/input/porCommitment.d.ts rename to src/cjs/lib/converter/input/porCommitment.d.ts diff --git a/src/lib/converter/input/porCommitment.js b/src/cjs/lib/converter/input/porCommitment.js similarity index 77% rename from src/lib/converter/input/porCommitment.js rename to src/cjs/lib/converter/input/porCommitment.js index 9b97253..5e0d2a0 100644 --- a/src/lib/converter/input/porCommitment.js +++ b/src/cjs/lib/converter/input/porCommitment.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.POR_COMMITMENT) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.POR_COMMITMENT) { throw new Error( 'Decode Error: could not decode porCommitment with key 0x' + keyVal.key.toString('hex'), @@ -12,7 +12,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_1.InputTypes.POR_COMMITMENT]); + const key = Buffer.from([typeFields_js_1.InputTypes.POR_COMMITMENT]); return { key, value: Buffer.from(data, 'utf8'), diff --git a/src/lib/converter/input/sighashType.d.ts b/src/cjs/lib/converter/input/sighashType.d.ts similarity index 100% rename from src/lib/converter/input/sighashType.d.ts rename to src/cjs/lib/converter/input/sighashType.d.ts diff --git a/src/lib/converter/input/sighashType.js b/src/cjs/lib/converter/input/sighashType.js similarity index 78% rename from src/lib/converter/input/sighashType.js rename to src/cjs/lib/converter/input/sighashType.js index 9f90c1b..953a127 100644 --- a/src/lib/converter/input/sighashType.js +++ b/src/cjs/lib/converter/input/sighashType.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.SIGHASH_TYPE) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.SIGHASH_TYPE) { throw new Error( 'Decode Error: could not decode sighashType with key 0x' + keyVal.key.toString('hex'), @@ -12,7 +12,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_1.InputTypes.SIGHASH_TYPE]); + const key = Buffer.from([typeFields_js_1.InputTypes.SIGHASH_TYPE]); const value = Buffer.allocUnsafe(4); value.writeUInt32LE(data, 0); return { diff --git a/src/lib/converter/input/tapKeySig.d.ts b/src/cjs/lib/converter/input/tapKeySig.d.ts similarity index 100% rename from src/lib/converter/input/tapKeySig.d.ts rename to src/cjs/lib/converter/input/tapKeySig.d.ts diff --git a/src/lib/converter/input/tapKeySig.js b/src/cjs/lib/converter/input/tapKeySig.js similarity index 81% rename from src/lib/converter/input/tapKeySig.js rename to src/cjs/lib/converter/input/tapKeySig.js index a55a0a1..a991056 100644 --- a/src/lib/converter/input/tapKeySig.js +++ b/src/cjs/lib/converter/input/tapKeySig.js @@ -1,9 +1,9 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { if ( - keyVal.key[0] !== typeFields_1.InputTypes.TAP_KEY_SIG || + keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_KEY_SIG || keyVal.key.length !== 1 ) { throw new Error( @@ -20,7 +20,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(value) { - const key = Buffer.from([typeFields_1.InputTypes.TAP_KEY_SIG]); + const key = Buffer.from([typeFields_js_1.InputTypes.TAP_KEY_SIG]); return { key, value }; } exports.encode = encode; diff --git a/src/lib/converter/input/tapLeafScript.d.ts b/src/cjs/lib/converter/input/tapLeafScript.d.ts similarity index 100% rename from src/lib/converter/input/tapLeafScript.d.ts rename to src/cjs/lib/converter/input/tapLeafScript.d.ts diff --git a/src/lib/converter/input/tapLeafScript.js b/src/cjs/lib/converter/input/tapLeafScript.js similarity index 89% rename from src/lib/converter/input/tapLeafScript.js rename to src/cjs/lib/converter/input/tapLeafScript.js index f2cd4da..6d107a7 100644 --- a/src/lib/converter/input/tapLeafScript.js +++ b/src/cjs/lib/converter/input/tapLeafScript.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.TAP_LEAF_SCRIPT) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_LEAF_SCRIPT) { throw new Error( 'Decode Error: could not decode tapLeafScript with key 0x' + keyVal.key.toString('hex'), @@ -27,7 +27,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(tScript) { - const head = Buffer.from([typeFields_1.InputTypes.TAP_LEAF_SCRIPT]); + const head = Buffer.from([typeFields_js_1.InputTypes.TAP_LEAF_SCRIPT]); const verBuf = Buffer.from([tScript.leafVersion]); return { key: Buffer.concat([head, tScript.controlBlock]), diff --git a/src/lib/converter/input/tapMerkleRoot.d.ts b/src/cjs/lib/converter/input/tapMerkleRoot.d.ts similarity index 100% rename from src/lib/converter/input/tapMerkleRoot.d.ts rename to src/cjs/lib/converter/input/tapMerkleRoot.d.ts diff --git a/src/lib/converter/input/tapMerkleRoot.js b/src/cjs/lib/converter/input/tapMerkleRoot.js similarity index 80% rename from src/lib/converter/input/tapMerkleRoot.js rename to src/cjs/lib/converter/input/tapMerkleRoot.js index c7c2697..3f02c45 100644 --- a/src/lib/converter/input/tapMerkleRoot.js +++ b/src/cjs/lib/converter/input/tapMerkleRoot.js @@ -1,9 +1,9 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { if ( - keyVal.key[0] !== typeFields_1.InputTypes.TAP_MERKLE_ROOT || + keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_MERKLE_ROOT || keyVal.key.length !== 1 ) { throw new Error( @@ -18,7 +18,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(value) { - const key = Buffer.from([typeFields_1.InputTypes.TAP_MERKLE_ROOT]); + const key = Buffer.from([typeFields_js_1.InputTypes.TAP_MERKLE_ROOT]); return { key, value }; } exports.encode = encode; diff --git a/src/lib/converter/input/tapScriptSig.d.ts b/src/cjs/lib/converter/input/tapScriptSig.d.ts similarity index 100% rename from src/lib/converter/input/tapScriptSig.d.ts rename to src/cjs/lib/converter/input/tapScriptSig.d.ts diff --git a/src/lib/converter/input/tapScriptSig.js b/src/cjs/lib/converter/input/tapScriptSig.js similarity index 89% rename from src/lib/converter/input/tapScriptSig.js rename to src/cjs/lib/converter/input/tapScriptSig.js index 7180d32..0af3800 100644 --- a/src/lib/converter/input/tapScriptSig.js +++ b/src/cjs/lib/converter/input/tapScriptSig.js @@ -1,8 +1,8 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); +const typeFields_js_1 = require('../../typeFields.js'); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.TAP_SCRIPT_SIG) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + keyVal.key.toString('hex'), @@ -30,7 +30,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(tSig) { - const head = Buffer.from([typeFields_1.InputTypes.TAP_SCRIPT_SIG]); + const head = Buffer.from([typeFields_js_1.InputTypes.TAP_SCRIPT_SIG]); return { key: Buffer.concat([head, tSig.pubkey, tSig.leafHash]), value: tSig.signature, diff --git a/src/lib/converter/input/witnessUtxo.d.ts b/src/cjs/lib/converter/input/witnessUtxo.d.ts similarity index 100% rename from src/lib/converter/input/witnessUtxo.d.ts rename to src/cjs/lib/converter/input/witnessUtxo.d.ts diff --git a/src/lib/converter/input/witnessUtxo.js b/src/cjs/lib/converter/input/witnessUtxo.js similarity index 64% rename from src/lib/converter/input/witnessUtxo.js rename to src/cjs/lib/converter/input/witnessUtxo.js index fad8ae5..7d71752 100644 --- a/src/lib/converter/input/witnessUtxo.js +++ b/src/cjs/lib/converter/input/witnessUtxo.js @@ -1,16 +1,27 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); -const tools_1 = require('../tools'); -const varuint = require('../varint'); +const typeFields_js_1 = require('../../typeFields.js'); +const tools_js_1 = require('../tools.js'); +const varuint = __importStar(require('../varint.js')); function decode(keyVal) { - if (keyVal.key[0] !== typeFields_1.InputTypes.WITNESS_UTXO) { + if (keyVal.key[0] !== typeFields_js_1.InputTypes.WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode witnessUtxo with key 0x' + keyVal.key.toString('hex'), ); } - const value = tools_1.readUInt64LE(keyVal.value, 0); + const value = tools_js_1.readUInt64LE(keyVal.value, 0); let _offset = 8; const scriptLen = varuint.decode(keyVal.value, _offset); _offset += varuint.encodingLength(scriptLen); @@ -28,11 +39,11 @@ function encode(data) { const { script, value } = data; const varintLen = varuint.encodingLength(script.length); const result = Buffer.allocUnsafe(8 + varintLen + script.length); - tools_1.writeUInt64LE(result, value, 0); + tools_js_1.writeUInt64LE(result, value, 0); varuint.encode(script.length, result, 8); script.copy(result, 8 + varintLen); return { - key: Buffer.from([typeFields_1.InputTypes.WITNESS_UTXO]), + key: Buffer.from([typeFields_js_1.InputTypes.WITNESS_UTXO]), value: result, }; } diff --git a/src/lib/converter/output/tapTree.d.ts b/src/cjs/lib/converter/output/tapTree.d.ts similarity index 100% rename from src/lib/converter/output/tapTree.d.ts rename to src/cjs/lib/converter/output/tapTree.d.ts diff --git a/src/lib/converter/output/tapTree.js b/src/cjs/lib/converter/output/tapTree.js similarity index 74% rename from src/lib/converter/output/tapTree.js rename to src/cjs/lib/converter/output/tapTree.js index f1ec8d8..4fad598 100644 --- a/src/lib/converter/output/tapTree.js +++ b/src/cjs/lib/converter/output/tapTree.js @@ -1,10 +1,21 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../../typeFields'); -const varuint = require('../varint'); +const typeFields_js_1 = require('../../typeFields.js'); +const varuint = __importStar(require('../varint.js')); function decode(keyVal) { if ( - keyVal.key[0] !== typeFields_1.OutputTypes.TAP_TREE || + keyVal.key[0] !== typeFields_js_1.OutputTypes.TAP_TREE || keyVal.key.length !== 1 ) { throw new Error( @@ -30,7 +41,7 @@ function decode(keyVal) { } exports.decode = decode; function encode(tree) { - const key = Buffer.from([typeFields_1.OutputTypes.TAP_TREE]); + const key = Buffer.from([typeFields_js_1.OutputTypes.TAP_TREE]); const bufs = [].concat( ...tree.leaves.map(tapLeaf => [ Buffer.of(tapLeaf.depth, tapLeaf.leafVersion), diff --git a/src/lib/converter/shared/bip32Derivation.d.ts b/src/cjs/lib/converter/shared/bip32Derivation.d.ts similarity index 100% rename from src/lib/converter/shared/bip32Derivation.d.ts rename to src/cjs/lib/converter/shared/bip32Derivation.d.ts diff --git a/src/lib/converter/shared/bip32Derivation.js b/src/cjs/lib/converter/shared/bip32Derivation.js similarity index 100% rename from src/lib/converter/shared/bip32Derivation.js rename to src/cjs/lib/converter/shared/bip32Derivation.js diff --git a/src/lib/converter/shared/checkPubkey.d.ts b/src/cjs/lib/converter/shared/checkPubkey.d.ts similarity index 100% rename from src/lib/converter/shared/checkPubkey.d.ts rename to src/cjs/lib/converter/shared/checkPubkey.d.ts diff --git a/src/lib/converter/shared/checkPubkey.js b/src/cjs/lib/converter/shared/checkPubkey.js similarity index 100% rename from src/lib/converter/shared/checkPubkey.js rename to src/cjs/lib/converter/shared/checkPubkey.js diff --git a/src/lib/converter/shared/redeemScript.d.ts b/src/cjs/lib/converter/shared/redeemScript.d.ts similarity index 100% rename from src/lib/converter/shared/redeemScript.d.ts rename to src/cjs/lib/converter/shared/redeemScript.d.ts diff --git a/src/lib/converter/shared/redeemScript.js b/src/cjs/lib/converter/shared/redeemScript.js similarity index 100% rename from src/lib/converter/shared/redeemScript.js rename to src/cjs/lib/converter/shared/redeemScript.js diff --git a/src/lib/converter/shared/tapBip32Derivation.d.ts b/src/cjs/lib/converter/shared/tapBip32Derivation.d.ts similarity index 100% rename from src/lib/converter/shared/tapBip32Derivation.d.ts rename to src/cjs/lib/converter/shared/tapBip32Derivation.d.ts diff --git a/src/cjs/lib/converter/shared/tapBip32Derivation.js b/src/cjs/lib/converter/shared/tapBip32Derivation.js new file mode 100644 index 0000000..cca74c2 --- /dev/null +++ b/src/cjs/lib/converter/shared/tapBip32Derivation.js @@ -0,0 +1,64 @@ +'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; +Object.defineProperty(exports, '__esModule', { value: true }); +const varuint = __importStar(require('../varint.js')); +const bip32Derivation = __importStar(require('./bip32Derivation.js')); +const isValidBIP340Key = pubkey => pubkey.length === 32; +function makeConverter(TYPE_BYTE) { + const parent = bip32Derivation.makeConverter(TYPE_BYTE, isValidBIP340Key); + function decode(keyVal) { + const nHashes = varuint.decode(keyVal.value); + const nHashesLen = varuint.encodingLength(nHashes); + const base = parent.decode({ + key: keyVal.key, + value: keyVal.value.slice(nHashesLen + nHashes * 32), + }); + const leafHashes = new Array(nHashes); + for (let i = 0, _offset = nHashesLen; i < nHashes; i++, _offset += 32) { + leafHashes[i] = keyVal.value.slice(_offset, _offset + 32); + } + return Object.assign({}, base, { leafHashes }); + } + function encode(data) { + const base = parent.encode(data); + const nHashesLen = varuint.encodingLength(data.leafHashes.length); + const nHashesBuf = Buffer.allocUnsafe(nHashesLen); + varuint.encode(data.leafHashes.length, nHashesBuf); + const value = Buffer.concat([nHashesBuf, ...data.leafHashes, base.value]); + return Object.assign({}, base, { value }); + } + const expected = + '{ ' + + 'masterFingerprint: Buffer; ' + + 'pubkey: Buffer; ' + + 'path: string; ' + + 'leafHashes: Buffer[]; ' + + '}'; + function check(data) { + return ( + Array.isArray(data.leafHashes) && + data.leafHashes.every( + leafHash => Buffer.isBuffer(leafHash) && leafHash.length === 32, + ) && + parent.check(data) + ); + } + return { + decode, + encode, + check, + expected, + canAddToArray: parent.canAddToArray, + }; +} +exports.makeConverter = makeConverter; diff --git a/src/lib/converter/shared/tapInternalKey.d.ts b/src/cjs/lib/converter/shared/tapInternalKey.d.ts similarity index 100% rename from src/lib/converter/shared/tapInternalKey.d.ts rename to src/cjs/lib/converter/shared/tapInternalKey.d.ts diff --git a/src/lib/converter/shared/tapInternalKey.js b/src/cjs/lib/converter/shared/tapInternalKey.js similarity index 100% rename from src/lib/converter/shared/tapInternalKey.js rename to src/cjs/lib/converter/shared/tapInternalKey.js diff --git a/src/lib/converter/shared/witnessScript.d.ts b/src/cjs/lib/converter/shared/witnessScript.d.ts similarity index 100% rename from src/lib/converter/shared/witnessScript.d.ts rename to src/cjs/lib/converter/shared/witnessScript.d.ts diff --git a/src/lib/converter/shared/witnessScript.js b/src/cjs/lib/converter/shared/witnessScript.js similarity index 100% rename from src/lib/converter/shared/witnessScript.js rename to src/cjs/lib/converter/shared/witnessScript.js diff --git a/src/lib/converter/tools.d.ts b/src/cjs/lib/converter/tools.d.ts similarity index 100% rename from src/lib/converter/tools.d.ts rename to src/cjs/lib/converter/tools.d.ts diff --git a/src/lib/converter/tools.js b/src/cjs/lib/converter/tools.js similarity index 85% rename from src/lib/converter/tools.js rename to src/cjs/lib/converter/tools.js index 1d5a86a..dcedb22 100644 --- a/src/lib/converter/tools.js +++ b/src/cjs/lib/converter/tools.js @@ -1,6 +1,17 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); -const varuint = require('./varint'); +const varuint = __importStar(require('./varint.js')); exports.range = n => [...Array(n).keys()]; function reverseBuffer(buffer) { if (buffer.length < 1) return buffer; diff --git a/src/lib/converter/varint.d.ts b/src/cjs/lib/converter/varint.d.ts similarity index 100% rename from src/lib/converter/varint.d.ts rename to src/cjs/lib/converter/varint.d.ts diff --git a/src/lib/converter/varint.js b/src/cjs/lib/converter/varint.js similarity index 100% rename from src/lib/converter/varint.js rename to src/cjs/lib/converter/varint.js diff --git a/src/lib/interfaces.d.ts b/src/cjs/lib/interfaces.d.ts similarity index 100% rename from src/lib/interfaces.d.ts rename to src/cjs/lib/interfaces.d.ts diff --git a/src/lib/interfaces.js b/src/cjs/lib/interfaces.js similarity index 100% rename from src/lib/interfaces.js rename to src/cjs/lib/interfaces.js diff --git a/src/lib/parser/fromBuffer.d.ts b/src/cjs/lib/parser/fromBuffer.d.ts similarity index 93% rename from src/lib/parser/fromBuffer.d.ts rename to src/cjs/lib/parser/fromBuffer.d.ts index 729a74b..87cc125 100644 --- a/src/lib/parser/fromBuffer.d.ts +++ b/src/cjs/lib/parser/fromBuffer.d.ts @@ -1,6 +1,6 @@ /// import { KeyValue, Transaction, TransactionFromBuffer } from '../interfaces'; -import { PsbtAttributes } from './index'; +import { PsbtAttributes } from './index.js'; export declare function psbtFromBuffer(buffer: Buffer, txGetter: TransactionFromBuffer): PsbtAttributes; interface PsbtFromKeyValsArg { globalMapKeyVals: KeyValue[]; diff --git a/src/lib/parser/fromBuffer.js b/src/cjs/lib/parser/fromBuffer.js similarity index 77% rename from src/lib/parser/fromBuffer.js rename to src/cjs/lib/parser/fromBuffer.js index 5d05844..e366b7e 100644 --- a/src/lib/parser/fromBuffer.js +++ b/src/cjs/lib/parser/fromBuffer.js @@ -1,9 +1,20 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); -const convert = require('../converter'); -const tools_1 = require('../converter/tools'); -const varuint = require('../converter/varint'); -const typeFields_1 = require('../typeFields'); +const convert = __importStar(require('../converter/index.js')); +const tools_js_1 = require('../converter/tools.js'); +const varuint = __importStar(require('../converter/varint.js')); +const typeFields_js_1 = require('../typeFields.js'); function psbtFromBuffer(buffer, txGetter) { let offset = 0; function varSlice() { @@ -63,7 +74,7 @@ function psbtFromBuffer(buffer, txGetter) { globalMapKeyVals.push(keyVal); } const unsignedTxMaps = globalMapKeyVals.filter( - keyVal => keyVal.key[0] === typeFields_1.GlobalTypes.UNSIGNED_TX, + keyVal => keyVal.key[0] === typeFields_js_1.GlobalTypes.UNSIGNED_TX, ); if (unsignedTxMaps.length !== 1) { throw new Error('Format Error: Only one UNSIGNED_TX allowed'); @@ -74,7 +85,7 @@ function psbtFromBuffer(buffer, txGetter) { const inputKeyVals = []; const outputKeyVals = []; // Get input fields - for (const index of tools_1.range(inputCount)) { + for (const index of tools_js_1.range(inputCount)) { const inputKeyIndex = {}; const input = []; while (!checkEndOfKeyValPairs()) { @@ -94,7 +105,7 @@ function psbtFromBuffer(buffer, txGetter) { } inputKeyVals.push(input); } - for (const index of tools_1.range(outputCount)) { + for (const index of tools_js_1.range(outputCount)) { const outputKeyIndex = {}; const output = []; while (!checkEndOfKeyValPairs()) { @@ -142,18 +153,18 @@ function psbtFromKeyVals( // If a globalMap item needs pubkey, uncomment // const pubkey = convert.globals.checkPubkey(keyVal); switch (keyVal.key[0]) { - case typeFields_1.GlobalTypes.UNSIGNED_TX: + case typeFields_js_1.GlobalTypes.UNSIGNED_TX: checkKeyBuffer( 'global', keyVal.key, - typeFields_1.GlobalTypes.UNSIGNED_TX, + typeFields_js_1.GlobalTypes.UNSIGNED_TX, ); if (txCount > 0) { throw new Error('Format Error: GlobalMap has multiple UNSIGNED_TX'); } txCount++; break; - case typeFields_1.GlobalTypes.GLOBAL_XPUB: + case typeFields_js_1.GlobalTypes.GLOBAL_XPUB: if (globalMap.globalXpub === undefined) { globalMap.globalXpub = []; } @@ -171,16 +182,16 @@ function psbtFromKeyVals( const inputs = []; const outputs = []; // Get input fields - for (const index of tools_1.range(inputCount)) { + for (const index of tools_js_1.range(inputCount)) { const input = {}; for (const keyVal of inputKeyVals[index]) { convert.inputs.checkPubkey(keyVal); switch (keyVal.key[0]) { - case typeFields_1.InputTypes.NON_WITNESS_UTXO: + case typeFields_js_1.InputTypes.NON_WITNESS_UTXO: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.NON_WITNESS_UTXO, + typeFields_js_1.InputTypes.NON_WITNESS_UTXO, ); if (input.nonWitnessUtxo !== undefined) { throw new Error( @@ -189,57 +200,57 @@ function psbtFromKeyVals( } input.nonWitnessUtxo = convert.inputs.nonWitnessUtxo.decode(keyVal); break; - case typeFields_1.InputTypes.WITNESS_UTXO: + case typeFields_js_1.InputTypes.WITNESS_UTXO: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.WITNESS_UTXO, + typeFields_js_1.InputTypes.WITNESS_UTXO, ); if (input.witnessUtxo !== undefined) { throw new Error('Format Error: Input has multiple WITNESS_UTXO'); } input.witnessUtxo = convert.inputs.witnessUtxo.decode(keyVal); break; - case typeFields_1.InputTypes.PARTIAL_SIG: + case typeFields_js_1.InputTypes.PARTIAL_SIG: if (input.partialSig === undefined) { input.partialSig = []; } input.partialSig.push(convert.inputs.partialSig.decode(keyVal)); break; - case typeFields_1.InputTypes.SIGHASH_TYPE: + case typeFields_js_1.InputTypes.SIGHASH_TYPE: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.SIGHASH_TYPE, + typeFields_js_1.InputTypes.SIGHASH_TYPE, ); if (input.sighashType !== undefined) { throw new Error('Format Error: Input has multiple SIGHASH_TYPE'); } input.sighashType = convert.inputs.sighashType.decode(keyVal); break; - case typeFields_1.InputTypes.REDEEM_SCRIPT: + case typeFields_js_1.InputTypes.REDEEM_SCRIPT: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.REDEEM_SCRIPT, + typeFields_js_1.InputTypes.REDEEM_SCRIPT, ); if (input.redeemScript !== undefined) { throw new Error('Format Error: Input has multiple REDEEM_SCRIPT'); } input.redeemScript = convert.inputs.redeemScript.decode(keyVal); break; - case typeFields_1.InputTypes.WITNESS_SCRIPT: + case typeFields_js_1.InputTypes.WITNESS_SCRIPT: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.WITNESS_SCRIPT, + typeFields_js_1.InputTypes.WITNESS_SCRIPT, ); if (input.witnessScript !== undefined) { throw new Error('Format Error: Input has multiple WITNESS_SCRIPT'); } input.witnessScript = convert.inputs.witnessScript.decode(keyVal); break; - case typeFields_1.InputTypes.BIP32_DERIVATION: + case typeFields_js_1.InputTypes.BIP32_DERIVATION: if (input.bip32Derivation === undefined) { input.bip32Derivation = []; } @@ -247,53 +258,53 @@ function psbtFromKeyVals( convert.inputs.bip32Derivation.decode(keyVal), ); break; - case typeFields_1.InputTypes.FINAL_SCRIPTSIG: + case typeFields_js_1.InputTypes.FINAL_SCRIPTSIG: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.FINAL_SCRIPTSIG, + typeFields_js_1.InputTypes.FINAL_SCRIPTSIG, ); input.finalScriptSig = convert.inputs.finalScriptSig.decode(keyVal); break; - case typeFields_1.InputTypes.FINAL_SCRIPTWITNESS: + case typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.FINAL_SCRIPTWITNESS, + typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS, ); input.finalScriptWitness = convert.inputs.finalScriptWitness.decode( keyVal, ); break; - case typeFields_1.InputTypes.POR_COMMITMENT: + case typeFields_js_1.InputTypes.POR_COMMITMENT: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.POR_COMMITMENT, + typeFields_js_1.InputTypes.POR_COMMITMENT, ); input.porCommitment = convert.inputs.porCommitment.decode(keyVal); break; - case typeFields_1.InputTypes.TAP_KEY_SIG: + case typeFields_js_1.InputTypes.TAP_KEY_SIG: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.TAP_KEY_SIG, + typeFields_js_1.InputTypes.TAP_KEY_SIG, ); input.tapKeySig = convert.inputs.tapKeySig.decode(keyVal); break; - case typeFields_1.InputTypes.TAP_SCRIPT_SIG: + case typeFields_js_1.InputTypes.TAP_SCRIPT_SIG: if (input.tapScriptSig === undefined) { input.tapScriptSig = []; } input.tapScriptSig.push(convert.inputs.tapScriptSig.decode(keyVal)); break; - case typeFields_1.InputTypes.TAP_LEAF_SCRIPT: + case typeFields_js_1.InputTypes.TAP_LEAF_SCRIPT: if (input.tapLeafScript === undefined) { input.tapLeafScript = []; } input.tapLeafScript.push(convert.inputs.tapLeafScript.decode(keyVal)); break; - case typeFields_1.InputTypes.TAP_BIP32_DERIVATION: + case typeFields_js_1.InputTypes.TAP_BIP32_DERIVATION: if (input.tapBip32Derivation === undefined) { input.tapBip32Derivation = []; } @@ -301,19 +312,19 @@ function psbtFromKeyVals( convert.inputs.tapBip32Derivation.decode(keyVal), ); break; - case typeFields_1.InputTypes.TAP_INTERNAL_KEY: + case typeFields_js_1.InputTypes.TAP_INTERNAL_KEY: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.TAP_INTERNAL_KEY, + typeFields_js_1.InputTypes.TAP_INTERNAL_KEY, ); input.tapInternalKey = convert.inputs.tapInternalKey.decode(keyVal); break; - case typeFields_1.InputTypes.TAP_MERKLE_ROOT: + case typeFields_js_1.InputTypes.TAP_MERKLE_ROOT: checkKeyBuffer( 'input', keyVal.key, - typeFields_1.InputTypes.TAP_MERKLE_ROOT, + typeFields_js_1.InputTypes.TAP_MERKLE_ROOT, ); input.tapMerkleRoot = convert.inputs.tapMerkleRoot.decode(keyVal); break; @@ -325,34 +336,34 @@ function psbtFromKeyVals( } inputs.push(input); } - for (const index of tools_1.range(outputCount)) { + for (const index of tools_js_1.range(outputCount)) { const output = {}; for (const keyVal of outputKeyVals[index]) { convert.outputs.checkPubkey(keyVal); switch (keyVal.key[0]) { - case typeFields_1.OutputTypes.REDEEM_SCRIPT: + case typeFields_js_1.OutputTypes.REDEEM_SCRIPT: checkKeyBuffer( 'output', keyVal.key, - typeFields_1.OutputTypes.REDEEM_SCRIPT, + typeFields_js_1.OutputTypes.REDEEM_SCRIPT, ); if (output.redeemScript !== undefined) { throw new Error('Format Error: Output has multiple REDEEM_SCRIPT'); } output.redeemScript = convert.outputs.redeemScript.decode(keyVal); break; - case typeFields_1.OutputTypes.WITNESS_SCRIPT: + case typeFields_js_1.OutputTypes.WITNESS_SCRIPT: checkKeyBuffer( 'output', keyVal.key, - typeFields_1.OutputTypes.WITNESS_SCRIPT, + typeFields_js_1.OutputTypes.WITNESS_SCRIPT, ); if (output.witnessScript !== undefined) { throw new Error('Format Error: Output has multiple WITNESS_SCRIPT'); } output.witnessScript = convert.outputs.witnessScript.decode(keyVal); break; - case typeFields_1.OutputTypes.BIP32_DERIVATION: + case typeFields_js_1.OutputTypes.BIP32_DERIVATION: if (output.bip32Derivation === undefined) { output.bip32Derivation = []; } @@ -360,23 +371,23 @@ function psbtFromKeyVals( convert.outputs.bip32Derivation.decode(keyVal), ); break; - case typeFields_1.OutputTypes.TAP_INTERNAL_KEY: + case typeFields_js_1.OutputTypes.TAP_INTERNAL_KEY: checkKeyBuffer( 'output', keyVal.key, - typeFields_1.OutputTypes.TAP_INTERNAL_KEY, + typeFields_js_1.OutputTypes.TAP_INTERNAL_KEY, ); output.tapInternalKey = convert.outputs.tapInternalKey.decode(keyVal); break; - case typeFields_1.OutputTypes.TAP_TREE: + case typeFields_js_1.OutputTypes.TAP_TREE: checkKeyBuffer( 'output', keyVal.key, - typeFields_1.OutputTypes.TAP_TREE, + typeFields_js_1.OutputTypes.TAP_TREE, ); output.tapTree = convert.outputs.tapTree.decode(keyVal); break; - case typeFields_1.OutputTypes.TAP_BIP32_DERIVATION: + case typeFields_js_1.OutputTypes.TAP_BIP32_DERIVATION: if (output.tapBip32Derivation === undefined) { output.tapBip32Derivation = []; } diff --git a/src/lib/parser/index.d.ts b/src/cjs/lib/parser/index.d.ts similarity index 73% rename from src/lib/parser/index.d.ts rename to src/cjs/lib/parser/index.d.ts index c9364df..bbd9eae 100644 --- a/src/lib/parser/index.d.ts +++ b/src/cjs/lib/parser/index.d.ts @@ -1,6 +1,6 @@ import { PsbtGlobal, PsbtInput, PsbtOutput } from '../interfaces'; -export * from './fromBuffer'; -export * from './toBuffer'; +export * from './fromBuffer.js'; +export * from './toBuffer.js'; export interface PsbtAttributes { globalMap: PsbtGlobal; inputs: PsbtInput[]; diff --git a/src/lib/parser/index.js b/src/cjs/lib/parser/index.js similarity index 69% rename from src/lib/parser/index.js rename to src/cjs/lib/parser/index.js index d6a752f..6f30632 100644 --- a/src/lib/parser/index.js +++ b/src/cjs/lib/parser/index.js @@ -3,5 +3,5 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } Object.defineProperty(exports, '__esModule', { value: true }); -__export(require('./fromBuffer')); -__export(require('./toBuffer')); +__export(require('./fromBuffer.js')); +__export(require('./toBuffer.js')); diff --git a/src/lib/parser/toBuffer.d.ts b/src/cjs/lib/parser/toBuffer.d.ts similarity index 88% rename from src/lib/parser/toBuffer.d.ts rename to src/cjs/lib/parser/toBuffer.d.ts index ba62352..04d0e19 100644 --- a/src/lib/parser/toBuffer.d.ts +++ b/src/cjs/lib/parser/toBuffer.d.ts @@ -1,6 +1,6 @@ /// import { KeyValue } from '../interfaces'; -import { PsbtAttributes } from './index'; +import { PsbtAttributes } from './index.js'; export declare function psbtToBuffer({ globalMap, inputs, outputs, }: PsbtAttributes): Buffer; export declare function psbtToKeyVals({ globalMap, inputs, outputs, }: PsbtAttributes): { globalKeyVals: KeyValue[]; diff --git a/src/lib/parser/toBuffer.js b/src/cjs/lib/parser/toBuffer.js similarity index 80% rename from src/lib/parser/toBuffer.js rename to src/cjs/lib/parser/toBuffer.js index 798856f..120c1ae 100644 --- a/src/lib/parser/toBuffer.js +++ b/src/cjs/lib/parser/toBuffer.js @@ -1,18 +1,29 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); -const convert = require('../converter'); -const tools_1 = require('../converter/tools'); +const convert = __importStar(require('../converter/index.js')); +const tools_js_1 = require('../converter/tools.js'); function psbtToBuffer({ globalMap, inputs, outputs }) { const { globalKeyVals, inputKeyVals, outputKeyVals } = psbtToKeyVals({ globalMap, inputs, outputs, }); - const globalBuffer = tools_1.keyValsToBuffer(globalKeyVals); + const globalBuffer = tools_js_1.keyValsToBuffer(globalKeyVals); const keyValsOrEmptyToBuffer = keyVals => keyVals.length === 0 ? [Buffer.from([0])] - : keyVals.map(tools_1.keyValsToBuffer); + : keyVals.map(tools_js_1.keyValsToBuffer); const inputBuffers = keyValsOrEmptyToBuffer(inputKeyVals); const outputBuffers = keyValsOrEmptyToBuffer(outputKeyVals); const header = Buffer.allocUnsafe(5); diff --git a/src/lib/psbt.d.ts b/src/cjs/lib/psbt.d.ts similarity index 100% rename from src/lib/psbt.d.ts rename to src/cjs/lib/psbt.d.ts diff --git a/src/lib/psbt.js b/src/cjs/lib/psbt.js similarity index 70% rename from src/lib/psbt.js rename to src/cjs/lib/psbt.js index 01eeddb..7e20297 100644 --- a/src/lib/psbt.js +++ b/src/cjs/lib/psbt.js @@ -1,9 +1,9 @@ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -const combiner_1 = require('./combiner'); -const parser_1 = require('./parser'); -const typeFields_1 = require('./typeFields'); -const utils_1 = require('./utils'); +const index_js_1 = require('./combiner/index.js'); +const index_js_2 = require('./parser/index.js'); +const typeFields_js_1 = require('./typeFields.js'); +const utils_js_1 = require('./utils.js'); class Psbt { constructor(tx) { this.inputs = []; @@ -21,7 +21,7 @@ class Psbt { return this.fromBuffer(buffer, txFromBuffer); } static fromBuffer(buffer, txFromBuffer) { - const results = parser_1.psbtFromBuffer(buffer, txFromBuffer); + const results = index_js_2.psbtFromBuffer(buffer, txFromBuffer); const psbt = new this(results.globalMap.unsignedTx); Object.assign(psbt, results); return psbt; @@ -35,49 +35,49 @@ class Psbt { return buffer.toString('hex'); } toBuffer() { - return parser_1.psbtToBuffer(this); + return index_js_2.psbtToBuffer(this); } updateGlobal(updateData) { - utils_1.updateGlobal(updateData, this.globalMap); + utils_js_1.updateGlobal(updateData, this.globalMap); return this; } updateInput(inputIndex, updateData) { - const input = utils_1.checkForInput(this.inputs, inputIndex); - utils_1.updateInput(updateData, input); + const input = utils_js_1.checkForInput(this.inputs, inputIndex); + utils_js_1.updateInput(updateData, input); return this; } updateOutput(outputIndex, updateData) { - const output = utils_1.checkForOutput(this.outputs, outputIndex); - utils_1.updateOutput(updateData, output); + const output = utils_js_1.checkForOutput(this.outputs, outputIndex); + utils_js_1.updateOutput(updateData, output); return this; } addUnknownKeyValToGlobal(keyVal) { - utils_1.checkHasKey( + utils_js_1.checkHasKey( keyVal, this.globalMap.unknownKeyVals, - utils_1.getEnumLength(typeFields_1.GlobalTypes), + utils_js_1.getEnumLength(typeFields_js_1.GlobalTypes), ); if (!this.globalMap.unknownKeyVals) this.globalMap.unknownKeyVals = []; this.globalMap.unknownKeyVals.push(keyVal); return this; } addUnknownKeyValToInput(inputIndex, keyVal) { - const input = utils_1.checkForInput(this.inputs, inputIndex); - utils_1.checkHasKey( + const input = utils_js_1.checkForInput(this.inputs, inputIndex); + utils_js_1.checkHasKey( keyVal, input.unknownKeyVals, - utils_1.getEnumLength(typeFields_1.InputTypes), + utils_js_1.getEnumLength(typeFields_js_1.InputTypes), ); if (!input.unknownKeyVals) input.unknownKeyVals = []; input.unknownKeyVals.push(keyVal); return this; } addUnknownKeyValToOutput(outputIndex, keyVal) { - const output = utils_1.checkForOutput(this.outputs, outputIndex); - utils_1.checkHasKey( + const output = utils_js_1.checkForOutput(this.outputs, outputIndex); + utils_js_1.checkHasKey( keyVal, output.unknownKeyVals, - utils_1.getEnumLength(typeFields_1.OutputTypes), + utils_js_1.getEnumLength(typeFields_js_1.OutputTypes), ); if (!output.unknownKeyVals) output.unknownKeyVals = []; output.unknownKeyVals.push(keyVal); @@ -96,7 +96,7 @@ class Psbt { addKeyVals.forEach(keyVal => this.addUnknownKeyValToInput(inputIndex, keyVal), ); - utils_1.addInputAttributes(this.inputs, inputData); + utils_js_1.addInputAttributes(this.inputs, inputData); return this; } addOutput(outputData) { @@ -112,12 +112,12 @@ class Psbt { addKeyVals.forEach(keyVal => this.addUnknownKeyValToOutput(outputIndex, keyVal), ); - utils_1.addOutputAttributes(this.outputs, outputData); + utils_js_1.addOutputAttributes(this.outputs, outputData); return this; } clearFinalizedInput(inputIndex) { - const input = utils_1.checkForInput(this.inputs, inputIndex); - utils_1.inputCheckUncleanFinalized(inputIndex, input); + const input = utils_js_1.checkForInput(this.inputs, inputIndex); + utils_js_1.inputCheckUncleanFinalized(inputIndex, input); for (const key of Object.keys(input)) { if ( ![ @@ -137,7 +137,7 @@ class Psbt { combine(...those) { // Combine this with those. // Return self for chaining. - const result = combiner_1.combine([this].concat(those)); + const result = index_js_1.combine([this].concat(those)); Object.assign(this, result); return this; } diff --git a/src/lib/typeFields.d.ts b/src/cjs/lib/typeFields.d.ts similarity index 100% rename from src/lib/typeFields.d.ts rename to src/cjs/lib/typeFields.d.ts diff --git a/src/lib/typeFields.js b/src/cjs/lib/typeFields.js similarity index 100% rename from src/lib/typeFields.js rename to src/cjs/lib/typeFields.js diff --git a/src/lib/utils.d.ts b/src/cjs/lib/utils.d.ts similarity index 100% rename from src/lib/utils.d.ts rename to src/cjs/lib/utils.d.ts diff --git a/src/lib/utils.js b/src/cjs/lib/utils.js similarity index 92% rename from src/lib/utils.js rename to src/cjs/lib/utils.js index 1e58ae0..a3ed9fd 100644 --- a/src/lib/utils.js +++ b/src/cjs/lib/utils.js @@ -1,6 +1,17 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); -const converter = require('./converter'); +const converter = __importStar(require('./converter/index.js')); function checkForInput(inputs, inputIndex) { const input = inputs[inputIndex]; if (input === undefined) throw new Error(`No input #${inputIndex}`); diff --git a/src/esm/lib/combiner/index.d.ts b/src/esm/lib/combiner/index.d.ts new file mode 100644 index 0000000..f4ebd8c --- /dev/null +++ b/src/esm/lib/combiner/index.d.ts @@ -0,0 +1,2 @@ +import { PsbtAttributes } from '../parser/index.js'; +export declare function combine(psbts: PsbtAttributes[]): PsbtAttributes; diff --git a/src/esm/lib/combiner/index.js b/src/esm/lib/combiner/index.js new file mode 100644 index 0000000..33ea8b0 --- /dev/null +++ b/src/esm/lib/combiner/index.js @@ -0,0 +1,80 @@ +import { psbtFromKeyVals, psbtToKeyVals } from '../parser/index.js'; +export function combine(psbts) { + const self = psbts[0]; + const selfKeyVals = psbtToKeyVals(self); + const others = psbts.slice(1); + if (others.length === 0) throw new Error('Combine: Nothing to combine'); + const selfTx = getTx(self); + if (selfTx === undefined) { + throw new Error('Combine: Self missing transaction'); + } + const selfGlobalSet = getKeySet(selfKeyVals.globalKeyVals); + const selfInputSets = selfKeyVals.inputKeyVals.map(getKeySet); + const selfOutputSets = selfKeyVals.outputKeyVals.map(getKeySet); + for (const other of others) { + const otherTx = getTx(other); + if ( + otherTx === undefined || + !otherTx.toBuffer().equals(selfTx.toBuffer()) + ) { + throw new Error( + 'Combine: One of the Psbts does not have the same transaction.', + ); + } + const otherKeyVals = psbtToKeyVals(other); + const otherGlobalSet = getKeySet(otherKeyVals.globalKeyVals); + otherGlobalSet.forEach( + keyPusher( + selfGlobalSet, + selfKeyVals.globalKeyVals, + otherKeyVals.globalKeyVals, + ), + ); + const otherInputSets = otherKeyVals.inputKeyVals.map(getKeySet); + otherInputSets.forEach((inputSet, idx) => + inputSet.forEach( + keyPusher( + selfInputSets[idx], + selfKeyVals.inputKeyVals[idx], + otherKeyVals.inputKeyVals[idx], + ), + ), + ); + const otherOutputSets = otherKeyVals.outputKeyVals.map(getKeySet); + otherOutputSets.forEach((outputSet, idx) => + outputSet.forEach( + keyPusher( + selfOutputSets[idx], + selfKeyVals.outputKeyVals[idx], + otherKeyVals.outputKeyVals[idx], + ), + ), + ); + } + return psbtFromKeyVals(selfTx, { + globalMapKeyVals: selfKeyVals.globalKeyVals, + inputKeyVals: selfKeyVals.inputKeyVals, + outputKeyVals: selfKeyVals.outputKeyVals, + }); +} +function keyPusher(selfSet, selfKeyVals, otherKeyVals) { + return key => { + if (selfSet.has(key)) return; + const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + selfKeyVals.push(newKv); + selfSet.add(key); + }; +} +function getTx(psbt) { + return psbt.globalMap.unsignedTx; +} +function getKeySet(keyVals) { + const set = new Set(); + keyVals.forEach(keyVal => { + const hex = keyVal.key.toString('hex'); + if (set.has(hex)) + throw new Error('Combine: KeyValue Map keys should be unique'); + set.add(hex); + }); + return set; +} diff --git a/src/esm/lib/converter/global/globalXpub.d.ts b/src/esm/lib/converter/global/globalXpub.d.ts new file mode 100644 index 0000000..5b96567 --- /dev/null +++ b/src/esm/lib/converter/global/globalXpub.d.ts @@ -0,0 +1,6 @@ +import { GlobalXpub, KeyValue } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): GlobalXpub; +export declare function encode(data: GlobalXpub): KeyValue; +export declare const expected = "{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }"; +export declare function check(data: any): data is GlobalXpub; +export declare function canAddToArray(array: GlobalXpub[], item: GlobalXpub, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/global/globalXpub.js b/src/esm/lib/converter/global/globalXpub.js new file mode 100644 index 0000000..fb617d3 --- /dev/null +++ b/src/esm/lib/converter/global/globalXpub.js @@ -0,0 +1,77 @@ +import { GlobalTypes } from '../../typeFields.js'; +const range = n => [...Array(n).keys()]; +export function decode(keyVal) { + if (keyVal.key[0] !== GlobalTypes.GLOBAL_XPUB) { + throw new Error( + 'Decode Error: could not decode globalXpub with key 0x' + + keyVal.key.toString('hex'), + ); + } + if (keyVal.key.length !== 79 || ![2, 3].includes(keyVal.key[46])) { + throw new Error( + 'Decode Error: globalXpub has invalid extended pubkey in key 0x' + + keyVal.key.toString('hex'), + ); + } + if ((keyVal.value.length / 4) % 1 !== 0) { + throw new Error( + 'Decode Error: Global GLOBAL_XPUB value length should be multiple of 4', + ); + } + const extendedPubkey = keyVal.key.slice(1); + const data = { + masterFingerprint: keyVal.value.slice(0, 4), + extendedPubkey, + path: 'm', + }; + for (const i of range(keyVal.value.length / 4 - 1)) { + const val = keyVal.value.readUInt32LE(i * 4 + 4); + const isHard = !!(val & 0x80000000); + const idx = val & 0x7fffffff; + data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); + } + return data; +} +export function encode(data) { + const head = Buffer.from([GlobalTypes.GLOBAL_XPUB]); + const key = Buffer.concat([head, data.extendedPubkey]); + const splitPath = data.path.split('/'); + const value = Buffer.allocUnsafe(splitPath.length * 4); + data.masterFingerprint.copy(value, 0); + let offset = 4; + splitPath.slice(1).forEach(level => { + const isHard = level.slice(-1) === "'"; + let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); + if (isHard) num += 0x80000000; + value.writeUInt32LE(num, offset); + offset += 4; + }); + return { + key, + value, + }; +} +export const expected = + '{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }'; +export function check(data) { + const epk = data.extendedPubkey; + const mfp = data.masterFingerprint; + const p = data.path; + return ( + Buffer.isBuffer(epk) && + epk.length === 78 && + [2, 3].indexOf(epk[45]) > -1 && + Buffer.isBuffer(mfp) && + mfp.length === 4 && + typeof p === 'string' && + !!p.match(/^m(\/\d+'?)*$/) + ); +} +export function canAddToArray(array, item, dupeSet) { + const dupeString = item.extendedPubkey.toString('hex'); + if (dupeSet.has(dupeString)) return false; + dupeSet.add(dupeString); + return ( + array.filter(v => v.extendedPubkey.equals(item.extendedPubkey)).length === 0 + ); +} diff --git a/src/esm/lib/converter/global/unsignedTx.d.ts b/src/esm/lib/converter/global/unsignedTx.d.ts new file mode 100644 index 0000000..ddcdce4 --- /dev/null +++ b/src/esm/lib/converter/global/unsignedTx.d.ts @@ -0,0 +1,2 @@ +import { KeyValue, Transaction } from '../../interfaces'; +export declare function encode(data: Transaction): KeyValue; diff --git a/src/esm/lib/converter/global/unsignedTx.js b/src/esm/lib/converter/global/unsignedTx.js new file mode 100644 index 0000000..a2d435a --- /dev/null +++ b/src/esm/lib/converter/global/unsignedTx.js @@ -0,0 +1,7 @@ +import { GlobalTypes } from '../../typeFields.js'; +export function encode(data) { + return { + key: Buffer.from([GlobalTypes.UNSIGNED_TX]), + value: data.toBuffer(), + }; +} diff --git a/src/esm/lib/converter/index.d.ts b/src/esm/lib/converter/index.d.ts new file mode 100644 index 0000000..e6ff4c0 --- /dev/null +++ b/src/esm/lib/converter/index.d.ts @@ -0,0 +1,109 @@ +/// +import * as globalXpub from './global/globalXpub.js'; +import * as unsignedTx from './global/unsignedTx.js'; +import * as finalScriptSig from './input/finalScriptSig.js'; +import * as finalScriptWitness from './input/finalScriptWitness.js'; +import * as nonWitnessUtxo from './input/nonWitnessUtxo.js'; +import * as partialSig from './input/partialSig.js'; +import * as porCommitment from './input/porCommitment.js'; +import * as sighashType from './input/sighashType.js'; +import * as tapKeySig from './input/tapKeySig.js'; +import * as tapLeafScript from './input/tapLeafScript.js'; +import * as tapMerkleRoot from './input/tapMerkleRoot.js'; +import * as tapScriptSig from './input/tapScriptSig.js'; +import * as witnessUtxo from './input/witnessUtxo.js'; +import * as tapTree from './output/tapTree.js'; +declare const globals: { + unsignedTx: typeof unsignedTx; + globalXpub: typeof globalXpub; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; +}; +declare const inputs: { + nonWitnessUtxo: typeof nonWitnessUtxo; + partialSig: typeof partialSig; + sighashType: typeof sighashType; + finalScriptSig: typeof finalScriptSig; + finalScriptWitness: typeof finalScriptWitness; + porCommitment: typeof porCommitment; + witnessUtxo: typeof witnessUtxo; + bip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").Bip32Derivation; + encode: (data: import("../interfaces.js").Bip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").Bip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; + }; + redeemScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + witnessScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + tapKeySig: typeof tapKeySig; + tapScriptSig: typeof tapScriptSig; + tapLeafScript: typeof tapLeafScript; + tapBip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").TapBip32Derivation; + encode: (data: import("../interfaces.js").TapBip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").TapBip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").TapBip32Derivation[], item: import("../interfaces.js").TapBip32Derivation, dupeSet: Set) => boolean; + }; + tapInternalKey: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + tapMerkleRoot: typeof tapMerkleRoot; +}; +declare const outputs: { + bip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").Bip32Derivation; + encode: (data: import("../interfaces.js").Bip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").Bip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; + }; + redeemScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + witnessScript: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + tapBip32Derivation: { + decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").TapBip32Derivation; + encode: (data: import("../interfaces.js").TapBip32Derivation) => import("../interfaces.js").KeyValue; + check: (data: any) => data is import("../interfaces.js").TapBip32Derivation; + expected: string; + canAddToArray: (array: import("../interfaces.js").TapBip32Derivation[], item: import("../interfaces.js").TapBip32Derivation, dupeSet: Set) => boolean; + }; + tapTree: typeof tapTree; + tapInternalKey: { + decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; + encode: (data: Buffer) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Buffer; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; + }; +}; +export { globals, inputs, outputs }; diff --git a/src/esm/lib/converter/index.js b/src/esm/lib/converter/index.js new file mode 100644 index 0000000..a6e0dd5 --- /dev/null +++ b/src/esm/lib/converter/index.js @@ -0,0 +1,63 @@ +import { InputTypes, OutputTypes } from '../typeFields.js'; +import * as globalXpub from './global/globalXpub.js'; +import * as unsignedTx from './global/unsignedTx.js'; +import * as finalScriptSig from './input/finalScriptSig.js'; +import * as finalScriptWitness from './input/finalScriptWitness.js'; +import * as nonWitnessUtxo from './input/nonWitnessUtxo.js'; +import * as partialSig from './input/partialSig.js'; +import * as porCommitment from './input/porCommitment.js'; +import * as sighashType from './input/sighashType.js'; +import * as tapKeySig from './input/tapKeySig.js'; +import * as tapLeafScript from './input/tapLeafScript.js'; +import * as tapMerkleRoot from './input/tapMerkleRoot.js'; +import * as tapScriptSig from './input/tapScriptSig.js'; +import * as witnessUtxo from './input/witnessUtxo.js'; +import * as tapTree from './output/tapTree.js'; +import * as bip32Derivation from './shared/bip32Derivation.js'; +import * as checkPubkey from './shared/checkPubkey.js'; +import * as redeemScript from './shared/redeemScript.js'; +import * as tapBip32Derivation from './shared/tapBip32Derivation.js'; +import * as tapInternalKey from './shared/tapInternalKey.js'; +import * as witnessScript from './shared/witnessScript.js'; +const globals = { + unsignedTx, + globalXpub, + // pass an Array of key bytes that require pubkey beside the key + checkPubkey: checkPubkey.makeChecker([]), +}; +const inputs = { + nonWitnessUtxo, + partialSig, + sighashType, + finalScriptSig, + finalScriptWitness, + porCommitment, + witnessUtxo, + bip32Derivation: bip32Derivation.makeConverter(InputTypes.BIP32_DERIVATION), + redeemScript: redeemScript.makeConverter(InputTypes.REDEEM_SCRIPT), + witnessScript: witnessScript.makeConverter(InputTypes.WITNESS_SCRIPT), + checkPubkey: checkPubkey.makeChecker([ + InputTypes.PARTIAL_SIG, + InputTypes.BIP32_DERIVATION, + ]), + tapKeySig, + tapScriptSig, + tapLeafScript, + tapBip32Derivation: tapBip32Derivation.makeConverter( + InputTypes.TAP_BIP32_DERIVATION, + ), + tapInternalKey: tapInternalKey.makeConverter(InputTypes.TAP_INTERNAL_KEY), + tapMerkleRoot, +}; +const outputs = { + bip32Derivation: bip32Derivation.makeConverter(OutputTypes.BIP32_DERIVATION), + redeemScript: redeemScript.makeConverter(OutputTypes.REDEEM_SCRIPT), + witnessScript: witnessScript.makeConverter(OutputTypes.WITNESS_SCRIPT), + checkPubkey: checkPubkey.makeChecker([OutputTypes.BIP32_DERIVATION]), + tapBip32Derivation: tapBip32Derivation.makeConverter( + OutputTypes.TAP_BIP32_DERIVATION, + ), + tapTree, + tapInternalKey: tapInternalKey.makeConverter(OutputTypes.TAP_INTERNAL_KEY), +}; +export { globals, inputs, outputs }; diff --git a/src/esm/lib/converter/input/finalScriptSig.d.ts b/src/esm/lib/converter/input/finalScriptSig.d.ts new file mode 100644 index 0000000..1d82b86 --- /dev/null +++ b/src/esm/lib/converter/input/finalScriptSig.d.ts @@ -0,0 +1,6 @@ +import { FinalScriptSig, KeyValue } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): FinalScriptSig; +export declare function encode(data: FinalScriptSig): KeyValue; +export declare const expected = "Buffer"; +export declare function check(data: any): data is FinalScriptSig; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/finalScriptSig.js b/src/esm/lib/converter/input/finalScriptSig.js new file mode 100644 index 0000000..7f6838e --- /dev/null +++ b/src/esm/lib/converter/input/finalScriptSig.js @@ -0,0 +1,24 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTSIG) { + throw new Error( + 'Decode Error: could not decode finalScriptSig with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value; +} +export function encode(data) { + const key = Buffer.from([InputTypes.FINAL_SCRIPTSIG]); + return { + key, + value: data, + }; +} +export const expected = 'Buffer'; +export function check(data) { + return Buffer.isBuffer(data); +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.finalScriptSig === undefined; +} diff --git a/src/esm/lib/converter/input/finalScriptWitness.d.ts b/src/esm/lib/converter/input/finalScriptWitness.d.ts new file mode 100644 index 0000000..d640ab6 --- /dev/null +++ b/src/esm/lib/converter/input/finalScriptWitness.d.ts @@ -0,0 +1,6 @@ +import { FinalScriptWitness, KeyValue } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): FinalScriptWitness; +export declare function encode(data: FinalScriptWitness): KeyValue; +export declare const expected = "Buffer"; +export declare function check(data: any): data is FinalScriptWitness; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/finalScriptWitness.js b/src/esm/lib/converter/input/finalScriptWitness.js new file mode 100644 index 0000000..fe5a9d2 --- /dev/null +++ b/src/esm/lib/converter/input/finalScriptWitness.js @@ -0,0 +1,26 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTWITNESS) { + throw new Error( + 'Decode Error: could not decode finalScriptWitness with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value; +} +export function encode(data) { + const key = Buffer.from([InputTypes.FINAL_SCRIPTWITNESS]); + return { + key, + value: data, + }; +} +export const expected = 'Buffer'; +export function check(data) { + return Buffer.isBuffer(data); +} +export function canAdd(currentData, newData) { + return ( + !!currentData && !!newData && currentData.finalScriptWitness === undefined + ); +} diff --git a/src/esm/lib/converter/input/nonWitnessUtxo.d.ts b/src/esm/lib/converter/input/nonWitnessUtxo.d.ts new file mode 100644 index 0000000..0e30673 --- /dev/null +++ b/src/esm/lib/converter/input/nonWitnessUtxo.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, NonWitnessUtxo } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): NonWitnessUtxo; +export declare function encode(data: NonWitnessUtxo): KeyValue; +export declare const expected = "Buffer"; +export declare function check(data: any): data is NonWitnessUtxo; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/nonWitnessUtxo.js b/src/esm/lib/converter/input/nonWitnessUtxo.js new file mode 100644 index 0000000..ee8f2b2 --- /dev/null +++ b/src/esm/lib/converter/input/nonWitnessUtxo.js @@ -0,0 +1,23 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.NON_WITNESS_UTXO) { + throw new Error( + 'Decode Error: could not decode nonWitnessUtxo with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value; +} +export function encode(data) { + return { + key: Buffer.from([InputTypes.NON_WITNESS_UTXO]), + value: data, + }; +} +export const expected = 'Buffer'; +export function check(data) { + return Buffer.isBuffer(data); +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.nonWitnessUtxo === undefined; +} diff --git a/src/esm/lib/converter/input/partialSig.d.ts b/src/esm/lib/converter/input/partialSig.d.ts new file mode 100644 index 0000000..e60f6a9 --- /dev/null +++ b/src/esm/lib/converter/input/partialSig.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, PartialSig } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): PartialSig; +export declare function encode(pSig: PartialSig): KeyValue; +export declare const expected = "{ pubkey: Buffer; signature: Buffer; }"; +export declare function check(data: any): data is PartialSig; +export declare function canAddToArray(array: PartialSig[], item: PartialSig, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/input/partialSig.js b/src/esm/lib/converter/input/partialSig.js new file mode 100644 index 0000000..9e21342 --- /dev/null +++ b/src/esm/lib/converter/input/partialSig.js @@ -0,0 +1,59 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.PARTIAL_SIG) { + throw new Error( + 'Decode Error: could not decode partialSig with key 0x' + + keyVal.key.toString('hex'), + ); + } + if ( + !(keyVal.key.length === 34 || keyVal.key.length === 66) || + ![2, 3, 4].includes(keyVal.key[1]) + ) { + throw new Error( + 'Decode Error: partialSig has invalid pubkey in key 0x' + + keyVal.key.toString('hex'), + ); + } + const pubkey = keyVal.key.slice(1); + return { + pubkey, + signature: keyVal.value, + }; +} +export function encode(pSig) { + const head = Buffer.from([InputTypes.PARTIAL_SIG]); + return { + key: Buffer.concat([head, pSig.pubkey]), + value: pSig.signature, + }; +} +export const expected = '{ pubkey: Buffer; signature: Buffer; }'; +export function check(data) { + return ( + Buffer.isBuffer(data.pubkey) && + Buffer.isBuffer(data.signature) && + [33, 65].includes(data.pubkey.length) && + [2, 3, 4].includes(data.pubkey[0]) && + isDerSigWithSighash(data.signature) + ); +} +function isDerSigWithSighash(buf) { + if (!Buffer.isBuffer(buf) || buf.length < 9) return false; + if (buf[0] !== 0x30) return false; + if (buf.length !== buf[1] + 3) return false; + if (buf[2] !== 0x02) return false; + const rLen = buf[3]; + if (rLen > 33 || rLen < 1) return false; + if (buf[3 + rLen + 1] !== 0x02) return false; + const sLen = buf[3 + rLen + 2]; + if (sLen > 33 || sLen < 1) return false; + if (buf.length !== 3 + rLen + 2 + sLen + 2) return false; + return true; +} +export function canAddToArray(array, item, dupeSet) { + const dupeString = item.pubkey.toString('hex'); + if (dupeSet.has(dupeString)) return false; + dupeSet.add(dupeString); + return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; +} diff --git a/src/esm/lib/converter/input/porCommitment.d.ts b/src/esm/lib/converter/input/porCommitment.d.ts new file mode 100644 index 0000000..1f45bb3 --- /dev/null +++ b/src/esm/lib/converter/input/porCommitment.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, PorCommitment } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): PorCommitment; +export declare function encode(data: PorCommitment): KeyValue; +export declare const expected = "string"; +export declare function check(data: any): data is PorCommitment; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/porCommitment.js b/src/esm/lib/converter/input/porCommitment.js new file mode 100644 index 0000000..5e8dad1 --- /dev/null +++ b/src/esm/lib/converter/input/porCommitment.js @@ -0,0 +1,24 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.POR_COMMITMENT) { + throw new Error( + 'Decode Error: could not decode porCommitment with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value.toString('utf8'); +} +export function encode(data) { + const key = Buffer.from([InputTypes.POR_COMMITMENT]); + return { + key, + value: Buffer.from(data, 'utf8'), + }; +} +export const expected = 'string'; +export function check(data) { + return typeof data === 'string'; +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.porCommitment === undefined; +} diff --git a/src/esm/lib/converter/input/sighashType.d.ts b/src/esm/lib/converter/input/sighashType.d.ts new file mode 100644 index 0000000..a86e990 --- /dev/null +++ b/src/esm/lib/converter/input/sighashType.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, SighashType } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): SighashType; +export declare function encode(data: SighashType): KeyValue; +export declare const expected = "number"; +export declare function check(data: any): data is SighashType; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/sighashType.js b/src/esm/lib/converter/input/sighashType.js new file mode 100644 index 0000000..d1e090e --- /dev/null +++ b/src/esm/lib/converter/input/sighashType.js @@ -0,0 +1,26 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.SIGHASH_TYPE) { + throw new Error( + 'Decode Error: could not decode sighashType with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value.readUInt32LE(0); +} +export function encode(data) { + const key = Buffer.from([InputTypes.SIGHASH_TYPE]); + const value = Buffer.allocUnsafe(4); + value.writeUInt32LE(data, 0); + return { + key, + value, + }; +} +export const expected = 'number'; +export function check(data) { + return typeof data === 'number'; +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.sighashType === undefined; +} diff --git a/src/esm/lib/converter/input/tapKeySig.d.ts b/src/esm/lib/converter/input/tapKeySig.d.ts new file mode 100644 index 0000000..6c3a46b --- /dev/null +++ b/src/esm/lib/converter/input/tapKeySig.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, TapKeySig } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): TapKeySig; +export declare function encode(value: TapKeySig): KeyValue; +export declare const expected = "Buffer"; +export declare function check(data: any): data is TapKeySig; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/tapKeySig.js b/src/esm/lib/converter/input/tapKeySig.js new file mode 100644 index 0000000..7f9f585 --- /dev/null +++ b/src/esm/lib/converter/input/tapKeySig.js @@ -0,0 +1,26 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.TAP_KEY_SIG || keyVal.key.length !== 1) { + throw new Error( + 'Decode Error: could not decode tapKeySig with key 0x' + + keyVal.key.toString('hex'), + ); + } + if (!check(keyVal.value)) { + throw new Error( + 'Decode Error: tapKeySig not a valid 64-65-byte BIP340 signature', + ); + } + return keyVal.value; +} +export function encode(value) { + const key = Buffer.from([InputTypes.TAP_KEY_SIG]); + return { key, value }; +} +export const expected = 'Buffer'; +export function check(data) { + return Buffer.isBuffer(data) && (data.length === 64 || data.length === 65); +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.tapKeySig === undefined; +} diff --git a/src/esm/lib/converter/input/tapLeafScript.d.ts b/src/esm/lib/converter/input/tapLeafScript.d.ts new file mode 100644 index 0000000..33fc2c5 --- /dev/null +++ b/src/esm/lib/converter/input/tapLeafScript.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, TapLeafScript } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): TapLeafScript; +export declare function encode(tScript: TapLeafScript): KeyValue; +export declare const expected = "{ controlBlock: Buffer; leafVersion: number, script: Buffer; }"; +export declare function check(data: any): data is TapLeafScript; +export declare function canAddToArray(array: TapLeafScript[], item: TapLeafScript, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/input/tapLeafScript.js b/src/esm/lib/converter/input/tapLeafScript.js new file mode 100644 index 0000000..b574887 --- /dev/null +++ b/src/esm/lib/converter/input/tapLeafScript.js @@ -0,0 +1,51 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.TAP_LEAF_SCRIPT) { + throw new Error( + 'Decode Error: could not decode tapLeafScript with key 0x' + + keyVal.key.toString('hex'), + ); + } + if ((keyVal.key.length - 2) % 32 !== 0) { + throw new Error( + 'Decode Error: tapLeafScript has invalid control block in key 0x' + + keyVal.key.toString('hex'), + ); + } + const leafVersion = keyVal.value[keyVal.value.length - 1]; + if ((keyVal.key[1] & 0xfe) !== leafVersion) { + throw new Error( + 'Decode Error: tapLeafScript bad leaf version in key 0x' + + keyVal.key.toString('hex'), + ); + } + const script = keyVal.value.slice(0, -1); + const controlBlock = keyVal.key.slice(1); + return { controlBlock, script, leafVersion }; +} +export function encode(tScript) { + const head = Buffer.from([InputTypes.TAP_LEAF_SCRIPT]); + const verBuf = Buffer.from([tScript.leafVersion]); + return { + key: Buffer.concat([head, tScript.controlBlock]), + value: Buffer.concat([tScript.script, verBuf]), + }; +} +export const expected = + '{ controlBlock: Buffer; leafVersion: number, script: Buffer; }'; +export function check(data) { + return ( + Buffer.isBuffer(data.controlBlock) && + (data.controlBlock.length - 1) % 32 === 0 && + (data.controlBlock[0] & 0xfe) === data.leafVersion && + Buffer.isBuffer(data.script) + ); +} +export function canAddToArray(array, item, dupeSet) { + const dupeString = item.controlBlock.toString('hex'); + if (dupeSet.has(dupeString)) return false; + dupeSet.add(dupeString); + return ( + array.filter(v => v.controlBlock.equals(item.controlBlock)).length === 0 + ); +} diff --git a/src/esm/lib/converter/input/tapMerkleRoot.d.ts b/src/esm/lib/converter/input/tapMerkleRoot.d.ts new file mode 100644 index 0000000..def3a44 --- /dev/null +++ b/src/esm/lib/converter/input/tapMerkleRoot.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, TapMerkleRoot } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): TapMerkleRoot; +export declare function encode(value: TapMerkleRoot): KeyValue; +export declare const expected = "Buffer"; +export declare function check(data: any): data is TapMerkleRoot; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/tapMerkleRoot.js b/src/esm/lib/converter/input/tapMerkleRoot.js new file mode 100644 index 0000000..e082210 --- /dev/null +++ b/src/esm/lib/converter/input/tapMerkleRoot.js @@ -0,0 +1,24 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.TAP_MERKLE_ROOT || keyVal.key.length !== 1) { + throw new Error( + 'Decode Error: could not decode tapMerkleRoot with key 0x' + + keyVal.key.toString('hex'), + ); + } + if (!check(keyVal.value)) { + throw new Error('Decode Error: tapMerkleRoot not a 32-byte hash'); + } + return keyVal.value; +} +export function encode(value) { + const key = Buffer.from([InputTypes.TAP_MERKLE_ROOT]); + return { key, value }; +} +export const expected = 'Buffer'; +export function check(data) { + return Buffer.isBuffer(data) && data.length === 32; +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.tapMerkleRoot === undefined; +} diff --git a/src/esm/lib/converter/input/tapScriptSig.d.ts b/src/esm/lib/converter/input/tapScriptSig.d.ts new file mode 100644 index 0000000..28884a9 --- /dev/null +++ b/src/esm/lib/converter/input/tapScriptSig.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, TapScriptSig } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): TapScriptSig; +export declare function encode(tSig: TapScriptSig): KeyValue; +export declare const expected = "{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }"; +export declare function check(data: any): data is TapScriptSig; +export declare function canAddToArray(array: TapScriptSig[], item: TapScriptSig, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/input/tapScriptSig.js b/src/esm/lib/converter/input/tapScriptSig.js new file mode 100644 index 0000000..0bbb59a --- /dev/null +++ b/src/esm/lib/converter/input/tapScriptSig.js @@ -0,0 +1,58 @@ +import { InputTypes } from '../../typeFields.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.TAP_SCRIPT_SIG) { + throw new Error( + 'Decode Error: could not decode tapScriptSig with key 0x' + + keyVal.key.toString('hex'), + ); + } + if (keyVal.key.length !== 65) { + throw new Error( + 'Decode Error: tapScriptSig has invalid key 0x' + + keyVal.key.toString('hex'), + ); + } + if (keyVal.value.length !== 64 && keyVal.value.length !== 65) { + throw new Error( + 'Decode Error: tapScriptSig has invalid signature in key 0x' + + keyVal.key.toString('hex'), + ); + } + const pubkey = keyVal.key.slice(1, 33); + const leafHash = keyVal.key.slice(33); + return { + pubkey, + leafHash, + signature: keyVal.value, + }; +} +export function encode(tSig) { + const head = Buffer.from([InputTypes.TAP_SCRIPT_SIG]); + return { + key: Buffer.concat([head, tSig.pubkey, tSig.leafHash]), + value: tSig.signature, + }; +} +export const expected = + '{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }'; +export function check(data) { + return ( + Buffer.isBuffer(data.pubkey) && + Buffer.isBuffer(data.leafHash) && + Buffer.isBuffer(data.signature) && + data.pubkey.length === 32 && + data.leafHash.length === 32 && + (data.signature.length === 64 || data.signature.length === 65) + ); +} +export function canAddToArray(array, item, dupeSet) { + const dupeString = + item.pubkey.toString('hex') + item.leafHash.toString('hex'); + if (dupeSet.has(dupeString)) return false; + dupeSet.add(dupeString); + return ( + array.filter( + v => v.pubkey.equals(item.pubkey) && v.leafHash.equals(item.leafHash), + ).length === 0 + ); +} diff --git a/src/esm/lib/converter/input/witnessUtxo.d.ts b/src/esm/lib/converter/input/witnessUtxo.d.ts new file mode 100644 index 0000000..d977aec --- /dev/null +++ b/src/esm/lib/converter/input/witnessUtxo.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, WitnessUtxo } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): WitnessUtxo; +export declare function encode(data: WitnessUtxo): KeyValue; +export declare const expected = "{ script: Buffer; value: number; }"; +export declare function check(data: any): data is WitnessUtxo; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/witnessUtxo.js b/src/esm/lib/converter/input/witnessUtxo.js new file mode 100644 index 0000000..0ceea31 --- /dev/null +++ b/src/esm/lib/converter/input/witnessUtxo.js @@ -0,0 +1,42 @@ +import { InputTypes } from '../../typeFields.js'; +import { readUInt64LE, writeUInt64LE } from '../tools.js'; +import * as varuint from '../varint.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== InputTypes.WITNESS_UTXO) { + throw new Error( + 'Decode Error: could not decode witnessUtxo with key 0x' + + keyVal.key.toString('hex'), + ); + } + const value = readUInt64LE(keyVal.value, 0); + let _offset = 8; + const scriptLen = varuint.decode(keyVal.value, _offset); + _offset += varuint.encodingLength(scriptLen); + const script = keyVal.value.slice(_offset); + if (script.length !== scriptLen) { + throw new Error('Decode Error: WITNESS_UTXO script is not proper length'); + } + return { + script, + value, + }; +} +export function encode(data) { + const { script, value } = data; + const varintLen = varuint.encodingLength(script.length); + const result = Buffer.allocUnsafe(8 + varintLen + script.length); + writeUInt64LE(result, value, 0); + varuint.encode(script.length, result, 8); + script.copy(result, 8 + varintLen); + return { + key: Buffer.from([InputTypes.WITNESS_UTXO]), + value: result, + }; +} +export const expected = '{ script: Buffer; value: number; }'; +export function check(data) { + return Buffer.isBuffer(data.script) && typeof data.value === 'number'; +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.witnessUtxo === undefined; +} diff --git a/src/esm/lib/converter/output/tapTree.d.ts b/src/esm/lib/converter/output/tapTree.d.ts new file mode 100644 index 0000000..06c76e1 --- /dev/null +++ b/src/esm/lib/converter/output/tapTree.d.ts @@ -0,0 +1,6 @@ +import { KeyValue, TapTree } from '../../interfaces'; +export declare function decode(keyVal: KeyValue): TapTree; +export declare function encode(tree: TapTree): KeyValue; +export declare const expected = "{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }"; +export declare function check(data: any): data is TapTree; +export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/output/tapTree.js b/src/esm/lib/converter/output/tapTree.js new file mode 100644 index 0000000..2af718e --- /dev/null +++ b/src/esm/lib/converter/output/tapTree.js @@ -0,0 +1,56 @@ +import { OutputTypes } from '../../typeFields.js'; +import * as varuint from '../varint.js'; +export function decode(keyVal) { + if (keyVal.key[0] !== OutputTypes.TAP_TREE || keyVal.key.length !== 1) { + throw new Error( + 'Decode Error: could not decode tapTree with key 0x' + + keyVal.key.toString('hex'), + ); + } + let _offset = 0; + const data = []; + while (_offset < keyVal.value.length) { + const depth = keyVal.value[_offset++]; + const leafVersion = keyVal.value[_offset++]; + const scriptLen = varuint.decode(keyVal.value, _offset); + _offset += varuint.encodingLength(scriptLen); + data.push({ + depth, + leafVersion, + script: keyVal.value.slice(_offset, _offset + scriptLen), + }); + _offset += scriptLen; + } + return { leaves: data }; +} +export function encode(tree) { + const key = Buffer.from([OutputTypes.TAP_TREE]); + const bufs = [].concat( + ...tree.leaves.map(tapLeaf => [ + Buffer.of(tapLeaf.depth, tapLeaf.leafVersion), + varuint.encode(tapLeaf.script.length), + tapLeaf.script, + ]), + ); + return { + key, + value: Buffer.concat(bufs), + }; +} +export const expected = + '{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }'; +export function check(data) { + return ( + Array.isArray(data.leaves) && + data.leaves.every( + tapLeaf => + tapLeaf.depth >= 0 && + tapLeaf.depth <= 128 && + (tapLeaf.leafVersion & 0xfe) === tapLeaf.leafVersion && + Buffer.isBuffer(tapLeaf.script), + ) + ); +} +export function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.tapTree === undefined; +} diff --git a/src/esm/lib/converter/shared/bip32Derivation.d.ts b/src/esm/lib/converter/shared/bip32Derivation.d.ts new file mode 100644 index 0000000..6528887 --- /dev/null +++ b/src/esm/lib/converter/shared/bip32Derivation.d.ts @@ -0,0 +1,9 @@ +/// +import { Bip32Derivation, KeyValue } from '../../interfaces'; +export declare function makeConverter(TYPE_BYTE: number, isValidPubkey?: (pubkey: Buffer) => boolean): { + decode: (keyVal: KeyValue) => Bip32Derivation; + encode: (data: Bip32Derivation) => KeyValue; + check: (data: any) => data is Bip32Derivation; + expected: string; + canAddToArray: (array: Bip32Derivation[], item: Bip32Derivation, dupeSet: Set) => boolean; +}; diff --git a/src/esm/lib/converter/shared/bip32Derivation.js b/src/esm/lib/converter/shared/bip32Derivation.js new file mode 100644 index 0000000..a19b8d9 --- /dev/null +++ b/src/esm/lib/converter/shared/bip32Derivation.js @@ -0,0 +1,81 @@ +const range = n => [...Array(n).keys()]; +const isValidDERKey = pubkey => + (pubkey.length === 33 && [2, 3].includes(pubkey[0])) || + (pubkey.length === 65 && 4 === pubkey[0]); +export function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { + function decode(keyVal) { + if (keyVal.key[0] !== TYPE_BYTE) { + throw new Error( + 'Decode Error: could not decode bip32Derivation with key 0x' + + keyVal.key.toString('hex'), + ); + } + const pubkey = keyVal.key.slice(1); + if (!isValidPubkey(pubkey)) { + throw new Error( + 'Decode Error: bip32Derivation has invalid pubkey in key 0x' + + keyVal.key.toString('hex'), + ); + } + if ((keyVal.value.length / 4) % 1 !== 0) { + throw new Error( + 'Decode Error: Input BIP32_DERIVATION value length should be multiple of 4', + ); + } + const data = { + masterFingerprint: keyVal.value.slice(0, 4), + pubkey, + path: 'm', + }; + for (const i of range(keyVal.value.length / 4 - 1)) { + const val = keyVal.value.readUInt32LE(i * 4 + 4); + const isHard = !!(val & 0x80000000); + const idx = val & 0x7fffffff; + data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); + } + return data; + } + function encode(data) { + const head = Buffer.from([TYPE_BYTE]); + const key = Buffer.concat([head, data.pubkey]); + const splitPath = data.path.split('/'); + const value = Buffer.allocUnsafe(splitPath.length * 4); + data.masterFingerprint.copy(value, 0); + let offset = 4; + splitPath.slice(1).forEach(level => { + const isHard = level.slice(-1) === "'"; + let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); + if (isHard) num += 0x80000000; + value.writeUInt32LE(num, offset); + offset += 4; + }); + return { + key, + value, + }; + } + const expected = + '{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }'; + function check(data) { + return ( + Buffer.isBuffer(data.pubkey) && + Buffer.isBuffer(data.masterFingerprint) && + typeof data.path === 'string' && + isValidPubkey(data.pubkey) && + data.masterFingerprint.length === 4 + ); + } + function canAddToArray(array, item, dupeSet) { + const dupeString = item.pubkey.toString('hex'); + if (dupeSet.has(dupeString)) return false; + dupeSet.add(dupeString); + return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + } + return { + decode, + encode, + check, + expected, + canAddToArray, + }; +} diff --git a/src/esm/lib/converter/shared/checkPubkey.d.ts b/src/esm/lib/converter/shared/checkPubkey.d.ts new file mode 100644 index 0000000..4b282b3 --- /dev/null +++ b/src/esm/lib/converter/shared/checkPubkey.d.ts @@ -0,0 +1,3 @@ +/// +import { KeyValue } from '../../interfaces'; +export declare function makeChecker(pubkeyTypes: number[]): (keyVal: KeyValue) => Buffer | undefined; diff --git a/src/esm/lib/converter/shared/checkPubkey.js b/src/esm/lib/converter/shared/checkPubkey.js new file mode 100644 index 0000000..41e1fe3 --- /dev/null +++ b/src/esm/lib/converter/shared/checkPubkey.js @@ -0,0 +1,18 @@ +export function makeChecker(pubkeyTypes) { + return checkPubkey; + function checkPubkey(keyVal) { + let pubkey; + if (pubkeyTypes.includes(keyVal.key[0])) { + pubkey = keyVal.key.slice(1); + if ( + !(pubkey.length === 33 || pubkey.length === 65) || + ![2, 3, 4].includes(pubkey[0]) + ) { + throw new Error( + 'Format Error: invalid pubkey in key 0x' + keyVal.key.toString('hex'), + ); + } + } + return pubkey; + } +} diff --git a/src/esm/lib/converter/shared/redeemScript.d.ts b/src/esm/lib/converter/shared/redeemScript.d.ts new file mode 100644 index 0000000..fa1f0d8 --- /dev/null +++ b/src/esm/lib/converter/shared/redeemScript.d.ts @@ -0,0 +1,8 @@ +import { KeyValue, RedeemScript } from '../../interfaces'; +export declare function makeConverter(TYPE_BYTE: number): { + decode: (keyVal: KeyValue) => RedeemScript; + encode: (data: RedeemScript) => KeyValue; + check: (data: any) => data is RedeemScript; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; +}; diff --git a/src/esm/lib/converter/shared/redeemScript.js b/src/esm/lib/converter/shared/redeemScript.js new file mode 100644 index 0000000..075f6c5 --- /dev/null +++ b/src/esm/lib/converter/shared/redeemScript.js @@ -0,0 +1,32 @@ +export function makeConverter(TYPE_BYTE) { + function decode(keyVal) { + if (keyVal.key[0] !== TYPE_BYTE) { + throw new Error( + 'Decode Error: could not decode redeemScript with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value; + } + function encode(data) { + const key = Buffer.from([TYPE_BYTE]); + return { + key, + value: data, + }; + } + const expected = 'Buffer'; + function check(data) { + return Buffer.isBuffer(data); + } + function canAdd(currentData, newData) { + return !!currentData && !!newData && currentData.redeemScript === undefined; + } + return { + decode, + encode, + check, + expected, + canAdd, + }; +} diff --git a/src/esm/lib/converter/shared/tapBip32Derivation.d.ts b/src/esm/lib/converter/shared/tapBip32Derivation.d.ts new file mode 100644 index 0000000..ef42ca9 --- /dev/null +++ b/src/esm/lib/converter/shared/tapBip32Derivation.d.ts @@ -0,0 +1,8 @@ +import { KeyValue, TapBip32Derivation } from '../../interfaces'; +export declare function makeConverter(TYPE_BYTE: number): { + decode: (keyVal: KeyValue) => TapBip32Derivation; + encode: (data: TapBip32Derivation) => KeyValue; + check: (data: any) => data is TapBip32Derivation; + expected: string; + canAddToArray: (array: TapBip32Derivation[], item: TapBip32Derivation, dupeSet: Set) => boolean; +}; diff --git a/src/lib/converter/shared/tapBip32Derivation.js b/src/esm/lib/converter/shared/tapBip32Derivation.js similarity index 86% rename from src/lib/converter/shared/tapBip32Derivation.js rename to src/esm/lib/converter/shared/tapBip32Derivation.js index 021ca9e..fa58d4b 100644 --- a/src/lib/converter/shared/tapBip32Derivation.js +++ b/src/esm/lib/converter/shared/tapBip32Derivation.js @@ -1,9 +1,7 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const varuint = require('../varint'); -const bip32Derivation = require('./bip32Derivation'); +import * as varuint from '../varint.js'; +import * as bip32Derivation from './bip32Derivation.js'; const isValidBIP340Key = pubkey => pubkey.length === 32; -function makeConverter(TYPE_BYTE) { +export function makeConverter(TYPE_BYTE) { const parent = bip32Derivation.makeConverter(TYPE_BYTE, isValidBIP340Key); function decode(keyVal) { const nHashes = varuint.decode(keyVal.value); @@ -50,4 +48,3 @@ function makeConverter(TYPE_BYTE) { canAddToArray: parent.canAddToArray, }; } -exports.makeConverter = makeConverter; diff --git a/src/esm/lib/converter/shared/tapInternalKey.d.ts b/src/esm/lib/converter/shared/tapInternalKey.d.ts new file mode 100644 index 0000000..30e5e4f --- /dev/null +++ b/src/esm/lib/converter/shared/tapInternalKey.d.ts @@ -0,0 +1,8 @@ +import { KeyValue, TapInternalKey } from '../../interfaces'; +export declare function makeConverter(TYPE_BYTE: number): { + decode: (keyVal: KeyValue) => TapInternalKey; + encode: (data: TapInternalKey) => KeyValue; + check: (data: any) => data is TapInternalKey; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; +}; diff --git a/src/esm/lib/converter/shared/tapInternalKey.js b/src/esm/lib/converter/shared/tapInternalKey.js new file mode 100644 index 0000000..772027c --- /dev/null +++ b/src/esm/lib/converter/shared/tapInternalKey.js @@ -0,0 +1,36 @@ +export function makeConverter(TYPE_BYTE) { + function decode(keyVal) { + if (keyVal.key[0] !== TYPE_BYTE || keyVal.key.length !== 1) { + throw new Error( + 'Decode Error: could not decode tapInternalKey with key 0x' + + keyVal.key.toString('hex'), + ); + } + if (keyVal.value.length !== 32) { + throw new Error( + 'Decode Error: tapInternalKey not a 32-byte x-only pubkey', + ); + } + return keyVal.value; + } + function encode(value) { + const key = Buffer.from([TYPE_BYTE]); + return { key, value }; + } + const expected = 'Buffer'; + function check(data) { + return Buffer.isBuffer(data) && data.length === 32; + } + function canAdd(currentData, newData) { + return ( + !!currentData && !!newData && currentData.tapInternalKey === undefined + ); + } + return { + decode, + encode, + check, + expected, + canAdd, + }; +} diff --git a/src/esm/lib/converter/shared/witnessScript.d.ts b/src/esm/lib/converter/shared/witnessScript.d.ts new file mode 100644 index 0000000..809c322 --- /dev/null +++ b/src/esm/lib/converter/shared/witnessScript.d.ts @@ -0,0 +1,8 @@ +import { KeyValue, WitnessScript } from '../../interfaces'; +export declare function makeConverter(TYPE_BYTE: number): { + decode: (keyVal: KeyValue) => WitnessScript; + encode: (data: WitnessScript) => KeyValue; + check: (data: any) => data is WitnessScript; + expected: string; + canAdd: (currentData: any, newData: any) => boolean; +}; diff --git a/src/esm/lib/converter/shared/witnessScript.js b/src/esm/lib/converter/shared/witnessScript.js new file mode 100644 index 0000000..56d4ab8 --- /dev/null +++ b/src/esm/lib/converter/shared/witnessScript.js @@ -0,0 +1,34 @@ +export function makeConverter(TYPE_BYTE) { + function decode(keyVal) { + if (keyVal.key[0] !== TYPE_BYTE) { + throw new Error( + 'Decode Error: could not decode witnessScript with key 0x' + + keyVal.key.toString('hex'), + ); + } + return keyVal.value; + } + function encode(data) { + const key = Buffer.from([TYPE_BYTE]); + return { + key, + value: data, + }; + } + const expected = 'Buffer'; + function check(data) { + return Buffer.isBuffer(data); + } + function canAdd(currentData, newData) { + return ( + !!currentData && !!newData && currentData.witnessScript === undefined + ); + } + return { + decode, + encode, + check, + expected, + canAdd, + }; +} diff --git a/src/esm/lib/converter/tools.d.ts b/src/esm/lib/converter/tools.d.ts new file mode 100644 index 0000000..53866c8 --- /dev/null +++ b/src/esm/lib/converter/tools.d.ts @@ -0,0 +1,8 @@ +/// +import { KeyValue } from '../interfaces'; +export declare const range: (n: number) => number[]; +export declare function reverseBuffer(buffer: Buffer): Buffer; +export declare function keyValsToBuffer(keyVals: KeyValue[]): Buffer; +export declare function keyValToBuffer(keyVal: KeyValue): Buffer; +export declare function readUInt64LE(buffer: Buffer, offset: number): number; +export declare function writeUInt64LE(buffer: Buffer, value: number, offset: number): number; diff --git a/src/esm/lib/converter/tools.js b/src/esm/lib/converter/tools.js new file mode 100644 index 0000000..f484d69 --- /dev/null +++ b/src/esm/lib/converter/tools.js @@ -0,0 +1,56 @@ +import * as varuint from './varint.js'; +export const range = n => [...Array(n).keys()]; +export function reverseBuffer(buffer) { + if (buffer.length < 1) return buffer; + let j = buffer.length - 1; + let tmp = 0; + for (let i = 0; i < buffer.length / 2; i++) { + tmp = buffer[i]; + buffer[i] = buffer[j]; + buffer[j] = tmp; + j--; + } + return buffer; +} +export function keyValsToBuffer(keyVals) { + const buffers = keyVals.map(keyValToBuffer); + buffers.push(Buffer.from([0])); + return Buffer.concat(buffers); +} +export function keyValToBuffer(keyVal) { + const keyLen = keyVal.key.length; + const valLen = keyVal.value.length; + const keyVarIntLen = varuint.encodingLength(keyLen); + const valVarIntLen = varuint.encodingLength(valLen); + const buffer = Buffer.allocUnsafe( + keyVarIntLen + keyLen + valVarIntLen + valLen, + ); + varuint.encode(keyLen, buffer, 0); + keyVal.key.copy(buffer, keyVarIntLen); + varuint.encode(valLen, buffer, keyVarIntLen + keyLen); + keyVal.value.copy(buffer, keyVarIntLen + keyLen + valVarIntLen); + return buffer; +} +// https://github.com/feross/buffer/blob/master/index.js#L1127 +function verifuint(value, max) { + if (typeof value !== 'number') + throw new Error('cannot write a non-number as a number'); + if (value < 0) + throw new Error('specified a negative value for writing an unsigned value'); + if (value > max) throw new Error('RangeError: value out of range'); + if (Math.floor(value) !== value) + throw new Error('value has a fractional component'); +} +export function readUInt64LE(buffer, offset) { + const a = buffer.readUInt32LE(offset); + let b = buffer.readUInt32LE(offset + 4); + b *= 0x100000000; + verifuint(b + a, 0x001fffffffffffff); + return b + a; +} +export function writeUInt64LE(buffer, value, offset) { + verifuint(value, 0x001fffffffffffff); + buffer.writeInt32LE(value & -1, offset); + buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); + return offset + 8; +} diff --git a/src/esm/lib/converter/varint.d.ts b/src/esm/lib/converter/varint.d.ts new file mode 100644 index 0000000..cff1d08 --- /dev/null +++ b/src/esm/lib/converter/varint.d.ts @@ -0,0 +1,4 @@ +/// +export declare function encode(_number: number, buffer?: Buffer, offset?: number): Buffer; +export declare function decode(buffer: Buffer, offset?: number): number; +export declare function encodingLength(_number: number): number; diff --git a/src/esm/lib/converter/varint.js b/src/esm/lib/converter/varint.js new file mode 100644 index 0000000..16ffedf --- /dev/null +++ b/src/esm/lib/converter/varint.js @@ -0,0 +1,72 @@ +// Number.MAX_SAFE_INTEGER +const MAX_SAFE_INTEGER = 9007199254740991; +function checkUInt53(n) { + if (n < 0 || n > MAX_SAFE_INTEGER || n % 1 !== 0) + throw new RangeError('value out of range'); +} +export function encode(_number, buffer, offset) { + checkUInt53(_number); + if (!buffer) buffer = Buffer.allocUnsafe(encodingLength(_number)); + if (!Buffer.isBuffer(buffer)) + throw new TypeError('buffer must be a Buffer instance'); + if (!offset) offset = 0; + // 8 bit + if (_number < 0xfd) { + buffer.writeUInt8(_number, offset); + Object.assign(encode, { bytes: 1 }); + // 16 bit + } else if (_number <= 0xffff) { + buffer.writeUInt8(0xfd, offset); + buffer.writeUInt16LE(_number, offset + 1); + Object.assign(encode, { bytes: 3 }); + // 32 bit + } else if (_number <= 0xffffffff) { + buffer.writeUInt8(0xfe, offset); + buffer.writeUInt32LE(_number, offset + 1); + Object.assign(encode, { bytes: 5 }); + // 64 bit + } else { + buffer.writeUInt8(0xff, offset); + buffer.writeUInt32LE(_number >>> 0, offset + 1); + buffer.writeUInt32LE((_number / 0x100000000) | 0, offset + 5); + Object.assign(encode, { bytes: 9 }); + } + return buffer; +} +export function decode(buffer, offset) { + if (!Buffer.isBuffer(buffer)) + throw new TypeError('buffer must be a Buffer instance'); + if (!offset) offset = 0; + const first = buffer.readUInt8(offset); + // 8 bit + if (first < 0xfd) { + Object.assign(decode, { bytes: 1 }); + return first; + // 16 bit + } else if (first === 0xfd) { + Object.assign(decode, { bytes: 3 }); + return buffer.readUInt16LE(offset + 1); + // 32 bit + } else if (first === 0xfe) { + Object.assign(decode, { bytes: 5 }); + return buffer.readUInt32LE(offset + 1); + // 64 bit + } else { + Object.assign(decode, { bytes: 9 }); + const lo = buffer.readUInt32LE(offset + 1); + const hi = buffer.readUInt32LE(offset + 5); + const _number = hi * 0x0100000000 + lo; + checkUInt53(_number); + return _number; + } +} +export function encodingLength(_number) { + checkUInt53(_number); + return _number < 0xfd + ? 1 + : _number <= 0xffff + ? 3 + : _number <= 0xffffffff + ? 5 + : 9; +} diff --git a/src/esm/lib/interfaces.d.ts b/src/esm/lib/interfaces.d.ts new file mode 100644 index 0000000..a445c7d --- /dev/null +++ b/src/esm/lib/interfaces.d.ts @@ -0,0 +1,115 @@ +/// +export declare type TransactionFromBuffer = (buffer: Buffer) => Transaction; +export interface Transaction { + getInputOutputCounts(): { + inputCount: number; + outputCount: number; + }; + addInput(objectArg: any): void; + addOutput(objectArg: any): void; + toBuffer(): Buffer; +} +export interface KeyValue { + key: Buffer; + value: Buffer; +} +export interface PsbtGlobal extends PsbtGlobalUpdate { + unsignedTx: Transaction; + unknownKeyVals?: KeyValue[]; +} +export interface PsbtGlobalUpdate { + globalXpub?: GlobalXpub[]; +} +export interface PsbtInput extends PsbtInputUpdate { + unknownKeyVals?: KeyValue[]; +} +export interface PsbtInputUpdate { + partialSig?: PartialSig[]; + nonWitnessUtxo?: NonWitnessUtxo; + witnessUtxo?: WitnessUtxo; + sighashType?: SighashType; + redeemScript?: RedeemScript; + witnessScript?: WitnessScript; + bip32Derivation?: Bip32Derivation[]; + finalScriptSig?: FinalScriptSig; + finalScriptWitness?: FinalScriptWitness; + porCommitment?: PorCommitment; + tapKeySig?: TapKeySig; + tapScriptSig?: TapScriptSig[]; + tapLeafScript?: TapLeafScript[]; + tapBip32Derivation?: TapBip32Derivation[]; + tapInternalKey?: TapInternalKey; + tapMerkleRoot?: TapMerkleRoot; +} +export interface PsbtInputExtended extends PsbtInput { + [index: string]: any; +} +export interface PsbtOutput extends PsbtOutputUpdate { + unknownKeyVals?: KeyValue[]; +} +export interface PsbtOutputUpdate { + redeemScript?: RedeemScript; + witnessScript?: WitnessScript; + bip32Derivation?: Bip32Derivation[]; + tapBip32Derivation?: TapBip32Derivation[]; + tapTree?: TapTree; + tapInternalKey?: TapInternalKey; +} +export interface PsbtOutputExtended extends PsbtOutput { + [index: string]: any; +} +export interface GlobalXpub { + extendedPubkey: Buffer; + masterFingerprint: Buffer; + path: string; +} +export interface PartialSig { + pubkey: Buffer; + signature: Buffer; +} +export interface Bip32Derivation { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; +} +export interface WitnessUtxo { + script: Buffer; + value: number; +} +export declare type NonWitnessUtxo = Buffer; +export declare type SighashType = number; +export declare type RedeemScript = Buffer; +export declare type WitnessScript = Buffer; +export declare type FinalScriptSig = Buffer; +export declare type FinalScriptWitness = Buffer; +export declare type PorCommitment = string; +export declare type TapKeySig = Buffer; +export interface TapScriptSig extends PartialSig { + leafHash: Buffer; +} +interface TapScript { + leafVersion: number; + script: Buffer; +} +export declare type ControlBlock = Buffer; +export interface TapLeafScript extends TapScript { + controlBlock: ControlBlock; +} +export interface TapBip32Derivation extends Bip32Derivation { + leafHashes: Buffer[]; +} +export declare type TapInternalKey = Buffer; +export declare type TapMerkleRoot = Buffer; +export interface TapLeaf extends TapScript { + depth: number; +} +export interface TapTree { + leaves: TapLeaf[]; +} +export declare type TransactionIOCountGetter = (txBuffer: Buffer) => { + inputCount: number; + outputCount: number; +}; +export declare type TransactionVersionSetter = (version: number, txBuffer: Buffer) => Buffer; +export declare type TransactionLocktimeSetter = (locktime: number, txBuffer: Buffer) => Buffer; +export {}; diff --git a/src/esm/lib/interfaces.js b/src/esm/lib/interfaces.js new file mode 100644 index 0000000..e69de29 diff --git a/src/esm/lib/parser/fromBuffer.d.ts b/src/esm/lib/parser/fromBuffer.d.ts new file mode 100644 index 0000000..87cc125 --- /dev/null +++ b/src/esm/lib/parser/fromBuffer.d.ts @@ -0,0 +1,12 @@ +/// +import { KeyValue, Transaction, TransactionFromBuffer } from '../interfaces'; +import { PsbtAttributes } from './index.js'; +export declare function psbtFromBuffer(buffer: Buffer, txGetter: TransactionFromBuffer): PsbtAttributes; +interface PsbtFromKeyValsArg { + globalMapKeyVals: KeyValue[]; + inputKeyVals: KeyValue[][]; + outputKeyVals: KeyValue[][]; +} +export declare function checkKeyBuffer(type: string, keyBuf: Buffer, keyNum: number): void; +export declare function psbtFromKeyVals(unsignedTx: Transaction, { globalMapKeyVals, inputKeyVals, outputKeyVals }: PsbtFromKeyValsArg): PsbtAttributes; +export {}; diff --git a/src/esm/lib/parser/fromBuffer.js b/src/esm/lib/parser/fromBuffer.js new file mode 100644 index 0000000..26f91d3 --- /dev/null +++ b/src/esm/lib/parser/fromBuffer.js @@ -0,0 +1,327 @@ +import * as convert from '../converter/index.js'; +import { range } from '../converter/tools.js'; +import * as varuint from '../converter/varint.js'; +import { GlobalTypes, InputTypes, OutputTypes } from '../typeFields.js'; +export function psbtFromBuffer(buffer, txGetter) { + let offset = 0; + function varSlice() { + const keyLen = varuint.decode(buffer, offset); + offset += varuint.encodingLength(keyLen); + const key = buffer.slice(offset, offset + keyLen); + offset += keyLen; + return key; + } + function readUInt32BE() { + const num = buffer.readUInt32BE(offset); + offset += 4; + return num; + } + function readUInt8() { + const num = buffer.readUInt8(offset); + offset += 1; + return num; + } + function getKeyValue() { + const key = varSlice(); + const value = varSlice(); + return { + key, + value, + }; + } + function checkEndOfKeyValPairs() { + if (offset >= buffer.length) { + throw new Error('Format Error: Unexpected End of PSBT'); + } + const isEnd = buffer.readUInt8(offset) === 0; + if (isEnd) { + offset++; + } + return isEnd; + } + if (readUInt32BE() !== 0x70736274) { + throw new Error('Format Error: Invalid Magic Number'); + } + if (readUInt8() !== 0xff) { + throw new Error( + 'Format Error: Magic Number must be followed by 0xff separator', + ); + } + const globalMapKeyVals = []; + const globalKeyIndex = {}; + while (!checkEndOfKeyValPairs()) { + const keyVal = getKeyValue(); + const hexKey = keyVal.key.toString('hex'); + if (globalKeyIndex[hexKey]) { + throw new Error( + 'Format Error: Keys must be unique for global keymap: key ' + hexKey, + ); + } + globalKeyIndex[hexKey] = 1; + globalMapKeyVals.push(keyVal); + } + const unsignedTxMaps = globalMapKeyVals.filter( + keyVal => keyVal.key[0] === GlobalTypes.UNSIGNED_TX, + ); + if (unsignedTxMaps.length !== 1) { + throw new Error('Format Error: Only one UNSIGNED_TX allowed'); + } + const unsignedTx = txGetter(unsignedTxMaps[0].value); + // Get input and output counts to loop the respective fields + const { inputCount, outputCount } = unsignedTx.getInputOutputCounts(); + const inputKeyVals = []; + const outputKeyVals = []; + // Get input fields + for (const index of range(inputCount)) { + const inputKeyIndex = {}; + const input = []; + while (!checkEndOfKeyValPairs()) { + const keyVal = getKeyValue(); + const hexKey = keyVal.key.toString('hex'); + if (inputKeyIndex[hexKey]) { + throw new Error( + 'Format Error: Keys must be unique for each input: ' + + 'input index ' + + index + + ' key ' + + hexKey, + ); + } + inputKeyIndex[hexKey] = 1; + input.push(keyVal); + } + inputKeyVals.push(input); + } + for (const index of range(outputCount)) { + const outputKeyIndex = {}; + const output = []; + while (!checkEndOfKeyValPairs()) { + const keyVal = getKeyValue(); + const hexKey = keyVal.key.toString('hex'); + if (outputKeyIndex[hexKey]) { + throw new Error( + 'Format Error: Keys must be unique for each output: ' + + 'output index ' + + index + + ' key ' + + hexKey, + ); + } + outputKeyIndex[hexKey] = 1; + output.push(keyVal); + } + outputKeyVals.push(output); + } + return psbtFromKeyVals(unsignedTx, { + globalMapKeyVals, + inputKeyVals, + outputKeyVals, + }); +} +export function checkKeyBuffer(type, keyBuf, keyNum) { + if (!keyBuf.equals(Buffer.from([keyNum]))) { + throw new Error( + `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + ); + } +} +export function psbtFromKeyVals( + unsignedTx, + { globalMapKeyVals, inputKeyVals, outputKeyVals }, +) { + // That was easy :-) + const globalMap = { + unsignedTx, + }; + let txCount = 0; + for (const keyVal of globalMapKeyVals) { + // If a globalMap item needs pubkey, uncomment + // const pubkey = convert.globals.checkPubkey(keyVal); + switch (keyVal.key[0]) { + case GlobalTypes.UNSIGNED_TX: + checkKeyBuffer('global', keyVal.key, GlobalTypes.UNSIGNED_TX); + if (txCount > 0) { + throw new Error('Format Error: GlobalMap has multiple UNSIGNED_TX'); + } + txCount++; + break; + case GlobalTypes.GLOBAL_XPUB: + if (globalMap.globalXpub === undefined) { + globalMap.globalXpub = []; + } + globalMap.globalXpub.push(convert.globals.globalXpub.decode(keyVal)); + break; + default: + // This will allow inclusion during serialization. + if (!globalMap.unknownKeyVals) globalMap.unknownKeyVals = []; + globalMap.unknownKeyVals.push(keyVal); + } + } + // Get input and output counts to loop the respective fields + const inputCount = inputKeyVals.length; + const outputCount = outputKeyVals.length; + const inputs = []; + const outputs = []; + // Get input fields + for (const index of range(inputCount)) { + const input = {}; + for (const keyVal of inputKeyVals[index]) { + convert.inputs.checkPubkey(keyVal); + switch (keyVal.key[0]) { + case InputTypes.NON_WITNESS_UTXO: + checkKeyBuffer('input', keyVal.key, InputTypes.NON_WITNESS_UTXO); + if (input.nonWitnessUtxo !== undefined) { + throw new Error( + 'Format Error: Input has multiple NON_WITNESS_UTXO', + ); + } + input.nonWitnessUtxo = convert.inputs.nonWitnessUtxo.decode(keyVal); + break; + case InputTypes.WITNESS_UTXO: + checkKeyBuffer('input', keyVal.key, InputTypes.WITNESS_UTXO); + if (input.witnessUtxo !== undefined) { + throw new Error('Format Error: Input has multiple WITNESS_UTXO'); + } + input.witnessUtxo = convert.inputs.witnessUtxo.decode(keyVal); + break; + case InputTypes.PARTIAL_SIG: + if (input.partialSig === undefined) { + input.partialSig = []; + } + input.partialSig.push(convert.inputs.partialSig.decode(keyVal)); + break; + case InputTypes.SIGHASH_TYPE: + checkKeyBuffer('input', keyVal.key, InputTypes.SIGHASH_TYPE); + if (input.sighashType !== undefined) { + throw new Error('Format Error: Input has multiple SIGHASH_TYPE'); + } + input.sighashType = convert.inputs.sighashType.decode(keyVal); + break; + case InputTypes.REDEEM_SCRIPT: + checkKeyBuffer('input', keyVal.key, InputTypes.REDEEM_SCRIPT); + if (input.redeemScript !== undefined) { + throw new Error('Format Error: Input has multiple REDEEM_SCRIPT'); + } + input.redeemScript = convert.inputs.redeemScript.decode(keyVal); + break; + case InputTypes.WITNESS_SCRIPT: + checkKeyBuffer('input', keyVal.key, InputTypes.WITNESS_SCRIPT); + if (input.witnessScript !== undefined) { + throw new Error('Format Error: Input has multiple WITNESS_SCRIPT'); + } + input.witnessScript = convert.inputs.witnessScript.decode(keyVal); + break; + case InputTypes.BIP32_DERIVATION: + if (input.bip32Derivation === undefined) { + input.bip32Derivation = []; + } + input.bip32Derivation.push( + convert.inputs.bip32Derivation.decode(keyVal), + ); + break; + case InputTypes.FINAL_SCRIPTSIG: + checkKeyBuffer('input', keyVal.key, InputTypes.FINAL_SCRIPTSIG); + input.finalScriptSig = convert.inputs.finalScriptSig.decode(keyVal); + break; + case InputTypes.FINAL_SCRIPTWITNESS: + checkKeyBuffer('input', keyVal.key, InputTypes.FINAL_SCRIPTWITNESS); + input.finalScriptWitness = convert.inputs.finalScriptWitness.decode( + keyVal, + ); + break; + case InputTypes.POR_COMMITMENT: + checkKeyBuffer('input', keyVal.key, InputTypes.POR_COMMITMENT); + input.porCommitment = convert.inputs.porCommitment.decode(keyVal); + break; + case InputTypes.TAP_KEY_SIG: + checkKeyBuffer('input', keyVal.key, InputTypes.TAP_KEY_SIG); + input.tapKeySig = convert.inputs.tapKeySig.decode(keyVal); + break; + case InputTypes.TAP_SCRIPT_SIG: + if (input.tapScriptSig === undefined) { + input.tapScriptSig = []; + } + input.tapScriptSig.push(convert.inputs.tapScriptSig.decode(keyVal)); + break; + case InputTypes.TAP_LEAF_SCRIPT: + if (input.tapLeafScript === undefined) { + input.tapLeafScript = []; + } + input.tapLeafScript.push(convert.inputs.tapLeafScript.decode(keyVal)); + break; + case InputTypes.TAP_BIP32_DERIVATION: + if (input.tapBip32Derivation === undefined) { + input.tapBip32Derivation = []; + } + input.tapBip32Derivation.push( + convert.inputs.tapBip32Derivation.decode(keyVal), + ); + break; + case InputTypes.TAP_INTERNAL_KEY: + checkKeyBuffer('input', keyVal.key, InputTypes.TAP_INTERNAL_KEY); + input.tapInternalKey = convert.inputs.tapInternalKey.decode(keyVal); + break; + case InputTypes.TAP_MERKLE_ROOT: + checkKeyBuffer('input', keyVal.key, InputTypes.TAP_MERKLE_ROOT); + input.tapMerkleRoot = convert.inputs.tapMerkleRoot.decode(keyVal); + break; + default: + // This will allow inclusion during serialization. + if (!input.unknownKeyVals) input.unknownKeyVals = []; + input.unknownKeyVals.push(keyVal); + } + } + inputs.push(input); + } + for (const index of range(outputCount)) { + const output = {}; + for (const keyVal of outputKeyVals[index]) { + convert.outputs.checkPubkey(keyVal); + switch (keyVal.key[0]) { + case OutputTypes.REDEEM_SCRIPT: + checkKeyBuffer('output', keyVal.key, OutputTypes.REDEEM_SCRIPT); + if (output.redeemScript !== undefined) { + throw new Error('Format Error: Output has multiple REDEEM_SCRIPT'); + } + output.redeemScript = convert.outputs.redeemScript.decode(keyVal); + break; + case OutputTypes.WITNESS_SCRIPT: + checkKeyBuffer('output', keyVal.key, OutputTypes.WITNESS_SCRIPT); + if (output.witnessScript !== undefined) { + throw new Error('Format Error: Output has multiple WITNESS_SCRIPT'); + } + output.witnessScript = convert.outputs.witnessScript.decode(keyVal); + break; + case OutputTypes.BIP32_DERIVATION: + if (output.bip32Derivation === undefined) { + output.bip32Derivation = []; + } + output.bip32Derivation.push( + convert.outputs.bip32Derivation.decode(keyVal), + ); + break; + case OutputTypes.TAP_INTERNAL_KEY: + checkKeyBuffer('output', keyVal.key, OutputTypes.TAP_INTERNAL_KEY); + output.tapInternalKey = convert.outputs.tapInternalKey.decode(keyVal); + break; + case OutputTypes.TAP_TREE: + checkKeyBuffer('output', keyVal.key, OutputTypes.TAP_TREE); + output.tapTree = convert.outputs.tapTree.decode(keyVal); + break; + case OutputTypes.TAP_BIP32_DERIVATION: + if (output.tapBip32Derivation === undefined) { + output.tapBip32Derivation = []; + } + output.tapBip32Derivation.push( + convert.outputs.tapBip32Derivation.decode(keyVal), + ); + break; + default: + if (!output.unknownKeyVals) output.unknownKeyVals = []; + output.unknownKeyVals.push(keyVal); + } + } + outputs.push(output); + } + return { globalMap, inputs, outputs }; +} diff --git a/src/esm/lib/parser/index.d.ts b/src/esm/lib/parser/index.d.ts new file mode 100644 index 0000000..bbd9eae --- /dev/null +++ b/src/esm/lib/parser/index.d.ts @@ -0,0 +1,8 @@ +import { PsbtGlobal, PsbtInput, PsbtOutput } from '../interfaces'; +export * from './fromBuffer.js'; +export * from './toBuffer.js'; +export interface PsbtAttributes { + globalMap: PsbtGlobal; + inputs: PsbtInput[]; + outputs: PsbtOutput[]; +} diff --git a/src/esm/lib/parser/index.js b/src/esm/lib/parser/index.js new file mode 100644 index 0000000..b16096c --- /dev/null +++ b/src/esm/lib/parser/index.js @@ -0,0 +1,2 @@ +export * from './fromBuffer.js'; +export * from './toBuffer.js'; diff --git a/src/esm/lib/parser/toBuffer.d.ts b/src/esm/lib/parser/toBuffer.d.ts new file mode 100644 index 0000000..04d0e19 --- /dev/null +++ b/src/esm/lib/parser/toBuffer.d.ts @@ -0,0 +1,9 @@ +/// +import { KeyValue } from '../interfaces'; +import { PsbtAttributes } from './index.js'; +export declare function psbtToBuffer({ globalMap, inputs, outputs, }: PsbtAttributes): Buffer; +export declare function psbtToKeyVals({ globalMap, inputs, outputs, }: PsbtAttributes): { + globalKeyVals: KeyValue[]; + inputKeyVals: KeyValue[][]; + outputKeyVals: KeyValue[][]; +}; diff --git a/src/esm/lib/parser/toBuffer.js b/src/esm/lib/parser/toBuffer.js new file mode 100644 index 0000000..61129a3 --- /dev/null +++ b/src/esm/lib/parser/toBuffer.js @@ -0,0 +1,58 @@ +import * as convert from '../converter/index.js'; +import { keyValsToBuffer } from '../converter/tools.js'; +export function psbtToBuffer({ globalMap, inputs, outputs }) { + const { globalKeyVals, inputKeyVals, outputKeyVals } = psbtToKeyVals({ + globalMap, + inputs, + outputs, + }); + const globalBuffer = keyValsToBuffer(globalKeyVals); + const keyValsOrEmptyToBuffer = keyVals => + keyVals.length === 0 ? [Buffer.from([0])] : keyVals.map(keyValsToBuffer); + const inputBuffers = keyValsOrEmptyToBuffer(inputKeyVals); + const outputBuffers = keyValsOrEmptyToBuffer(outputKeyVals); + const header = Buffer.allocUnsafe(5); + header.writeUIntBE(0x70736274ff, 0, 5); + return Buffer.concat( + [header, globalBuffer].concat(inputBuffers, outputBuffers), + ); +} +const sortKeyVals = (a, b) => { + return a.key.compare(b.key); +}; +function keyValsFromMap(keyValMap, converterFactory) { + const keyHexSet = new Set(); + const keyVals = Object.entries(keyValMap).reduce((result, [key, value]) => { + if (key === 'unknownKeyVals') return result; + // We are checking for undefined anyways. So ignore TS error + // @ts-ignore + const converter = converterFactory[key]; + if (converter === undefined) return result; + const encodedKeyVals = (Array.isArray(value) ? value : [value]).map( + converter.encode, + ); + const keyHexes = encodedKeyVals.map(kv => kv.key.toString('hex')); + keyHexes.forEach(hex => { + if (keyHexSet.has(hex)) + throw new Error('Serialize Error: Duplicate key: ' + hex); + keyHexSet.add(hex); + }); + return result.concat(encodedKeyVals); + }, []); + // Get other keyVals that have not yet been gotten + const otherKeyVals = keyValMap.unknownKeyVals + ? keyValMap.unknownKeyVals.filter(keyVal => { + return !keyHexSet.has(keyVal.key.toString('hex')); + }) + : []; + return keyVals.concat(otherKeyVals).sort(sortKeyVals); +} +export function psbtToKeyVals({ globalMap, inputs, outputs }) { + // First parse the global keyVals + // Get any extra keyvals to pass along + return { + globalKeyVals: keyValsFromMap(globalMap, convert.globals), + inputKeyVals: inputs.map(i => keyValsFromMap(i, convert.inputs)), + outputKeyVals: outputs.map(o => keyValsFromMap(o, convert.outputs)), + }; +} diff --git a/src/esm/lib/psbt.d.ts b/src/esm/lib/psbt.d.ts new file mode 100644 index 0000000..184758c --- /dev/null +++ b/src/esm/lib/psbt.d.ts @@ -0,0 +1,25 @@ +/// +import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, Transaction, TransactionFromBuffer } from './interfaces'; +export declare class Psbt { + static fromBase64(this: T, data: string, txFromBuffer: TransactionFromBuffer): InstanceType; + static fromHex(this: T, data: string, txFromBuffer: TransactionFromBuffer): InstanceType; + static fromBuffer(this: T, buffer: Buffer, txFromBuffer: TransactionFromBuffer): InstanceType; + readonly inputs: PsbtInput[]; + readonly outputs: PsbtOutput[]; + readonly globalMap: PsbtGlobal; + constructor(tx: Transaction); + toBase64(): string; + toHex(): string; + toBuffer(): Buffer; + updateGlobal(updateData: PsbtGlobalUpdate): this; + updateInput(inputIndex: number, updateData: PsbtInputUpdate): this; + updateOutput(outputIndex: number, updateData: PsbtOutputUpdate): this; + addUnknownKeyValToGlobal(keyVal: KeyValue): this; + addUnknownKeyValToInput(inputIndex: number, keyVal: KeyValue): this; + addUnknownKeyValToOutput(outputIndex: number, keyVal: KeyValue): this; + addInput(inputData: PsbtInputExtended): this; + addOutput(outputData: PsbtOutputExtended): this; + clearFinalizedInput(inputIndex: number): this; + combine(...those: this[]): this; + getTransaction(): Buffer; +} diff --git a/src/esm/lib/psbt.js b/src/esm/lib/psbt.js new file mode 100644 index 0000000..2f2369b --- /dev/null +++ b/src/esm/lib/psbt.js @@ -0,0 +1,148 @@ +import { combine } from './combiner/index.js'; +import { psbtFromBuffer, psbtToBuffer } from './parser/index.js'; +import { GlobalTypes, InputTypes, OutputTypes } from './typeFields.js'; +import { + addInputAttributes, + addOutputAttributes, + checkForInput, + checkForOutput, + checkHasKey, + getEnumLength, + inputCheckUncleanFinalized, + updateGlobal, + updateInput, + updateOutput, +} from './utils.js'; +export class Psbt { + constructor(tx) { + this.inputs = []; + this.outputs = []; + this.globalMap = { + unsignedTx: tx, + }; + } + static fromBase64(data, txFromBuffer) { + const buffer = Buffer.from(data, 'base64'); + return this.fromBuffer(buffer, txFromBuffer); + } + static fromHex(data, txFromBuffer) { + const buffer = Buffer.from(data, 'hex'); + return this.fromBuffer(buffer, txFromBuffer); + } + static fromBuffer(buffer, txFromBuffer) { + const results = psbtFromBuffer(buffer, txFromBuffer); + const psbt = new this(results.globalMap.unsignedTx); + Object.assign(psbt, results); + return psbt; + } + toBase64() { + const buffer = this.toBuffer(); + return buffer.toString('base64'); + } + toHex() { + const buffer = this.toBuffer(); + return buffer.toString('hex'); + } + toBuffer() { + return psbtToBuffer(this); + } + updateGlobal(updateData) { + updateGlobal(updateData, this.globalMap); + return this; + } + updateInput(inputIndex, updateData) { + const input = checkForInput(this.inputs, inputIndex); + updateInput(updateData, input); + return this; + } + updateOutput(outputIndex, updateData) { + const output = checkForOutput(this.outputs, outputIndex); + updateOutput(updateData, output); + return this; + } + addUnknownKeyValToGlobal(keyVal) { + checkHasKey( + keyVal, + this.globalMap.unknownKeyVals, + getEnumLength(GlobalTypes), + ); + if (!this.globalMap.unknownKeyVals) this.globalMap.unknownKeyVals = []; + this.globalMap.unknownKeyVals.push(keyVal); + return this; + } + addUnknownKeyValToInput(inputIndex, keyVal) { + const input = checkForInput(this.inputs, inputIndex); + checkHasKey(keyVal, input.unknownKeyVals, getEnumLength(InputTypes)); + if (!input.unknownKeyVals) input.unknownKeyVals = []; + input.unknownKeyVals.push(keyVal); + return this; + } + addUnknownKeyValToOutput(outputIndex, keyVal) { + const output = checkForOutput(this.outputs, outputIndex); + checkHasKey(keyVal, output.unknownKeyVals, getEnumLength(OutputTypes)); + if (!output.unknownKeyVals) output.unknownKeyVals = []; + output.unknownKeyVals.push(keyVal); + return this; + } + addInput(inputData) { + this.globalMap.unsignedTx.addInput(inputData); + this.inputs.push({ + unknownKeyVals: [], + }); + const addKeyVals = inputData.unknownKeyVals || []; + const inputIndex = this.inputs.length - 1; + if (!Array.isArray(addKeyVals)) { + throw new Error('unknownKeyVals must be an Array'); + } + addKeyVals.forEach(keyVal => + this.addUnknownKeyValToInput(inputIndex, keyVal), + ); + addInputAttributes(this.inputs, inputData); + return this; + } + addOutput(outputData) { + this.globalMap.unsignedTx.addOutput(outputData); + this.outputs.push({ + unknownKeyVals: [], + }); + const addKeyVals = outputData.unknownKeyVals || []; + const outputIndex = this.outputs.length - 1; + if (!Array.isArray(addKeyVals)) { + throw new Error('unknownKeyVals must be an Array'); + } + addKeyVals.forEach(keyVal => + this.addUnknownKeyValToOutput(outputIndex, keyVal), + ); + addOutputAttributes(this.outputs, outputData); + return this; + } + clearFinalizedInput(inputIndex) { + const input = checkForInput(this.inputs, inputIndex); + inputCheckUncleanFinalized(inputIndex, input); + for (const key of Object.keys(input)) { + if ( + ![ + 'witnessUtxo', + 'nonWitnessUtxo', + 'finalScriptSig', + 'finalScriptWitness', + 'unknownKeyVals', + ].includes(key) + ) { + // @ts-ignore + delete input[key]; + } + } + return this; + } + combine(...those) { + // Combine this with those. + // Return self for chaining. + const result = combine([this].concat(those)); + Object.assign(this, result); + return this; + } + getTransaction() { + return this.globalMap.unsignedTx.toBuffer(); + } +} diff --git a/src/esm/lib/typeFields.d.ts b/src/esm/lib/typeFields.d.ts new file mode 100644 index 0000000..e8cbcbe --- /dev/null +++ b/src/esm/lib/typeFields.d.ts @@ -0,0 +1,33 @@ +export declare enum GlobalTypes { + UNSIGNED_TX = 0, + GLOBAL_XPUB = 1 +} +export declare const GLOBAL_TYPE_NAMES: string[]; +export declare enum InputTypes { + NON_WITNESS_UTXO = 0, + WITNESS_UTXO = 1, + PARTIAL_SIG = 2, + SIGHASH_TYPE = 3, + REDEEM_SCRIPT = 4, + WITNESS_SCRIPT = 5, + BIP32_DERIVATION = 6, + FINAL_SCRIPTSIG = 7, + FINAL_SCRIPTWITNESS = 8, + POR_COMMITMENT = 9, + TAP_KEY_SIG = 19, + TAP_SCRIPT_SIG = 20, + TAP_LEAF_SCRIPT = 21, + TAP_BIP32_DERIVATION = 22, + TAP_INTERNAL_KEY = 23, + TAP_MERKLE_ROOT = 24 +} +export declare const INPUT_TYPE_NAMES: string[]; +export declare enum OutputTypes { + REDEEM_SCRIPT = 0, + WITNESS_SCRIPT = 1, + BIP32_DERIVATION = 2, + TAP_INTERNAL_KEY = 5, + TAP_TREE = 6, + TAP_BIP32_DERIVATION = 7 +} +export declare const OUTPUT_TYPE_NAMES: string[]; diff --git a/src/esm/lib/typeFields.js b/src/esm/lib/typeFields.js new file mode 100644 index 0000000..23cc1e3 --- /dev/null +++ b/src/esm/lib/typeFields.js @@ -0,0 +1,62 @@ +export var GlobalTypes; +(function(GlobalTypes) { + GlobalTypes[(GlobalTypes['UNSIGNED_TX'] = 0)] = 'UNSIGNED_TX'; + GlobalTypes[(GlobalTypes['GLOBAL_XPUB'] = 1)] = 'GLOBAL_XPUB'; +})(GlobalTypes || (GlobalTypes = {})); +export const GLOBAL_TYPE_NAMES = ['unsignedTx', 'globalXpub']; +export var InputTypes; +(function(InputTypes) { + InputTypes[(InputTypes['NON_WITNESS_UTXO'] = 0)] = 'NON_WITNESS_UTXO'; + InputTypes[(InputTypes['WITNESS_UTXO'] = 1)] = 'WITNESS_UTXO'; + InputTypes[(InputTypes['PARTIAL_SIG'] = 2)] = 'PARTIAL_SIG'; + InputTypes[(InputTypes['SIGHASH_TYPE'] = 3)] = 'SIGHASH_TYPE'; + InputTypes[(InputTypes['REDEEM_SCRIPT'] = 4)] = 'REDEEM_SCRIPT'; + InputTypes[(InputTypes['WITNESS_SCRIPT'] = 5)] = 'WITNESS_SCRIPT'; + InputTypes[(InputTypes['BIP32_DERIVATION'] = 6)] = 'BIP32_DERIVATION'; + InputTypes[(InputTypes['FINAL_SCRIPTSIG'] = 7)] = 'FINAL_SCRIPTSIG'; + InputTypes[(InputTypes['FINAL_SCRIPTWITNESS'] = 8)] = 'FINAL_SCRIPTWITNESS'; + InputTypes[(InputTypes['POR_COMMITMENT'] = 9)] = 'POR_COMMITMENT'; + InputTypes[(InputTypes['TAP_KEY_SIG'] = 19)] = 'TAP_KEY_SIG'; + InputTypes[(InputTypes['TAP_SCRIPT_SIG'] = 20)] = 'TAP_SCRIPT_SIG'; + InputTypes[(InputTypes['TAP_LEAF_SCRIPT'] = 21)] = 'TAP_LEAF_SCRIPT'; + InputTypes[(InputTypes['TAP_BIP32_DERIVATION'] = 22)] = + 'TAP_BIP32_DERIVATION'; + InputTypes[(InputTypes['TAP_INTERNAL_KEY'] = 23)] = 'TAP_INTERNAL_KEY'; + InputTypes[(InputTypes['TAP_MERKLE_ROOT'] = 24)] = 'TAP_MERKLE_ROOT'; +})(InputTypes || (InputTypes = {})); +export const INPUT_TYPE_NAMES = [ + 'nonWitnessUtxo', + 'witnessUtxo', + 'partialSig', + 'sighashType', + 'redeemScript', + 'witnessScript', + 'bip32Derivation', + 'finalScriptSig', + 'finalScriptWitness', + 'porCommitment', + 'tapKeySig', + 'tapScriptSig', + 'tapLeafScript', + 'tapBip32Derivation', + 'tapInternalKey', + 'tapMerkleRoot', +]; +export var OutputTypes; +(function(OutputTypes) { + OutputTypes[(OutputTypes['REDEEM_SCRIPT'] = 0)] = 'REDEEM_SCRIPT'; + OutputTypes[(OutputTypes['WITNESS_SCRIPT'] = 1)] = 'WITNESS_SCRIPT'; + OutputTypes[(OutputTypes['BIP32_DERIVATION'] = 2)] = 'BIP32_DERIVATION'; + OutputTypes[(OutputTypes['TAP_INTERNAL_KEY'] = 5)] = 'TAP_INTERNAL_KEY'; + OutputTypes[(OutputTypes['TAP_TREE'] = 6)] = 'TAP_TREE'; + OutputTypes[(OutputTypes['TAP_BIP32_DERIVATION'] = 7)] = + 'TAP_BIP32_DERIVATION'; +})(OutputTypes || (OutputTypes = {})); +export const OUTPUT_TYPE_NAMES = [ + 'redeemScript', + 'witnessScript', + 'bip32Derivation', + 'tapInternalKey', + 'tapTree', + 'tapBip32Derivation', +]; diff --git a/src/esm/lib/utils.d.ts b/src/esm/lib/utils.d.ts new file mode 100644 index 0000000..3ba2cda --- /dev/null +++ b/src/esm/lib/utils.d.ts @@ -0,0 +1,14 @@ +/// +import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate } from './interfaces'; +export declare function checkForInput(inputs: PsbtInput[], inputIndex: number): PsbtInput; +export declare function checkForOutput(outputs: PsbtOutput[], outputIndex: number): PsbtOutput; +export declare function checkHasKey(checkKeyVal: KeyValue, keyVals: KeyValue[] | undefined, enumLength: number): void; +export declare function getEnumLength(myenum: any): number; +export declare function inputCheckUncleanFinalized(inputIndex: number, input: PsbtInput): void; +export declare const updateGlobal: (updateData: PsbtGlobalUpdate, mainData: PsbtGlobal) => void; +export declare const updateInput: (updateData: PsbtInputUpdate, mainData: PsbtInput) => void; +export declare const updateOutput: (updateData: PsbtOutputUpdate, mainData: PsbtOutput) => void; +export declare function addInputAttributes(inputs: PsbtInput[], data: any): void; +export declare function addOutputAttributes(outputs: PsbtOutput[], data: any): void; +export declare function defaultVersionSetter(version: number, txBuf: Buffer): Buffer; +export declare function defaultLocktimeSetter(locktime: number, txBuf: Buffer): Buffer; diff --git a/src/esm/lib/utils.js b/src/esm/lib/utils.js new file mode 100644 index 0000000..1866586 --- /dev/null +++ b/src/esm/lib/utils.js @@ -0,0 +1,127 @@ +import * as converter from './converter/index.js'; +export function checkForInput(inputs, inputIndex) { + const input = inputs[inputIndex]; + if (input === undefined) throw new Error(`No input #${inputIndex}`); + return input; +} +export function checkForOutput(outputs, outputIndex) { + const output = outputs[outputIndex]; + if (output === undefined) throw new Error(`No output #${outputIndex}`); + return output; +} +export function checkHasKey(checkKeyVal, keyVals, enumLength) { + if (checkKeyVal.key[0] < enumLength) { + throw new Error( + `Use the method for your specific key instead of addUnknownKeyVal*`, + ); + } + if ( + keyVals && + keyVals.filter(kv => kv.key.equals(checkKeyVal.key)).length !== 0 + ) { + throw new Error(`Duplicate Key: ${checkKeyVal.key.toString('hex')}`); + } +} +export function getEnumLength(myenum) { + let count = 0; + Object.keys(myenum).forEach(val => { + if (Number(isNaN(Number(val)))) { + count++; + } + }); + return count; +} +export function inputCheckUncleanFinalized(inputIndex, input) { + let result = false; + if (input.nonWitnessUtxo || input.witnessUtxo) { + const needScriptSig = !!input.redeemScript; + const needWitnessScript = !!input.witnessScript; + const scriptSigOK = !needScriptSig || !!input.finalScriptSig; + const witnessScriptOK = !needWitnessScript || !!input.finalScriptWitness; + const hasOneFinal = !!input.finalScriptSig || !!input.finalScriptWitness; + result = scriptSigOK && witnessScriptOK && hasOneFinal; + } + if (result === false) { + throw new Error( + `Input #${inputIndex} has too much or too little data to clean`, + ); + } +} +function throwForUpdateMaker(typeName, name, expected, data) { + throw new Error( + `Data for ${typeName} key ${name} is incorrect: Expected ` + + `${expected} and got ${JSON.stringify(data)}`, + ); +} +function updateMaker(typeName) { + return (updateData, mainData) => { + for (const name of Object.keys(updateData)) { + // @ts-ignore + const data = updateData[name]; + // @ts-ignore + const { canAdd, canAddToArray, check, expected } = + // @ts-ignore + converter[typeName + 's'][name] || {}; + const isArray = !!canAddToArray; + // If unknown data. ignore and do not add + if (check) { + if (isArray) { + if ( + !Array.isArray(data) || + // @ts-ignore + (mainData[name] && !Array.isArray(mainData[name])) + ) { + throw new Error(`Key type ${name} must be an array`); + } + if (!data.every(check)) { + throwForUpdateMaker(typeName, name, expected, data); + } + // @ts-ignore + const arr = mainData[name] || []; + const dupeCheckSet = new Set(); + if (!data.every(v => canAddToArray(arr, v, dupeCheckSet))) { + throw new Error('Can not add duplicate data to array'); + } + // @ts-ignore + mainData[name] = arr.concat(data); + } else { + if (!check(data)) { + throwForUpdateMaker(typeName, name, expected, data); + } + if (!canAdd(mainData, data)) { + throw new Error(`Can not add duplicate data to ${typeName}`); + } + // @ts-ignore + mainData[name] = data; + } + } + } + }; +} +export const updateGlobal = updateMaker('global'); +export const updateInput = updateMaker('input'); +export const updateOutput = updateMaker('output'); +export function addInputAttributes(inputs, data) { + const index = inputs.length - 1; + const input = checkForInput(inputs, index); + updateInput(data, input); +} +export function addOutputAttributes(outputs, data) { + const index = outputs.length - 1; + const output = checkForOutput(outputs, index); + updateOutput(data, output); +} +export function defaultVersionSetter(version, txBuf) { + if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { + throw new Error('Set Version: Invalid Transaction'); + } + txBuf.writeUInt32LE(version, 0); + return txBuf; +} +export function defaultLocktimeSetter(locktime, txBuf) { + if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { + throw new Error('Set Locktime: Invalid Transaction'); + } + txBuf.writeUInt32LE(locktime, txBuf.length - 4); + return txBuf; +} diff --git a/src/esm/tests/addInputOutput.d.ts b/src/esm/tests/addInputOutput.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/addInputOutput.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/addInputOutput.js b/src/esm/tests/addInputOutput.js similarity index 78% rename from src/tests/addInputOutput.js rename to src/esm/tests/addInputOutput.js index f1e2f15..a1512eb 100644 --- a/src/tests/addInputOutput.js +++ b/src/esm/tests/addInputOutput.js @@ -1,10 +1,8 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../lib/psbt'); -const txTools_1 = require('./utils/txTools'); +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { getDefaultTx, transactionFromBuffer } from './utils/txTools.js'; tape('Test: add Input Output', t => { - const psbt = new psbt_1.Psbt(txTools_1.getDefaultTx()); + const psbt = new Psbt(getDefaultTx()); psbt.addInput({ hash: '865dce988413971fd812d0e81a3395ed916a87ea533e1a16c0f4e15df96fa7d4', index: 3, @@ -28,10 +26,7 @@ tape('Test: add Input Output', t => { value: 987654321, }); const hex = psbt.toHex(); - const hex2 = psbt_1.Psbt.fromHex( - hex, - txTools_1.transactionFromBuffer, - ).toHex(); + const hex2 = Psbt.fromHex(hex, transactionFromBuffer).toHex(); t.equal( hex, '70736274ff01009c0100000002d4a76ff95de1f4c0161a3e53ea876a91ed95331ae8d01' + diff --git a/src/esm/tests/combine.d.ts b/src/esm/tests/combine.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/combine.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/combine.js b/src/esm/tests/combine.js similarity index 66% rename from src/tests/combine.js rename to src/esm/tests/combine.js index 12df0f1..6ebffec 100644 --- a/src/tests/combine.js +++ b/src/esm/tests/combine.js @@ -1,14 +1,10 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../lib/psbt'); -const combine_1 = require('./fixtures/combine'); -const txTools_1 = require('./utils/txTools'); -for (const f of combine_1.fixtures) { +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/combine.js'; +import { transactionFromBuffer } from './utils/txTools.js'; +for (const f of fixtures) { tape('Test: ' + f.description, t => { - const psbts = f.psbts.map(p => - psbt_1.Psbt.fromHex(p, txTools_1.transactionFromBuffer), - ); + const psbts = f.psbts.map(p => Psbt.fromHex(p, transactionFromBuffer)); const jsonA1 = jsonify(psbts[0]); const jsonA2 = jsonify(psbts[1]); psbts[0].combine(psbts[1]); diff --git a/src/esm/tests/create.d.ts b/src/esm/tests/create.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/create.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/create.js b/src/esm/tests/create.js similarity index 61% rename from src/tests/create.js rename to src/esm/tests/create.js index fa34dca..5f7bd00 100644 --- a/src/tests/create.js +++ b/src/esm/tests/create.js @@ -1,12 +1,10 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../lib/psbt'); -const create_1 = require('./fixtures/create'); -const txTools_1 = require('./utils/txTools'); -for (const f of create_1.fixtures) { +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/create.js'; +import { getDefaultTx } from './utils/txTools.js'; +for (const f of fixtures) { tape('Test: ' + f.description, t => { - const psbt = new psbt_1.Psbt(txTools_1.getDefaultTx(2)); + const psbt = new Psbt(getDefaultTx(2)); for (const input of f.input.addInputs) { psbt.addInput(input); } diff --git a/src/esm/tests/first.d.ts b/src/esm/tests/first.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/first.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/first.js b/src/esm/tests/first.js similarity index 55% rename from src/tests/first.js rename to src/esm/tests/first.js index 58c0255..9f24aba 100644 --- a/src/tests/first.js +++ b/src/esm/tests/first.js @@ -1,19 +1,14 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../lib/psbt'); -const first_1 = require('./fixtures/first'); -const txTools_1 = require('./utils/txTools'); -for (const f of first_1.fixtures) { +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/first.js'; +import { transactionFromBuffer } from './utils/txTools.js'; +for (const f of fixtures) { tape('Test: ' + f.description, t => { - const parsed = psbt_1.Psbt.fromHex( - f.input, - txTools_1.transactionFromBuffer, - ); + const parsed = Psbt.fromHex(f.input, transactionFromBuffer); const hex = parsed.toHex(); - const parsed2 = psbt_1.Psbt.fromHex(hex, txTools_1.transactionFromBuffer); + const parsed2 = Psbt.fromHex(hex, transactionFromBuffer); const hex2 = parsed2.toHex(); - const parsed3 = psbt_1.Psbt.fromHex(hex2, txTools_1.transactionFromBuffer); + const parsed3 = Psbt.fromHex(hex2, transactionFromBuffer); t.strictEqual(parsed.toHex(), parsed2.toHex()); t.strictEqual(parsed.toHex(), parsed3.toHex()); // @ts-ignore diff --git a/src/esm/tests/fixtures/combine.d.ts b/src/esm/tests/fixtures/combine.d.ts new file mode 100644 index 0000000..eabaf64 --- /dev/null +++ b/src/esm/tests/fixtures/combine.d.ts @@ -0,0 +1,5 @@ +export declare const fixtures: { + description: string; + psbts: string[]; + result: string; +}[]; diff --git a/src/tests/fixtures/combine.js b/src/esm/tests/fixtures/combine.js similarity index 99% rename from src/tests/fixtures/combine.js rename to src/esm/tests/fixtures/combine.js index 0102abe..4e22500 100644 --- a/src/tests/fixtures/combine.js +++ b/src/esm/tests/fixtures/combine.js @@ -1,6 +1,4 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.fixtures = [ +export const fixtures = [ { description: 'Combines two PSBTs', psbts: [ diff --git a/src/esm/tests/fixtures/create.d.ts b/src/esm/tests/fixtures/create.d.ts new file mode 100644 index 0000000..9bf70d4 --- /dev/null +++ b/src/esm/tests/fixtures/create.d.ts @@ -0,0 +1,47 @@ +/// +export declare const fixtures: { + description: string; + input: { + addInputs: { + hash: string; + index: number; + }[]; + addOutputs: { + script: Buffer; + value: number; + }[]; + updateInputData: ({ + nonWitnessUtxo: Buffer; + redeemScript: Buffer; + bip32Derivation: { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; + }[]; + witnessUtxo?: undefined; + witnessScript?: undefined; + } | { + witnessUtxo: { + script: Buffer; + value: number; + }; + redeemScript: Buffer; + witnessScript: Buffer; + bip32Derivation: { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; + }[]; + nonWitnessUtxo?: undefined; + })[]; + updateOutputData: { + bip32Derivation: { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; + }[]; + }[]; + }; + expectedBeforeUpdate: string; + expectedAfterUpdate: string; +}[]; diff --git a/src/tests/fixtures/create.js b/src/esm/tests/fixtures/create.js similarity index 98% rename from src/tests/fixtures/create.js rename to src/esm/tests/fixtures/create.js index 96ae9b2..504c4ba 100644 --- a/src/tests/fixtures/create.js +++ b/src/esm/tests/fixtures/create.js @@ -1,7 +1,5 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); const b = hex => Buffer.from(hex, 'hex'); -exports.fixtures = [ +export const fixtures = [ { description: 'Should create a psbt', input: { diff --git a/src/esm/tests/fixtures/first.d.ts b/src/esm/tests/fixtures/first.d.ts new file mode 100644 index 0000000..cff4de4 --- /dev/null +++ b/src/esm/tests/fixtures/first.d.ts @@ -0,0 +1,27 @@ +export declare const fixtures: { + description: string; + input: string; + output: { + globalMap: { + unsignedTx: string; + }; + inputs: { + witnessUtxo: { + script: string; + value: number; + }; + partialSig: { + pubkey: string; + signature: string; + }[]; + redeemScript: string; + witnessScript: string; + bip32Derivation: { + masterFingerprint: string; + pubkey: string; + path: string; + }[]; + }[]; + outputs: {}[]; + }; +}[]; diff --git a/src/tests/fixtures/first.js b/src/esm/tests/fixtures/first.js similarity index 96% rename from src/tests/fixtures/first.js rename to src/esm/tests/fixtures/first.js index 8f1b773..6e45806 100644 --- a/src/tests/fixtures/first.js +++ b/src/esm/tests/fixtures/first.js @@ -1,6 +1,4 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.fixtures = [ +export const fixtures = [ { description: 'Check one fixture', input: diff --git a/src/esm/tests/fixtures/fromBuffer.d.ts b/src/esm/tests/fixtures/fromBuffer.d.ts new file mode 100644 index 0000000..b66b977 --- /dev/null +++ b/src/esm/tests/fixtures/fromBuffer.d.ts @@ -0,0 +1,4 @@ +export declare const fixtures: { + hex: string; + exception: string; +}[]; diff --git a/src/tests/fixtures/fromBuffer.js b/src/esm/tests/fixtures/fromBuffer.js similarity index 80% rename from src/tests/fixtures/fromBuffer.js rename to src/esm/tests/fixtures/fromBuffer.js index 272d9f8..1d1ca9b 100644 --- a/src/tests/fixtures/fromBuffer.js +++ b/src/esm/tests/fixtures/fromBuffer.js @@ -1,6 +1,4 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.fixtures = [ +export const fixtures = [ { hex: '70736274fe', exception: 'Format Error: Magic Number must be followed by 0xff separator', diff --git a/src/esm/tests/fixtures/invalid.d.ts b/src/esm/tests/fixtures/invalid.d.ts new file mode 100644 index 0000000..7d2eb76 --- /dev/null +++ b/src/esm/tests/fixtures/invalid.d.ts @@ -0,0 +1,4 @@ +export declare const fixtures: { + exception: string; + b64: string; +}[]; diff --git a/src/tests/fixtures/invalid.js b/src/esm/tests/fixtures/invalid.js similarity index 99% rename from src/tests/fixtures/invalid.js rename to src/esm/tests/fixtures/invalid.js index e2b66ee..291d8b0 100644 --- a/src/tests/fixtures/invalid.js +++ b/src/esm/tests/fixtures/invalid.js @@ -1,6 +1,4 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.fixtures = [ +export const fixtures = [ { exception: 'Format Error: Invalid Magic Number', b64: diff --git a/src/esm/tests/fixtures/keyValsToPsbt.d.ts b/src/esm/tests/fixtures/keyValsToPsbt.d.ts new file mode 100644 index 0000000..afbbaca --- /dev/null +++ b/src/esm/tests/fixtures/keyValsToPsbt.d.ts @@ -0,0 +1,38 @@ +/// +export declare const fixtures: ({ + data: { + globalMapKeyVals: { + key: Buffer; + value: Buffer; + }[]; + inputKeyVals: { + key: Buffer; + value: Buffer; + }[][]; + outputKeyVals: never[]; + }; + exception: string; + expected?: undefined; +} | { + data: { + globalMapKeyVals: never[]; + inputKeyVals: never[]; + outputKeyVals: { + key: Buffer; + value: Buffer; + }[][]; + }; + exception: string; + expected?: undefined; +} | { + data: { + globalMapKeyVals: { + key: Buffer; + value: Buffer; + }[]; + inputKeyVals: never[]; + outputKeyVals: never[]; + }; + expected: string; + exception?: undefined; +})[]; diff --git a/src/tests/fixtures/keyValsToPsbt.js b/src/esm/tests/fixtures/keyValsToPsbt.js similarity index 98% rename from src/tests/fixtures/keyValsToPsbt.js rename to src/esm/tests/fixtures/keyValsToPsbt.js index 8eb10c2..e4b4571 100644 --- a/src/tests/fixtures/keyValsToPsbt.js +++ b/src/esm/tests/fixtures/keyValsToPsbt.js @@ -1,7 +1,5 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); const b = hex => Buffer.from(hex, 'hex'); -exports.fixtures = [ +export const fixtures = [ { data: { globalMapKeyVals: [ diff --git a/src/esm/tests/fixtures/methods.d.ts b/src/esm/tests/fixtures/methods.d.ts new file mode 100644 index 0000000..ba78010 --- /dev/null +++ b/src/esm/tests/fixtures/methods.d.ts @@ -0,0 +1,406 @@ +/// +export declare const fixtures: { + valid: ({ + method: string; + addInputOutput: boolean; + args: { + globalXpub: { + masterFingerprint: Buffer; + extendedPubkey: Buffer; + path: string; + }[]; + }[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + nonWitnessUtxo: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + witnessUtxo: { + script: Buffer; + value: number; + }; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + partialSig: { + pubkey: Buffer; + signature: Buffer; + }[]; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapInternalKey: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapMerkleRoot: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapKeySig: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapScriptSig: { + pubkey: Buffer; + leafHash: Buffer; + signature: Buffer; + }[]; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapLeafScript: { + controlBlock: Buffer; + script: Buffer; + leafVersion: number; + }[]; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + sighashType: number; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + redeemScript: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + witnessScript: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + bip32Derivation: { + masterFingerprint: Buffer; + path: string; + pubkey: Buffer; + }[]; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapBip32Derivation: { + leafHashes: Buffer[]; + masterFingerprint: Buffer; + path: string; + pubkey: Buffer; + }[]; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + finalScriptSig: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + finalScriptWitness: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + porCommitment: string; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + tapTree: { + leaves: { + depth: number; + script: Buffer; + leafVersion: number; + }[]; + }; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + key: Buffer; + value: Buffer; + })[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: { + hash: string; + index: number; + }[]; + expected: string; + } | { + method: string; + addInputOutput: boolean; + args: { + script: Buffer; + value: number; + }[]; + expected: string; + })[]; + invalid: ({ + method: string; + addInputOutput: boolean; + args: { + globalXpub: number; + }[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: { + globalXpub: number[]; + }[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + nonWitnessUtxo: string; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + twice: boolean; + args: (number | { + nonWitnessUtxo: Buffer; + })[]; + exception: string; + } | { + method: string; + addInputOutput: boolean; + twice: boolean; + args: (number | { + partialSig: { + pubkey: Buffer; + signature: Buffer; + }[]; + })[]; + exception: string; + } | { + method: string; + addInputOutput: boolean; + twice: boolean; + args: (number | { + tapScriptSig: { + pubkey: Buffer; + leafHash: Buffer; + signature: Buffer; + }[]; + })[]; + exception: string; + } | { + method: string; + addInputOutput: boolean; + twice: boolean; + args: (number | { + tapLeafScript: { + controlBlock: Buffer; + script: Buffer; + leafVersion: number; + }[]; + })[]; + exception: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + witnessUtxo: { + scripty: Buffer; + vyalue: number; + }; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + twice: boolean; + args: (number | { + witnessUtxo: { + script: Buffer; + value: number; + }; + })[]; + exception: string; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + partialSig: { + pubkdey: Buffer; + signdature: Buffer; + }[]; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + sighashType: string; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + redeemScript: string; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + witnessScript: string; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + bip32Derivation: { + a: number; + }[]; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + finalScriptSig: number; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + finalScriptWitness: number; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + porCommitment: number; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + redeemScript: number; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: (number | { + witnessScript: number; + })[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: import("bitcoinjs-lib").StackElement[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: { + hash: string; + index: number; + unknownKeyVals: number; + }[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: { + script: Buffer; + value: number; + unknownKeyVals: number; + }[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + args: { + key: Buffer; + value: Buffer; + }[]; + exception: string; + twice?: undefined; + } | { + method: string; + addInputOutput: boolean; + twice: boolean; + args: { + key: Buffer; + value: Buffer; + }[]; + exception: string; + })[]; +}; diff --git a/src/tests/fixtures/methods.js b/src/esm/tests/fixtures/methods.js similarity index 99% rename from src/tests/fixtures/methods.js rename to src/esm/tests/fixtures/methods.js index 7136636..4346f61 100644 --- a/src/tests/fixtures/methods.js +++ b/src/esm/tests/fixtures/methods.js @@ -1,5 +1,3 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); const b = h => Buffer.from(h, 'hex'); const dummyPubkeys = [ '03b1341ccba7683b6af4f1238cd6e97e7167d569fac47f1e48d47541844355bd46', @@ -30,7 +28,7 @@ const dummySchnorrSig = 'a251221c339a7129dd0b769698aca40d8d9da9570ab796a1820b91ab7dbf5acb' + 'ea21c88ba8f1e9308a21729baf080734beaf97023882d972f75e380d480fd704'; const dummy4Byte = '01020304'; -exports.fixtures = { +export const fixtures = { valid: [ { method: 'updateGlobal', diff --git a/src/esm/tests/fixtures/update.d.ts b/src/esm/tests/fixtures/update.d.ts new file mode 100644 index 0000000..5cd041d --- /dev/null +++ b/src/esm/tests/fixtures/update.d.ts @@ -0,0 +1,87 @@ +/// +export declare const fixtures: ({ + description: string; + before: string; + inputData: ({ + nonWitnessUtxo: Buffer; + witnessUtxo: { + script: Buffer; + value: number; + }; + redeemScript: Buffer; + bip32Derivation: { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; + }[]; + witnessScript?: undefined; + } | { + witnessUtxo: { + script: Buffer; + value: number; + }; + redeemScript: Buffer; + witnessScript: Buffer; + bip32Derivation: { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; + }[]; + nonWitnessUtxo?: undefined; + })[]; + outputData: { + bip32Derivation: { + masterFingerprint: Buffer; + pubkey: Buffer; + path: string; + }[]; + }[]; + after: string; + cleanForFinalize?: undefined; +} | { + description: string; + inputData: { + sighashType: number; + }[]; + outputData: never[]; + after: string; + before?: undefined; + cleanForFinalize?: undefined; +} | { + description: string; + inputData: { + partialSig: { + pubkey: Buffer; + signature: Buffer; + }[]; + }[]; + outputData: never[]; + after: string; + before?: undefined; + cleanForFinalize?: undefined; +} | { + description: string; + before: string; + inputData: { + partialSig: { + pubkey: Buffer; + signature: Buffer; + }[]; + }[]; + outputData: never[]; + after: string; + cleanForFinalize?: undefined; +} | { + description: string; + cleanForFinalize: boolean; + before: string; + inputData: ({ + finalScriptSig: Buffer; + finalScriptWitness?: undefined; + } | { + finalScriptSig: Buffer; + finalScriptWitness: Buffer; + })[]; + outputData: never[]; + after: string; +})[]; diff --git a/src/tests/fixtures/update.js b/src/esm/tests/fixtures/update.js similarity index 99% rename from src/tests/fixtures/update.js rename to src/esm/tests/fixtures/update.js index 6595e8f..b43c233 100644 --- a/src/tests/fixtures/update.js +++ b/src/esm/tests/fixtures/update.js @@ -1,7 +1,5 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); const b = hex => Buffer.from(hex, 'hex'); -exports.fixtures = [ +export const fixtures = [ { description: 'Step 1: From 2 empty inputs and 2 empty outputs, add set of info.', diff --git a/src/esm/tests/fixtures/valid.d.ts b/src/esm/tests/fixtures/valid.d.ts new file mode 100644 index 0000000..e465142 --- /dev/null +++ b/src/esm/tests/fixtures/valid.d.ts @@ -0,0 +1 @@ +export declare const fixtures: string[]; diff --git a/src/tests/fixtures/valid.js b/src/esm/tests/fixtures/valid.js similarity index 99% rename from src/tests/fixtures/valid.js rename to src/esm/tests/fixtures/valid.js index f60a37c..5509f0a 100644 --- a/src/tests/fixtures/valid.js +++ b/src/esm/tests/fixtures/valid.js @@ -1,6 +1,4 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.fixtures = [ +export const fixtures = [ 'cHNidP8BAHUCAAAAASaBcTce3/KF6Tet7qSze3gADAVmy7OtZGQXE8pCFxv2AAAAAAD+////AtPf9QUAAAAAGXapF' + 'NDFmQPFusKGh2DpD9UhpGZap2UgiKwA4fUFAAAAABepFDVF5uM7gyxHBQ8k0+65PJwDlIvHh7MuEwAAAQD9pQEBAA' + 'AAAAECiaPHHqtNIOA3G7ukzGmPopXJRjr6Ljl/hTPMti+VZ+UBAAAAFxYAFL4Y0VKpsBIDna89p95PUzSe7LmF///' + diff --git a/src/esm/tests/fixtures/varint.d.ts b/src/esm/tests/fixtures/varint.d.ts new file mode 100644 index 0000000..2d3ce76 --- /dev/null +++ b/src/esm/tests/fixtures/varint.d.ts @@ -0,0 +1,15 @@ +export declare const fixtures: { + valid: { + dec: number; + hex: string; + }[]; + invalid: ({ + dec: number; + msg: string; + hex?: undefined; + } | { + dec: number; + hex: string; + msg: string; + })[]; +}; diff --git a/src/tests/fixtures/varint.js b/src/esm/tests/fixtures/varint.js similarity index 91% rename from src/tests/fixtures/varint.js rename to src/esm/tests/fixtures/varint.js index 12a9e6a..7fc6c6d 100644 --- a/src/tests/fixtures/varint.js +++ b/src/esm/tests/fixtures/varint.js @@ -1,6 +1,4 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.fixtures = { +export const fixtures = { valid: [ { dec: 0, diff --git a/src/esm/tests/fromBIP/invalid.d.ts b/src/esm/tests/fromBIP/invalid.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/fromBIP/invalid.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/fromBIP/invalid.js b/src/esm/tests/fromBIP/invalid.js similarity index 63% rename from src/tests/fromBIP/invalid.js rename to src/esm/tests/fromBIP/invalid.js index 99bfb54..16a9eec 100644 --- a/src/tests/fromBIP/invalid.js +++ b/src/esm/tests/fromBIP/invalid.js @@ -1,14 +1,12 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../../lib/psbt'); -const invalid_1 = require('../fixtures/invalid'); -const txTools_1 = require('../utils/txTools'); +import tape from 'tape'; +import { Psbt } from '../../lib/psbt'; +import { fixtures } from '../fixtures/invalid'; +import { transactionFromBuffer } from '../utils/txTools'; // const res: any[] = []; -for (const f of invalid_1.fixtures) { +for (const f of fixtures) { tape(`Test: Should throw "${f.exception}"`, t => { t.throws(() => { - psbt_1.Psbt.fromBase64(f.b64, txTools_1.transactionFromBuffer); + Psbt.fromBase64(f.b64, transactionFromBuffer); }, new RegExp(f.exception)); t.end(); }); diff --git a/src/esm/tests/fromBIP/update.d.ts b/src/esm/tests/fromBIP/update.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/fromBIP/update.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/fromBIP/update.js b/src/esm/tests/fromBIP/update.js similarity index 54% rename from src/tests/fromBIP/update.js rename to src/esm/tests/fromBIP/update.js index c024f73..ee2d071 100644 --- a/src/tests/fromBIP/update.js +++ b/src/esm/tests/fromBIP/update.js @@ -1,17 +1,12 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../../lib/psbt'); -const update_1 = require('../fixtures/update'); -const txTools_1 = require('../utils/txTools'); +import tape from 'tape'; +import { Psbt } from '../../lib/psbt'; +import { fixtures } from '../fixtures/update'; +import { transactionFromBuffer } from '../utils/txTools'; let lastAfter; -for (const f of update_1.fixtures) { +for (const f of fixtures) { tape(f.description, t => { const before = f.before || lastAfter; - const psbt = psbt_1.Psbt.fromBase64( - before, - txTools_1.transactionFromBuffer, - ); + const psbt = Psbt.fromBase64(before, transactionFromBuffer); for (const [i, input] of f.inputData.entries()) { psbt.updateInput(i, input); if (f.cleanForFinalize) psbt.clearFinalizedInput(i); diff --git a/src/esm/tests/fromBIP/valid.d.ts b/src/esm/tests/fromBIP/valid.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/fromBIP/valid.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/esm/tests/fromBIP/valid.js b/src/esm/tests/fromBIP/valid.js new file mode 100644 index 0000000..280a0f9 --- /dev/null +++ b/src/esm/tests/fromBIP/valid.js @@ -0,0 +1,17 @@ +import tape from 'tape'; +import { Psbt } from '../../lib/psbt'; +import { fixtures } from '../fixtures/valid'; +import { transactionFromBuffer } from '../utils/txTools'; +for (const f of fixtures) { + tape(`Test: Should not throw`, t => { + let psbt; + t.doesNotThrow(() => { + psbt = Psbt.fromBase64(f, transactionFromBuffer); + }, 'fromBase64'); + t.doesNotThrow(() => { + const out = psbt.toBase64(); + t.equal(out, f); + }, 'toBase64'); + t.end(); + }); +} diff --git a/src/esm/tests/fromBuffer.d.ts b/src/esm/tests/fromBuffer.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/fromBuffer.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/fromBuffer.js b/src/esm/tests/fromBuffer.js similarity index 60% rename from src/tests/fromBuffer.js rename to src/esm/tests/fromBuffer.js index 649bbab..73b573f 100644 --- a/src/tests/fromBuffer.js +++ b/src/esm/tests/fromBuffer.js @@ -1,8 +1,6 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../lib/psbt'); -const fromBuffer_1 = require('./fixtures/fromBuffer'); +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/fromBuffer.js'; class Blah { constructor(buf) { this.buf = buf; @@ -24,10 +22,10 @@ class Blah { } } const fromBuf = b => new Blah(b); -for (const f of fromBuffer_1.fixtures) { +for (const f of fixtures) { tape('From Buffer should throw:', t => { t.throws(() => { - psbt_1.Psbt.fromHex(f.hex, fromBuf); + Psbt.fromHex(f.hex, fromBuf); }, new RegExp(f.exception)); t.end(); }); diff --git a/src/esm/tests/keyValsToPsbt.d.ts b/src/esm/tests/keyValsToPsbt.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/keyValsToPsbt.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/esm/tests/keyValsToPsbt.js b/src/esm/tests/keyValsToPsbt.js new file mode 100644 index 0000000..3585456 --- /dev/null +++ b/src/esm/tests/keyValsToPsbt.js @@ -0,0 +1,27 @@ +import tape from 'tape'; +import { psbtFromKeyVals } from '../lib/parser/fromBuffer.js'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/keyValsToPsbt.js'; +import { getDefaultTx, transactionFromBuffer } from './utils/txTools.js'; +for (const f of fixtures) { + if (f.exception) { + tape('From keyVals should throw:', t => { + t.throws(() => { + psbtFromKeyVals(getDefaultTx(), f.data); + }, new RegExp(f.exception)); + t.end(); + }); + } else { + const tx = transactionFromBuffer( + f.data.globalMapKeyVals.filter(kv => kv.key[0] === 0)[0].value, + ); + tape('From keyVals should not throw:', t => { + const data = psbtFromKeyVals(tx, f.data); + const psbt = new Psbt(tx); + Object.assign(psbt, data); + t.strictEqual(psbt.toBase64(), f.expected); + // else console.log(psbt.toBase64()); + t.end(); + }); + } +} diff --git a/src/esm/tests/methods.d.ts b/src/esm/tests/methods.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/methods.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/methods.js b/src/esm/tests/methods.js similarity index 71% rename from src/tests/methods.js rename to src/esm/tests/methods.js index 71e6600..28e6f9b 100644 --- a/src/tests/methods.js +++ b/src/esm/tests/methods.js @@ -1,18 +1,16 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../lib/psbt'); -const methods_1 = require('./fixtures/methods'); -const txTools_1 = require('./utils/txTools'); +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/methods.js'; +import { getDefaultTx } from './utils/txTools.js'; function run(f, typ) { tape(`check ${typ} method: ${f.method}`, t => { let func; let psbt; if (!f.addInputOutput) { // @ts-ignore - func = psbt_1.Psbt[f.method].bind(psbt_1.Psbt); + func = Psbt[f.method].bind(Psbt); } else { - psbt = new psbt_1.Psbt(txTools_1.getDefaultTx()); + psbt = new Psbt(getDefaultTx()); addInputOutput(psbt); // @ts-ignore func = psbt[f.method].bind(psbt); @@ -38,10 +36,10 @@ function run(f, typ) { t.end(); }); } -for (const f of methods_1.fixtures.valid) { +for (const f of fixtures.valid) { run(f, 'valid'); } -for (const f of methods_1.fixtures.invalid) { +for (const f of fixtures.invalid) { run(f, 'invalid'); } function addInputOutput(psbt) { diff --git a/src/esm/tests/utils/txTools.d.ts b/src/esm/tests/utils/txTools.d.ts new file mode 100644 index 0000000..ef5d530 --- /dev/null +++ b/src/esm/tests/utils/txTools.d.ts @@ -0,0 +1,16 @@ +/// +import { Transaction as BTransaction } from 'bitcoinjs-lib'; +import { Transaction as ITransaction, TransactionFromBuffer } from '../../lib/interfaces'; +export declare function getDefaultTx(version?: number): Transaction; +export declare const transactionFromBuffer: TransactionFromBuffer; +export declare class Transaction implements ITransaction { + tx: BTransaction; + constructor(buffer: Buffer); + getInputOutputCounts(): { + inputCount: number; + outputCount: number; + }; + addInput(input: any): void; + addOutput(output: any): void; + toBuffer(): Buffer; +} diff --git a/src/tests/utils/txTools.js b/src/esm/tests/utils/txTools.js similarity index 58% rename from src/tests/utils/txTools.js rename to src/esm/tests/utils/txTools.js index 03dea88..36a5cc1 100644 --- a/src/tests/utils/txTools.js +++ b/src/esm/tests/utils/txTools.js @@ -1,17 +1,14 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const bitcoinjs_lib_1 = require('bitcoinjs-lib'); -const tools_1 = require('../../lib/converter/tools'); -function getDefaultTx(version = 1) { +import { Transaction as BTransaction } from 'bitcoinjs-lib'; +import { reverseBuffer } from '../../lib/converter/tools.js'; +export function getDefaultTx(version = 1) { const TX = new Transaction(Buffer.from([1, 0, 0, 0, 0, 0, 0, 0, 0, 0])); TX.tx.version = version; return TX; } -exports.getDefaultTx = getDefaultTx; -exports.transactionFromBuffer = buffer => new Transaction(buffer); -class Transaction { +export const transactionFromBuffer = buffer => new Transaction(buffer); +export class Transaction { constructor(buffer) { - this.tx = bitcoinjs_lib_1.Transaction.fromBuffer(buffer); + this.tx = BTransaction.fromBuffer(buffer); if (this.tx.ins.some(input => input.script.length !== 0)) { throw new Error('Format Error: Transaction ScriptSigs are not empty'); } @@ -25,7 +22,7 @@ class Transaction { addInput(input) { const hash = typeof input.hash === 'string' - ? tools_1.reverseBuffer(Buffer.from(input.hash, 'hex')) + ? reverseBuffer(Buffer.from(input.hash, 'hex')) : input.hash; this.tx.addInput(hash, input.index, input.sequence); } @@ -36,4 +33,3 @@ class Transaction { return this.tx.toBuffer(); } } -exports.Transaction = Transaction; diff --git a/src/esm/tests/validation.d.ts b/src/esm/tests/validation.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/validation.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/validation.js b/src/esm/tests/validation.js similarity index 69% rename from src/tests/validation.js rename to src/esm/tests/validation.js index 2ce6c2c..37d6792 100644 --- a/src/tests/validation.js +++ b/src/esm/tests/validation.js @@ -1,9 +1,10 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const combiner_1 = require('../lib/combiner'); -const converter_1 = require('../lib/converter'); -const txTools_1 = require('./utils/txTools'); +import tape from 'tape'; +import { combine } from '../lib/combiner/index.js'; +import { + globals as convertGlobal, + inputs as convertInputs, +} from '../lib/converter/index.js'; +import { getDefaultTx } from './utils/txTools.js'; const b = hex => Buffer.from(hex, 'hex'); tape('should not pass isPartialSig with invalid DER signature', t => { const data = { @@ -24,48 +25,48 @@ tape('should not pass isPartialSig with invalid DER signature', t => { ]; for (const sig of sigs) { data.signature = sig; - t.assert(converter_1.inputs.partialSig.check(data) === false); + t.assert(convertInputs.partialSig.check(data) === false); } const keyVal = { key: b('ff'), value: b('ff'), }; t.throws(() => { - converter_1.inputs.nonWitnessUtxo.decode(keyVal); + convertInputs.nonWitnessUtxo.decode(keyVal); }, new RegExp('Decode Error: could not decode nonWitnessUtxo with key 0xff')); t.throws(() => { - converter_1.inputs.witnessUtxo.decode(keyVal); + convertInputs.witnessUtxo.decode(keyVal); }, new RegExp('Decode Error: could not decode witnessUtxo with key 0xff')); t.throws(() => { - converter_1.inputs.finalScriptSig.decode(keyVal); + convertInputs.finalScriptSig.decode(keyVal); }, new RegExp('Decode Error: could not decode finalScriptSig with key 0xff')); t.throws(() => { - converter_1.inputs.finalScriptWitness.decode(keyVal); + convertInputs.finalScriptWitness.decode(keyVal); }, new RegExp('Decode Error: could not decode finalScriptWitness with key 0xff')); t.throws(() => { - converter_1.inputs.porCommitment.decode(keyVal); + convertInputs.porCommitment.decode(keyVal); }, new RegExp('Decode Error: could not decode porCommitment with key 0xff')); t.throws(() => { - converter_1.inputs.sighashType.decode(keyVal); + convertInputs.sighashType.decode(keyVal); }, new RegExp('Decode Error: could not decode sighashType with key 0xff')); t.throws(() => { - converter_1.inputs.redeemScript.decode(keyVal); + convertInputs.redeemScript.decode(keyVal); }, new RegExp('Decode Error: could not decode redeemScript with key 0xff')); t.throws(() => { - converter_1.inputs.witnessScript.decode(keyVal); + convertInputs.witnessScript.decode(keyVal); }, new RegExp('Decode Error: could not decode witnessScript with key 0xff')); t.throws(() => { - converter_1.inputs.bip32Derivation.decode(keyVal); + convertInputs.bip32Derivation.decode(keyVal); }, new RegExp('Decode Error: could not decode bip32Derivation with key 0xff')); t.throws(() => { - converter_1.inputs.partialSig.decode(keyVal); + convertInputs.partialSig.decode(keyVal); }, new RegExp('Decode Error: could not decode partialSig with key 0xff')); keyVal.key = b('02ff'); t.throws(() => { - converter_1.inputs.partialSig.decode(keyVal); + convertInputs.partialSig.decode(keyVal); }, new RegExp('Decode Error: partialSig has invalid pubkey in key 0x02ff')); keyVal.key = Buffer.concat([b('02'), data.pubkey, data.pubkey.slice(1)]); - const result = converter_1.inputs.partialSig.decode(keyVal); + const result = convertInputs.partialSig.decode(keyVal); t.assert(result.pubkey.equals(keyVal.key.slice(1))); const psbt1 = { globalMap: { @@ -82,15 +83,15 @@ tape('should not pass isPartialSig with invalid DER signature', t => { outputs: [], }; t.throws(() => { - combiner_1.combine([psbt1]); + combine([psbt1]); }, new RegExp('Combine: Nothing to combine')); t.throws(() => { - combiner_1.combine([psbt1, psbt2]); + combine([psbt1, psbt2]); }, new RegExp('Combine: Self missing transaction')); - psbt1.globalMap.unsignedTx = txTools_1.getDefaultTx(1); - psbt2.globalMap.unsignedTx = txTools_1.getDefaultTx(2); + psbt1.globalMap.unsignedTx = getDefaultTx(1); + psbt2.globalMap.unsignedTx = getDefaultTx(2); t.throws(() => { - combiner_1.combine([psbt1, psbt2]); + combine([psbt1, psbt2]); }, new RegExp('Combine: One of the Psbts does not have the same transaction.')); psbt1.globalMap.unknownKeyVals.push({ key: b('09'), @@ -101,10 +102,10 @@ tape('should not pass isPartialSig with invalid DER signature', t => { value: b('ff'), }); t.throws(() => { - combiner_1.combine([psbt1, psbt2]); + combine([psbt1, psbt2]); }, new RegExp('Combine: KeyValue Map keys should be unique')); t.ok( - converter_1.globals.globalXpub.check({ + convertGlobal.globalXpub.check({ masterFingerprint: b('3442193e'), extendedPubkey: b( // tslint:disable-next-line:max-line-length diff --git a/src/esm/tests/varint.d.ts b/src/esm/tests/varint.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/src/esm/tests/varint.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/tests/varint.js b/src/esm/tests/varint.js similarity index 73% rename from src/tests/varint.js rename to src/esm/tests/varint.js index f74ef0a..e16dcb4 100644 --- a/src/tests/varint.js +++ b/src/esm/tests/varint.js @@ -1,41 +1,39 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const test = require('tape'); -const varuint = require('../lib/converter/varint'); -const varint_1 = require('./fixtures/varint'); -varint_1.fixtures.valid.forEach((fixture, i) => { - test('valid encode #' + (i + 1), t => { +import tape from 'tape'; +import * as varuint from '../lib/converter/varint.js'; +import { fixtures } from './fixtures/varint.js'; +fixtures.valid.forEach((fixture, i) => { + tape('valid encode #' + (i + 1), t => { t.same(varuint.encode(fixture.dec).toString('hex'), fixture.hex); // @ts-ignore t.same(varuint.encode.bytes, fixture.hex.length / 2); t.end(); }); - test('valid decode #' + (i + 1), t => { + tape('valid decode #' + (i + 1), t => { t.same(varuint.decode(Buffer.from(fixture.hex, 'hex')), fixture.dec); // @ts-ignore t.same(varuint.decode.bytes, fixture.hex.length / 2); t.end(); }); - test('valid encodingLength #' + (i + 1), t => { + tape('valid encodingLength #' + (i + 1), t => { t.same(varuint.encodingLength(fixture.dec), fixture.hex.length / 2); t.end(); }); }); -varint_1.fixtures.invalid.forEach((fixture, i) => { - test('invalid encode #' + (i + 1), t => { +fixtures.invalid.forEach((fixture, i) => { + tape('invalid encode #' + (i + 1), t => { t.throws(() => { varuint.encode(fixture.dec); }, new RegExp(fixture.msg)); t.end(); }); - test('invalid encodingLength #' + (i + 1), t => { + tape('invalid encodingLength #' + (i + 1), t => { t.throws(() => { varuint.encodingLength(fixture.dec); }, new RegExp(fixture.msg)); t.end(); }); if (fixture.hex) { - test('invalid decode #' + (i + 1), t => { + tape('invalid decode #' + (i + 1), t => { t.throws(() => { // @ts-ignore t.decode(varuint.decode(Buffer.from(fixture.hex, 'hex'))); @@ -44,7 +42,7 @@ varint_1.fixtures.invalid.forEach((fixture, i) => { }); } }); -test('encode', t => { +tape('encode', t => { t.test('write to buffer with offset', _t => { const buffer = Buffer.from([0x00, 0x00]); _t.same(varuint.encode(0xfc, buffer, 1).toString('hex'), '00fc'); @@ -61,7 +59,7 @@ test('encode', t => { }); t.end(); }); -test('decode', t => { +tape('decode', t => { t.test('read from buffer with offset', _t => { const buffer = Buffer.from([0x00, 0xfc]); _t.same(varuint.decode(buffer, 1), 0xfc); diff --git a/src/lib/converter/index.d.ts b/src/lib/converter/index.d.ts deleted file mode 100644 index 074eb3d..0000000 --- a/src/lib/converter/index.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -/// -import * as globalXpub from './global/globalXpub'; -import * as unsignedTx from './global/unsignedTx'; -import * as finalScriptSig from './input/finalScriptSig'; -import * as finalScriptWitness from './input/finalScriptWitness'; -import * as nonWitnessUtxo from './input/nonWitnessUtxo'; -import * as partialSig from './input/partialSig'; -import * as porCommitment from './input/porCommitment'; -import * as sighashType from './input/sighashType'; -import * as tapKeySig from './input/tapKeySig'; -import * as tapLeafScript from './input/tapLeafScript'; -import * as tapMerkleRoot from './input/tapMerkleRoot'; -import * as tapScriptSig from './input/tapScriptSig'; -import * as witnessUtxo from './input/witnessUtxo'; -import * as tapTree from './output/tapTree'; -declare const globals: { - unsignedTx: typeof unsignedTx; - globalXpub: typeof globalXpub; - checkPubkey: (keyVal: import("../interfaces").KeyValue) => Buffer | undefined; -}; -declare const inputs: { - nonWitnessUtxo: typeof nonWitnessUtxo; - partialSig: typeof partialSig; - sighashType: typeof sighashType; - finalScriptSig: typeof finalScriptSig; - finalScriptWitness: typeof finalScriptWitness; - porCommitment: typeof porCommitment; - witnessUtxo: typeof witnessUtxo; - bip32Derivation: { - decode: (keyVal: import("../interfaces").KeyValue) => import("../interfaces").Bip32Derivation; - encode: (data: import("../interfaces").Bip32Derivation) => import("../interfaces").KeyValue; - check: (data: any) => data is import("../interfaces").Bip32Derivation; - expected: string; - canAddToArray: (array: import("../interfaces").Bip32Derivation[], item: import("../interfaces").Bip32Derivation, dupeSet: Set) => boolean; - }; - redeemScript: { - decode: (keyVal: import("../interfaces").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces").KeyValue; - check: (data: any) => data is Buffer; - expected: string; - canAdd: (currentData: any, newData: any) => boolean; - }; - witnessScript: { - decode: (keyVal: import("../interfaces").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces").KeyValue; - check: (data: any) => data is Buffer; - expected: string; - canAdd: (currentData: any, newData: any) => boolean; - }; - checkPubkey: (keyVal: import("../interfaces").KeyValue) => Buffer | undefined; - tapKeySig: typeof tapKeySig; - tapScriptSig: typeof tapScriptSig; - tapLeafScript: typeof tapLeafScript; - tapBip32Derivation: { - decode: (keyVal: import("../interfaces").KeyValue) => import("../interfaces").TapBip32Derivation; - encode: (data: import("../interfaces").TapBip32Derivation) => import("../interfaces").KeyValue; - check: (data: any) => data is import("../interfaces").TapBip32Derivation; - expected: string; - canAddToArray: (array: import("../interfaces").TapBip32Derivation[], item: import("../interfaces").TapBip32Derivation, dupeSet: Set) => boolean; - }; - tapInternalKey: { - decode: (keyVal: import("../interfaces").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces").KeyValue; - check: (data: any) => data is Buffer; - expected: string; - canAdd: (currentData: any, newData: any) => boolean; - }; - tapMerkleRoot: typeof tapMerkleRoot; -}; -declare const outputs: { - bip32Derivation: { - decode: (keyVal: import("../interfaces").KeyValue) => import("../interfaces").Bip32Derivation; - encode: (data: import("../interfaces").Bip32Derivation) => import("../interfaces").KeyValue; - check: (data: any) => data is import("../interfaces").Bip32Derivation; - expected: string; - canAddToArray: (array: import("../interfaces").Bip32Derivation[], item: import("../interfaces").Bip32Derivation, dupeSet: Set) => boolean; - }; - redeemScript: { - decode: (keyVal: import("../interfaces").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces").KeyValue; - check: (data: any) => data is Buffer; - expected: string; - canAdd: (currentData: any, newData: any) => boolean; - }; - witnessScript: { - decode: (keyVal: import("../interfaces").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces").KeyValue; - check: (data: any) => data is Buffer; - expected: string; - canAdd: (currentData: any, newData: any) => boolean; - }; - checkPubkey: (keyVal: import("../interfaces").KeyValue) => Buffer | undefined; - tapBip32Derivation: { - decode: (keyVal: import("../interfaces").KeyValue) => import("../interfaces").TapBip32Derivation; - encode: (data: import("../interfaces").TapBip32Derivation) => import("../interfaces").KeyValue; - check: (data: any) => data is import("../interfaces").TapBip32Derivation; - expected: string; - canAddToArray: (array: import("../interfaces").TapBip32Derivation[], item: import("../interfaces").TapBip32Derivation, dupeSet: Set) => boolean; - }; - tapTree: typeof tapTree; - tapInternalKey: { - decode: (keyVal: import("../interfaces").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces").KeyValue; - check: (data: any) => data is Buffer; - expected: string; - canAdd: (currentData: any, newData: any) => boolean; - }; -}; -export { globals, inputs, outputs }; diff --git a/src/lib/converter/index.js b/src/lib/converter/index.js deleted file mode 100644 index 729d05d..0000000 --- a/src/lib/converter/index.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const typeFields_1 = require('../typeFields'); -const globalXpub = require('./global/globalXpub'); -const unsignedTx = require('./global/unsignedTx'); -const finalScriptSig = require('./input/finalScriptSig'); -const finalScriptWitness = require('./input/finalScriptWitness'); -const nonWitnessUtxo = require('./input/nonWitnessUtxo'); -const partialSig = require('./input/partialSig'); -const porCommitment = require('./input/porCommitment'); -const sighashType = require('./input/sighashType'); -const tapKeySig = require('./input/tapKeySig'); -const tapLeafScript = require('./input/tapLeafScript'); -const tapMerkleRoot = require('./input/tapMerkleRoot'); -const tapScriptSig = require('./input/tapScriptSig'); -const witnessUtxo = require('./input/witnessUtxo'); -const tapTree = require('./output/tapTree'); -const bip32Derivation = require('./shared/bip32Derivation'); -const checkPubkey = require('./shared/checkPubkey'); -const redeemScript = require('./shared/redeemScript'); -const tapBip32Derivation = require('./shared/tapBip32Derivation'); -const tapInternalKey = require('./shared/tapInternalKey'); -const witnessScript = require('./shared/witnessScript'); -const globals = { - unsignedTx, - globalXpub, - // pass an Array of key bytes that require pubkey beside the key - checkPubkey: checkPubkey.makeChecker([]), -}; -exports.globals = globals; -const inputs = { - nonWitnessUtxo, - partialSig, - sighashType, - finalScriptSig, - finalScriptWitness, - porCommitment, - witnessUtxo, - bip32Derivation: bip32Derivation.makeConverter( - typeFields_1.InputTypes.BIP32_DERIVATION, - ), - redeemScript: redeemScript.makeConverter( - typeFields_1.InputTypes.REDEEM_SCRIPT, - ), - witnessScript: witnessScript.makeConverter( - typeFields_1.InputTypes.WITNESS_SCRIPT, - ), - checkPubkey: checkPubkey.makeChecker([ - typeFields_1.InputTypes.PARTIAL_SIG, - typeFields_1.InputTypes.BIP32_DERIVATION, - ]), - tapKeySig, - tapScriptSig, - tapLeafScript, - tapBip32Derivation: tapBip32Derivation.makeConverter( - typeFields_1.InputTypes.TAP_BIP32_DERIVATION, - ), - tapInternalKey: tapInternalKey.makeConverter( - typeFields_1.InputTypes.TAP_INTERNAL_KEY, - ), - tapMerkleRoot, -}; -exports.inputs = inputs; -const outputs = { - bip32Derivation: bip32Derivation.makeConverter( - typeFields_1.OutputTypes.BIP32_DERIVATION, - ), - redeemScript: redeemScript.makeConverter( - typeFields_1.OutputTypes.REDEEM_SCRIPT, - ), - witnessScript: witnessScript.makeConverter( - typeFields_1.OutputTypes.WITNESS_SCRIPT, - ), - checkPubkey: checkPubkey.makeChecker([ - typeFields_1.OutputTypes.BIP32_DERIVATION, - ]), - tapBip32Derivation: tapBip32Derivation.makeConverter( - typeFields_1.OutputTypes.TAP_BIP32_DERIVATION, - ), - tapTree, - tapInternalKey: tapInternalKey.makeConverter( - typeFields_1.OutputTypes.TAP_INTERNAL_KEY, - ), -}; -exports.outputs = outputs; diff --git a/src/tests/fromBIP/valid.js b/src/tests/fromBIP/valid.js deleted file mode 100644 index 7021188..0000000 --- a/src/tests/fromBIP/valid.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const psbt_1 = require('../../lib/psbt'); -const valid_1 = require('../fixtures/valid'); -const txTools_1 = require('../utils/txTools'); -for (const f of valid_1.fixtures) { - tape(`Test: Should not throw`, t => { - let psbt; - t.doesNotThrow(() => { - psbt = psbt_1.Psbt.fromBase64(f, txTools_1.transactionFromBuffer); - }, 'fromBase64'); - t.doesNotThrow(() => { - const out = psbt.toBase64(); - t.equal(out, f); - }, 'toBase64'); - t.end(); - }); -} diff --git a/src/tests/keyValsToPsbt.js b/src/tests/keyValsToPsbt.js deleted file mode 100644 index 2d50a12..0000000 --- a/src/tests/keyValsToPsbt.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -const tape = require('tape'); -const fromBuffer_1 = require('../lib/parser/fromBuffer'); -const psbt_1 = require('../lib/psbt'); -const keyValsToPsbt_1 = require('./fixtures/keyValsToPsbt'); -const txTools_1 = require('./utils/txTools'); -for (const f of keyValsToPsbt_1.fixtures) { - if (f.exception) { - tape('From keyVals should throw:', t => { - t.throws(() => { - fromBuffer_1.psbtFromKeyVals(txTools_1.getDefaultTx(), f.data); - }, new RegExp(f.exception)); - t.end(); - }); - } else { - const tx = txTools_1.transactionFromBuffer( - f.data.globalMapKeyVals.filter(kv => kv.key[0] === 0)[0].value, - ); - tape('From keyVals should not throw:', t => { - const data = fromBuffer_1.psbtFromKeyVals(tx, f.data); - const psbt = new psbt_1.Psbt(tx); - Object.assign(psbt, data); - t.strictEqual(psbt.toBase64(), f.expected); - // else console.log(psbt.toBase64()); - t.end(); - }); - } -} diff --git a/ts_src/lib/combiner/index.ts b/ts_src/lib/combiner/index.ts index d008c98..0be55d8 100644 --- a/ts_src/lib/combiner/index.ts +++ b/ts_src/lib/combiner/index.ts @@ -1,5 +1,9 @@ import { KeyValue, Transaction } from '../interfaces'; -import { PsbtAttributes, psbtFromKeyVals, psbtToKeyVals } from '../parser'; +import { + PsbtAttributes, + psbtFromKeyVals, + psbtToKeyVals, +} from '../parser/index.js'; export function combine(psbts: PsbtAttributes[]): PsbtAttributes { const self = psbts[0]; diff --git a/ts_src/lib/converter/global/globalXpub.ts b/ts_src/lib/converter/global/globalXpub.ts index 3f9a70a..08f9bcd 100644 --- a/ts_src/lib/converter/global/globalXpub.ts +++ b/ts_src/lib/converter/global/globalXpub.ts @@ -1,5 +1,5 @@ import { GlobalXpub, KeyValue } from '../../interfaces'; -import { GlobalTypes } from '../../typeFields'; +import { GlobalTypes } from '../../typeFields.js'; const range = (n: number): number[] => [...Array(n).keys()]; export function decode(keyVal: KeyValue): GlobalXpub { diff --git a/ts_src/lib/converter/global/unsignedTx.ts b/ts_src/lib/converter/global/unsignedTx.ts index 29a4017..d229551 100644 --- a/ts_src/lib/converter/global/unsignedTx.ts +++ b/ts_src/lib/converter/global/unsignedTx.ts @@ -1,5 +1,5 @@ import { KeyValue, Transaction } from '../../interfaces'; -import { GlobalTypes } from '../../typeFields'; +import { GlobalTypes } from '../../typeFields.js'; export function encode(data: Transaction): KeyValue { return { diff --git a/ts_src/lib/converter/index.ts b/ts_src/lib/converter/index.ts index c814073..2cae70f 100644 --- a/ts_src/lib/converter/index.ts +++ b/ts_src/lib/converter/index.ts @@ -1,28 +1,28 @@ -import { InputTypes, OutputTypes } from '../typeFields'; +import { InputTypes, OutputTypes } from '../typeFields.js'; -import * as globalXpub from './global/globalXpub'; -import * as unsignedTx from './global/unsignedTx'; +import * as globalXpub from './global/globalXpub.js'; +import * as unsignedTx from './global/unsignedTx.js'; -import * as finalScriptSig from './input/finalScriptSig'; -import * as finalScriptWitness from './input/finalScriptWitness'; -import * as nonWitnessUtxo from './input/nonWitnessUtxo'; -import * as partialSig from './input/partialSig'; -import * as porCommitment from './input/porCommitment'; -import * as sighashType from './input/sighashType'; -import * as tapKeySig from './input/tapKeySig'; -import * as tapLeafScript from './input/tapLeafScript'; -import * as tapMerkleRoot from './input/tapMerkleRoot'; -import * as tapScriptSig from './input/tapScriptSig'; -import * as witnessUtxo from './input/witnessUtxo'; +import * as finalScriptSig from './input/finalScriptSig.js'; +import * as finalScriptWitness from './input/finalScriptWitness.js'; +import * as nonWitnessUtxo from './input/nonWitnessUtxo.js'; +import * as partialSig from './input/partialSig.js'; +import * as porCommitment from './input/porCommitment.js'; +import * as sighashType from './input/sighashType.js'; +import * as tapKeySig from './input/tapKeySig.js'; +import * as tapLeafScript from './input/tapLeafScript.js'; +import * as tapMerkleRoot from './input/tapMerkleRoot.js'; +import * as tapScriptSig from './input/tapScriptSig.js'; +import * as witnessUtxo from './input/witnessUtxo.js'; -import * as tapTree from './output/tapTree'; +import * as tapTree from './output/tapTree.js'; -import * as bip32Derivation from './shared/bip32Derivation'; -import * as checkPubkey from './shared/checkPubkey'; -import * as redeemScript from './shared/redeemScript'; -import * as tapBip32Derivation from './shared/tapBip32Derivation'; -import * as tapInternalKey from './shared/tapInternalKey'; -import * as witnessScript from './shared/witnessScript'; +import * as bip32Derivation from './shared/bip32Derivation.js'; +import * as checkPubkey from './shared/checkPubkey.js'; +import * as redeemScript from './shared/redeemScript.js'; +import * as tapBip32Derivation from './shared/tapBip32Derivation.js'; +import * as tapInternalKey from './shared/tapInternalKey.js'; +import * as witnessScript from './shared/witnessScript.js'; const globals = { unsignedTx, diff --git a/ts_src/lib/converter/input/finalScriptSig.ts b/ts_src/lib/converter/input/finalScriptSig.ts index 59a17f2..c986e43 100644 --- a/ts_src/lib/converter/input/finalScriptSig.ts +++ b/ts_src/lib/converter/input/finalScriptSig.ts @@ -1,5 +1,5 @@ import { FinalScriptSig, KeyValue } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): FinalScriptSig { if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTSIG) { diff --git a/ts_src/lib/converter/input/finalScriptWitness.ts b/ts_src/lib/converter/input/finalScriptWitness.ts index 37f9462..26c74a0 100644 --- a/ts_src/lib/converter/input/finalScriptWitness.ts +++ b/ts_src/lib/converter/input/finalScriptWitness.ts @@ -1,5 +1,5 @@ import { FinalScriptWitness, KeyValue } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): FinalScriptWitness { if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTWITNESS) { diff --git a/ts_src/lib/converter/input/nonWitnessUtxo.ts b/ts_src/lib/converter/input/nonWitnessUtxo.ts index 6b41520..f689d21 100644 --- a/ts_src/lib/converter/input/nonWitnessUtxo.ts +++ b/ts_src/lib/converter/input/nonWitnessUtxo.ts @@ -1,5 +1,5 @@ import { KeyValue, NonWitnessUtxo } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): NonWitnessUtxo { if (keyVal.key[0] !== InputTypes.NON_WITNESS_UTXO) { diff --git a/ts_src/lib/converter/input/partialSig.ts b/ts_src/lib/converter/input/partialSig.ts index 28a7a5d..ee58064 100644 --- a/ts_src/lib/converter/input/partialSig.ts +++ b/ts_src/lib/converter/input/partialSig.ts @@ -1,5 +1,5 @@ import { KeyValue, PartialSig } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): PartialSig { if (keyVal.key[0] !== InputTypes.PARTIAL_SIG) { diff --git a/ts_src/lib/converter/input/porCommitment.ts b/ts_src/lib/converter/input/porCommitment.ts index 751fcde..354d234 100644 --- a/ts_src/lib/converter/input/porCommitment.ts +++ b/ts_src/lib/converter/input/porCommitment.ts @@ -1,5 +1,5 @@ import { KeyValue, PorCommitment } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): PorCommitment { if (keyVal.key[0] !== InputTypes.POR_COMMITMENT) { diff --git a/ts_src/lib/converter/input/sighashType.ts b/ts_src/lib/converter/input/sighashType.ts index 38e606c..71e232b 100644 --- a/ts_src/lib/converter/input/sighashType.ts +++ b/ts_src/lib/converter/input/sighashType.ts @@ -1,5 +1,5 @@ import { KeyValue, SighashType } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): SighashType { if (keyVal.key[0] !== InputTypes.SIGHASH_TYPE) { diff --git a/ts_src/lib/converter/input/tapKeySig.ts b/ts_src/lib/converter/input/tapKeySig.ts index 2381088..5cc36c4 100644 --- a/ts_src/lib/converter/input/tapKeySig.ts +++ b/ts_src/lib/converter/input/tapKeySig.ts @@ -1,5 +1,5 @@ import { KeyValue, TapKeySig } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): TapKeySig { if (keyVal.key[0] !== InputTypes.TAP_KEY_SIG || keyVal.key.length !== 1) { diff --git a/ts_src/lib/converter/input/tapLeafScript.ts b/ts_src/lib/converter/input/tapLeafScript.ts index 4938a33..5ba155e 100644 --- a/ts_src/lib/converter/input/tapLeafScript.ts +++ b/ts_src/lib/converter/input/tapLeafScript.ts @@ -1,5 +1,5 @@ import { KeyValue, TapLeafScript } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): TapLeafScript { if (keyVal.key[0] !== InputTypes.TAP_LEAF_SCRIPT) { diff --git a/ts_src/lib/converter/input/tapMerkleRoot.ts b/ts_src/lib/converter/input/tapMerkleRoot.ts index 009453e..d3816ee 100644 --- a/ts_src/lib/converter/input/tapMerkleRoot.ts +++ b/ts_src/lib/converter/input/tapMerkleRoot.ts @@ -1,5 +1,5 @@ import { KeyValue, TapMerkleRoot } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): TapMerkleRoot { if (keyVal.key[0] !== InputTypes.TAP_MERKLE_ROOT || keyVal.key.length !== 1) { diff --git a/ts_src/lib/converter/input/tapScriptSig.ts b/ts_src/lib/converter/input/tapScriptSig.ts index 4c02989..0711b8e 100644 --- a/ts_src/lib/converter/input/tapScriptSig.ts +++ b/ts_src/lib/converter/input/tapScriptSig.ts @@ -1,5 +1,5 @@ import { KeyValue, TapScriptSig } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; +import { InputTypes } from '../../typeFields.js'; export function decode(keyVal: KeyValue): TapScriptSig { if (keyVal.key[0] !== InputTypes.TAP_SCRIPT_SIG) { diff --git a/ts_src/lib/converter/input/witnessUtxo.ts b/ts_src/lib/converter/input/witnessUtxo.ts index e55f331..3ff0b96 100644 --- a/ts_src/lib/converter/input/witnessUtxo.ts +++ b/ts_src/lib/converter/input/witnessUtxo.ts @@ -1,7 +1,7 @@ import { KeyValue, WitnessUtxo } from '../../interfaces'; -import { InputTypes } from '../../typeFields'; -import { readUInt64LE, writeUInt64LE } from '../tools'; -import * as varuint from '../varint'; +import { InputTypes } from '../../typeFields.js'; +import { readUInt64LE, writeUInt64LE } from '../tools.js'; +import * as varuint from '../varint.js'; export function decode(keyVal: KeyValue): WitnessUtxo { if (keyVal.key[0] !== InputTypes.WITNESS_UTXO) { diff --git a/ts_src/lib/converter/output/tapTree.ts b/ts_src/lib/converter/output/tapTree.ts index 6f8edea..f465483 100644 --- a/ts_src/lib/converter/output/tapTree.ts +++ b/ts_src/lib/converter/output/tapTree.ts @@ -1,6 +1,6 @@ import { KeyValue, TapLeaf, TapTree } from '../../interfaces'; -import { OutputTypes } from '../../typeFields'; -import * as varuint from '../varint'; +import { OutputTypes } from '../../typeFields.js'; +import * as varuint from '../varint.js'; export function decode(keyVal: KeyValue): TapTree { if (keyVal.key[0] !== OutputTypes.TAP_TREE || keyVal.key.length !== 1) { diff --git a/ts_src/lib/converter/shared/tapBip32Derivation.ts b/ts_src/lib/converter/shared/tapBip32Derivation.ts index 25ac61c..1392488 100644 --- a/ts_src/lib/converter/shared/tapBip32Derivation.ts +++ b/ts_src/lib/converter/shared/tapBip32Derivation.ts @@ -1,6 +1,6 @@ import { KeyValue, TapBip32Derivation } from '../../interfaces'; -import * as varuint from '../varint'; -import * as bip32Derivation from './bip32Derivation'; +import * as varuint from '../varint.js'; +import * as bip32Derivation from './bip32Derivation.js'; const isValidBIP340Key = (pubkey: Buffer): boolean => pubkey.length === 32; diff --git a/ts_src/lib/converter/tools.ts b/ts_src/lib/converter/tools.ts index 95db97f..7e3cad3 100644 --- a/ts_src/lib/converter/tools.ts +++ b/ts_src/lib/converter/tools.ts @@ -1,5 +1,5 @@ import { KeyValue } from '../interfaces'; -import * as varuint from './varint'; +import * as varuint from './varint.js'; export const range = (n: number): number[] => [...Array(n).keys()]; diff --git a/ts_src/lib/parser/fromBuffer.ts b/ts_src/lib/parser/fromBuffer.ts index 52c64ff..5bfcb7f 100644 --- a/ts_src/lib/parser/fromBuffer.ts +++ b/ts_src/lib/parser/fromBuffer.ts @@ -1,6 +1,6 @@ -import * as convert from '../converter'; -import { range } from '../converter/tools'; -import * as varuint from '../converter/varint'; +import * as convert from '../converter/index.js'; +import { range } from '../converter/tools.js'; +import * as varuint from '../converter/varint.js'; import { KeyValue, PsbtGlobal, @@ -9,8 +9,8 @@ import { Transaction, TransactionFromBuffer, } from '../interfaces'; -import { GlobalTypes, InputTypes, OutputTypes } from '../typeFields'; -import { PsbtAttributes } from './index'; +import { GlobalTypes, InputTypes, OutputTypes } from '../typeFields.js'; +import { PsbtAttributes } from './index.js'; export function psbtFromBuffer( buffer: Buffer, diff --git a/ts_src/lib/parser/index.ts b/ts_src/lib/parser/index.ts index 5965b5f..d56b9b6 100644 --- a/ts_src/lib/parser/index.ts +++ b/ts_src/lib/parser/index.ts @@ -1,7 +1,7 @@ import { PsbtGlobal, PsbtInput, PsbtOutput } from '../interfaces'; -export * from './fromBuffer'; -export * from './toBuffer'; +export * from './fromBuffer.js'; +export * from './toBuffer.js'; export interface PsbtAttributes { globalMap: PsbtGlobal; diff --git a/ts_src/lib/parser/toBuffer.ts b/ts_src/lib/parser/toBuffer.ts index a304aa9..6fb07e1 100644 --- a/ts_src/lib/parser/toBuffer.ts +++ b/ts_src/lib/parser/toBuffer.ts @@ -1,7 +1,7 @@ -import * as convert from '../converter'; -import { keyValsToBuffer } from '../converter/tools'; +import * as convert from '../converter/index.js'; +import { keyValsToBuffer } from '../converter/tools.js'; import { KeyValue, PsbtGlobal, PsbtInput, PsbtOutput } from '../interfaces'; -import { PsbtAttributes } from './index'; +import { PsbtAttributes } from './index.js'; export function psbtToBuffer({ globalMap, diff --git a/ts_src/lib/psbt.ts b/ts_src/lib/psbt.ts index 59c6ed9..b380f0d 100644 --- a/ts_src/lib/psbt.ts +++ b/ts_src/lib/psbt.ts @@ -1,4 +1,4 @@ -import { combine } from './combiner'; +import { combine } from './combiner/index.js'; import { KeyValue, PsbtGlobal, @@ -12,8 +12,8 @@ import { Transaction, TransactionFromBuffer, } from './interfaces'; -import { psbtFromBuffer, psbtToBuffer } from './parser'; -import { GlobalTypes, InputTypes, OutputTypes } from './typeFields'; +import { psbtFromBuffer, psbtToBuffer } from './parser/index.js'; +import { GlobalTypes, InputTypes, OutputTypes } from './typeFields.js'; import { addInputAttributes, addOutputAttributes, @@ -25,7 +25,7 @@ import { updateGlobal, updateInput, updateOutput, -} from './utils'; +} from './utils.js'; export class Psbt { static fromBase64( diff --git a/ts_src/lib/utils.ts b/ts_src/lib/utils.ts index c2fa3a0..579fa8c 100644 --- a/ts_src/lib/utils.ts +++ b/ts_src/lib/utils.ts @@ -1,4 +1,4 @@ -import * as converter from './converter'; +import * as converter from './converter/index.js'; import { KeyValue, PsbtGlobal, diff --git a/ts_src/tests/addInputOutput.ts b/ts_src/tests/addInputOutput.ts index f49d5ab..4a36c75 100644 --- a/ts_src/tests/addInputOutput.ts +++ b/ts_src/tests/addInputOutput.ts @@ -1,6 +1,6 @@ -import * as tape from 'tape'; -import { Psbt } from '../lib/psbt'; -import { getDefaultTx, transactionFromBuffer } from './utils/txTools'; +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { getDefaultTx, transactionFromBuffer } from './utils/txTools.js'; tape('Test: add Input Output', t => { const psbt = new Psbt(getDefaultTx()); diff --git a/ts_src/tests/combine.ts b/ts_src/tests/combine.ts index c6e881c..bccda02 100644 --- a/ts_src/tests/combine.ts +++ b/ts_src/tests/combine.ts @@ -1,7 +1,7 @@ -import * as tape from 'tape'; -import { Psbt } from '../lib/psbt'; -import { fixtures } from './fixtures/combine'; -import { transactionFromBuffer } from './utils/txTools'; +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/combine.js'; +import { transactionFromBuffer } from './utils/txTools.js'; for (const f of fixtures) { tape('Test: ' + f.description, t => { diff --git a/ts_src/tests/create.ts b/ts_src/tests/create.ts index 15eb4e1..7a0b217 100644 --- a/ts_src/tests/create.ts +++ b/ts_src/tests/create.ts @@ -1,7 +1,7 @@ -import * as tape from 'tape'; -import { Psbt } from '../lib/psbt'; -import { fixtures } from './fixtures/create'; -import { getDefaultTx } from './utils/txTools'; +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/create.js'; +import { getDefaultTx } from './utils/txTools.js'; for (const f of fixtures) { tape('Test: ' + f.description, t => { diff --git a/ts_src/tests/first.ts b/ts_src/tests/first.ts index 6d8a46f..c5a7cb7 100644 --- a/ts_src/tests/first.ts +++ b/ts_src/tests/first.ts @@ -1,7 +1,7 @@ -import * as tape from 'tape'; -import { Psbt } from '../lib/psbt'; -import { fixtures } from './fixtures/first'; -import { transactionFromBuffer } from './utils/txTools'; +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/first.js'; +import { transactionFromBuffer } from './utils/txTools.js'; for (const f of fixtures) { tape('Test: ' + f.description, t => { diff --git a/ts_src/tests/fromBIP/invalid.ts b/ts_src/tests/fromBIP/invalid.ts index c851f49..08eae73 100644 --- a/ts_src/tests/fromBIP/invalid.ts +++ b/ts_src/tests/fromBIP/invalid.ts @@ -1,4 +1,4 @@ -import * as tape from 'tape'; +import tape from 'tape'; import { Psbt } from '../../lib/psbt'; import { fixtures } from '../fixtures/invalid'; import { transactionFromBuffer } from '../utils/txTools'; diff --git a/ts_src/tests/fromBIP/update.ts b/ts_src/tests/fromBIP/update.ts index b37d932..c2dc1ab 100644 --- a/ts_src/tests/fromBIP/update.ts +++ b/ts_src/tests/fromBIP/update.ts @@ -1,4 +1,4 @@ -import * as tape from 'tape'; +import tape from 'tape'; import { Psbt } from '../../lib/psbt'; import { fixtures } from '../fixtures/update'; import { transactionFromBuffer } from '../utils/txTools'; diff --git a/ts_src/tests/fromBIP/valid.ts b/ts_src/tests/fromBIP/valid.ts index 616dd43..e88015b 100644 --- a/ts_src/tests/fromBIP/valid.ts +++ b/ts_src/tests/fromBIP/valid.ts @@ -1,4 +1,4 @@ -import * as tape from 'tape'; +import tape from 'tape'; import { Psbt } from '../../lib/psbt'; import { fixtures } from '../fixtures/valid'; import { transactionFromBuffer } from '../utils/txTools'; diff --git a/ts_src/tests/fromBuffer.ts b/ts_src/tests/fromBuffer.ts index 8a8787a..dbbc714 100644 --- a/ts_src/tests/fromBuffer.ts +++ b/ts_src/tests/fromBuffer.ts @@ -1,6 +1,6 @@ -import * as tape from 'tape'; -import { Psbt } from '../lib/psbt'; -import { fixtures } from './fixtures/fromBuffer'; +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/fromBuffer.js'; class Blah { constructor(public buf: Buffer) {} diff --git a/ts_src/tests/keyValsToPsbt.ts b/ts_src/tests/keyValsToPsbt.ts index c0ef22c..43082fd 100644 --- a/ts_src/tests/keyValsToPsbt.ts +++ b/ts_src/tests/keyValsToPsbt.ts @@ -1,8 +1,8 @@ -import * as tape from 'tape'; -import { psbtFromKeyVals } from '../lib/parser/fromBuffer'; -import { Psbt } from '../lib/psbt'; -import { fixtures } from './fixtures/keyValsToPsbt'; -import { getDefaultTx, transactionFromBuffer } from './utils/txTools'; +import tape from 'tape'; +import { psbtFromKeyVals } from '../lib/parser/fromBuffer.js'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/keyValsToPsbt.js'; +import { getDefaultTx, transactionFromBuffer } from './utils/txTools.js'; for (const f of fixtures) { if (f.exception) { diff --git a/ts_src/tests/methods.ts b/ts_src/tests/methods.ts index 7133cbc..5c6e4c1 100644 --- a/ts_src/tests/methods.ts +++ b/ts_src/tests/methods.ts @@ -1,7 +1,7 @@ -import * as tape from 'tape'; -import { Psbt } from '../lib/psbt'; -import { fixtures } from './fixtures/methods'; -import { getDefaultTx } from './utils/txTools'; +import tape from 'tape'; +import { Psbt } from '../lib/psbt.js'; +import { fixtures } from './fixtures/methods.js'; +import { getDefaultTx } from './utils/txTools.js'; function run(f: any, typ: string): void { tape(`check ${typ} method: ${f.method}`, t => { diff --git a/ts_src/tests/utils/txTools.ts b/ts_src/tests/utils/txTools.ts index dc68fe9..624cc6b 100644 --- a/ts_src/tests/utils/txTools.ts +++ b/ts_src/tests/utils/txTools.ts @@ -1,5 +1,5 @@ import { Transaction as BTransaction } from 'bitcoinjs-lib'; -import { reverseBuffer } from '../../lib/converter/tools'; +import { reverseBuffer } from '../../lib/converter/tools.js'; import { Transaction as ITransaction, TransactionFromBuffer, diff --git a/ts_src/tests/validation.ts b/ts_src/tests/validation.ts index 0da1ece..1e0947e 100644 --- a/ts_src/tests/validation.ts +++ b/ts_src/tests/validation.ts @@ -1,10 +1,10 @@ -import * as tape from 'tape'; -import { combine } from '../lib/combiner'; +import tape from 'tape'; +import { combine } from '../lib/combiner/index.js'; import { globals as convertGlobal, inputs as convertInputs, -} from '../lib/converter'; -import { getDefaultTx } from './utils/txTools'; +} from '../lib/converter/index.js'; +import { getDefaultTx } from './utils/txTools.js'; const b = (hex: string): Buffer => Buffer.from(hex, 'hex'); diff --git a/ts_src/tests/varint.ts b/ts_src/tests/varint.ts index 7858e8b..432686d 100644 --- a/ts_src/tests/varint.ts +++ b/ts_src/tests/varint.ts @@ -1,38 +1,38 @@ -import * as test from 'tape'; -import * as varuint from '../lib/converter/varint'; +import tape from 'tape'; +import * as varuint from '../lib/converter/varint.js'; -import { fixtures } from './fixtures/varint'; +import { fixtures } from './fixtures/varint.js'; fixtures.valid.forEach((fixture, i) => { - test('valid encode #' + (i + 1), t => { + tape('valid encode #' + (i + 1), t => { t.same(varuint.encode(fixture.dec).toString('hex'), fixture.hex); // @ts-ignore t.same(varuint.encode.bytes, fixture.hex.length / 2); t.end(); }); - test('valid decode #' + (i + 1), t => { + tape('valid decode #' + (i + 1), t => { t.same(varuint.decode(Buffer.from(fixture.hex, 'hex')), fixture.dec); // @ts-ignore t.same(varuint.decode.bytes, fixture.hex.length / 2); t.end(); }); - test('valid encodingLength #' + (i + 1), t => { + tape('valid encodingLength #' + (i + 1), t => { t.same(varuint.encodingLength(fixture.dec), fixture.hex.length / 2); t.end(); }); }); fixtures.invalid.forEach((fixture, i) => { - test('invalid encode #' + (i + 1), t => { + tape('invalid encode #' + (i + 1), t => { t.throws(() => { varuint.encode(fixture.dec); }, new RegExp(fixture.msg)); t.end(); }); - test('invalid encodingLength #' + (i + 1), t => { + tape('invalid encodingLength #' + (i + 1), t => { t.throws(() => { varuint.encodingLength(fixture.dec); }, new RegExp(fixture.msg)); @@ -40,7 +40,7 @@ fixtures.invalid.forEach((fixture, i) => { }); if (fixture.hex) { - test('invalid decode #' + (i + 1), t => { + tape('invalid decode #' + (i + 1), t => { t.throws(() => { // @ts-ignore t.decode(varuint.decode(Buffer.from(fixture.hex, 'hex'))); @@ -50,7 +50,7 @@ fixtures.invalid.forEach((fixture, i) => { } }); -test('encode', t => { +tape('encode', t => { t.test('write to buffer with offset', _t => { const buffer = Buffer.from([0x00, 0x00]); _t.same(varuint.encode(0xfc, buffer, 1).toString('hex'), '00fc'); @@ -70,7 +70,7 @@ test('encode', t => { t.end(); }); -test('decode', t => { +tape('decode', t => { t.test('read from buffer with offset', _t => { const buffer = Buffer.from([0x00, 0xfc]); _t.same(varuint.decode(buffer, 1), 0xfc); diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..3c08eba --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2015", + "outDir": "./src", + "declaration": true, + "rootDir": "./ts_src", + "types": ["node"], + "allowJs": false, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "moduleResolution": "Node", + "module": "ESNext", + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true + }, + "include": ["ts_src/**/*.ts"], + "exclude": ["**/*.spec.ts", "node_modules/**/*"] +} diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json new file mode 100644 index 0000000..c93762f --- /dev/null +++ b/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": false, + "outDir": "src/cjs", + "module": "commonjs" + }, + "exclude": ["ts_src/tests/**/*"] +} diff --git a/tsconfig.json b/tsconfig.json index 0da8441..0d9e728 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,31 +1,8 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "ES2015", - "module": "commonjs", - "outDir": "./src", - "declaration": true, - "rootDir": "./ts_src", - "types": [ - "node" - ], - "allowJs": false, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "strictBindCallApply": true, - "strictPropertyInitialization": true, - "noImplicitThis": true, - "alwaysStrict": true, - "esModuleInterop": false, - "noUnusedLocals": true, - "noUnusedParameters": true - }, - "include": [ - "ts_src/**/*.ts" - ], - "exclude": [ - "**/*.spec.ts", - "node_modules/**/*" - ] + "outDir": "src/esm", + "esModuleInterop": true, + "module": "ESNext" + } } From d1d3495161fd0a54650cd446c7496e0d3e1f4324 Mon Sep 17 00:00:00 2001 From: ayman Date: Mon, 17 Jun 2024 14:18:23 +0530 Subject: [PATCH 2/9] fix: tests and coverage --- package-lock.json | 885 +++++++++++++++++++++++++++++++ package.json | 6 +- src/esm/tests/fromBIP/invalid.js | 6 +- src/esm/tests/fromBIP/update.js | 6 +- src/esm/tests/fromBIP/valid.js | 6 +- ts_src/tests/fromBIP/invalid.ts | 6 +- ts_src/tests/fromBIP/update.ts | 6 +- ts_src/tests/fromBIP/valid.ts | 6 +- 8 files changed, 906 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4173980..9ba53bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@types/node": "12.0.8", "@types/tape": "4.2.33", "bitcoinjs-lib": "^5.0.5", + "c8": "^10.1.2", "nyc": "^14.1.1", "prettier": "^1.18.2", "rimraf": "^2.6.3", @@ -281,6 +282,117 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -354,6 +466,22 @@ "node": ">= 0.4" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/node": { "version": "12.0.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.8.tgz", @@ -644,6 +772,460 @@ "node": ">=0.10.0" } }, + "node_modules/c8": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^7.0.1", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "monocart-coverage-reports": "^2" + }, + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } + } + }, + "node_modules/c8/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/c8/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/c8/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/c8/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/c8/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/c8/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/c8/node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/c8/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/c8/node_modules/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/c8/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/c8/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/c8/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/caching-transform": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", @@ -999,6 +1581,12 @@ "ignored": "bin/ignored" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -1179,6 +1767,15 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2039,6 +2636,24 @@ "node": ">=6" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2201,6 +2816,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -2454,12 +3078,46 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -2797,6 +3455,27 @@ "sha.js": "bin.js" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -2917,6 +3596,57 @@ "node": ">=6" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -2978,6 +3708,28 @@ "node": ">=6" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -3276,6 +4028,26 @@ "uuid": "bin/uuid" } }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -3389,6 +4161,107 @@ "node": ">=6" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3445,6 +4318,18 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 6b3ed47..5dea067 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "scripts": { "build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json && npm run formatjs", "clean": "rimraf src types", - "coverage": "nyc --check-coverage --exclude='src/tests/**/*.js' --reporter=lcov --reporter=text --branches 90 --functions 90 --lines 90 npm run unit", + "coverage": "c8 --check-coverage --exclude='src/esm/tests/**/*.js' --reporter=lcov --reporter=text --branches 90 --functions 90 --lines 90 npm run unit", "flb": "npm run format && npm run lint && npm run build", "format": "npm run prettier -- --write", "formatjs": "npm run prettierjs -- --write > /dev/null 2>&1", @@ -33,7 +33,7 @@ "prettier": "prettier 'ts_src/**/*.ts' --ignore-path ./.prettierignore", "prettierjs": "prettier 'src/**/*.js' --ignore-path ./.prettierignore", "test": "npm run format:ci && npm run lint && npm run build && npm run coverage", - "unit": "tape src/esm/tests/*.js src/tests/fromBIP/*.js" + "unit": "tape src/esm/tests/*.js src/esm/tests/fromBIP/*.js" }, "repository": { "type": "git", @@ -43,7 +43,7 @@ "@types/node": "12.0.8", "@types/tape": "4.2.33", "bitcoinjs-lib": "^5.0.5", - "nyc": "^14.1.1", + "c8": "^10.1.2", "prettier": "^1.18.2", "rimraf": "^2.6.3", "tape": "^5.3.0", diff --git a/src/esm/tests/fromBIP/invalid.js b/src/esm/tests/fromBIP/invalid.js index 16a9eec..4c49346 100644 --- a/src/esm/tests/fromBIP/invalid.js +++ b/src/esm/tests/fromBIP/invalid.js @@ -1,7 +1,7 @@ import tape from 'tape'; -import { Psbt } from '../../lib/psbt'; -import { fixtures } from '../fixtures/invalid'; -import { transactionFromBuffer } from '../utils/txTools'; +import { Psbt } from '../../lib/psbt.js'; +import { fixtures } from '../fixtures/invalid.js'; +import { transactionFromBuffer } from '../utils/txTools.js'; // const res: any[] = []; for (const f of fixtures) { tape(`Test: Should throw "${f.exception}"`, t => { diff --git a/src/esm/tests/fromBIP/update.js b/src/esm/tests/fromBIP/update.js index ee2d071..ce72c2d 100644 --- a/src/esm/tests/fromBIP/update.js +++ b/src/esm/tests/fromBIP/update.js @@ -1,7 +1,7 @@ import tape from 'tape'; -import { Psbt } from '../../lib/psbt'; -import { fixtures } from '../fixtures/update'; -import { transactionFromBuffer } from '../utils/txTools'; +import { Psbt } from '../../lib/psbt.js'; +import { fixtures } from '../fixtures/update.js'; +import { transactionFromBuffer } from '../utils/txTools.js'; let lastAfter; for (const f of fixtures) { tape(f.description, t => { diff --git a/src/esm/tests/fromBIP/valid.js b/src/esm/tests/fromBIP/valid.js index 280a0f9..6ba7992 100644 --- a/src/esm/tests/fromBIP/valid.js +++ b/src/esm/tests/fromBIP/valid.js @@ -1,7 +1,7 @@ import tape from 'tape'; -import { Psbt } from '../../lib/psbt'; -import { fixtures } from '../fixtures/valid'; -import { transactionFromBuffer } from '../utils/txTools'; +import { Psbt } from '../../lib/psbt.js'; +import { fixtures } from '../fixtures/valid.js'; +import { transactionFromBuffer } from '../utils/txTools.js'; for (const f of fixtures) { tape(`Test: Should not throw`, t => { let psbt; diff --git a/ts_src/tests/fromBIP/invalid.ts b/ts_src/tests/fromBIP/invalid.ts index 08eae73..44144da 100644 --- a/ts_src/tests/fromBIP/invalid.ts +++ b/ts_src/tests/fromBIP/invalid.ts @@ -1,7 +1,7 @@ import tape from 'tape'; -import { Psbt } from '../../lib/psbt'; -import { fixtures } from '../fixtures/invalid'; -import { transactionFromBuffer } from '../utils/txTools'; +import { Psbt } from '../../lib/psbt.js'; +import { fixtures } from '../fixtures/invalid.js'; +import { transactionFromBuffer } from '../utils/txTools.js'; // const res: any[] = []; diff --git a/ts_src/tests/fromBIP/update.ts b/ts_src/tests/fromBIP/update.ts index c2dc1ab..b713129 100644 --- a/ts_src/tests/fromBIP/update.ts +++ b/ts_src/tests/fromBIP/update.ts @@ -1,7 +1,7 @@ import tape from 'tape'; -import { Psbt } from '../../lib/psbt'; -import { fixtures } from '../fixtures/update'; -import { transactionFromBuffer } from '../utils/txTools'; +import { Psbt } from '../../lib/psbt.js'; +import { fixtures } from '../fixtures/update.js'; +import { transactionFromBuffer } from '../utils/txTools.js'; let lastAfter: any; diff --git a/ts_src/tests/fromBIP/valid.ts b/ts_src/tests/fromBIP/valid.ts index e88015b..7b1a9ad 100644 --- a/ts_src/tests/fromBIP/valid.ts +++ b/ts_src/tests/fromBIP/valid.ts @@ -1,7 +1,7 @@ import tape from 'tape'; -import { Psbt } from '../../lib/psbt'; -import { fixtures } from '../fixtures/valid'; -import { transactionFromBuffer } from '../utils/txTools'; +import { Psbt } from '../../lib/psbt.js'; +import { fixtures } from '../fixtures/valid.js'; +import { transactionFromBuffer } from '../utils/txTools.js'; for (const f of fixtures) { tape(`Test: Should not throw`, t => { From 83c9a2eb8808ae96644481e3130892b48afc4b73 Mon Sep 17 00:00:00 2001 From: ayman Date: Mon, 26 Aug 2024 17:02:32 +0530 Subject: [PATCH 3/9] feat: support uint8array --- .github/workflows/main_ci.yml | 36 +- package-lock.json | 11217 +++++++++++++--- package.json | 6 +- src/cjs/lib/combiner/index.js | 20 +- src/cjs/lib/converter/global/globalXpub.d.ts | 2 +- src/cjs/lib/converter/global/globalXpub.js | 39 +- src/cjs/lib/converter/global/unsignedTx.js | 2 +- src/cjs/lib/converter/index.d.ts | 43 +- .../lib/converter/input/finalScriptSig.d.ts | 2 +- src/cjs/lib/converter/input/finalScriptSig.js | 20 +- .../converter/input/finalScriptWitness.d.ts | 2 +- .../lib/converter/input/finalScriptWitness.js | 20 +- .../lib/converter/input/nonWitnessUtxo.d.ts | 2 +- src/cjs/lib/converter/input/nonWitnessUtxo.js | 20 +- src/cjs/lib/converter/input/partialSig.d.ts | 2 +- src/cjs/lib/converter/input/partialSig.js | 34 +- src/cjs/lib/converter/input/porCommitment.js | 20 +- src/cjs/lib/converter/input/sighashType.js | 22 +- src/cjs/lib/converter/input/tapKeySig.d.ts | 2 +- src/cjs/lib/converter/input/tapKeySig.js | 22 +- .../lib/converter/input/tapLeafScript.d.ts | 2 +- src/cjs/lib/converter/input/tapLeafScript.js | 37 +- .../lib/converter/input/tapMerkleRoot.d.ts | 2 +- src/cjs/lib/converter/input/tapMerkleRoot.js | 20 +- src/cjs/lib/converter/input/tapScriptSig.d.ts | 2 +- src/cjs/lib/converter/input/tapScriptSig.js | 40 +- src/cjs/lib/converter/input/witnessUtxo.d.ts | 2 +- src/cjs/lib/converter/input/witnessUtxo.js | 29 +- src/cjs/lib/converter/output/tapTree.d.ts | 2 +- src/cjs/lib/converter/output/tapTree.js | 25 +- .../lib/converter/shared/bip32Derivation.d.ts | 3 +- .../lib/converter/shared/bip32Derivation.js | 40 +- src/cjs/lib/converter/shared/checkPubkey.d.ts | 3 +- src/cjs/lib/converter/shared/checkPubkey.js | 14 +- src/cjs/lib/converter/shared/redeemScript.js | 20 +- .../converter/shared/tapBip32Derivation.js | 28 +- .../lib/converter/shared/tapInternalKey.js | 20 +- src/cjs/lib/converter/shared/witnessScript.js | 20 +- src/cjs/lib/converter/tools.d.ts | 9 +- src/cjs/lib/converter/tools.js | 65 +- src/cjs/lib/interfaces.d.ts | 55 +- src/cjs/lib/parser/fromBuffer.d.ts | 5 +- src/cjs/lib/parser/fromBuffer.js | 29 +- src/cjs/lib/parser/toBuffer.d.ts | 3 +- src/cjs/lib/parser/toBuffer.js | 15 +- src/cjs/lib/psbt.d.ts | 11 +- src/cjs/lib/psbt.js | 33 +- src/cjs/lib/utils.d.ts | 7 +- src/cjs/lib/utils.js | 15 +- src/esm/lib/combiner/index.js | 9 +- src/esm/lib/converter/global/globalXpub.d.ts | 2 +- src/esm/lib/converter/global/globalXpub.js | 28 +- src/esm/lib/converter/global/unsignedTx.js | 2 +- src/esm/lib/converter/index.d.ts | 43 +- .../lib/converter/input/finalScriptSig.d.ts | 2 +- src/esm/lib/converter/input/finalScriptSig.js | 9 +- .../converter/input/finalScriptWitness.d.ts | 2 +- .../lib/converter/input/finalScriptWitness.js | 9 +- .../lib/converter/input/nonWitnessUtxo.d.ts | 2 +- src/esm/lib/converter/input/nonWitnessUtxo.js | 9 +- src/esm/lib/converter/input/partialSig.d.ts | 2 +- src/esm/lib/converter/input/partialSig.js | 23 +- src/esm/lib/converter/input/porCommitment.js | 9 +- src/esm/lib/converter/input/sighashType.js | 11 +- src/esm/lib/converter/input/tapKeySig.d.ts | 2 +- src/esm/lib/converter/input/tapKeySig.js | 11 +- .../lib/converter/input/tapLeafScript.d.ts | 2 +- src/esm/lib/converter/input/tapLeafScript.js | 26 +- .../lib/converter/input/tapMerkleRoot.d.ts | 2 +- src/esm/lib/converter/input/tapMerkleRoot.js | 9 +- src/esm/lib/converter/input/tapScriptSig.d.ts | 2 +- src/esm/lib/converter/input/tapScriptSig.js | 28 +- src/esm/lib/converter/input/witnessUtxo.d.ts | 2 +- src/esm/lib/converter/input/witnessUtxo.js | 29 +- src/esm/lib/converter/output/tapTree.d.ts | 2 +- src/esm/lib/converter/output/tapTree.js | 25 +- .../lib/converter/shared/bip32Derivation.d.ts | 3 +- .../lib/converter/shared/bip32Derivation.js | 29 +- src/esm/lib/converter/shared/checkPubkey.d.ts | 3 +- src/esm/lib/converter/shared/checkPubkey.js | 3 +- src/esm/lib/converter/shared/redeemScript.js | 9 +- .../converter/shared/tapBip32Derivation.js | 28 +- .../lib/converter/shared/tapInternalKey.js | 9 +- src/esm/lib/converter/shared/witnessScript.js | 9 +- src/esm/lib/converter/tools.d.ts | 9 +- src/esm/lib/converter/tools.js | 63 +- src/esm/lib/interfaces.d.ts | 55 +- src/esm/lib/parser/fromBuffer.d.ts | 5 +- src/esm/lib/parser/fromBuffer.js | 29 +- src/esm/lib/parser/toBuffer.d.ts | 3 +- src/esm/lib/parser/toBuffer.js | 17 +- src/esm/lib/psbt.d.ts | 11 +- src/esm/lib/psbt.js | 23 +- src/esm/lib/utils.d.ts | 7 +- src/esm/lib/utils.js | 15 +- src/esm/tests/addInputOutput.js | 6 - src/esm/tests/combine.js | 6 +- src/esm/tests/first.js | 8 +- src/esm/tests/fixtures/create.d.ts | 4 +- src/esm/tests/fixtures/create.js | 6 +- src/esm/tests/fixtures/keyValsToPsbt.js | 2 + src/esm/tests/fixtures/methods.js | 24 +- src/esm/tests/fixtures/update.d.ts | 4 +- src/esm/tests/fixtures/update.js | 4 +- src/esm/tests/utils/txTools.d.ts | 2 +- src/esm/tests/utils/txTools.js | 2 +- src/esm/tests/validation.js | 4 +- ts_src/lib/combiner/index.ts | 9 +- ts_src/lib/converter/global/globalXpub.ts | 29 +- ts_src/lib/converter/global/unsignedTx.ts | 2 +- ts_src/lib/converter/input/finalScriptSig.ts | 9 +- .../lib/converter/input/finalScriptWitness.ts | 9 +- ts_src/lib/converter/input/nonWitnessUtxo.ts | 9 +- ts_src/lib/converter/input/partialSig.ts | 25 +- ts_src/lib/converter/input/porCommitment.ts | 9 +- ts_src/lib/converter/input/sighashType.ts | 11 +- ts_src/lib/converter/input/tapKeySig.ts | 11 +- ts_src/lib/converter/input/tapLeafScript.ts | 26 +- ts_src/lib/converter/input/tapMerkleRoot.ts | 9 +- ts_src/lib/converter/input/tapScriptSig.ts | 28 +- ts_src/lib/converter/input/witnessUtxo.ts | 29 +- ts_src/lib/converter/output/tapTree.ts | 32 +- .../lib/converter/shared/bip32Derivation.ts | 31 +- ts_src/lib/converter/shared/checkPubkey.ts | 10 +- ts_src/lib/converter/shared/redeemScript.ts | 9 +- .../converter/shared/tapBip32Derivation.ts | 29 +- ts_src/lib/converter/shared/tapInternalKey.ts | 9 +- ts_src/lib/converter/shared/witnessScript.ts | 9 +- ts_src/lib/converter/tools.ts | 73 +- ts_src/lib/interfaces.ts | 58 +- ts_src/lib/parser/fromBuffer.ts | 35 +- ts_src/lib/parser/toBuffer.ts | 21 +- ts_src/lib/psbt.ts | 70 +- ts_src/lib/utils.ts | 27 +- ts_src/tests/addInputOutput.ts | 8 - ts_src/tests/combine.ts | 7 +- ts_src/tests/first.ts | 8 +- ts_src/tests/fixtures/create.ts | 6 +- ts_src/tests/fixtures/keyValsToPsbt.ts | 2 + ts_src/tests/fixtures/methods.ts | 24 +- ts_src/tests/fixtures/update.ts | 4 +- ts_src/tests/fromBuffer.ts | 6 +- ts_src/tests/utils/txTools.ts | 6 +- ts_src/tests/validation.ts | 4 +- tsconfig.base.json | 2 +- tslint.json | 7 +- 146 files changed, 10910 insertions(+), 2595 deletions(-) diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 04a6363..2109d39 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -10,60 +10,60 @@ jobs: audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm audit unit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run unit coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run coverage format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run format:ci gitdiff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run gitdiff:ci lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 with: - node-version: 12 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run lint diff --git a/package-lock.json b/package-lock.json index 9ba53bb..0a9e5e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,12 +8,15 @@ "name": "bip174", "version": "2.1.1", "license": "MIT", + "dependencies": { + "uint8array-tools": "../uint8array-tools", + "varuint-bitcoin": "../varuint-bitcoin" + }, "devDependencies": { "@types/node": "12.0.8", "@types/tape": "4.2.33", "bitcoinjs-lib": "^5.0.5", "c8": "^10.1.2", - "nyc": "^14.1.1", "prettier": "^1.18.2", "rimraf": "^2.6.3", "tape": "^5.3.0", @@ -21,262 +24,9356 @@ "typescript": "3.5.2" }, "engines": { - "node": ">=8.0.0" + "node": ">=18.0.0" + } + }, + "../uint8array-tools": { + "version": "0.0.8", + "license": "MIT", + "devDependencies": { + "@types/jest": "27.0.2", + "@types/node": "16.11.1", + "@typescript-eslint/eslint-plugin": "5.0.0", + "@typescript-eslint/parser": "5.0.0", + "eslint": "8.0.1", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "4.0.0", + "jest": "27.2.5", + "prettier": "2.4.1", + "ts-jest": "27.0.7", + "typescript": "4.4.4" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "../uint8array-tools/node_modules/@ampproject/remapping": { + "version": "2.3.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/@babel/code-frame": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/compat-data": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/core": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "../uint8array-tools/node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../uint8array-tools/node_modules/@babel/generator": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-compilation-targets": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../uint8array-tools/node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-module-transforms": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-plugin-utils": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helper-validator-option": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/helpers": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/highlight": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/@babel/parser": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "../uint8array-tools/node_modules/@babel/template": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/traverse": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/@babel/types": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@eslint/eslintrc": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../uint8array-tools/node_modules/@humanwhocodes/config-array": { + "version": "0.6.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "../uint8array-tools/node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "dev": true, + "license": "BSD-3-Clause" + }, + "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/@jest/console": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/core": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", + "micromatch": "^4.0.4", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/@jest/environment": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/fake-timers": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@sinonjs/fake-timers": "^8.0.1", + "@types/node": "*", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/globals": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/reporters": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.1.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/@jest/source-map": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9", + "source-map": "^0.6.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/test-result": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/test-sequencer": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/transform": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.5.1", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jest/types": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "../uint8array-tools/node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/@sinonjs/commons": { + "version": "1.8.6", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "../uint8array-tools/node_modules/@sinonjs/fake-timers": { + "version": "8.1.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "../uint8array-tools/node_modules/@tootallnate/once": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/@types/babel__core": { + "version": "7.20.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "../uint8array-tools/node_modules/@types/babel__generator": { + "version": "7.6.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "../uint8array-tools/node_modules/@types/babel__template": { + "version": "7.4.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "../uint8array-tools/node_modules/@types/babel__traverse": { + "version": "7.20.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "../uint8array-tools/node_modules/@types/graceful-fs": { + "version": "4.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../uint8array-tools/node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "../uint8array-tools/node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "../uint8array-tools/node_modules/@types/jest": { + "version": "27.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-diff": "^27.0.0", + "pretty-format": "^27.0.0" + } + }, + "../uint8array-tools/node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@types/node": { + "version": "16.11.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@types/prettier": { + "version": "2.7.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@types/stack-utils": { + "version": "2.0.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@types/yargs": { + "version": "16.0.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "../uint8array-tools/node_modules/@types/yargs-parser": { + "version": "21.0.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/experimental-utils": "5.0.0", + "@typescript-eslint/scope-manager": "5.0.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/@typescript-eslint/experimental-utils": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "5.0.0", + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/typescript-estree": "5.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "../uint8array-tools/node_modules/@typescript-eslint/parser": { + "version": "5.0.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.0.0", + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/typescript-estree": "5.0.0", + "debug": "^4.3.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/@typescript-eslint/scope-manager": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/visitor-keys": "5.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../uint8array-tools/node_modules/@typescript-eslint/types": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../uint8array-tools/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.0.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.0.0", + "@typescript-eslint/visitor-keys": "5.0.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.0.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../uint8array-tools/node_modules/abab": { + "version": "2.0.6", + "dev": true, + "license": "BSD-3-Clause" + }, + "../uint8array-tools/node_modules/acorn": { + "version": "8.12.0", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../uint8array-tools/node_modules/acorn-globals": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, + "../uint8array-tools/node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../uint8array-tools/node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "../uint8array-tools/node_modules/acorn-walk": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "../uint8array-tools/node_modules/agent-base": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "../uint8array-tools/node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../uint8array-tools/node_modules/ansi-colors": { + "version": "4.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/ansi-escapes": { + "version": "4.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../uint8array-tools/node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "../uint8array-tools/node_modules/array-union": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/asynckit": { + "version": "0.4.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/babel-jest": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "../uint8array-tools/node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/babel-plugin-jest-hoist": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../uint8array-tools/node_modules/babel-preset-jest": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^27.5.1", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "../uint8array-tools/node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "../uint8array-tools/node_modules/braces": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/browser-process-hrtime": { + "version": "1.0.0", + "dev": true, + "license": "BSD-2-Clause" + }, + "../uint8array-tools/node_modules/browserslist": { + "version": "4.23.1", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "../uint8array-tools/node_modules/bs-logger": { + "version": "0.2.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/bser": { + "version": "2.1.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "../uint8array-tools/node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/camelcase": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/caniuse-lite": { + "version": "1.0.30001638", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "../uint8array-tools/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../uint8array-tools/node_modules/char-regex": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/ci-info": { + "version": "3.9.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/cjs-module-lexer": { + "version": "1.3.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/cliui": { + "version": "7.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "../uint8array-tools/node_modules/co": { + "version": "4.6.0", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "../uint8array-tools/node_modules/collect-v8-coverage": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../uint8array-tools/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/combined-stream": { + "version": "1.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "../uint8array-tools/node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/convert-source-map": { + "version": "1.9.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/cssom": { + "version": "0.4.4", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/cssstyle": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/data-urls": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/debug": { + "version": "4.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/decimal.js": { + "version": "10.4.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/dedent": { + "version": "0.7.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/deepmerge": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/delayed-stream": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "../uint8array-tools/node_modules/detect-newline": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/diff-sequences": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/domexception": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "webidl-conversions": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/domexception/node_modules/webidl-conversions": { + "version": "5.0.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/electron-to-chromium": { + "version": "1.4.812", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/emittery": { + "version": "0.8.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "../uint8array-tools/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/enquirer": { + "version": "2.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "../uint8array-tools/node_modules/error-ex": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "../uint8array-tools/node_modules/escalade": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/escodegen": { + "version": "2.1.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "../uint8array-tools/node_modules/escodegen/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../uint8array-tools/node_modules/eslint": { + "version": "8.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint/eslintrc": "^1.0.3", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^6.0.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../uint8array-tools/node_modules/eslint-config-prettier": { + "version": "8.3.0", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "../uint8array-tools/node_modules/eslint-plugin-prettier": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "../uint8array-tools/node_modules/eslint-utils": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "../uint8array-tools/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../uint8array-tools/node_modules/eslint/node_modules/eslint-scope": { + "version": "6.0.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../uint8array-tools/node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../uint8array-tools/node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../uint8array-tools/node_modules/espree": { + "version": "9.6.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../uint8array-tools/node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/esquery": { + "version": "1.5.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "../uint8array-tools/node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../uint8array-tools/node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "../uint8array-tools/node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../uint8array-tools/node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../uint8array-tools/node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/execa": { + "version": "5.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "../uint8array-tools/node_modules/exit": { + "version": "0.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "../uint8array-tools/node_modules/expect": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/fast-diff": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0" + }, + "../uint8array-tools/node_modules/fast-glob": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "../uint8array-tools/node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/fastq": { + "version": "1.17.1", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "../uint8array-tools/node_modules/fb-watchman": { + "version": "2.0.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "../uint8array-tools/node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../uint8array-tools/node_modules/fill-range": { + "version": "7.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/flat-cache": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../uint8array-tools/node_modules/flatted": { + "version": "3.3.1", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/form-data": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../uint8array-tools/node_modules/functional-red-black-tree": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../uint8array-tools/node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "../uint8array-tools/node_modules/get-package-type": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../uint8array-tools/node_modules/get-stream": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../uint8array-tools/node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../uint8array-tools/node_modules/globals": { + "version": "13.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/globby": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/hasown": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../uint8array-tools/node_modules/html-encoding-sniffer": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^1.0.5" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/html-escaper": { + "version": "2.0.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/http-proxy-agent": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/https-proxy-agent": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/human-signals": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "../uint8array-tools/node_modules/iconv-lite": { + "version": "0.4.24", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/ignore": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../uint8array-tools/node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/import-local": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "../uint8array-tools/node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../uint8array-tools/node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/is-arrayish": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/is-core-module": { + "version": "2.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../uint8array-tools/node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/is-generator-fn": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../uint8array-tools/node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/is-stream": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/is-typedarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../uint8array-tools/node_modules/istanbul-lib-report": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/istanbul-reports": { + "version": "3.1.7", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/jest": { + "version": "27.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^27.2.5", + "import-local": "^3.0.2", + "jest-cli": "^27.2.5" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/jest-changed-files": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "execa": "^5.0.0", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-circus": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-cli": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "prompts": "^2.0.1", + "yargs": "^16.2.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/jest-config": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.8.0", + "@jest/test-sequencer": "^27.5.1", + "@jest/types": "^27.5.1", + "babel-jest": "^27.5.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.9", + "jest-circus": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-jasmine2": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/jest-diff": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-docblock": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-each": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-environment-jsdom": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1", + "jsdom": "^16.6.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-environment-node": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-get-type": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-haste-map": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "../uint8array-tools/node_modules/jest-jasmine2": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^27.5.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-leak-detector": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-matcher-utils": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-message-util": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^27.5.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-mock": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/jest-regex-util": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-resolve": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-resolve-dependencies": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-snapshot": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-runner": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^27.5.1", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-leak-detector": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "source-map-support": "^0.5.6", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-runtime": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/globals": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-serializer": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-snapshot": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.7.2", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.0.0", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^27.5.1", + "semver": "^7.3.2" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-util": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-validate": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^27.5.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "leven": "^3.1.0", + "pretty-format": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/jest-watcher": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^27.5.1", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/jest-worker": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "../uint8array-tools/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "../uint8array-tools/node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../uint8array-tools/node_modules/jsdom": { + "version": "16.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/json5": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/keyv": { + "version": "4.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "../uint8array-tools/node_modules/kleur": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/leven": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../uint8array-tools/node_modules/lines-and-columns": { + "version": "1.2.4", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/lodash.memoize": { + "version": "4.1.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "../uint8array-tools/node_modules/make-dir": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/make-error": { + "version": "1.3.6", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/makeerror": { + "version": "1.0.12", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "../uint8array-tools/node_modules/merge-stream": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/micromatch": { + "version": "4.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "../uint8array-tools/node_modules/mime-db": { + "version": "1.52.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../uint8array-tools/node_modules/mime-types": { + "version": "2.1.35", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "../uint8array-tools/node_modules/mimic-fn": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "../uint8array-tools/node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/node-int64": { + "version": "0.4.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/node-releases": { + "version": "2.0.14", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/npm-run-path": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/nwsapi": { + "version": "2.2.10", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "../uint8array-tools/node_modules/onetime": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/optionator": { + "version": "0.9.4", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../uint8array-tools/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/parse-json": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/parse5": { + "version": "6.0.1", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/picocolors": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "../uint8array-tools/node_modules/pirates": { + "version": "4.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "../uint8array-tools/node_modules/prettier": { + "version": "2.4.1", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../uint8array-tools/node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../uint8array-tools/node_modules/pretty-format": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "../uint8array-tools/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../uint8array-tools/node_modules/progress": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "../uint8array-tools/node_modules/prompts": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "../uint8array-tools/node_modules/psl": { + "version": "1.9.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/punycode": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/querystringify": { + "version": "2.2.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../uint8array-tools/node_modules/react-is": { + "version": "17.0.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/regexpp": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "../uint8array-tools/node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/requires-port": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../uint8array-tools/node_modules/resolve-cwd": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/resolve.exports": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../uint8array-tools/node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "../uint8array-tools/node_modules/safer-buffer": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/saxes": { + "version": "5.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/semver": { + "version": "7.6.2", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/signal-exit": { + "version": "3.0.7", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/sisteransi": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/source-map-support": { + "version": "0.5.21", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "../uint8array-tools/node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "../uint8array-tools/node_modules/stack-utils": { + "version": "2.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/string-length": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/strip-bom": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/strip-final-newline": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/supports-hyperlinks": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../uint8array-tools/node_modules/symbol-tree": { + "version": "3.2.4", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/terminal-link": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/test-exclude": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/throat": { + "version": "6.0.2", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/tmpl": { + "version": "1.0.5", + "dev": true, + "license": "BSD-3-Clause" + }, + "../uint8array-tools/node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "../uint8array-tools/node_modules/tough-cookie": { + "version": "4.1.4", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "../uint8array-tools/node_modules/tr46": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "../uint8array-tools/node_modules/ts-jest": { + "version": "27.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^27.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@types/jest": "^27.0.0", + "babel-jest": ">=27.0.0 <28", + "jest": "^27.0.0", + "typescript": ">=3.8 <5.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "babel-jest": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/tslib": { + "version": "1.14.1", + "dev": true, + "license": "0BSD" + }, + "../uint8array-tools/node_modules/tsutils": { + "version": "3.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "../uint8array-tools/node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../uint8array-tools/node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../uint8array-tools/node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../uint8array-tools/node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "../uint8array-tools/node_modules/typescript": { + "version": "4.4.4", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "../uint8array-tools/node_modules/universalify": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "../uint8array-tools/node_modules/update-browserslist-db": { + "version": "1.0.16", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "../uint8array-tools/node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "../uint8array-tools/node_modules/url-parse": { + "version": "1.5.10", + "dev": true, + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "../uint8array-tools/node_modules/v8-compile-cache": { + "version": "2.4.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/v8-to-istanbul": { + "version": "8.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "../uint8array-tools/node_modules/v8-to-istanbul/node_modules/source-map": { + "version": "0.7.4", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/w3c-hr-time": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "../uint8array-tools/node_modules/w3c-xmlserializer": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/walker": { + "version": "1.0.8", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "../uint8array-tools/node_modules/webidl-conversions": { + "version": "6.1.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=10.4" + } + }, + "../uint8array-tools/node_modules/whatwg-encoding": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "../uint8array-tools/node_modules/whatwg-mimetype": { + "version": "2.3.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/whatwg-url": { + "version": "8.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "../uint8array-tools/node_modules/word-wrap": { + "version": "1.2.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../uint8array-tools/node_modules/wrap-ansi": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../uint8array-tools/node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/write-file-atomic": { + "version": "3.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "../uint8array-tools/node_modules/ws": { + "version": "7.5.10", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "../uint8array-tools/node_modules/xml-name-validator": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0" + }, + "../uint8array-tools/node_modules/xmlchars": { + "version": "2.2.0", + "dev": true, + "license": "MIT" + }, + "../uint8array-tools/node_modules/y18n": { + "version": "5.0.8", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + }, + "../uint8array-tools/node_modules/yargs": { + "version": "16.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "../uint8array-tools/node_modules/yargs-parser": { + "version": "20.2.9", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../varuint-bitcoin": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "uint8array-tools": "^0.0.8" + }, + "devDependencies": { + "@types/node": "^20.14.8", + "c8": "^10.1.2", + "rimraf": "^5.0.7", + "tape": "^5.3.0", + "ts-standard": "^12.0.2", + "typescript": "^5.1.6" + } + }, + "../varuint-bitcoin/node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "../varuint-bitcoin/node_modules/@eslint-community/regexpp": { + "version": "4.10.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "../varuint-bitcoin/node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/@eslint/js": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../varuint-bitcoin/node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "../varuint-bitcoin/node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "../varuint-bitcoin/node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui": { + "version": "8.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../varuint-bitcoin/node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "../varuint-bitcoin/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "../varuint-bitcoin/node_modules/@ljharb/resumer": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@ljharb/through": "^2.3.13", + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/@ljharb/through": { + "version": "2.3.13", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "../varuint-bitcoin/node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../varuint-bitcoin/node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "../varuint-bitcoin/node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "../varuint-bitcoin/node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@types/json5": { + "version": "0.0.29", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@types/node": { + "version": "20.14.9", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "../varuint-bitcoin/node_modules/@types/semver": { + "version": "7.5.8", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/utils/node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../varuint-bitcoin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "../varuint-bitcoin/node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/acorn": { + "version": "8.12.0", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "../varuint-bitcoin/node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "../varuint-bitcoin/node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "../varuint-bitcoin/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array-includes": { + "version": "3.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array-union": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.every": { + "version": "1.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.findlast": { + "version": "1.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.flat": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.toreversed": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "../varuint-bitcoin/node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/available-typed-arrays": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "../varuint-bitcoin/node_modules/braces": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/builtins": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, + "../varuint-bitcoin/node_modules/c8": { + "version": "10.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^7.0.1", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "monocart-coverage-reports": "^2" + }, + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/call-bind": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/cliui": { + "version": "8.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "../varuint-bitcoin/node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "../varuint-bitcoin/node_modules/data-view-buffer": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/data-view-byte-length": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/data-view-byte-offset": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/debug": { + "version": "4.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/deep-equal": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/define-data-property": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/define-properties": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/defined": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../varuint-bitcoin/node_modules/dotignore": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "minimatch": "^3.0.4" + }, + "bin": { + "ignored": "bin/ignored" + } + }, + "../varuint-bitcoin/node_modules/eastasianwidth": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/error-ex": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "../varuint-bitcoin/node_modules/es-abstract": { + "version": "1.23.3", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/es-define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/es-errors": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/es-get-iterator": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/es-iterator-helpers": { + "version": "1.0.19", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/es-object-atoms": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/es-set-tostringtag": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/es-shim-unscopables": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + } + }, + "../varuint-bitcoin/node_modules/es-to-primitive": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/escalade": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/eslint": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../varuint-bitcoin/node_modules/eslint-config-standard-jsx": { + "version": "11.0.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peerDependencies": { + "eslint": "^8.8.0", + "eslint-plugin-react": "^7.28.0" + } + }, + "../varuint-bitcoin/node_modules/eslint-config-standard-with-typescript": { + "version": "23.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint-config-standard": "17.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0", + "typescript": "*" + } + }, + "../varuint-bitcoin/node_modules/eslint-config-standard-with-typescript/node_modules/eslint-config-standard": { + "version": "17.0.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peerDependencies": { + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0" + } + }, + "../varuint-bitcoin/node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "../varuint-bitcoin/node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "../varuint-bitcoin/node_modules/eslint-module-utils": { + "version": "2.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "../varuint-bitcoin/node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-es": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-import": { + "version": "2.29.1", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-n": { + "version": "15.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "builtins": "^5.0.1", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-promise": { + "version": "6.2.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-react": { + "version": "7.34.3", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.toreversed": "^1.1.2", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.19", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.8", + "object.fromentries": "^2.0.8", + "object.hasown": "^1.1.4", + "object.values": "^1.2.0", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.11" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "../varuint-bitcoin/node_modules/eslint-scope": { + "version": "7.2.2", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../varuint-bitcoin/node_modules/eslint-utils": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "../varuint-bitcoin/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "../varuint-bitcoin/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../varuint-bitcoin/node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/espree": { + "version": "9.6.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "../varuint-bitcoin/node_modules/esquery": { + "version": "1.5.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "../varuint-bitcoin/node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "../varuint-bitcoin/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "../varuint-bitcoin/node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/fast-glob": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "../varuint-bitcoin/node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../varuint-bitcoin/node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/fastq": { + "version": "1.17.1", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "../varuint-bitcoin/node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../varuint-bitcoin/node_modules/fill-range": { + "version": "7.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/flat-cache": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "../varuint-bitcoin/node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/flatted": { + "version": "3.3.1", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/for-each": { + "version": "0.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "../varuint-bitcoin/node_modules/foreground-child": { + "version": "3.2.1", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/function.prototype.name": { + "version": "1.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/functions-have-names": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "../varuint-bitcoin/node_modules/get-intrinsic": { + "version": "1.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/get-package-type": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../varuint-bitcoin/node_modules/get-stdin": { + "version": "8.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/get-symbol-description": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "../varuint-bitcoin/node_modules/globalthis": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/globby": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/gopd": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/graphemer": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/has-bigints": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/has-dynamic-import": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/has-property-descriptors": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/has-proto": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/has-symbols": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/has-tostringtag": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/hasown": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/html-escaper": { + "version": "2.0.2", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/ignore": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../varuint-bitcoin/node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "../varuint-bitcoin/node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../varuint-bitcoin/node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/internal-slot": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/is-arguments": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-array-buffer": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-arrayish": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/is-async-function": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-bigint": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-boolean-object": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-callable": { + "version": "1.2.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-core-module": { + "version": "2.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-data-view": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-date-object": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/is-finalizationregistry": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/is-generator-function": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/is-map": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-negative-zero": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../varuint-bitcoin/node_modules/is-number-object": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-path-inside": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/is-regex": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-set": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-string": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-symbol": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-typed-array": { + "version": "1.1.13", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-weakmap": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-weakref": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/is-weakset": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/isarray": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/istanbul-lib-report": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../varuint-bitcoin/node_modules/istanbul-reports": { + "version": "3.1.7", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/iterator.prototype": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, + "../varuint-bitcoin/node_modules/jackspeak": { + "version": "3.4.0", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "../varuint-bitcoin/node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/json-parse-better-errors": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/json5": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "../varuint-bitcoin/node_modules/jsx-ast-utils": { + "version": "3.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "../varuint-bitcoin/node_modules/keyv": { + "version": "4.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "../varuint-bitcoin/node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../varuint-bitcoin/node_modules/load-json-file": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/loose-envify": { + "version": "1.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "../varuint-bitcoin/node_modules/make-dir": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../varuint-bitcoin/node_modules/micromatch": { + "version": "4.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "../varuint-bitcoin/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "../varuint-bitcoin/node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/minipass": { + "version": "7.1.2", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "../varuint-bitcoin/node_modules/mock-property": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.1", + "functions-have-names": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "hasown": "^2.0.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/natural-compare-lite": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/object-inspect": { + "version": "1.13.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/object-is": { + "version": "1.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/object-keys": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/object.assign": { + "version": "4.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/object.entries": { + "version": "1.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/object.fromentries": { + "version": "2.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/object.groupby": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/object.hasown": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/object.values": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "../varuint-bitcoin/node_modules/optionator": { + "version": "0.9.4", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../varuint-bitcoin/node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/package-json-from-dist": { + "version": "1.0.0", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "../varuint-bitcoin/node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/parse-json": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "../varuint-bitcoin/node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/path-scurry": { + "version": "1.11.1", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "dev": true, + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "../varuint-bitcoin/node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "../varuint-bitcoin/node_modules/pify": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/pkg-conf": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/pkg-conf/node_modules/find-up": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/pkg-conf/node_modules/locate-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/pkg-conf/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/pkg-conf/node_modules/p-locate": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/pkg-conf/node_modules/path-exists": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../varuint-bitcoin/node_modules/possible-typed-array-names": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "../varuint-bitcoin/node_modules/prop-types": { + "version": "15.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "../varuint-bitcoin/node_modules/punycode": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/react-is": { + "version": "16.13.1", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/reflect.getprototypeof": { + "version": "1.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/regexpp": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "../varuint-bitcoin/node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../varuint-bitcoin/node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "../varuint-bitcoin/node_modules/rimraf": { + "version": "5.0.7", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../varuint-bitcoin/node_modules/rimraf/node_modules/glob": { + "version": "10.4.2", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.5", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "../varuint-bitcoin/node_modules/safe-array-concat": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/safe-regex-test": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/semver": { + "version": "7.6.2", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../varuint-bitcoin/node_modules/set-function-length": { + "version": "1.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/set-function-name": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/side-channel": { + "version": "1.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/standard-engine": { + "version": "15.1.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "get-stdin": "^8.0.0", + "minimist": "^1.2.6", + "pkg-conf": "^3.1.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../varuint-bitcoin/node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/string.prototype.matchall": { + "version": "4.0.11", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/string.prototype.trim": { + "version": "1.2.9", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/string.prototype.trimend": { + "version": "1.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/strip-bom": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../varuint-bitcoin/node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../varuint-bitcoin/node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/tape": { + "version": "5.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@ljharb/resumer": "^0.1.3", + "@ljharb/through": "^2.3.13", + "array.prototype.every": "^1.1.6", + "call-bind": "^1.0.7", + "deep-equal": "^2.2.3", + "defined": "^1.0.1", + "dotignore": "^0.1.2", + "for-each": "^0.3.3", + "get-package-type": "^0.1.0", + "glob": "^7.2.3", + "has-dynamic-import": "^2.1.0", + "hasown": "^2.0.2", + "inherits": "^2.0.4", + "is-regex": "^1.1.4", + "minimist": "^1.2.8", + "mock-property": "^1.0.3", + "object-inspect": "^1.13.1", + "object-is": "^1.1.6", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "resolve": "^2.0.0-next.5", + "string.prototype.trim": "^1.2.9" + }, + "bin": { + "tape": "bin/tape" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/tape/node_modules/resolve": { + "version": "2.0.0-next.5", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/test-exclude": { + "version": "7.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "../varuint-bitcoin/node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../varuint-bitcoin/node_modules/test-exclude/node_modules/glob": { + "version": "10.4.2", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.5", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../varuint-bitcoin/node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "../varuint-bitcoin/node_modules/ts-standard": { + "version": "12.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^8.0.1", + "eslint-config-standard-jsx": "^11.0.0", + "eslint-config-standard-with-typescript": "^23.0.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.28.0", + "minimist": "^1.2.6", + "pkg-conf": "^4.0.0", + "standard-engine": "^15.0.0" + }, + "bin": { + "ts-standard": "cli.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/find-up": { + "version": "6.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/load-json-file": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/locate-path": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/p-limit": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/p-locate": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/path-exists": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/pkg-conf": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^6.0.0", + "load-json-file": "^7.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/ts-standard/node_modules/yocto-queue": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../varuint-bitcoin/node_modules/tsconfig-paths": { + "version": "3.15.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "../varuint-bitcoin/node_modules/tslib": { + "version": "1.14.1", + "dev": true, + "license": "0BSD" + }, + "../varuint-bitcoin/node_modules/tsutils": { + "version": "3.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "../varuint-bitcoin/node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "../varuint-bitcoin/node_modules/type-fest": { + "version": "0.3.1", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=6" + } + }, + "../varuint-bitcoin/node_modules/typed-array-buffer": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../varuint-bitcoin/node_modules/typed-array-byte-length": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/typed-array-length": { + "version": "1.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../varuint-bitcoin/node_modules/typescript": { + "version": "5.5.2", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" } }, - "node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "../varuint-bitcoin/node_modules/uint8array-tools": { + "resolved": "../uint8array-tools", + "link": true + }, + "../varuint-bitcoin/node_modules/unbox-primitive": { + "version": "1.0.2", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.10", - "chalk": "^2.4.2" + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" }, - "engines": { - "node": ">=6.9.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "../varuint-bitcoin/node_modules/undici-types": { + "version": "5.26.5", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/uri-js": { + "version": "4.4.1", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@babel/types": "^7.22.10", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "punycode": "^2.1.0" + } + }, + "../varuint-bitcoin/node_modules/v8-to-istanbul": { + "version": "9.3.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10.12.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "../varuint-bitcoin/node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/which": { + "version": "2.0.2", "dev": true, + "license": "ISC", "dependencies": { - "@babel/types": "^7.22.5" + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "../varuint-bitcoin/node_modules/which-boxed-primitive": { + "version": "1.0.2", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" }, - "engines": { - "node": ">=6.9.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "../varuint-bitcoin/node_modules/which-builtin-type": { + "version": "1.1.3", "dev": true, + "license": "MIT", + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "../varuint-bitcoin/node_modules/which-collection": { + "version": "1.0.2", "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "../varuint-bitcoin/node_modules/which-typed-array": { + "version": "1.1.15", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/parser": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", - "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", + "../varuint-bitcoin/node_modules/word-wrap": { + "version": "1.2.5", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, + "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, - "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "../varuint-bitcoin/node_modules/wrap-ansi": { + "version": "7.0.0", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "../varuint-bitcoin/node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "../varuint-bitcoin/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "../varuint-bitcoin/node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6.9.0" + "node": ">=7.0.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "../varuint-bitcoin/node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=6.9.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@babel/traverse/node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "../varuint-bitcoin/node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6.9.0" + "node": ">=7.0.0" + } + }, + "../varuint-bitcoin/node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../varuint-bitcoin/node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "../varuint-bitcoin/node_modules/xdg-basedir": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "../varuint-bitcoin/node_modules/y18n": { + "version": "5.0.8", "dev": true, + "license": "ISC", "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/traverse/node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "../varuint-bitcoin/node_modules/yargs": { + "version": "17.7.2", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=12" } }, - "node_modules/@babel/traverse/node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "../varuint-bitcoin/node_modules/yargs-parser": { + "version": "21.1.1", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, + "license": "ISC", "engines": { - "node": ">=6.0.0" + "node": ">=12" + } + }, + "../varuint-bitcoin/node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@babel/traverse/node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "node_modules/@babel/code-frame": { + "version": "7.22.10", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/highlight": "^7.22.10", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "node_modules/@babel/highlight": { + "version": "7.22.10", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" @@ -284,15 +9381,13 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -307,9 +9402,8 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -319,9 +9413,8 @@ }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -331,15 +9424,13 @@ }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -354,9 +9445,8 @@ }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -369,9 +9459,8 @@ }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -379,63 +9468,36 @@ }, "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", "dev": true, + "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=8" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -443,9 +9505,8 @@ }, "node_modules/@ljharb/resumer": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", - "integrity": "sha512-d+tsDgfkj9X5QTriqM4lKesCkMMJC3IrbPKHvayP00ELx2axdXvDfWkqjxrLXIzGcQzmj7VAUT1wopqARTvafw==", "dev": true, + "license": "MIT", "dependencies": { "@ljharb/through": "^2.3.13", "call-bind": "^1.0.7" @@ -456,9 +9517,8 @@ }, "node_modules/@ljharb/through": { "version": "2.3.13", - "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", - "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7" }, @@ -468,9 +9528,8 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -478,39 +9537,26 @@ }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { "version": "12.0.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.8.tgz", - "integrity": "sha512-b8bbUOTwzIY3V5vDTY1fIJ+ePKDUBqt2hC2woVGotdQQhG/2Sh62HOKHrT7ab+VerXAcPyAiTEipPu/FsreUtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/tape": { "version": "4.2.33", - "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.2.33.tgz", - "integrity": "sha512-ltfyuY5BIkYlGuQfwqzTDT8f0q8Z5DGppvUnWGs39oqDmMd6/UWhNpX3ZMh/VYvfxs3rFGHMrLC/eGRdLiDGuw==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, - "node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -518,38 +9564,18 @@ "node": ">=4" } }, - "node_modules/append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "dependencies": { - "default-require-extensions": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", - "dev": true - }, "node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.5", "is-array-buffer": "^3.0.4" @@ -563,9 +9589,8 @@ }, "node_modules/array.prototype.every": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.6.tgz", - "integrity": "sha512-gNEqZD97w6bfQRNmHkFv7rNnGM+VWyHZT+h/rf9C+22owcXuENr66Lfo0phItpU5KoXW6Owb34q2+8MnSIZ57w==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -582,9 +9607,8 @@ }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, + "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", @@ -604,9 +9628,8 @@ }, "node_modules/available-typed-arrays": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -619,48 +9642,42 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/base-x": { "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.0.1" } }, "node_modules/bech32": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bindings": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "dev": true, + "license": "MIT", "dependencies": { "file-uri-to-path": "1.0.0" } }, "node_modules/bip174": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.0.tgz", - "integrity": "sha512-lkc0XyiX9E9KiVAS1ZiOqK1xfiwvf4FXDDdkDq5crcDzOq+xGytY+14qCsqz7kCiy8rpN1CRNfacRhf9G3JNSA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/bip32": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", - "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "10.12.18", "bs58check": "^2.1.1", @@ -676,30 +9693,26 @@ }, "node_modules/bip32/node_modules/@types/node": { "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bip66": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.0.1" } }, "node_modules/bitcoin-ops": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", - "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bitcoinjs-lib": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz", - "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==", "dev": true, + "license": "MIT", "dependencies": { "bech32": "^1.1.2", "bip174": "^2.0.1", @@ -721,17 +9734,24 @@ "node": ">=8.0.0" } }, + "node_modules/bitcoinjs-lib/node_modules/varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.1" + } + }, "node_modules/bn.js": { "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -739,24 +9759,21 @@ }, "node_modules/brorand": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bs58": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, + "license": "MIT", "dependencies": { "base-x": "^3.0.2" } }, "node_modules/bs58check": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, + "license": "MIT", "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -765,18 +9782,16 @@ }, "node_modules/builtin-modules": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/c8": { "version": "10.1.2", - "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", - "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, + "license": "ISC", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", @@ -807,18 +9822,16 @@ }, "node_modules/c8/node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/c8/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -831,18 +9844,16 @@ }, "node_modules/c8/node_modules/brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/c8/node_modules/cliui": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -854,9 +9865,8 @@ }, "node_modules/c8/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -866,15 +9876,13 @@ }, "node_modules/c8/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/c8/node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -886,15 +9894,13 @@ }, "node_modules/c8/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/c8/node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -908,9 +9914,8 @@ }, "node_modules/c8/node_modules/foreground-child": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -924,9 +9929,8 @@ }, "node_modules/c8/node_modules/glob": { "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -946,36 +9950,32 @@ }, "node_modules/c8/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/c8/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/c8/node_modules/istanbul-lib-coverage": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/c8/node_modules/istanbul-lib-report": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", @@ -987,9 +9987,8 @@ }, "node_modules/c8/node_modules/istanbul-reports": { "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -1000,9 +9999,8 @@ }, "node_modules/c8/node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -1015,9 +10013,8 @@ }, "node_modules/c8/node_modules/make-dir": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -1030,9 +10027,8 @@ }, "node_modules/c8/node_modules/minimatch": { "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1045,9 +10041,8 @@ }, "node_modules/c8/node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -1060,9 +10055,8 @@ }, "node_modules/c8/node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -1075,18 +10069,16 @@ }, "node_modules/c8/node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/c8/node_modules/semver": { "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -1096,9 +10088,8 @@ }, "node_modules/c8/node_modules/signal-exit": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { "node": ">=14" }, @@ -1108,9 +10099,8 @@ }, "node_modules/c8/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -1122,9 +10112,8 @@ }, "node_modules/c8/node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1134,9 +10123,8 @@ }, "node_modules/c8/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -1146,9 +10134,8 @@ }, "node_modules/c8/node_modules/test-exclude": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", - "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^10.4.1", @@ -1160,9 +10147,8 @@ }, "node_modules/c8/node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -1175,9 +10161,8 @@ }, "node_modules/c8/node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -1192,18 +10177,16 @@ }, "node_modules/c8/node_modules/y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/c8/node_modules/yargs": { "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -1219,33 +10202,16 @@ }, "node_modules/c8/node_modules/yargs-parser": { "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } }, - "node_modules/caching-transform": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", - "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", - "dev": true, - "dependencies": { - "hasha": "^3.0.0", - "make-dir": "^2.0.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.4.2" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/call-bind": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1260,20 +10226,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1285,85 +10241,40 @@ }, "node_modules/cipher-base": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, "node_modules/color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/commander": { "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/cp-file": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", - "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "make-dir": "^2.0.0", - "nested-error-stacks": "^2.0.0", - "pify": "^4.0.1", - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": ">=6" - } + "license": "MIT" }, "node_modules/create-hash": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, + "license": "MIT", "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -1374,9 +10285,8 @@ }, "node_modules/create-hmac": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, + "license": "MIT", "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -1386,21 +10296,10 @@ "sha.js": "^2.4.8" } }, - "node_modules/cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", - "dev": true, - "dependencies": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, "node_modules/data-view-buffer": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -1415,9 +10314,8 @@ }, "node_modules/data-view-byte-length": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -1432,9 +10330,8 @@ }, "node_modules/data-view-byte-offset": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -1447,37 +10344,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/deep-equal": { "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dev": true, + "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.0", "call-bind": "^1.0.5", @@ -1505,23 +10375,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha512-B0n2zDIXpzLzKeoEozorDSa1cHc1t0NjmxP0zuAxbizNU2MBqYJJKYXrrFdKuQliojXynrxgd7l4ahfg/+aA5g==", - "dev": true, - "dependencies": { - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/define-data-property": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1536,9 +10393,8 @@ }, "node_modules/define-properties": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -1553,27 +10409,24 @@ }, "node_modules/defined": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/diff": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/dotignore": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", "dev": true, + "license": "MIT", "dependencies": { "minimatch": "^3.0.4" }, @@ -1583,15 +10436,13 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/elliptic": { "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, + "license": "MIT", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -1602,26 +10453,10 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, "node_modules/es-abstract": { "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, + "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", @@ -1679,9 +10514,8 @@ }, "node_modules/es-define-property": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -1691,18 +10525,16 @@ }, "node_modules/es-errors": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-get-iterator": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", @@ -1720,9 +10552,8 @@ }, "node_modules/es-object-atoms": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, @@ -1732,9 +10563,8 @@ }, "node_modules/es-set-tostringtag": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4", "has-tostringtag": "^1.0.2", @@ -1746,9 +10576,8 @@ }, "node_modules/es-to-primitive": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, + "license": "MIT", "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -1761,35 +10590,26 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "node_modules/escalade": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -1800,75 +10620,34 @@ }, "node_modules/file-uri-to-path": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true - }, - "node_modules/find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } + "license": "MIT" }, "node_modules/for-each": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, + "license": "MIT", "dependencies": { "is-callable": "^1.1.3" } }, - "node_modules/foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha512-3TOY+4TKV0Ml83PXJQY+JFQaHNV38lzQDIzzXYg1kWdBLenGgoZhAs0CKgzI31vi2pWEpQMq/Yi4bpKwCPkw7g==", - "dev": true, - "dependencies": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/function-bind": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/function.prototype.name": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -1884,27 +10663,24 @@ }, "node_modules/functions-have-names": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -1921,18 +10697,16 @@ }, "node_modules/get-package-type": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/get-symbol-description": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.5", "es-errors": "^1.3.0", @@ -1947,10 +10721,8 @@ }, "node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1966,20 +10738,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/globalthis": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, + "license": "MIT", "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" @@ -1993,9 +10755,8 @@ }, "node_modules/gopd": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -2003,17 +10764,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, "node_modules/has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -2023,18 +10777,16 @@ }, "node_modules/has-bigints": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-dynamic-import": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.1.0.tgz", - "integrity": "sha512-su0anMkNEnJKZ/rB99jn3y6lV/J8Ro96hBJ28YAeVzj5rWxH+YL/AdCyiYYA1HDLV9YhmvqpWSJJj2KLo1MX6g==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.5", "get-intrinsic": "^1.2.2" @@ -2048,18 +10800,16 @@ }, "node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/has-property-descriptors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -2069,9 +10819,8 @@ }, "node_modules/has-proto": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2081,9 +10830,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2093,9 +10841,8 @@ }, "node_modules/has-tostringtag": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -2108,9 +10855,8 @@ }, "node_modules/hash-base": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -2122,31 +10868,17 @@ }, "node_modules/hash.js": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, - "node_modules/hasha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", - "integrity": "sha512-w0Kz8lJFBoyaurBiNrIvxPqr/gJ6fOfSkpAPOepN3oECqGJag37xPbOv57izi/KP8auHgNYxn5fXtAb+1LsJ6w==", - "dev": true, - "dependencies": { - "is-stream": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/hasown": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -2156,42 +10888,23 @@ }, "node_modules/hmac-drbg": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "dev": true, + "license": "MIT", "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, "node_modules/html-escaper": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "engines": { - "node": ">=0.8.19" - } + "license": "MIT" }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2199,15 +10912,13 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/internal-slot": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.0", @@ -2219,9 +10930,8 @@ }, "node_modules/is-arguments": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2235,9 +10945,8 @@ }, "node_modules/is-array-buffer": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.1" @@ -2249,17 +10958,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, "node_modules/is-bigint": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" }, @@ -2269,9 +10971,8 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2285,9 +10986,8 @@ }, "node_modules/is-callable": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2297,9 +10997,8 @@ }, "node_modules/is-core-module": { "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, + "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -2309,9 +11008,8 @@ }, "node_modules/is-data-view": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", "dev": true, + "license": "MIT", "dependencies": { "is-typed-array": "^1.1.13" }, @@ -2324,9 +11022,8 @@ }, "node_modules/is-date-object": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2337,20 +11034,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/is-map": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2360,9 +11047,8 @@ }, "node_modules/is-negative-zero": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2372,9 +11058,8 @@ }, "node_modules/is-number-object": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2387,9 +11072,8 @@ }, "node_modules/is-regex": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -2403,9 +11087,8 @@ }, "node_modules/is-set": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2415,9 +11098,8 @@ }, "node_modules/is-shared-array-buffer": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7" }, @@ -2428,20 +11110,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-string": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -2454,9 +11126,8 @@ }, "node_modules/is-symbol": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, + "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -2469,9 +11140,8 @@ }, "node_modules/is-typed-array": { "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, + "license": "MIT", "dependencies": { "which-typed-array": "^1.1.14" }, @@ -2484,9 +11154,8 @@ }, "node_modules/is-weakmap": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2496,9 +11165,8 @@ }, "node_modules/is-weakref": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2" }, @@ -2508,9 +11176,8 @@ }, "node_modules/is-weakset": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "get-intrinsic": "^1.2.4" @@ -2524,123 +11191,18 @@ }, "node_modules/isarray": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", - "dev": true, - "dependencies": { - "append-transform": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", - "dev": true, - "dependencies": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/istanbul-reports": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", - "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0" - }, - "engines": { - "node": ">=6" - } + "license": "ISC" }, "node_modules/jackspeak": { "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -2656,15 +11218,13 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -2673,133 +11233,35 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/md5.js": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, + "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", "safe-buffer": "^5.1.2" } }, - "node_modules/merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, "node_modules/merkle-lib": { "version": "2.0.10", - "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz", - "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/minimalistic-assert": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2809,27 +11271,24 @@ }, "node_modules/minimist": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/minipass": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mkdirp": { "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -2839,9 +11298,8 @@ }, "node_modules/mock-property": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.0.3.tgz", - "integrity": "sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.1", "functions-have-names": "^1.2.3", @@ -2857,89 +11315,23 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/nan": { "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true - }, - "node_modules/nested-error-stacks": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", - "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", - "dev": true - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/nyc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", - "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", - "dev": true, - "dependencies": { - "archy": "^1.0.0", - "caching-transform": "^3.0.2", - "convert-source-map": "^1.6.0", - "cp-file": "^6.2.0", - "find-cache-dir": "^2.1.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", - "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.2.3", - "uuid": "^3.3.2", - "yargs": "^13.2.2", - "yargs-parser": "^13.0.0" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=6" - } + "license": "MIT" }, "node_modules/object-inspect": { "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-is": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1" @@ -2953,151 +11345,62 @@ }, "node_modules/object-keys": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", - "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "node_modules/once": { + "version": "1.4.0", "dev": true, - "engines": { - "node": ">=4" + "license": "ISC", + "dependencies": { + "wrappy": "1" } }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/path-scurry": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -3111,69 +11414,24 @@ }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, + "license": "ISC", "engines": { "node": "14 || >=16.14" } }, - "node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-type/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/possible-typed-array-names": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/prettier": { "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -3181,62 +11439,26 @@ "node": ">=4" } }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, "node_modules/pushdata-bitcoin": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", - "integrity": "sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==", "dev": true, + "license": "MIT", "dependencies": { "bitcoin-ops": "^1.3.0" } }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", - "dev": true, - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/readable-stream": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3248,9 +11470,8 @@ }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.6", "define-properties": "^1.2.1", @@ -3264,38 +11485,18 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/resolve": { "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dev": true, + "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -3308,21 +11509,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/rimraf": { "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -3332,9 +11522,8 @@ }, "node_modules/ripemd160": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, + "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -3342,9 +11531,8 @@ }, "node_modules/safe-array-concat": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "get-intrinsic": "^1.2.4", @@ -3360,8 +11548,6 @@ }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -3376,13 +11562,13 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safe-regex-test": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -3397,24 +11583,16 @@ }, "node_modules/semver": { "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, "node_modules/set-function-length": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -3429,9 +11607,8 @@ }, "node_modules/set-function-name": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -3444,9 +11621,8 @@ }, "node_modules/sha.js": { "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, + "license": "(MIT AND BSD-3-Clause)", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3457,9 +11633,8 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -3469,18 +11644,16 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -3494,78 +11667,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", - "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", - "dev": true, - "dependencies": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", "dev": true, + "license": "MIT", "dependencies": { "internal-slot": "^1.0.4" }, @@ -3575,33 +11685,17 @@ }, "node_modules/string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, - "node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -3613,33 +11707,29 @@ }, "node_modules/string-width-cjs/node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/string-width-cjs/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/string-width-cjs/node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3649,9 +11739,8 @@ }, "node_modules/string.prototype.trim": { "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -3667,9 +11756,8 @@ }, "node_modules/string.prototype.trimend": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -3681,9 +11769,8 @@ }, "node_modules/string.prototype.trimstart": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -3696,24 +11783,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3723,27 +11797,16 @@ }, "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -3753,9 +11816,8 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3765,9 +11827,8 @@ }, "node_modules/tape": { "version": "5.7.5", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.5.tgz", - "integrity": "sha512-C5Gm1MR8ujZmNrsmOiHSkKFfY2thrnUrFw/fFtcva9FABbN7LrHuQPi3MTS0Z0i/SLfYSJtRIcJYDUpwPsQ8yA==", "dev": true, + "license": "MIT", "dependencies": { "@ljharb/resumer": "^0.1.2", "@ljharb/through": "^2.3.12", @@ -3801,9 +11862,8 @@ }, "node_modules/tape/node_modules/resolve": { "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, + "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -3816,27 +11876,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", - "dev": true, - "dependencies": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tiny-secp256k1": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", - "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { "bindings": "^1.3.0", "bn.js": "^4.11.8", @@ -3848,26 +11892,15 @@ "node": ">=6.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/tslib": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tslint": { "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", @@ -3895,9 +11928,8 @@ }, "node_modules/tsutils": { "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -3907,9 +11939,8 @@ }, "node_modules/typed-array-buffer": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -3921,9 +11952,8 @@ }, "node_modules/typed-array-byte-length": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", @@ -3940,9 +11970,8 @@ }, "node_modules/typed-array-byte-offset": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, + "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -3960,9 +11989,8 @@ }, "node_modules/typed-array-length": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", @@ -3980,15 +12008,13 @@ }, "node_modules/typeforce": { "version": "1.18.0", - "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", - "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/typescript": { "version": "3.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz", - "integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3997,11 +12023,14 @@ "node": ">=4.2.0" } }, + "node_modules/uint8array-tools": { + "resolved": "../uint8array-tools", + "link": true + }, "node_modules/unbox-primitive": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -4014,25 +12043,13 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "dev": true, - "bin": { - "uuid": "bin/uuid" - } + "license": "MIT" }, "node_modules/v8-to-istanbul": { "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, + "license": "ISC", "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", @@ -4044,46 +12061,17 @@ }, "node_modules/v8-to-istanbul/node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } + "license": "MIT" }, "node_modules/varuint-bitcoin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", - "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.1" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } + "resolved": "../varuint-bitcoin", + "link": true }, "node_modules/which-boxed-primitive": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, + "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -4097,9 +12085,8 @@ }, "node_modules/which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, + "license": "MIT", "dependencies": { "is-map": "^2.0.3", "is-set": "^2.0.3", @@ -4113,17 +12100,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, "node_modules/which-typed-array": { "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, + "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -4140,33 +12120,17 @@ }, "node_modules/wif": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", - "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", "dev": true, + "license": "MIT", "dependencies": { "bs58check": "<3.0.0" } }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -4181,18 +12145,16 @@ }, "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4205,9 +12167,8 @@ }, "node_modules/wrap-ansi-cjs/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -4217,30 +12178,26 @@ }, "node_modules/wrap-ansi-cjs/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/wrap-ansi-cjs/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -4252,9 +12209,8 @@ }, "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4264,66 +12220,13 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "license": "ISC" }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 5dea067..70dc1fc 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "src/esm/lib" ], "engines": { - "node": ">=8.0.0" + "node": ">=18.0.0" }, "scripts": { "build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json && npm run formatjs", @@ -39,6 +39,10 @@ "type": "git", "url": "git+https://github.com/bitcoinjs/bip174.git" }, + "dependencies": { + "uint8array-tools": "../uint8array-tools", + "varuint-bitcoin": "../varuint-bitcoin" + }, "devDependencies": { "@types/node": "12.0.8", "@types/tape": "4.2.33", diff --git a/src/cjs/lib/combiner/index.js b/src/cjs/lib/combiner/index.js index 3b29f66..7a56880 100644 --- a/src/cjs/lib/combiner/index.js +++ b/src/cjs/lib/combiner/index.js @@ -1,6 +1,18 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const index_js_1 = require('../parser/index.js'); +const tools = __importStar(require('uint8array-tools')); function combine(psbts) { const self = psbts[0]; const selfKeyVals = index_js_1.psbtToKeyVals(self); @@ -17,7 +29,7 @@ function combine(psbts) { const otherTx = getTx(other); if ( otherTx === undefined || - !otherTx.toBuffer().equals(selfTx.toBuffer()) + tools.compare(otherTx.toBuffer(), selfTx.toBuffer()) !== 0 ) { throw new Error( 'Combine: One of the Psbts does not have the same transaction.', @@ -63,7 +75,8 @@ exports.combine = combine; function keyPusher(selfSet, selfKeyVals, otherKeyVals) { return key => { if (selfSet.has(key)) return; - const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + // const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + const newKv = otherKeyVals.filter(kv => tools.toHex(kv.key) === key)[0]; selfKeyVals.push(newKv); selfSet.add(key); }; @@ -74,7 +87,8 @@ function getTx(psbt) { function getKeySet(keyVals) { const set = new Set(); keyVals.forEach(keyVal => { - const hex = keyVal.key.toString('hex'); + // const hex = keyVal.key.toString('hex'); + const hex = tools.toHex(keyVal.key); if (set.has(hex)) throw new Error('Combine: KeyValue Map keys should be unique'); set.add(hex); diff --git a/src/cjs/lib/converter/global/globalXpub.d.ts b/src/cjs/lib/converter/global/globalXpub.d.ts index 5b96567..a3b0d11 100644 --- a/src/cjs/lib/converter/global/globalXpub.d.ts +++ b/src/cjs/lib/converter/global/globalXpub.d.ts @@ -1,6 +1,6 @@ import { GlobalXpub, KeyValue } from '../../interfaces'; export declare function decode(keyVal: KeyValue): GlobalXpub; export declare function encode(data: GlobalXpub): KeyValue; -export declare const expected = "{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }"; +export declare const expected = "{ masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; }"; export declare function check(data: any): data is GlobalXpub; export declare function canAddToArray(array: GlobalXpub[], item: GlobalXpub, dupeSet: Set): boolean; diff --git a/src/cjs/lib/converter/global/globalXpub.js b/src/cjs/lib/converter/global/globalXpub.js index d661413..198e604 100644 --- a/src/cjs/lib/converter/global/globalXpub.js +++ b/src/cjs/lib/converter/global/globalXpub.js @@ -1,18 +1,30 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); const range = n => [...Array(n).keys()]; function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.GlobalTypes.GLOBAL_XPUB) { throw new Error( 'Decode Error: could not decode globalXpub with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.key.length !== 79 || ![2, 3].includes(keyVal.key[46])) { throw new Error( 'Decode Error: globalXpub has invalid extended pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.value.length / 4) % 1 !== 0) { @@ -27,7 +39,7 @@ function decode(keyVal) { path: 'm', }; for (const i of range(keyVal.value.length / 4 - 1)) { - const val = keyVal.value.readUInt32LE(i * 4 + 4); + const val = tools.readUInt32(keyVal.value, i * 4 + 4, 'LE'); const isHard = !!(val & 0x80000000); const idx = val & 0x7fffffff; data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); @@ -36,17 +48,17 @@ function decode(keyVal) { } exports.decode = decode; function encode(data) { - const head = Buffer.from([typeFields_js_1.GlobalTypes.GLOBAL_XPUB]); - const key = Buffer.concat([head, data.extendedPubkey]); + const head = new Uint8Array([typeFields_js_1.GlobalTypes.GLOBAL_XPUB]); + const key = tools.concat([head, data.extendedPubkey]); const splitPath = data.path.split('/'); - const value = Buffer.allocUnsafe(splitPath.length * 4); - data.masterFingerprint.copy(value, 0); + const value = new Uint8Array(splitPath.length * 4); + value.set(data.masterFingerprint, 0); let offset = 4; splitPath.slice(1).forEach(level => { const isHard = level.slice(-1) === "'"; let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); if (isHard) num += 0x80000000; - value.writeUInt32LE(num, offset); + tools.writeUInt32(value, offset, num, 'LE'); offset += 4; }); return { @@ -56,16 +68,16 @@ function encode(data) { } exports.encode = encode; exports.expected = - '{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }'; + '{ masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; }'; function check(data) { const epk = data.extendedPubkey; const mfp = data.masterFingerprint; const p = data.path; return ( - Buffer.isBuffer(epk) && + epk instanceof Uint8Array && epk.length === 78 && [2, 3].indexOf(epk[45]) > -1 && - Buffer.isBuffer(mfp) && + mfp instanceof Uint8Array && mfp.length === 4 && typeof p === 'string' && !!p.match(/^m(\/\d+'?)*$/) @@ -73,11 +85,12 @@ function check(data) { } exports.check = check; function canAddToArray(array, item, dupeSet) { - const dupeString = item.extendedPubkey.toString('hex'); + const dupeString = tools.toHex(item.extendedPubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( - array.filter(v => v.extendedPubkey.equals(item.extendedPubkey)).length === 0 + array.filter(v => tools.compare(v.extendedPubkey, item.extendedPubkey)) + .length === 0 ); } exports.canAddToArray = canAddToArray; diff --git a/src/cjs/lib/converter/global/unsignedTx.js b/src/cjs/lib/converter/global/unsignedTx.js index ed998b2..bc402e0 100644 --- a/src/cjs/lib/converter/global/unsignedTx.js +++ b/src/cjs/lib/converter/global/unsignedTx.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); function encode(data) { return { - key: Buffer.from([typeFields_js_1.GlobalTypes.UNSIGNED_TX]), + key: new Uint8Array([typeFields_js_1.GlobalTypes.UNSIGNED_TX]), value: data.toBuffer(), }; } diff --git a/src/cjs/lib/converter/index.d.ts b/src/cjs/lib/converter/index.d.ts index e6ff4c0..f152688 100644 --- a/src/cjs/lib/converter/index.d.ts +++ b/src/cjs/lib/converter/index.d.ts @@ -1,4 +1,3 @@ -/// import * as globalXpub from './global/globalXpub.js'; import * as unsignedTx from './global/unsignedTx.js'; import * as finalScriptSig from './input/finalScriptSig.js'; @@ -16,7 +15,7 @@ import * as tapTree from './output/tapTree.js'; declare const globals: { unsignedTx: typeof unsignedTx; globalXpub: typeof globalXpub; - checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array | undefined; }; declare const inputs: { nonWitnessUtxo: typeof nonWitnessUtxo; @@ -34,20 +33,20 @@ declare const inputs: { canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; }; redeemScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; witnessScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; - checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array | undefined; tapKeySig: typeof tapKeySig; tapScriptSig: typeof tapScriptSig; tapLeafScript: typeof tapLeafScript; @@ -59,9 +58,9 @@ declare const inputs: { canAddToArray: (array: import("../interfaces.js").TapBip32Derivation[], item: import("../interfaces.js").TapBip32Derivation, dupeSet: Set) => boolean; }; tapInternalKey: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; @@ -76,20 +75,20 @@ declare const outputs: { canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; }; redeemScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; witnessScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; - checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array | undefined; tapBip32Derivation: { decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").TapBip32Derivation; encode: (data: import("../interfaces.js").TapBip32Derivation) => import("../interfaces.js").KeyValue; @@ -99,9 +98,9 @@ declare const outputs: { }; tapTree: typeof tapTree; tapInternalKey: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; diff --git a/src/cjs/lib/converter/input/finalScriptSig.d.ts b/src/cjs/lib/converter/input/finalScriptSig.d.ts index 1d82b86..f08bc72 100644 --- a/src/cjs/lib/converter/input/finalScriptSig.d.ts +++ b/src/cjs/lib/converter/input/finalScriptSig.d.ts @@ -1,6 +1,6 @@ import { FinalScriptSig, KeyValue } from '../../interfaces'; export declare function decode(keyVal: KeyValue): FinalScriptSig; export declare function encode(data: FinalScriptSig): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is FinalScriptSig; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/input/finalScriptSig.js b/src/cjs/lib/converter/input/finalScriptSig.js index 17ba530..239598f 100644 --- a/src/cjs/lib/converter/input/finalScriptSig.js +++ b/src/cjs/lib/converter/input/finalScriptSig.js @@ -1,27 +1,39 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.FINAL_SCRIPTSIG) { throw new Error( 'Decode Error: could not decode finalScriptSig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_js_1.InputTypes.FINAL_SCRIPTSIG]); + const key = new Uint8Array([typeFields_js_1.InputTypes.FINAL_SCRIPTSIG]); return { key, value: data, }; } exports.encode = encode; -exports.expected = 'Buffer'; +exports.expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } exports.check = check; function canAdd(currentData, newData) { diff --git a/src/cjs/lib/converter/input/finalScriptWitness.d.ts b/src/cjs/lib/converter/input/finalScriptWitness.d.ts index d640ab6..aa64099 100644 --- a/src/cjs/lib/converter/input/finalScriptWitness.d.ts +++ b/src/cjs/lib/converter/input/finalScriptWitness.d.ts @@ -1,6 +1,6 @@ import { FinalScriptWitness, KeyValue } from '../../interfaces'; export declare function decode(keyVal: KeyValue): FinalScriptWitness; export declare function encode(data: FinalScriptWitness): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is FinalScriptWitness; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/input/finalScriptWitness.js b/src/cjs/lib/converter/input/finalScriptWitness.js index f45418e..9c1f91a 100644 --- a/src/cjs/lib/converter/input/finalScriptWitness.js +++ b/src/cjs/lib/converter/input/finalScriptWitness.js @@ -1,27 +1,39 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS) { throw new Error( 'Decode Error: could not decode finalScriptWitness with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS]); + const key = new Uint8Array([typeFields_js_1.InputTypes.FINAL_SCRIPTWITNESS]); return { key, value: data, }; } exports.encode = encode; -exports.expected = 'Buffer'; +exports.expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } exports.check = check; function canAdd(currentData, newData) { diff --git a/src/cjs/lib/converter/input/nonWitnessUtxo.d.ts b/src/cjs/lib/converter/input/nonWitnessUtxo.d.ts index 0e30673..498a9ba 100644 --- a/src/cjs/lib/converter/input/nonWitnessUtxo.d.ts +++ b/src/cjs/lib/converter/input/nonWitnessUtxo.d.ts @@ -1,6 +1,6 @@ import { KeyValue, NonWitnessUtxo } from '../../interfaces'; export declare function decode(keyVal: KeyValue): NonWitnessUtxo; export declare function encode(data: NonWitnessUtxo): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is NonWitnessUtxo; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/input/nonWitnessUtxo.js b/src/cjs/lib/converter/input/nonWitnessUtxo.js index 1b9d4ff..5d7847a 100644 --- a/src/cjs/lib/converter/input/nonWitnessUtxo.js +++ b/src/cjs/lib/converter/input/nonWitnessUtxo.js @@ -1,11 +1,23 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.NON_WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode nonWitnessUtxo with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; @@ -13,14 +25,14 @@ function decode(keyVal) { exports.decode = decode; function encode(data) { return { - key: Buffer.from([typeFields_js_1.InputTypes.NON_WITNESS_UTXO]), + key: new Uint8Array([typeFields_js_1.InputTypes.NON_WITNESS_UTXO]), value: data, }; } exports.encode = encode; -exports.expected = 'Buffer'; +exports.expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } exports.check = check; function canAdd(currentData, newData) { diff --git a/src/cjs/lib/converter/input/partialSig.d.ts b/src/cjs/lib/converter/input/partialSig.d.ts index e60f6a9..b7fd8c5 100644 --- a/src/cjs/lib/converter/input/partialSig.d.ts +++ b/src/cjs/lib/converter/input/partialSig.d.ts @@ -1,6 +1,6 @@ import { KeyValue, PartialSig } from '../../interfaces'; export declare function decode(keyVal: KeyValue): PartialSig; export declare function encode(pSig: PartialSig): KeyValue; -export declare const expected = "{ pubkey: Buffer; signature: Buffer; }"; +export declare const expected = "{ pubkey: Uint8Array; signature: Uint8Array; }"; export declare function check(data: any): data is PartialSig; export declare function canAddToArray(array: PartialSig[], item: PartialSig, dupeSet: Set): boolean; diff --git a/src/cjs/lib/converter/input/partialSig.js b/src/cjs/lib/converter/input/partialSig.js index 7185de6..a790584 100644 --- a/src/cjs/lib/converter/input/partialSig.js +++ b/src/cjs/lib/converter/input/partialSig.js @@ -1,11 +1,23 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.PARTIAL_SIG) { throw new Error( 'Decode Error: could not decode partialSig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ( @@ -14,7 +26,7 @@ function decode(keyVal) { ) { throw new Error( 'Decode Error: partialSig has invalid pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1); @@ -25,18 +37,18 @@ function decode(keyVal) { } exports.decode = decode; function encode(pSig) { - const head = Buffer.from([typeFields_js_1.InputTypes.PARTIAL_SIG]); + const head = new Uint8Array([typeFields_js_1.InputTypes.PARTIAL_SIG]); return { - key: Buffer.concat([head, pSig.pubkey]), + key: tools.concat([head, pSig.pubkey]), value: pSig.signature, }; } exports.encode = encode; -exports.expected = '{ pubkey: Buffer; signature: Buffer; }'; +exports.expected = '{ pubkey: Uint8Array; signature: Uint8Array; }'; function check(data) { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.signature) && + data.pubkey instanceof Uint8Array && + data.signature instanceof Uint8Array && [33, 65].includes(data.pubkey.length) && [2, 3, 4].includes(data.pubkey[0]) && isDerSigWithSighash(data.signature) @@ -44,7 +56,7 @@ function check(data) { } exports.check = check; function isDerSigWithSighash(buf) { - if (!Buffer.isBuffer(buf) || buf.length < 9) return false; + if (!(buf instanceof Uint8Array) || buf.length < 9) return false; if (buf[0] !== 0x30) return false; if (buf.length !== buf[1] + 3) return false; if (buf[2] !== 0x02) return false; @@ -57,9 +69,11 @@ function isDerSigWithSighash(buf) { return true; } function canAddToArray(array, item, dupeSet) { - const dupeString = item.pubkey.toString('hex'); + const dupeString = tools.toHex(item.pubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); - return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + return ( + array.filter(v => tools.compare(v.pubkey, item.pubkey) === 0).length === 0 + ); } exports.canAddToArray = canAddToArray; diff --git a/src/cjs/lib/converter/input/porCommitment.js b/src/cjs/lib/converter/input/porCommitment.js index 5e0d2a0..30cd582 100644 --- a/src/cjs/lib/converter/input/porCommitment.js +++ b/src/cjs/lib/converter/input/porCommitment.js @@ -1,21 +1,33 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.POR_COMMITMENT) { throw new Error( 'Decode Error: could not decode porCommitment with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - return keyVal.value.toString('utf8'); + return tools.toUtf8(keyVal.value); } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_js_1.InputTypes.POR_COMMITMENT]); + const key = new Uint8Array([typeFields_js_1.InputTypes.POR_COMMITMENT]); return { key, - value: Buffer.from(data, 'utf8'), + value: tools.fromUtf8(data), }; } exports.encode = encode; diff --git a/src/cjs/lib/converter/input/sighashType.js b/src/cjs/lib/converter/input/sighashType.js index 953a127..623f100 100644 --- a/src/cjs/lib/converter/input/sighashType.js +++ b/src/cjs/lib/converter/input/sighashType.js @@ -1,20 +1,32 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.SIGHASH_TYPE) { throw new Error( 'Decode Error: could not decode sighashType with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - return keyVal.value.readUInt32LE(0); + return Number(tools.readUInt32(keyVal.value, 0, 'LE')); } exports.decode = decode; function encode(data) { - const key = Buffer.from([typeFields_js_1.InputTypes.SIGHASH_TYPE]); - const value = Buffer.allocUnsafe(4); - value.writeUInt32LE(data, 0); + const key = Uint8Array.from([typeFields_js_1.InputTypes.SIGHASH_TYPE]); + const value = new Uint8Array(4); + tools.writeUInt32(value, 0, data, 'LE'); return { key, value, diff --git a/src/cjs/lib/converter/input/tapKeySig.d.ts b/src/cjs/lib/converter/input/tapKeySig.d.ts index 6c3a46b..07b357b 100644 --- a/src/cjs/lib/converter/input/tapKeySig.d.ts +++ b/src/cjs/lib/converter/input/tapKeySig.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapKeySig } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapKeySig; export declare function encode(value: TapKeySig): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is TapKeySig; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/input/tapKeySig.js b/src/cjs/lib/converter/input/tapKeySig.js index a991056..9449eeb 100644 --- a/src/cjs/lib/converter/input/tapKeySig.js +++ b/src/cjs/lib/converter/input/tapKeySig.js @@ -1,6 +1,18 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if ( keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_KEY_SIG || @@ -8,7 +20,7 @@ function decode(keyVal) { ) { throw new Error( 'Decode Error: could not decode tapKeySig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (!check(keyVal.value)) { @@ -20,13 +32,15 @@ function decode(keyVal) { } exports.decode = decode; function encode(value) { - const key = Buffer.from([typeFields_js_1.InputTypes.TAP_KEY_SIG]); + const key = Uint8Array.from([typeFields_js_1.InputTypes.TAP_KEY_SIG]); return { key, value }; } exports.encode = encode; -exports.expected = 'Buffer'; +exports.expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data) && (data.length === 64 || data.length === 65); + return ( + data instanceof Uint8Array && (data.length === 64 || data.length === 65) + ); } exports.check = check; function canAdd(currentData, newData) { diff --git a/src/cjs/lib/converter/input/tapLeafScript.d.ts b/src/cjs/lib/converter/input/tapLeafScript.d.ts index 33fc2c5..f0ac9da 100644 --- a/src/cjs/lib/converter/input/tapLeafScript.d.ts +++ b/src/cjs/lib/converter/input/tapLeafScript.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapLeafScript } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapLeafScript; export declare function encode(tScript: TapLeafScript): KeyValue; -export declare const expected = "{ controlBlock: Buffer; leafVersion: number, script: Buffer; }"; +export declare const expected = "{ controlBlock: Uint8Array; leafVersion: number, script: Uint8Array; }"; export declare function check(data: any): data is TapLeafScript; export declare function canAddToArray(array: TapLeafScript[], item: TapLeafScript, dupeSet: Set): boolean; diff --git a/src/cjs/lib/converter/input/tapLeafScript.js b/src/cjs/lib/converter/input/tapLeafScript.js index 6d107a7..ff4382b 100644 --- a/src/cjs/lib/converter/input/tapLeafScript.js +++ b/src/cjs/lib/converter/input/tapLeafScript.js @@ -1,24 +1,36 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_LEAF_SCRIPT) { throw new Error( 'Decode Error: could not decode tapLeafScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.key.length - 2) % 32 !== 0) { throw new Error( 'Decode Error: tapLeafScript has invalid control block in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const leafVersion = keyVal.value[keyVal.value.length - 1]; if ((keyVal.key[1] & 0xfe) !== leafVersion) { throw new Error( 'Decode Error: tapLeafScript bad leaf version in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const script = keyVal.value.slice(0, -1); @@ -27,31 +39,32 @@ function decode(keyVal) { } exports.decode = decode; function encode(tScript) { - const head = Buffer.from([typeFields_js_1.InputTypes.TAP_LEAF_SCRIPT]); - const verBuf = Buffer.from([tScript.leafVersion]); + const head = Uint8Array.from([typeFields_js_1.InputTypes.TAP_LEAF_SCRIPT]); + const verBuf = Uint8Array.from([tScript.leafVersion]); return { - key: Buffer.concat([head, tScript.controlBlock]), - value: Buffer.concat([tScript.script, verBuf]), + key: tools.concat([head, tScript.controlBlock]), + value: tools.concat([tScript.script, verBuf]), }; } exports.encode = encode; exports.expected = - '{ controlBlock: Buffer; leafVersion: number, script: Buffer; }'; + '{ controlBlock: Uint8Array; leafVersion: number, script: Uint8Array; }'; function check(data) { return ( - Buffer.isBuffer(data.controlBlock) && + data.controlBlock instanceof Uint8Array && (data.controlBlock.length - 1) % 32 === 0 && (data.controlBlock[0] & 0xfe) === data.leafVersion && - Buffer.isBuffer(data.script) + data.script instanceof Uint8Array ); } exports.check = check; function canAddToArray(array, item, dupeSet) { - const dupeString = item.controlBlock.toString('hex'); + const dupeString = tools.toHex(item.controlBlock); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( - array.filter(v => v.controlBlock.equals(item.controlBlock)).length === 0 + array.filter(v => tools.compare(v.controlBlock, item.controlBlock) === 0) + .length === 0 ); } exports.canAddToArray = canAddToArray; diff --git a/src/cjs/lib/converter/input/tapMerkleRoot.d.ts b/src/cjs/lib/converter/input/tapMerkleRoot.d.ts index def3a44..1e222dc 100644 --- a/src/cjs/lib/converter/input/tapMerkleRoot.d.ts +++ b/src/cjs/lib/converter/input/tapMerkleRoot.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapMerkleRoot } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapMerkleRoot; export declare function encode(value: TapMerkleRoot): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is TapMerkleRoot; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/input/tapMerkleRoot.js b/src/cjs/lib/converter/input/tapMerkleRoot.js index 3f02c45..a233a7f 100644 --- a/src/cjs/lib/converter/input/tapMerkleRoot.js +++ b/src/cjs/lib/converter/input/tapMerkleRoot.js @@ -1,6 +1,18 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if ( keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_MERKLE_ROOT || @@ -8,7 +20,7 @@ function decode(keyVal) { ) { throw new Error( 'Decode Error: could not decode tapMerkleRoot with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (!check(keyVal.value)) { @@ -18,13 +30,13 @@ function decode(keyVal) { } exports.decode = decode; function encode(value) { - const key = Buffer.from([typeFields_js_1.InputTypes.TAP_MERKLE_ROOT]); + const key = Uint8Array.from([typeFields_js_1.InputTypes.TAP_MERKLE_ROOT]); return { key, value }; } exports.encode = encode; -exports.expected = 'Buffer'; +exports.expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data) && data.length === 32; + return data instanceof Uint8Array && data.length === 32; } exports.check = check; function canAdd(currentData, newData) { diff --git a/src/cjs/lib/converter/input/tapScriptSig.d.ts b/src/cjs/lib/converter/input/tapScriptSig.d.ts index 28884a9..6172daa 100644 --- a/src/cjs/lib/converter/input/tapScriptSig.d.ts +++ b/src/cjs/lib/converter/input/tapScriptSig.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapScriptSig } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapScriptSig; export declare function encode(tSig: TapScriptSig): KeyValue; -export declare const expected = "{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }"; +export declare const expected = "{ pubkey: Uint8Array; leafHash: Uint8Array; signature: Uint8Array; }"; export declare function check(data: any): data is TapScriptSig; export declare function canAddToArray(array: TapScriptSig[], item: TapScriptSig, dupeSet: Set): boolean; diff --git a/src/cjs/lib/converter/input/tapScriptSig.js b/src/cjs/lib/converter/input/tapScriptSig.js index 0af3800..0b7b44b 100644 --- a/src/cjs/lib/converter/input/tapScriptSig.js +++ b/src/cjs/lib/converter/input/tapScriptSig.js @@ -1,23 +1,35 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + - keyVal.key.toString('hex'), + // keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.key.length !== 65) { throw new Error( - 'Decode Error: tapScriptSig has invalid key 0x' + - keyVal.key.toString('hex'), + 'Decode Error: tapScriptSig has invalid key 0x' + tools.toHex(keyVal.key), ); } if (keyVal.value.length !== 64 && keyVal.value.length !== 65) { throw new Error( 'Decode Error: tapScriptSig has invalid signature in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1, 33); @@ -30,19 +42,20 @@ function decode(keyVal) { } exports.decode = decode; function encode(tSig) { - const head = Buffer.from([typeFields_js_1.InputTypes.TAP_SCRIPT_SIG]); + const head = Uint8Array.from([typeFields_js_1.InputTypes.TAP_SCRIPT_SIG]); return { - key: Buffer.concat([head, tSig.pubkey, tSig.leafHash]), + key: tools.concat([head, tSig.pubkey, tSig.leafHash]), value: tSig.signature, }; } exports.encode = encode; -exports.expected = '{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }'; +exports.expected = + '{ pubkey: Uint8Array; leafHash: Uint8Array; signature: Uint8Array; }'; function check(data) { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.leafHash) && - Buffer.isBuffer(data.signature) && + data.pubkey instanceof Uint8Array && + data.leafHash instanceof Uint8Array && + data.signature instanceof Uint8Array && data.pubkey.length === 32 && data.leafHash.length === 32 && (data.signature.length === 64 || data.signature.length === 65) @@ -50,13 +63,14 @@ function check(data) { } exports.check = check; function canAddToArray(array, item, dupeSet) { - const dupeString = - item.pubkey.toString('hex') + item.leafHash.toString('hex'); + const dupeString = tools.toHex(item.pubkey) + tools.toHex(item.leafHash); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( array.filter( - v => v.pubkey.equals(item.pubkey) && v.leafHash.equals(item.leafHash), + v => + tools.compare(v.pubkey, item.pubkey) === 0 && + tools.compare(v.leafHash, item.leafHash) === 0, ).length === 0 ); } diff --git a/src/cjs/lib/converter/input/witnessUtxo.d.ts b/src/cjs/lib/converter/input/witnessUtxo.d.ts index d977aec..f670563 100644 --- a/src/cjs/lib/converter/input/witnessUtxo.d.ts +++ b/src/cjs/lib/converter/input/witnessUtxo.d.ts @@ -1,6 +1,6 @@ import { KeyValue, WitnessUtxo } from '../../interfaces'; export declare function decode(keyVal: KeyValue): WitnessUtxo; export declare function encode(data: WitnessUtxo): KeyValue; -export declare const expected = "{ script: Buffer; value: number; }"; +export declare const expected = "{ script: Uint8Array; value: bigint; }"; export declare function check(data: any): data is WitnessUtxo; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/input/witnessUtxo.js b/src/cjs/lib/converter/input/witnessUtxo.js index 7d71752..174d094 100644 --- a/src/cjs/lib/converter/input/witnessUtxo.js +++ b/src/cjs/lib/converter/input/witnessUtxo.js @@ -12,19 +12,22 @@ var __importStar = }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); -const tools_js_1 = require('../tools.js'); -const varuint = __importStar(require('../varint.js')); +const tools = __importStar(require('uint8array-tools')); +const varuint = __importStar(require('varuint-bitcoin')); function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode witnessUtxo with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - const value = tools_js_1.readUInt64LE(keyVal.value, 0); + const value = tools.readInt64(keyVal.value, 0, 'LE'); let _offset = 8; - const scriptLen = varuint.decode(keyVal.value, _offset); - _offset += varuint.encodingLength(scriptLen); + const { numberValue: scriptLen, bytes } = varuint.decode( + keyVal.value, + _offset, + ); + _offset += bytes; const script = keyVal.value.slice(_offset); if (script.length !== scriptLen) { throw new Error('Decode Error: WITNESS_UTXO script is not proper length'); @@ -37,20 +40,20 @@ function decode(keyVal) { exports.decode = decode; function encode(data) { const { script, value } = data; - const varintLen = varuint.encodingLength(script.length); - const result = Buffer.allocUnsafe(8 + varintLen + script.length); - tools_js_1.writeUInt64LE(result, value, 0); + const varuintlen = varuint.encodingLength(script.length); + const result = new Uint8Array(8 + varuintlen + script.length); + tools.writeUInt64(result, 0, BigInt(value), 'LE'); varuint.encode(script.length, result, 8); - script.copy(result, 8 + varintLen); + result.set(script, 8 + varuintlen); return { - key: Buffer.from([typeFields_js_1.InputTypes.WITNESS_UTXO]), + key: Uint8Array.from([typeFields_js_1.InputTypes.WITNESS_UTXO]), value: result, }; } exports.encode = encode; -exports.expected = '{ script: Buffer; value: number; }'; +exports.expected = '{ script: Uint8Array; value: bigint; }'; function check(data) { - return Buffer.isBuffer(data.script) && typeof data.value === 'number'; + return data.script instanceof Uint8Array && typeof data.value === 'bigint'; } exports.check = check; function canAdd(currentData, newData) { diff --git a/src/cjs/lib/converter/output/tapTree.d.ts b/src/cjs/lib/converter/output/tapTree.d.ts index 06c76e1..f976363 100644 --- a/src/cjs/lib/converter/output/tapTree.d.ts +++ b/src/cjs/lib/converter/output/tapTree.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapTree } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapTree; export declare function encode(tree: TapTree): KeyValue; -export declare const expected = "{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }"; +export declare const expected = "{ leaves: [{ depth: number; leafVersion: number, script: Uint8Array; }] }"; export declare function check(data: any): data is TapTree; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/cjs/lib/converter/output/tapTree.js b/src/cjs/lib/converter/output/tapTree.js index 4fad598..6e87964 100644 --- a/src/cjs/lib/converter/output/tapTree.js +++ b/src/cjs/lib/converter/output/tapTree.js @@ -12,7 +12,9 @@ var __importStar = }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); -const varuint = __importStar(require('../varint.js')); +// import * as varuint from '../varint.js'; +const varuint = __importStar(require('varuint-bitcoin')); +const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { if ( keyVal.key[0] !== typeFields_js_1.OutputTypes.TAP_TREE || @@ -20,7 +22,7 @@ function decode(keyVal) { ) { throw new Error( 'Decode Error: could not decode tapTree with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } let _offset = 0; @@ -28,8 +30,11 @@ function decode(keyVal) { while (_offset < keyVal.value.length) { const depth = keyVal.value[_offset++]; const leafVersion = keyVal.value[_offset++]; - const scriptLen = varuint.decode(keyVal.value, _offset); - _offset += varuint.encodingLength(scriptLen); + const { numberValue: scriptLen, bytes } = varuint.decode( + keyVal.value, + _offset, + ); + _offset += bytes; data.push({ depth, leafVersion, @@ -41,22 +46,22 @@ function decode(keyVal) { } exports.decode = decode; function encode(tree) { - const key = Buffer.from([typeFields_js_1.OutputTypes.TAP_TREE]); + const key = Uint8Array.from([typeFields_js_1.OutputTypes.TAP_TREE]); const bufs = [].concat( ...tree.leaves.map(tapLeaf => [ - Buffer.of(tapLeaf.depth, tapLeaf.leafVersion), - varuint.encode(tapLeaf.script.length), + Uint8Array.of(tapLeaf.depth, tapLeaf.leafVersion), + varuint.encode(BigInt(tapLeaf.script.length)).buffer, tapLeaf.script, ]), ); return { key, - value: Buffer.concat(bufs), + value: tools.concat(bufs), }; } exports.encode = encode; exports.expected = - '{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }'; + '{ leaves: [{ depth: number; leafVersion: number, script: Uint8Array; }] }'; function check(data) { return ( Array.isArray(data.leaves) && @@ -65,7 +70,7 @@ function check(data) { tapLeaf.depth >= 0 && tapLeaf.depth <= 128 && (tapLeaf.leafVersion & 0xfe) === tapLeaf.leafVersion && - Buffer.isBuffer(tapLeaf.script), + tapLeaf.script instanceof Uint8Array, ) ); } diff --git a/src/cjs/lib/converter/shared/bip32Derivation.d.ts b/src/cjs/lib/converter/shared/bip32Derivation.d.ts index 6528887..d3b646d 100644 --- a/src/cjs/lib/converter/shared/bip32Derivation.d.ts +++ b/src/cjs/lib/converter/shared/bip32Derivation.d.ts @@ -1,6 +1,5 @@ -/// import { Bip32Derivation, KeyValue } from '../../interfaces'; -export declare function makeConverter(TYPE_BYTE: number, isValidPubkey?: (pubkey: Buffer) => boolean): { +export declare function makeConverter(TYPE_BYTE: number, isValidPubkey?: (pubkey: Uint8Array) => boolean): { decode: (keyVal: KeyValue) => Bip32Derivation; encode: (data: Bip32Derivation) => KeyValue; check: (data: any) => data is Bip32Derivation; diff --git a/src/cjs/lib/converter/shared/bip32Derivation.js b/src/cjs/lib/converter/shared/bip32Derivation.js index 359120b..5a074b6 100644 --- a/src/cjs/lib/converter/shared/bip32Derivation.js +++ b/src/cjs/lib/converter/shared/bip32Derivation.js @@ -1,5 +1,17 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); +const tools = __importStar(require('uint8array-tools')); const range = n => [...Array(n).keys()]; const isValidDERKey = pubkey => (pubkey.length === 33 && [2, 3].includes(pubkey[0])) || @@ -9,14 +21,14 @@ function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode bip32Derivation with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1); if (!isValidPubkey(pubkey)) { throw new Error( 'Decode Error: bip32Derivation has invalid pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.value.length / 4) % 1 !== 0) { @@ -30,7 +42,7 @@ function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { path: 'm', }; for (const i of range(keyVal.value.length / 4 - 1)) { - const val = keyVal.value.readUInt32LE(i * 4 + 4); + const val = tools.readUInt32(keyVal.value, i * 4 + 4, 'LE'); const isHard = !!(val & 0x80000000); const idx = val & 0x7fffffff; data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); @@ -38,17 +50,17 @@ function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { return data; } function encode(data) { - const head = Buffer.from([TYPE_BYTE]); - const key = Buffer.concat([head, data.pubkey]); + const head = Uint8Array.from([TYPE_BYTE]); + const key = tools.concat([head, data.pubkey]); const splitPath = data.path.split('/'); - const value = Buffer.allocUnsafe(splitPath.length * 4); - data.masterFingerprint.copy(value, 0); + const value = new Uint8Array(splitPath.length * 4); + value.set(data.masterFingerprint, 0); let offset = 4; splitPath.slice(1).forEach(level => { const isHard = level.slice(-1) === "'"; let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); if (isHard) num += 0x80000000; - value.writeUInt32LE(num, offset); + tools.writeUInt32(value, offset, num, 'LE'); offset += 4; }); return { @@ -57,21 +69,23 @@ function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { }; } const expected = - '{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }'; + '{ masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; }'; function check(data) { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.masterFingerprint) && + data.pubkey instanceof Uint8Array && + data.masterFingerprint instanceof Uint8Array && typeof data.path === 'string' && isValidPubkey(data.pubkey) && data.masterFingerprint.length === 4 ); } function canAddToArray(array, item, dupeSet) { - const dupeString = item.pubkey.toString('hex'); + const dupeString = tools.toHex(item.pubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); - return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + return ( + array.filter(v => tools.compare(v.pubkey, item.pubkey) === 0).length === 0 + ); } return { decode, diff --git a/src/cjs/lib/converter/shared/checkPubkey.d.ts b/src/cjs/lib/converter/shared/checkPubkey.d.ts index 4b282b3..0966a06 100644 --- a/src/cjs/lib/converter/shared/checkPubkey.d.ts +++ b/src/cjs/lib/converter/shared/checkPubkey.d.ts @@ -1,3 +1,2 @@ -/// import { KeyValue } from '../../interfaces'; -export declare function makeChecker(pubkeyTypes: number[]): (keyVal: KeyValue) => Buffer | undefined; +export declare function makeChecker(pubkeyTypes: number[]): (keyVal: KeyValue) => Uint8Array | undefined; diff --git a/src/cjs/lib/converter/shared/checkPubkey.js b/src/cjs/lib/converter/shared/checkPubkey.js index d59625d..3498a6a 100644 --- a/src/cjs/lib/converter/shared/checkPubkey.js +++ b/src/cjs/lib/converter/shared/checkPubkey.js @@ -1,5 +1,17 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); +const tools = __importStar(require('uint8array-tools')); function makeChecker(pubkeyTypes) { return checkPubkey; function checkPubkey(keyVal) { @@ -11,7 +23,7 @@ function makeChecker(pubkeyTypes) { ![2, 3, 4].includes(pubkey[0]) ) { throw new Error( - 'Format Error: invalid pubkey in key 0x' + keyVal.key.toString('hex'), + 'Format Error: invalid pubkey in key 0x' + tools.toHex(keyVal.key), ); } } diff --git a/src/cjs/lib/converter/shared/redeemScript.js b/src/cjs/lib/converter/shared/redeemScript.js index 7b5746a..9fbdfe9 100644 --- a/src/cjs/lib/converter/shared/redeemScript.js +++ b/src/cjs/lib/converter/shared/redeemScript.js @@ -1,25 +1,37 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); +const tools = __importStar(require('uint8array-tools')); function makeConverter(TYPE_BYTE) { function decode(keyVal) { if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode redeemScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } function encode(data) { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value: data, }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.redeemScript === undefined; diff --git a/src/cjs/lib/converter/shared/tapBip32Derivation.js b/src/cjs/lib/converter/shared/tapBip32Derivation.js index cca74c2..aeb9289 100644 --- a/src/cjs/lib/converter/shared/tapBip32Derivation.js +++ b/src/cjs/lib/converter/shared/tapBip32Derivation.js @@ -11,44 +11,46 @@ var __importStar = return result; }; Object.defineProperty(exports, '__esModule', { value: true }); -const varuint = __importStar(require('../varint.js')); +const varuint = __importStar(require('varuint-bitcoin')); +const tools = __importStar(require('uint8array-tools')); const bip32Derivation = __importStar(require('./bip32Derivation.js')); const isValidBIP340Key = pubkey => pubkey.length === 32; function makeConverter(TYPE_BYTE) { const parent = bip32Derivation.makeConverter(TYPE_BYTE, isValidBIP340Key); function decode(keyVal) { - const nHashes = varuint.decode(keyVal.value); - const nHashesLen = varuint.encodingLength(nHashes); + const { numberValue: nHashes, bytes: nHashesLen } = varuint.decode( + keyVal.value, + ); const base = parent.decode({ key: keyVal.key, - value: keyVal.value.slice(nHashesLen + nHashes * 32), + value: keyVal.value.slice(nHashesLen + Number(nHashes) * 32), }); - const leafHashes = new Array(nHashes); + const leafHashes = new Array(Number(nHashes)); for (let i = 0, _offset = nHashesLen; i < nHashes; i++, _offset += 32) { leafHashes[i] = keyVal.value.slice(_offset, _offset + 32); } - return Object.assign({}, base, { leafHashes }); + return { ...base, leafHashes }; } function encode(data) { const base = parent.encode(data); const nHashesLen = varuint.encodingLength(data.leafHashes.length); - const nHashesBuf = Buffer.allocUnsafe(nHashesLen); + const nHashesBuf = new Uint8Array(nHashesLen); varuint.encode(data.leafHashes.length, nHashesBuf); - const value = Buffer.concat([nHashesBuf, ...data.leafHashes, base.value]); - return Object.assign({}, base, { value }); + const value = tools.concat([nHashesBuf, ...data.leafHashes, base.value]); + return { ...base, value }; } const expected = '{ ' + - 'masterFingerprint: Buffer; ' + - 'pubkey: Buffer; ' + + 'masterFingerprint: Uint8Array; ' + + 'pubkey: Uint8Array; ' + 'path: string; ' + - 'leafHashes: Buffer[]; ' + + 'leafHashes: Uint8Array[]; ' + '}'; function check(data) { return ( Array.isArray(data.leafHashes) && data.leafHashes.every( - leafHash => Buffer.isBuffer(leafHash) && leafHash.length === 32, + leafHash => leafHash instanceof Uint8Array && leafHash.length === 32, ) && parent.check(data) ); diff --git a/src/cjs/lib/converter/shared/tapInternalKey.js b/src/cjs/lib/converter/shared/tapInternalKey.js index e0e918e..6f915aa 100644 --- a/src/cjs/lib/converter/shared/tapInternalKey.js +++ b/src/cjs/lib/converter/shared/tapInternalKey.js @@ -1,11 +1,23 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); +const tools = __importStar(require('uint8array-tools')); function makeConverter(TYPE_BYTE) { function decode(keyVal) { if (keyVal.key[0] !== TYPE_BYTE || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapInternalKey with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.value.length !== 32) { @@ -16,12 +28,12 @@ function makeConverter(TYPE_BYTE) { return keyVal.value; } function encode(value) { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data) && data.length === 32; + return data instanceof Uint8Array && data.length === 32; } function canAdd(currentData, newData) { return ( diff --git a/src/cjs/lib/converter/shared/witnessScript.js b/src/cjs/lib/converter/shared/witnessScript.js index d66a421..c31be2c 100644 --- a/src/cjs/lib/converter/shared/witnessScript.js +++ b/src/cjs/lib/converter/shared/witnessScript.js @@ -1,25 +1,37 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); +const tools = __importStar(require('uint8array-tools')); function makeConverter(TYPE_BYTE) { function decode(keyVal) { if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode witnessScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } function encode(data) { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value: data, }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } function canAdd(currentData, newData) { return ( diff --git a/src/cjs/lib/converter/tools.d.ts b/src/cjs/lib/converter/tools.d.ts index 53866c8..0fbb8a6 100644 --- a/src/cjs/lib/converter/tools.d.ts +++ b/src/cjs/lib/converter/tools.d.ts @@ -1,8 +1,5 @@ -/// import { KeyValue } from '../interfaces'; export declare const range: (n: number) => number[]; -export declare function reverseBuffer(buffer: Buffer): Buffer; -export declare function keyValsToBuffer(keyVals: KeyValue[]): Buffer; -export declare function keyValToBuffer(keyVal: KeyValue): Buffer; -export declare function readUInt64LE(buffer: Buffer, offset: number): number; -export declare function writeUInt64LE(buffer: Buffer, value: number, offset: number): number; +export declare function reverseBuffer(buffer: Uint8Array): Uint8Array; +export declare function keyValsToBuffer(keyVals: KeyValue[]): Uint8Array; +export declare function keyValToBuffer(keyVal: KeyValue): Uint8Array; diff --git a/src/cjs/lib/converter/tools.js b/src/cjs/lib/converter/tools.js index dcedb22..55b4958 100644 --- a/src/cjs/lib/converter/tools.js +++ b/src/cjs/lib/converter/tools.js @@ -11,7 +11,8 @@ var __importStar = return result; }; Object.defineProperty(exports, '__esModule', { value: true }); -const varuint = __importStar(require('./varint.js')); +const varuint = __importStar(require('varuint-bitcoin')); +const tools = __importStar(require('uint8array-tools')); exports.range = n => [...Array(n).keys()]; function reverseBuffer(buffer) { if (buffer.length < 1) return buffer; @@ -28,8 +29,8 @@ function reverseBuffer(buffer) { exports.reverseBuffer = reverseBuffer; function keyValsToBuffer(keyVals) { const buffers = keyVals.map(keyValToBuffer); - buffers.push(Buffer.from([0])); - return Buffer.concat(buffers); + buffers.push(Uint8Array.from([0])); + return tools.concat(buffers); } exports.keyValsToBuffer = keyValsToBuffer; function keyValToBuffer(keyVal) { @@ -37,38 +38,38 @@ function keyValToBuffer(keyVal) { const valLen = keyVal.value.length; const keyVarIntLen = varuint.encodingLength(keyLen); const valVarIntLen = varuint.encodingLength(valLen); - const buffer = Buffer.allocUnsafe( - keyVarIntLen + keyLen + valVarIntLen + valLen, - ); + const buffer = new Uint8Array(keyVarIntLen + keyLen + valVarIntLen + valLen); varuint.encode(keyLen, buffer, 0); - keyVal.key.copy(buffer, keyVarIntLen); + buffer.set(keyVal.key, keyVarIntLen); varuint.encode(valLen, buffer, keyVarIntLen + keyLen); - keyVal.value.copy(buffer, keyVarIntLen + keyLen + valVarIntLen); + buffer.set(keyVal.value, keyVarIntLen + keyLen + valVarIntLen); return buffer; } exports.keyValToBuffer = keyValToBuffer; // https://github.com/feross/buffer/blob/master/index.js#L1127 -function verifuint(value, max) { - if (typeof value !== 'number') - throw new Error('cannot write a non-number as a number'); - if (value < 0) - throw new Error('specified a negative value for writing an unsigned value'); - if (value > max) throw new Error('RangeError: value out of range'); - if (Math.floor(value) !== value) - throw new Error('value has a fractional component'); -} -function readUInt64LE(buffer, offset) { - const a = buffer.readUInt32LE(offset); - let b = buffer.readUInt32LE(offset + 4); - b *= 0x100000000; - verifuint(b + a, 0x001fffffffffffff); - return b + a; -} -exports.readUInt64LE = readUInt64LE; -function writeUInt64LE(buffer, value, offset) { - verifuint(value, 0x001fffffffffffff); - buffer.writeInt32LE(value & -1, offset); - buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); - return offset + 8; -} -exports.writeUInt64LE = writeUInt64LE; +// function verifuint(value: number, max: number): void { +// if (typeof value !== 'number') +// throw new Error('cannot write a non-number as a number'); +// if (value < 0) +// throw new Error('specified a negative value for writing an unsigned value'); +// if (value > max) throw new Error('RangeError: value out of range'); +// if (Math.floor(value) !== value) +// throw new Error('value has a fractional component'); +// } +// export function readUInt64LE(buffer: Buffer, offset: number): number { +// const a = buffer.readUInt32LE(offset); +// let b = buffer.readUInt32LE(offset + 4); +// b *= 0x100000000; +// verifuint(b + a, 0x001fffffffffffff); +// return b + a; +// } +// export function writeUInt64LE( +// buffer: Buffer, +// value: number, +// offset: number, +// ): number { +// verifuint(value, 0x001fffffffffffff); +// buffer.writeInt32LE(value & -1, offset); +// buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); +// return offset + 8; +// } diff --git a/src/cjs/lib/interfaces.d.ts b/src/cjs/lib/interfaces.d.ts index a445c7d..9a5112e 100644 --- a/src/cjs/lib/interfaces.d.ts +++ b/src/cjs/lib/interfaces.d.ts @@ -1,5 +1,4 @@ -/// -export declare type TransactionFromBuffer = (buffer: Buffer) => Transaction; +export declare type TransactionFromBuffer = (buffer: Uint8Array) => Transaction; export interface Transaction { getInputOutputCounts(): { inputCount: number; @@ -7,11 +6,11 @@ export interface Transaction { }; addInput(objectArg: any): void; addOutput(objectArg: any): void; - toBuffer(): Buffer; + toBuffer(): Uint8Array; } export interface KeyValue { - key: Buffer; - value: Buffer; + key: Uint8Array; + value: Uint8Array; } export interface PsbtGlobal extends PsbtGlobalUpdate { unsignedTx: Transaction; @@ -59,57 +58,57 @@ export interface PsbtOutputExtended extends PsbtOutput { [index: string]: any; } export interface GlobalXpub { - extendedPubkey: Buffer; - masterFingerprint: Buffer; + extendedPubkey: Uint8Array; + masterFingerprint: Uint8Array; path: string; } export interface PartialSig { - pubkey: Buffer; - signature: Buffer; + pubkey: Uint8Array; + signature: Uint8Array; } export interface Bip32Derivation { - masterFingerprint: Buffer; - pubkey: Buffer; + masterFingerprint: Uint8Array; + pubkey: Uint8Array; path: string; } export interface WitnessUtxo { - script: Buffer; - value: number; + script: Uint8Array; + value: bigint; } -export declare type NonWitnessUtxo = Buffer; +export declare type NonWitnessUtxo = Uint8Array; export declare type SighashType = number; -export declare type RedeemScript = Buffer; -export declare type WitnessScript = Buffer; -export declare type FinalScriptSig = Buffer; -export declare type FinalScriptWitness = Buffer; +export declare type RedeemScript = Uint8Array; +export declare type WitnessScript = Uint8Array; +export declare type FinalScriptSig = Uint8Array; +export declare type FinalScriptWitness = Uint8Array; export declare type PorCommitment = string; -export declare type TapKeySig = Buffer; +export declare type TapKeySig = Uint8Array; export interface TapScriptSig extends PartialSig { - leafHash: Buffer; + leafHash: Uint8Array; } interface TapScript { leafVersion: number; - script: Buffer; + script: Uint8Array; } -export declare type ControlBlock = Buffer; +export declare type ControlBlock = Uint8Array; export interface TapLeafScript extends TapScript { controlBlock: ControlBlock; } export interface TapBip32Derivation extends Bip32Derivation { - leafHashes: Buffer[]; + leafHashes: Uint8Array[]; } -export declare type TapInternalKey = Buffer; -export declare type TapMerkleRoot = Buffer; +export declare type TapInternalKey = Uint8Array; +export declare type TapMerkleRoot = Uint8Array; export interface TapLeaf extends TapScript { depth: number; } export interface TapTree { leaves: TapLeaf[]; } -export declare type TransactionIOCountGetter = (txBuffer: Buffer) => { +export declare type TransactionIOCountGetter = (txBuffer: Uint8Array) => { inputCount: number; outputCount: number; }; -export declare type TransactionVersionSetter = (version: number, txBuffer: Buffer) => Buffer; -export declare type TransactionLocktimeSetter = (locktime: number, txBuffer: Buffer) => Buffer; +export declare type TransactionVersionSetter = (version: number, txBuffer: Uint8Array) => Uint8Array; +export declare type TransactionLocktimeSetter = (locktime: number, txBuffer: Uint8Array) => Uint8Array; export {}; diff --git a/src/cjs/lib/parser/fromBuffer.d.ts b/src/cjs/lib/parser/fromBuffer.d.ts index 87cc125..f59bc3b 100644 --- a/src/cjs/lib/parser/fromBuffer.d.ts +++ b/src/cjs/lib/parser/fromBuffer.d.ts @@ -1,12 +1,11 @@ -/// import { KeyValue, Transaction, TransactionFromBuffer } from '../interfaces'; import { PsbtAttributes } from './index.js'; -export declare function psbtFromBuffer(buffer: Buffer, txGetter: TransactionFromBuffer): PsbtAttributes; +export declare function psbtFromBuffer(buffer: Uint8Array, txGetter: TransactionFromBuffer): PsbtAttributes; interface PsbtFromKeyValsArg { globalMapKeyVals: KeyValue[]; inputKeyVals: KeyValue[][]; outputKeyVals: KeyValue[][]; } -export declare function checkKeyBuffer(type: string, keyBuf: Buffer, keyNum: number): void; +export declare function checkKeyBuffer(type: string, keyBuf: Uint8Array, keyNum: number): void; export declare function psbtFromKeyVals(unsignedTx: Transaction, { globalMapKeyVals, inputKeyVals, outputKeyVals }: PsbtFromKeyValsArg): PsbtAttributes; export {}; diff --git a/src/cjs/lib/parser/fromBuffer.js b/src/cjs/lib/parser/fromBuffer.js index e366b7e..02846d6 100644 --- a/src/cjs/lib/parser/fromBuffer.js +++ b/src/cjs/lib/parser/fromBuffer.js @@ -13,24 +13,26 @@ var __importStar = Object.defineProperty(exports, '__esModule', { value: true }); const convert = __importStar(require('../converter/index.js')); const tools_js_1 = require('../converter/tools.js'); -const varuint = __importStar(require('../converter/varint.js')); +// import * as varuint from '../converter/varint.js'; +const varuint = __importStar(require('varuint-bitcoin')); +const tools = __importStar(require('uint8array-tools')); const typeFields_js_1 = require('../typeFields.js'); function psbtFromBuffer(buffer, txGetter) { let offset = 0; function varSlice() { - const keyLen = varuint.decode(buffer, offset); - offset += varuint.encodingLength(keyLen); - const key = buffer.slice(offset, offset + keyLen); - offset += keyLen; + const { numberValue: keyLen, bytes } = varuint.decode(buffer, offset); + offset += bytes; + const key = buffer.slice(offset, offset + Number(keyLen)); + offset += Number(keyLen); return key; } function readUInt32BE() { - const num = buffer.readUInt32BE(offset); + const num = tools.readUInt32(buffer, offset, 'BE'); offset += 4; return num; } function readUInt8() { - const num = buffer.readUInt8(offset); + const num = tools.readUInt8(buffer, offset); offset += 1; return num; } @@ -46,7 +48,7 @@ function psbtFromBuffer(buffer, txGetter) { if (offset >= buffer.length) { throw new Error('Format Error: Unexpected End of PSBT'); } - const isEnd = buffer.readUInt8(offset) === 0; + const isEnd = tools.readUInt8(buffer, offset) === 0; if (isEnd) { offset++; } @@ -64,7 +66,7 @@ function psbtFromBuffer(buffer, txGetter) { const globalKeyIndex = {}; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (globalKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for global keymap: key ' + hexKey, @@ -90,7 +92,7 @@ function psbtFromBuffer(buffer, txGetter) { const input = []; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (inputKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for each input: ' + @@ -110,7 +112,7 @@ function psbtFromBuffer(buffer, txGetter) { const output = []; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (outputKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for each output: ' + @@ -133,9 +135,10 @@ function psbtFromBuffer(buffer, txGetter) { } exports.psbtFromBuffer = psbtFromBuffer; function checkKeyBuffer(type, keyBuf, keyNum) { - if (!keyBuf.equals(Buffer.from([keyNum]))) { + if (tools.compare(keyBuf, Uint8Array.from([keyNum]))) { throw new Error( - `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + // `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + `Format Error: Invalid ${type} key: ${tools.toHex(keyBuf)}`, ); } } diff --git a/src/cjs/lib/parser/toBuffer.d.ts b/src/cjs/lib/parser/toBuffer.d.ts index 04d0e19..4e7b230 100644 --- a/src/cjs/lib/parser/toBuffer.d.ts +++ b/src/cjs/lib/parser/toBuffer.d.ts @@ -1,7 +1,6 @@ -/// import { KeyValue } from '../interfaces'; import { PsbtAttributes } from './index.js'; -export declare function psbtToBuffer({ globalMap, inputs, outputs, }: PsbtAttributes): Buffer; +export declare function psbtToBuffer({ globalMap, inputs, outputs, }: PsbtAttributes): Uint8Array; export declare function psbtToKeyVals({ globalMap, inputs, outputs, }: PsbtAttributes): { globalKeyVals: KeyValue[]; inputKeyVals: KeyValue[][]; diff --git a/src/cjs/lib/parser/toBuffer.js b/src/cjs/lib/parser/toBuffer.js index 120c1ae..c1596aa 100644 --- a/src/cjs/lib/parser/toBuffer.js +++ b/src/cjs/lib/parser/toBuffer.js @@ -13,6 +13,7 @@ var __importStar = Object.defineProperty(exports, '__esModule', { value: true }); const convert = __importStar(require('../converter/index.js')); const tools_js_1 = require('../converter/tools.js'); +const tools = __importStar(require('uint8array-tools')); function psbtToBuffer({ globalMap, inputs, outputs }) { const { globalKeyVals, inputKeyVals, outputKeyVals } = psbtToKeyVals({ globalMap, @@ -22,19 +23,19 @@ function psbtToBuffer({ globalMap, inputs, outputs }) { const globalBuffer = tools_js_1.keyValsToBuffer(globalKeyVals); const keyValsOrEmptyToBuffer = keyVals => keyVals.length === 0 - ? [Buffer.from([0])] + ? [Uint8Array.from([0])] : keyVals.map(tools_js_1.keyValsToBuffer); const inputBuffers = keyValsOrEmptyToBuffer(inputKeyVals); const outputBuffers = keyValsOrEmptyToBuffer(outputKeyVals); - const header = Buffer.allocUnsafe(5); - header.writeUIntBE(0x70736274ff, 0, 5); - return Buffer.concat( + const header = new Uint8Array(5); + header.set([0x70, 0x73, 0x62, 0x74, 0xff], 0); + return tools.concat( [header, globalBuffer].concat(inputBuffers, outputBuffers), ); } exports.psbtToBuffer = psbtToBuffer; const sortKeyVals = (a, b) => { - return a.key.compare(b.key); + return tools.compare(a.key, b.key); }; function keyValsFromMap(keyValMap, converterFactory) { const keyHexSet = new Set(); @@ -47,7 +48,7 @@ function keyValsFromMap(keyValMap, converterFactory) { const encodedKeyVals = (Array.isArray(value) ? value : [value]).map( converter.encode, ); - const keyHexes = encodedKeyVals.map(kv => kv.key.toString('hex')); + const keyHexes = encodedKeyVals.map(kv => tools.toHex(kv.key)); keyHexes.forEach(hex => { if (keyHexSet.has(hex)) throw new Error('Serialize Error: Duplicate key: ' + hex); @@ -58,7 +59,7 @@ function keyValsFromMap(keyValMap, converterFactory) { // Get other keyVals that have not yet been gotten const otherKeyVals = keyValMap.unknownKeyVals ? keyValMap.unknownKeyVals.filter(keyVal => { - return !keyHexSet.has(keyVal.key.toString('hex')); + return !keyHexSet.has(tools.toHex(keyVal.key)); }) : []; return keyVals.concat(otherKeyVals).sort(sortKeyVals); diff --git a/src/cjs/lib/psbt.d.ts b/src/cjs/lib/psbt.d.ts index 184758c..7044337 100644 --- a/src/cjs/lib/psbt.d.ts +++ b/src/cjs/lib/psbt.d.ts @@ -1,16 +1,15 @@ -/// -import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, Transaction, TransactionFromBuffer } from './interfaces'; +import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, Transaction, TransactionFromBuffer } from './interfaces.js'; export declare class Psbt { static fromBase64(this: T, data: string, txFromBuffer: TransactionFromBuffer): InstanceType; static fromHex(this: T, data: string, txFromBuffer: TransactionFromBuffer): InstanceType; - static fromBuffer(this: T, buffer: Buffer, txFromBuffer: TransactionFromBuffer): InstanceType; + static fromBuffer(this: T, buffer: Uint8Array, txFromBuffer: TransactionFromBuffer): InstanceType; readonly inputs: PsbtInput[]; readonly outputs: PsbtOutput[]; readonly globalMap: PsbtGlobal; constructor(tx: Transaction); toBase64(): string; toHex(): string; - toBuffer(): Buffer; + toBuffer(): Uint8Array; updateGlobal(updateData: PsbtGlobalUpdate): this; updateInput(inputIndex: number, updateData: PsbtInputUpdate): this; updateOutput(outputIndex: number, updateData: PsbtOutputUpdate): this; @@ -21,5 +20,7 @@ export declare class Psbt { addOutput(outputData: PsbtOutputExtended): this; clearFinalizedInput(inputIndex: number): this; combine(...those: this[]): this; - getTransaction(): Buffer; + getTransaction(): Uint8Array; } +export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo } from "./interfaces.js"; +export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput } from "./utils.js"; diff --git a/src/cjs/lib/psbt.js b/src/cjs/lib/psbt.js index 7e20297..72e757c 100644 --- a/src/cjs/lib/psbt.js +++ b/src/cjs/lib/psbt.js @@ -1,9 +1,21 @@ 'use strict'; +var __importStar = + (this && this.__importStar) || + function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result['default'] = mod; + return result; + }; Object.defineProperty(exports, '__esModule', { value: true }); const index_js_1 = require('./combiner/index.js'); const index_js_2 = require('./parser/index.js'); const typeFields_js_1 = require('./typeFields.js'); const utils_js_1 = require('./utils.js'); +const tools = __importStar(require('uint8array-tools')); class Psbt { constructor(tx) { this.inputs = []; @@ -13,11 +25,11 @@ class Psbt { }; } static fromBase64(data, txFromBuffer) { - const buffer = Buffer.from(data, 'base64'); + const buffer = tools.fromBase64(data); return this.fromBuffer(buffer, txFromBuffer); } static fromHex(data, txFromBuffer) { - const buffer = Buffer.from(data, 'hex'); + const buffer = tools.fromHex(data); return this.fromBuffer(buffer, txFromBuffer); } static fromBuffer(buffer, txFromBuffer) { @@ -28,11 +40,11 @@ class Psbt { } toBase64() { const buffer = this.toBuffer(); - return buffer.toString('base64'); + return tools.toBase64(buffer); } toHex() { const buffer = this.toBuffer(); - return buffer.toString('hex'); + return tools.toHex(buffer); } toBuffer() { return index_js_2.psbtToBuffer(this); @@ -146,3 +158,16 @@ class Psbt { } } exports.Psbt = Psbt; +var utils_js_2 = require('./utils.js'); +exports.addInputAttributes = utils_js_2.addInputAttributes; +exports.addOutputAttributes = utils_js_2.addOutputAttributes; +exports.checkForInput = utils_js_2.checkForInput; +exports.checkForOutput = utils_js_2.checkForOutput; +exports.checkHasKey = utils_js_2.checkHasKey; +exports.defaultLocktimeSetter = utils_js_2.defaultLocktimeSetter; +exports.defaultVersionSetter = utils_js_2.defaultVersionSetter; +exports.getEnumLength = utils_js_2.getEnumLength; +exports.inputCheckUncleanFinalized = utils_js_2.inputCheckUncleanFinalized; +exports.updateGlobal = utils_js_2.updateGlobal; +exports.updateInput = utils_js_2.updateInput; +exports.updateOutput = utils_js_2.updateOutput; diff --git a/src/cjs/lib/utils.d.ts b/src/cjs/lib/utils.d.ts index 3ba2cda..40f5e34 100644 --- a/src/cjs/lib/utils.d.ts +++ b/src/cjs/lib/utils.d.ts @@ -1,5 +1,4 @@ -/// -import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate } from './interfaces'; +import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate } from './interfaces.js'; export declare function checkForInput(inputs: PsbtInput[], inputIndex: number): PsbtInput; export declare function checkForOutput(outputs: PsbtOutput[], outputIndex: number): PsbtOutput; export declare function checkHasKey(checkKeyVal: KeyValue, keyVals: KeyValue[] | undefined, enumLength: number): void; @@ -10,5 +9,5 @@ export declare const updateInput: (updateData: PsbtInputUpdate, mainData: PsbtIn export declare const updateOutput: (updateData: PsbtOutputUpdate, mainData: PsbtOutput) => void; export declare function addInputAttributes(inputs: PsbtInput[], data: any): void; export declare function addOutputAttributes(outputs: PsbtOutput[], data: any): void; -export declare function defaultVersionSetter(version: number, txBuf: Buffer): Buffer; -export declare function defaultLocktimeSetter(locktime: number, txBuf: Buffer): Buffer; +export declare function defaultVersionSetter(version: number, txBuf: Uint8Array): Uint8Array; +export declare function defaultLocktimeSetter(locktime: number, txBuf: Uint8Array): Uint8Array; diff --git a/src/cjs/lib/utils.js b/src/cjs/lib/utils.js index a3ed9fd..03c4ca1 100644 --- a/src/cjs/lib/utils.js +++ b/src/cjs/lib/utils.js @@ -12,6 +12,7 @@ var __importStar = }; Object.defineProperty(exports, '__esModule', { value: true }); const converter = __importStar(require('./converter/index.js')); +const tools = __importStar(require('uint8array-tools')); function checkForInput(inputs, inputIndex) { const input = inputs[inputIndex]; if (input === undefined) throw new Error(`No input #${inputIndex}`); @@ -32,9 +33,10 @@ function checkHasKey(checkKeyVal, keyVals, enumLength) { } if ( keyVals && - keyVals.filter(kv => kv.key.equals(checkKeyVal.key)).length !== 0 + keyVals.filter(kv => tools.compare(kv.key, checkKeyVal.key) === 0) + .length !== 0 ) { - throw new Error(`Duplicate Key: ${checkKeyVal.key.toString('hex')}`); + throw new Error(`Duplicate Key: ${tools.toHex(checkKeyVal.key)}`); } } exports.checkHasKey = checkHasKey; @@ -73,6 +75,7 @@ function throwForUpdateMaker(typeName, name, expected, data) { } function updateMaker(typeName) { return (updateData, mainData) => { + // @ts-ignore for (const name of Object.keys(updateData)) { // @ts-ignore const data = updateData[name]; @@ -132,18 +135,18 @@ function addOutputAttributes(outputs, data) { } exports.addOutputAttributes = addOutputAttributes; function defaultVersionSetter(version, txBuf) { - if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { + if (!(txBuf instanceof Uint8Array) || txBuf.length < 4) { throw new Error('Set Version: Invalid Transaction'); } - txBuf.writeUInt32LE(version, 0); + tools.writeUInt32(txBuf, 0, version, 'LE'); return txBuf; } exports.defaultVersionSetter = defaultVersionSetter; function defaultLocktimeSetter(locktime, txBuf) { - if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { + if (!(txBuf instanceof Uint8Array) || txBuf.length < 4) { throw new Error('Set Locktime: Invalid Transaction'); } - txBuf.writeUInt32LE(locktime, txBuf.length - 4); + tools.writeUInt32(txBuf, txBuf.length - 4, locktime, 'LE'); return txBuf; } exports.defaultLocktimeSetter = defaultLocktimeSetter; diff --git a/src/esm/lib/combiner/index.js b/src/esm/lib/combiner/index.js index 33ea8b0..7242ba9 100644 --- a/src/esm/lib/combiner/index.js +++ b/src/esm/lib/combiner/index.js @@ -1,4 +1,5 @@ import { psbtFromKeyVals, psbtToKeyVals } from '../parser/index.js'; +import * as tools from 'uint8array-tools'; export function combine(psbts) { const self = psbts[0]; const selfKeyVals = psbtToKeyVals(self); @@ -15,7 +16,7 @@ export function combine(psbts) { const otherTx = getTx(other); if ( otherTx === undefined || - !otherTx.toBuffer().equals(selfTx.toBuffer()) + tools.compare(otherTx.toBuffer(), selfTx.toBuffer()) !== 0 ) { throw new Error( 'Combine: One of the Psbts does not have the same transaction.', @@ -60,7 +61,8 @@ export function combine(psbts) { function keyPusher(selfSet, selfKeyVals, otherKeyVals) { return key => { if (selfSet.has(key)) return; - const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + // const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + const newKv = otherKeyVals.filter(kv => tools.toHex(kv.key) === key)[0]; selfKeyVals.push(newKv); selfSet.add(key); }; @@ -71,7 +73,8 @@ function getTx(psbt) { function getKeySet(keyVals) { const set = new Set(); keyVals.forEach(keyVal => { - const hex = keyVal.key.toString('hex'); + // const hex = keyVal.key.toString('hex'); + const hex = tools.toHex(keyVal.key); if (set.has(hex)) throw new Error('Combine: KeyValue Map keys should be unique'); set.add(hex); diff --git a/src/esm/lib/converter/global/globalXpub.d.ts b/src/esm/lib/converter/global/globalXpub.d.ts index 5b96567..a3b0d11 100644 --- a/src/esm/lib/converter/global/globalXpub.d.ts +++ b/src/esm/lib/converter/global/globalXpub.d.ts @@ -1,6 +1,6 @@ import { GlobalXpub, KeyValue } from '../../interfaces'; export declare function decode(keyVal: KeyValue): GlobalXpub; export declare function encode(data: GlobalXpub): KeyValue; -export declare const expected = "{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }"; +export declare const expected = "{ masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; }"; export declare function check(data: any): data is GlobalXpub; export declare function canAddToArray(array: GlobalXpub[], item: GlobalXpub, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/global/globalXpub.js b/src/esm/lib/converter/global/globalXpub.js index fb617d3..b9596f7 100644 --- a/src/esm/lib/converter/global/globalXpub.js +++ b/src/esm/lib/converter/global/globalXpub.js @@ -1,16 +1,17 @@ import { GlobalTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; const range = n => [...Array(n).keys()]; export function decode(keyVal) { if (keyVal.key[0] !== GlobalTypes.GLOBAL_XPUB) { throw new Error( 'Decode Error: could not decode globalXpub with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.key.length !== 79 || ![2, 3].includes(keyVal.key[46])) { throw new Error( 'Decode Error: globalXpub has invalid extended pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.value.length / 4) % 1 !== 0) { @@ -25,7 +26,7 @@ export function decode(keyVal) { path: 'm', }; for (const i of range(keyVal.value.length / 4 - 1)) { - const val = keyVal.value.readUInt32LE(i * 4 + 4); + const val = tools.readUInt32(keyVal.value, i * 4 + 4, 'LE'); const isHard = !!(val & 0x80000000); const idx = val & 0x7fffffff; data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); @@ -33,17 +34,17 @@ export function decode(keyVal) { return data; } export function encode(data) { - const head = Buffer.from([GlobalTypes.GLOBAL_XPUB]); - const key = Buffer.concat([head, data.extendedPubkey]); + const head = new Uint8Array([GlobalTypes.GLOBAL_XPUB]); + const key = tools.concat([head, data.extendedPubkey]); const splitPath = data.path.split('/'); - const value = Buffer.allocUnsafe(splitPath.length * 4); - data.masterFingerprint.copy(value, 0); + const value = new Uint8Array(splitPath.length * 4); + value.set(data.masterFingerprint, 0); let offset = 4; splitPath.slice(1).forEach(level => { const isHard = level.slice(-1) === "'"; let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); if (isHard) num += 0x80000000; - value.writeUInt32LE(num, offset); + tools.writeUInt32(value, offset, num, 'LE'); offset += 4; }); return { @@ -52,26 +53,27 @@ export function encode(data) { }; } export const expected = - '{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }'; + '{ masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; }'; export function check(data) { const epk = data.extendedPubkey; const mfp = data.masterFingerprint; const p = data.path; return ( - Buffer.isBuffer(epk) && + epk instanceof Uint8Array && epk.length === 78 && [2, 3].indexOf(epk[45]) > -1 && - Buffer.isBuffer(mfp) && + mfp instanceof Uint8Array && mfp.length === 4 && typeof p === 'string' && !!p.match(/^m(\/\d+'?)*$/) ); } export function canAddToArray(array, item, dupeSet) { - const dupeString = item.extendedPubkey.toString('hex'); + const dupeString = tools.toHex(item.extendedPubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( - array.filter(v => v.extendedPubkey.equals(item.extendedPubkey)).length === 0 + array.filter(v => tools.compare(v.extendedPubkey, item.extendedPubkey)) + .length === 0 ); } diff --git a/src/esm/lib/converter/global/unsignedTx.js b/src/esm/lib/converter/global/unsignedTx.js index a2d435a..fc5038a 100644 --- a/src/esm/lib/converter/global/unsignedTx.js +++ b/src/esm/lib/converter/global/unsignedTx.js @@ -1,7 +1,7 @@ import { GlobalTypes } from '../../typeFields.js'; export function encode(data) { return { - key: Buffer.from([GlobalTypes.UNSIGNED_TX]), + key: new Uint8Array([GlobalTypes.UNSIGNED_TX]), value: data.toBuffer(), }; } diff --git a/src/esm/lib/converter/index.d.ts b/src/esm/lib/converter/index.d.ts index e6ff4c0..f152688 100644 --- a/src/esm/lib/converter/index.d.ts +++ b/src/esm/lib/converter/index.d.ts @@ -1,4 +1,3 @@ -/// import * as globalXpub from './global/globalXpub.js'; import * as unsignedTx from './global/unsignedTx.js'; import * as finalScriptSig from './input/finalScriptSig.js'; @@ -16,7 +15,7 @@ import * as tapTree from './output/tapTree.js'; declare const globals: { unsignedTx: typeof unsignedTx; globalXpub: typeof globalXpub; - checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array | undefined; }; declare const inputs: { nonWitnessUtxo: typeof nonWitnessUtxo; @@ -34,20 +33,20 @@ declare const inputs: { canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; }; redeemScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; witnessScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; - checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array | undefined; tapKeySig: typeof tapKeySig; tapScriptSig: typeof tapScriptSig; tapLeafScript: typeof tapLeafScript; @@ -59,9 +58,9 @@ declare const inputs: { canAddToArray: (array: import("../interfaces.js").TapBip32Derivation[], item: import("../interfaces.js").TapBip32Derivation, dupeSet: Set) => boolean; }; tapInternalKey: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; @@ -76,20 +75,20 @@ declare const outputs: { canAddToArray: (array: import("../interfaces.js").Bip32Derivation[], item: import("../interfaces.js").Bip32Derivation, dupeSet: Set) => boolean; }; redeemScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; witnessScript: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; - checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Buffer | undefined; + checkPubkey: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array | undefined; tapBip32Derivation: { decode: (keyVal: import("../interfaces.js").KeyValue) => import("../interfaces.js").TapBip32Derivation; encode: (data: import("../interfaces.js").TapBip32Derivation) => import("../interfaces.js").KeyValue; @@ -99,9 +98,9 @@ declare const outputs: { }; tapTree: typeof tapTree; tapInternalKey: { - decode: (keyVal: import("../interfaces.js").KeyValue) => Buffer; - encode: (data: Buffer) => import("../interfaces.js").KeyValue; - check: (data: any) => data is Buffer; + decode: (keyVal: import("../interfaces.js").KeyValue) => Uint8Array; + encode: (data: Uint8Array) => import("../interfaces.js").KeyValue; + check: (data: any) => data is Uint8Array; expected: string; canAdd: (currentData: any, newData: any) => boolean; }; diff --git a/src/esm/lib/converter/input/finalScriptSig.d.ts b/src/esm/lib/converter/input/finalScriptSig.d.ts index 1d82b86..f08bc72 100644 --- a/src/esm/lib/converter/input/finalScriptSig.d.ts +++ b/src/esm/lib/converter/input/finalScriptSig.d.ts @@ -1,6 +1,6 @@ import { FinalScriptSig, KeyValue } from '../../interfaces'; export declare function decode(keyVal: KeyValue): FinalScriptSig; export declare function encode(data: FinalScriptSig): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is FinalScriptSig; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/finalScriptSig.js b/src/esm/lib/converter/input/finalScriptSig.js index 7f6838e..1a95767 100644 --- a/src/esm/lib/converter/input/finalScriptSig.js +++ b/src/esm/lib/converter/input/finalScriptSig.js @@ -1,23 +1,24 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTSIG) { throw new Error( 'Decode Error: could not decode finalScriptSig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } export function encode(data) { - const key = Buffer.from([InputTypes.FINAL_SCRIPTSIG]); + const key = new Uint8Array([InputTypes.FINAL_SCRIPTSIG]); return { key, value: data, }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } export function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.finalScriptSig === undefined; diff --git a/src/esm/lib/converter/input/finalScriptWitness.d.ts b/src/esm/lib/converter/input/finalScriptWitness.d.ts index d640ab6..aa64099 100644 --- a/src/esm/lib/converter/input/finalScriptWitness.d.ts +++ b/src/esm/lib/converter/input/finalScriptWitness.d.ts @@ -1,6 +1,6 @@ import { FinalScriptWitness, KeyValue } from '../../interfaces'; export declare function decode(keyVal: KeyValue): FinalScriptWitness; export declare function encode(data: FinalScriptWitness): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is FinalScriptWitness; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/finalScriptWitness.js b/src/esm/lib/converter/input/finalScriptWitness.js index fe5a9d2..83851c1 100644 --- a/src/esm/lib/converter/input/finalScriptWitness.js +++ b/src/esm/lib/converter/input/finalScriptWitness.js @@ -1,23 +1,24 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTWITNESS) { throw new Error( 'Decode Error: could not decode finalScriptWitness with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } export function encode(data) { - const key = Buffer.from([InputTypes.FINAL_SCRIPTWITNESS]); + const key = new Uint8Array([InputTypes.FINAL_SCRIPTWITNESS]); return { key, value: data, }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } export function canAdd(currentData, newData) { return ( diff --git a/src/esm/lib/converter/input/nonWitnessUtxo.d.ts b/src/esm/lib/converter/input/nonWitnessUtxo.d.ts index 0e30673..498a9ba 100644 --- a/src/esm/lib/converter/input/nonWitnessUtxo.d.ts +++ b/src/esm/lib/converter/input/nonWitnessUtxo.d.ts @@ -1,6 +1,6 @@ import { KeyValue, NonWitnessUtxo } from '../../interfaces'; export declare function decode(keyVal: KeyValue): NonWitnessUtxo; export declare function encode(data: NonWitnessUtxo): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is NonWitnessUtxo; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/nonWitnessUtxo.js b/src/esm/lib/converter/input/nonWitnessUtxo.js index ee8f2b2..0a296a4 100644 --- a/src/esm/lib/converter/input/nonWitnessUtxo.js +++ b/src/esm/lib/converter/input/nonWitnessUtxo.js @@ -1,22 +1,23 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.NON_WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode nonWitnessUtxo with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } export function encode(data) { return { - key: Buffer.from([InputTypes.NON_WITNESS_UTXO]), + key: new Uint8Array([InputTypes.NON_WITNESS_UTXO]), value: data, }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } export function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.nonWitnessUtxo === undefined; diff --git a/src/esm/lib/converter/input/partialSig.d.ts b/src/esm/lib/converter/input/partialSig.d.ts index e60f6a9..b7fd8c5 100644 --- a/src/esm/lib/converter/input/partialSig.d.ts +++ b/src/esm/lib/converter/input/partialSig.d.ts @@ -1,6 +1,6 @@ import { KeyValue, PartialSig } from '../../interfaces'; export declare function decode(keyVal: KeyValue): PartialSig; export declare function encode(pSig: PartialSig): KeyValue; -export declare const expected = "{ pubkey: Buffer; signature: Buffer; }"; +export declare const expected = "{ pubkey: Uint8Array; signature: Uint8Array; }"; export declare function check(data: any): data is PartialSig; export declare function canAddToArray(array: PartialSig[], item: PartialSig, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/input/partialSig.js b/src/esm/lib/converter/input/partialSig.js index 9e21342..29b5d19 100644 --- a/src/esm/lib/converter/input/partialSig.js +++ b/src/esm/lib/converter/input/partialSig.js @@ -1,9 +1,10 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.PARTIAL_SIG) { throw new Error( 'Decode Error: could not decode partialSig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ( @@ -12,7 +13,7 @@ export function decode(keyVal) { ) { throw new Error( 'Decode Error: partialSig has invalid pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1); @@ -22,24 +23,24 @@ export function decode(keyVal) { }; } export function encode(pSig) { - const head = Buffer.from([InputTypes.PARTIAL_SIG]); + const head = new Uint8Array([InputTypes.PARTIAL_SIG]); return { - key: Buffer.concat([head, pSig.pubkey]), + key: tools.concat([head, pSig.pubkey]), value: pSig.signature, }; } -export const expected = '{ pubkey: Buffer; signature: Buffer; }'; +export const expected = '{ pubkey: Uint8Array; signature: Uint8Array; }'; export function check(data) { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.signature) && + data.pubkey instanceof Uint8Array && + data.signature instanceof Uint8Array && [33, 65].includes(data.pubkey.length) && [2, 3, 4].includes(data.pubkey[0]) && isDerSigWithSighash(data.signature) ); } function isDerSigWithSighash(buf) { - if (!Buffer.isBuffer(buf) || buf.length < 9) return false; + if (!(buf instanceof Uint8Array) || buf.length < 9) return false; if (buf[0] !== 0x30) return false; if (buf.length !== buf[1] + 3) return false; if (buf[2] !== 0x02) return false; @@ -52,8 +53,10 @@ function isDerSigWithSighash(buf) { return true; } export function canAddToArray(array, item, dupeSet) { - const dupeString = item.pubkey.toString('hex'); + const dupeString = tools.toHex(item.pubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); - return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + return ( + array.filter(v => tools.compare(v.pubkey, item.pubkey) === 0).length === 0 + ); } diff --git a/src/esm/lib/converter/input/porCommitment.js b/src/esm/lib/converter/input/porCommitment.js index 5e8dad1..71935ca 100644 --- a/src/esm/lib/converter/input/porCommitment.js +++ b/src/esm/lib/converter/input/porCommitment.js @@ -1,18 +1,19 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.POR_COMMITMENT) { throw new Error( 'Decode Error: could not decode porCommitment with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - return keyVal.value.toString('utf8'); + return tools.toUtf8(keyVal.value); } export function encode(data) { - const key = Buffer.from([InputTypes.POR_COMMITMENT]); + const key = new Uint8Array([InputTypes.POR_COMMITMENT]); return { key, - value: Buffer.from(data, 'utf8'), + value: tools.fromUtf8(data), }; } export const expected = 'string'; diff --git a/src/esm/lib/converter/input/sighashType.js b/src/esm/lib/converter/input/sighashType.js index d1e090e..f67434e 100644 --- a/src/esm/lib/converter/input/sighashType.js +++ b/src/esm/lib/converter/input/sighashType.js @@ -1,17 +1,18 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.SIGHASH_TYPE) { throw new Error( 'Decode Error: could not decode sighashType with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - return keyVal.value.readUInt32LE(0); + return Number(tools.readUInt32(keyVal.value, 0, 'LE')); } export function encode(data) { - const key = Buffer.from([InputTypes.SIGHASH_TYPE]); - const value = Buffer.allocUnsafe(4); - value.writeUInt32LE(data, 0); + const key = Uint8Array.from([InputTypes.SIGHASH_TYPE]); + const value = new Uint8Array(4); + tools.writeUInt32(value, 0, data, 'LE'); return { key, value, diff --git a/src/esm/lib/converter/input/tapKeySig.d.ts b/src/esm/lib/converter/input/tapKeySig.d.ts index 6c3a46b..07b357b 100644 --- a/src/esm/lib/converter/input/tapKeySig.d.ts +++ b/src/esm/lib/converter/input/tapKeySig.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapKeySig } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapKeySig; export declare function encode(value: TapKeySig): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is TapKeySig; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/tapKeySig.js b/src/esm/lib/converter/input/tapKeySig.js index 7f9f585..5b6686d 100644 --- a/src/esm/lib/converter/input/tapKeySig.js +++ b/src/esm/lib/converter/input/tapKeySig.js @@ -1,9 +1,10 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.TAP_KEY_SIG || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapKeySig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (!check(keyVal.value)) { @@ -14,12 +15,14 @@ export function decode(keyVal) { return keyVal.value; } export function encode(value) { - const key = Buffer.from([InputTypes.TAP_KEY_SIG]); + const key = Uint8Array.from([InputTypes.TAP_KEY_SIG]); return { key, value }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data) { - return Buffer.isBuffer(data) && (data.length === 64 || data.length === 65); + return ( + data instanceof Uint8Array && (data.length === 64 || data.length === 65) + ); } export function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.tapKeySig === undefined; diff --git a/src/esm/lib/converter/input/tapLeafScript.d.ts b/src/esm/lib/converter/input/tapLeafScript.d.ts index 33fc2c5..f0ac9da 100644 --- a/src/esm/lib/converter/input/tapLeafScript.d.ts +++ b/src/esm/lib/converter/input/tapLeafScript.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapLeafScript } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapLeafScript; export declare function encode(tScript: TapLeafScript): KeyValue; -export declare const expected = "{ controlBlock: Buffer; leafVersion: number, script: Buffer; }"; +export declare const expected = "{ controlBlock: Uint8Array; leafVersion: number, script: Uint8Array; }"; export declare function check(data: any): data is TapLeafScript; export declare function canAddToArray(array: TapLeafScript[], item: TapLeafScript, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/input/tapLeafScript.js b/src/esm/lib/converter/input/tapLeafScript.js index b574887..79bb32e 100644 --- a/src/esm/lib/converter/input/tapLeafScript.js +++ b/src/esm/lib/converter/input/tapLeafScript.js @@ -1,22 +1,23 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.TAP_LEAF_SCRIPT) { throw new Error( 'Decode Error: could not decode tapLeafScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.key.length - 2) % 32 !== 0) { throw new Error( 'Decode Error: tapLeafScript has invalid control block in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const leafVersion = keyVal.value[keyVal.value.length - 1]; if ((keyVal.key[1] & 0xfe) !== leafVersion) { throw new Error( 'Decode Error: tapLeafScript bad leaf version in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const script = keyVal.value.slice(0, -1); @@ -24,28 +25,29 @@ export function decode(keyVal) { return { controlBlock, script, leafVersion }; } export function encode(tScript) { - const head = Buffer.from([InputTypes.TAP_LEAF_SCRIPT]); - const verBuf = Buffer.from([tScript.leafVersion]); + const head = Uint8Array.from([InputTypes.TAP_LEAF_SCRIPT]); + const verBuf = Uint8Array.from([tScript.leafVersion]); return { - key: Buffer.concat([head, tScript.controlBlock]), - value: Buffer.concat([tScript.script, verBuf]), + key: tools.concat([head, tScript.controlBlock]), + value: tools.concat([tScript.script, verBuf]), }; } export const expected = - '{ controlBlock: Buffer; leafVersion: number, script: Buffer; }'; + '{ controlBlock: Uint8Array; leafVersion: number, script: Uint8Array; }'; export function check(data) { return ( - Buffer.isBuffer(data.controlBlock) && + data.controlBlock instanceof Uint8Array && (data.controlBlock.length - 1) % 32 === 0 && (data.controlBlock[0] & 0xfe) === data.leafVersion && - Buffer.isBuffer(data.script) + data.script instanceof Uint8Array ); } export function canAddToArray(array, item, dupeSet) { - const dupeString = item.controlBlock.toString('hex'); + const dupeString = tools.toHex(item.controlBlock); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( - array.filter(v => v.controlBlock.equals(item.controlBlock)).length === 0 + array.filter(v => tools.compare(v.controlBlock, item.controlBlock) === 0) + .length === 0 ); } diff --git a/src/esm/lib/converter/input/tapMerkleRoot.d.ts b/src/esm/lib/converter/input/tapMerkleRoot.d.ts index def3a44..1e222dc 100644 --- a/src/esm/lib/converter/input/tapMerkleRoot.d.ts +++ b/src/esm/lib/converter/input/tapMerkleRoot.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapMerkleRoot } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapMerkleRoot; export declare function encode(value: TapMerkleRoot): KeyValue; -export declare const expected = "Buffer"; +export declare const expected = "Uint8Array"; export declare function check(data: any): data is TapMerkleRoot; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/tapMerkleRoot.js b/src/esm/lib/converter/input/tapMerkleRoot.js index e082210..d69a655 100644 --- a/src/esm/lib/converter/input/tapMerkleRoot.js +++ b/src/esm/lib/converter/input/tapMerkleRoot.js @@ -1,9 +1,10 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.TAP_MERKLE_ROOT || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapMerkleRoot with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (!check(keyVal.value)) { @@ -12,12 +13,12 @@ export function decode(keyVal) { return keyVal.value; } export function encode(value) { - const key = Buffer.from([InputTypes.TAP_MERKLE_ROOT]); + const key = Uint8Array.from([InputTypes.TAP_MERKLE_ROOT]); return { key, value }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data) { - return Buffer.isBuffer(data) && data.length === 32; + return data instanceof Uint8Array && data.length === 32; } export function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.tapMerkleRoot === undefined; diff --git a/src/esm/lib/converter/input/tapScriptSig.d.ts b/src/esm/lib/converter/input/tapScriptSig.d.ts index 28884a9..6172daa 100644 --- a/src/esm/lib/converter/input/tapScriptSig.d.ts +++ b/src/esm/lib/converter/input/tapScriptSig.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapScriptSig } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapScriptSig; export declare function encode(tSig: TapScriptSig): KeyValue; -export declare const expected = "{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }"; +export declare const expected = "{ pubkey: Uint8Array; leafHash: Uint8Array; signature: Uint8Array; }"; export declare function check(data: any): data is TapScriptSig; export declare function canAddToArray(array: TapScriptSig[], item: TapScriptSig, dupeSet: Set): boolean; diff --git a/src/esm/lib/converter/input/tapScriptSig.js b/src/esm/lib/converter/input/tapScriptSig.js index 0bbb59a..e507f5c 100644 --- a/src/esm/lib/converter/input/tapScriptSig.js +++ b/src/esm/lib/converter/input/tapScriptSig.js @@ -1,21 +1,22 @@ import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + - keyVal.key.toString('hex'), + // keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.key.length !== 65) { throw new Error( - 'Decode Error: tapScriptSig has invalid key 0x' + - keyVal.key.toString('hex'), + 'Decode Error: tapScriptSig has invalid key 0x' + tools.toHex(keyVal.key), ); } if (keyVal.value.length !== 64 && keyVal.value.length !== 65) { throw new Error( 'Decode Error: tapScriptSig has invalid signature in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1, 33); @@ -27,32 +28,33 @@ export function decode(keyVal) { }; } export function encode(tSig) { - const head = Buffer.from([InputTypes.TAP_SCRIPT_SIG]); + const head = Uint8Array.from([InputTypes.TAP_SCRIPT_SIG]); return { - key: Buffer.concat([head, tSig.pubkey, tSig.leafHash]), + key: tools.concat([head, tSig.pubkey, tSig.leafHash]), value: tSig.signature, }; } export const expected = - '{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }'; + '{ pubkey: Uint8Array; leafHash: Uint8Array; signature: Uint8Array; }'; export function check(data) { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.leafHash) && - Buffer.isBuffer(data.signature) && + data.pubkey instanceof Uint8Array && + data.leafHash instanceof Uint8Array && + data.signature instanceof Uint8Array && data.pubkey.length === 32 && data.leafHash.length === 32 && (data.signature.length === 64 || data.signature.length === 65) ); } export function canAddToArray(array, item, dupeSet) { - const dupeString = - item.pubkey.toString('hex') + item.leafHash.toString('hex'); + const dupeString = tools.toHex(item.pubkey) + tools.toHex(item.leafHash); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( array.filter( - v => v.pubkey.equals(item.pubkey) && v.leafHash.equals(item.leafHash), + v => + tools.compare(v.pubkey, item.pubkey) === 0 && + tools.compare(v.leafHash, item.leafHash) === 0, ).length === 0 ); } diff --git a/src/esm/lib/converter/input/witnessUtxo.d.ts b/src/esm/lib/converter/input/witnessUtxo.d.ts index d977aec..f670563 100644 --- a/src/esm/lib/converter/input/witnessUtxo.d.ts +++ b/src/esm/lib/converter/input/witnessUtxo.d.ts @@ -1,6 +1,6 @@ import { KeyValue, WitnessUtxo } from '../../interfaces'; export declare function decode(keyVal: KeyValue): WitnessUtxo; export declare function encode(data: WitnessUtxo): KeyValue; -export declare const expected = "{ script: Buffer; value: number; }"; +export declare const expected = "{ script: Uint8Array; value: bigint; }"; export declare function check(data: any): data is WitnessUtxo; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/input/witnessUtxo.js b/src/esm/lib/converter/input/witnessUtxo.js index 0ceea31..6cdb96b 100644 --- a/src/esm/lib/converter/input/witnessUtxo.js +++ b/src/esm/lib/converter/input/witnessUtxo.js @@ -1,17 +1,20 @@ import { InputTypes } from '../../typeFields.js'; -import { readUInt64LE, writeUInt64LE } from '../tools.js'; -import * as varuint from '../varint.js'; +import * as tools from 'uint8array-tools'; +import * as varuint from 'varuint-bitcoin'; export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode witnessUtxo with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - const value = readUInt64LE(keyVal.value, 0); + const value = tools.readInt64(keyVal.value, 0, 'LE'); let _offset = 8; - const scriptLen = varuint.decode(keyVal.value, _offset); - _offset += varuint.encodingLength(scriptLen); + const { numberValue: scriptLen, bytes } = varuint.decode( + keyVal.value, + _offset, + ); + _offset += bytes; const script = keyVal.value.slice(_offset); if (script.length !== scriptLen) { throw new Error('Decode Error: WITNESS_UTXO script is not proper length'); @@ -23,19 +26,19 @@ export function decode(keyVal) { } export function encode(data) { const { script, value } = data; - const varintLen = varuint.encodingLength(script.length); - const result = Buffer.allocUnsafe(8 + varintLen + script.length); - writeUInt64LE(result, value, 0); + const varuintlen = varuint.encodingLength(script.length); + const result = new Uint8Array(8 + varuintlen + script.length); + tools.writeUInt64(result, 0, BigInt(value), 'LE'); varuint.encode(script.length, result, 8); - script.copy(result, 8 + varintLen); + result.set(script, 8 + varuintlen); return { - key: Buffer.from([InputTypes.WITNESS_UTXO]), + key: Uint8Array.from([InputTypes.WITNESS_UTXO]), value: result, }; } -export const expected = '{ script: Buffer; value: number; }'; +export const expected = '{ script: Uint8Array; value: bigint; }'; export function check(data) { - return Buffer.isBuffer(data.script) && typeof data.value === 'number'; + return data.script instanceof Uint8Array && typeof data.value === 'bigint'; } export function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.witnessUtxo === undefined; diff --git a/src/esm/lib/converter/output/tapTree.d.ts b/src/esm/lib/converter/output/tapTree.d.ts index 06c76e1..f976363 100644 --- a/src/esm/lib/converter/output/tapTree.d.ts +++ b/src/esm/lib/converter/output/tapTree.d.ts @@ -1,6 +1,6 @@ import { KeyValue, TapTree } from '../../interfaces'; export declare function decode(keyVal: KeyValue): TapTree; export declare function encode(tree: TapTree): KeyValue; -export declare const expected = "{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }"; +export declare const expected = "{ leaves: [{ depth: number; leafVersion: number, script: Uint8Array; }] }"; export declare function check(data: any): data is TapTree; export declare function canAdd(currentData: any, newData: any): boolean; diff --git a/src/esm/lib/converter/output/tapTree.js b/src/esm/lib/converter/output/tapTree.js index 2af718e..f30caa1 100644 --- a/src/esm/lib/converter/output/tapTree.js +++ b/src/esm/lib/converter/output/tapTree.js @@ -1,10 +1,12 @@ import { OutputTypes } from '../../typeFields.js'; -import * as varuint from '../varint.js'; +// import * as varuint from '../varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; export function decode(keyVal) { if (keyVal.key[0] !== OutputTypes.TAP_TREE || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapTree with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } let _offset = 0; @@ -12,8 +14,11 @@ export function decode(keyVal) { while (_offset < keyVal.value.length) { const depth = keyVal.value[_offset++]; const leafVersion = keyVal.value[_offset++]; - const scriptLen = varuint.decode(keyVal.value, _offset); - _offset += varuint.encodingLength(scriptLen); + const { numberValue: scriptLen, bytes } = varuint.decode( + keyVal.value, + _offset, + ); + _offset += bytes; data.push({ depth, leafVersion, @@ -24,21 +29,21 @@ export function decode(keyVal) { return { leaves: data }; } export function encode(tree) { - const key = Buffer.from([OutputTypes.TAP_TREE]); + const key = Uint8Array.from([OutputTypes.TAP_TREE]); const bufs = [].concat( ...tree.leaves.map(tapLeaf => [ - Buffer.of(tapLeaf.depth, tapLeaf.leafVersion), - varuint.encode(tapLeaf.script.length), + Uint8Array.of(tapLeaf.depth, tapLeaf.leafVersion), + varuint.encode(BigInt(tapLeaf.script.length)).buffer, tapLeaf.script, ]), ); return { key, - value: Buffer.concat(bufs), + value: tools.concat(bufs), }; } export const expected = - '{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }'; + '{ leaves: [{ depth: number; leafVersion: number, script: Uint8Array; }] }'; export function check(data) { return ( Array.isArray(data.leaves) && @@ -47,7 +52,7 @@ export function check(data) { tapLeaf.depth >= 0 && tapLeaf.depth <= 128 && (tapLeaf.leafVersion & 0xfe) === tapLeaf.leafVersion && - Buffer.isBuffer(tapLeaf.script), + tapLeaf.script instanceof Uint8Array, ) ); } diff --git a/src/esm/lib/converter/shared/bip32Derivation.d.ts b/src/esm/lib/converter/shared/bip32Derivation.d.ts index 6528887..d3b646d 100644 --- a/src/esm/lib/converter/shared/bip32Derivation.d.ts +++ b/src/esm/lib/converter/shared/bip32Derivation.d.ts @@ -1,6 +1,5 @@ -/// import { Bip32Derivation, KeyValue } from '../../interfaces'; -export declare function makeConverter(TYPE_BYTE: number, isValidPubkey?: (pubkey: Buffer) => boolean): { +export declare function makeConverter(TYPE_BYTE: number, isValidPubkey?: (pubkey: Uint8Array) => boolean): { decode: (keyVal: KeyValue) => Bip32Derivation; encode: (data: Bip32Derivation) => KeyValue; check: (data: any) => data is Bip32Derivation; diff --git a/src/esm/lib/converter/shared/bip32Derivation.js b/src/esm/lib/converter/shared/bip32Derivation.js index a19b8d9..0bf45db 100644 --- a/src/esm/lib/converter/shared/bip32Derivation.js +++ b/src/esm/lib/converter/shared/bip32Derivation.js @@ -1,3 +1,4 @@ +import * as tools from 'uint8array-tools'; const range = n => [...Array(n).keys()]; const isValidDERKey = pubkey => (pubkey.length === 33 && [2, 3].includes(pubkey[0])) || @@ -7,14 +8,14 @@ export function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode bip32Derivation with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1); if (!isValidPubkey(pubkey)) { throw new Error( 'Decode Error: bip32Derivation has invalid pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.value.length / 4) % 1 !== 0) { @@ -28,7 +29,7 @@ export function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { path: 'm', }; for (const i of range(keyVal.value.length / 4 - 1)) { - const val = keyVal.value.readUInt32LE(i * 4 + 4); + const val = tools.readUInt32(keyVal.value, i * 4 + 4, 'LE'); const isHard = !!(val & 0x80000000); const idx = val & 0x7fffffff; data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); @@ -36,17 +37,17 @@ export function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { return data; } function encode(data) { - const head = Buffer.from([TYPE_BYTE]); - const key = Buffer.concat([head, data.pubkey]); + const head = Uint8Array.from([TYPE_BYTE]); + const key = tools.concat([head, data.pubkey]); const splitPath = data.path.split('/'); - const value = Buffer.allocUnsafe(splitPath.length * 4); - data.masterFingerprint.copy(value, 0); + const value = new Uint8Array(splitPath.length * 4); + value.set(data.masterFingerprint, 0); let offset = 4; splitPath.slice(1).forEach(level => { const isHard = level.slice(-1) === "'"; let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); if (isHard) num += 0x80000000; - value.writeUInt32LE(num, offset); + tools.writeUInt32(value, offset, num, 'LE'); offset += 4; }); return { @@ -55,21 +56,23 @@ export function makeConverter(TYPE_BYTE, isValidPubkey = isValidDERKey) { }; } const expected = - '{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }'; + '{ masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; }'; function check(data) { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.masterFingerprint) && + data.pubkey instanceof Uint8Array && + data.masterFingerprint instanceof Uint8Array && typeof data.path === 'string' && isValidPubkey(data.pubkey) && data.masterFingerprint.length === 4 ); } function canAddToArray(array, item, dupeSet) { - const dupeString = item.pubkey.toString('hex'); + const dupeString = tools.toHex(item.pubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); - return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + return ( + array.filter(v => tools.compare(v.pubkey, item.pubkey) === 0).length === 0 + ); } return { decode, diff --git a/src/esm/lib/converter/shared/checkPubkey.d.ts b/src/esm/lib/converter/shared/checkPubkey.d.ts index 4b282b3..0966a06 100644 --- a/src/esm/lib/converter/shared/checkPubkey.d.ts +++ b/src/esm/lib/converter/shared/checkPubkey.d.ts @@ -1,3 +1,2 @@ -/// import { KeyValue } from '../../interfaces'; -export declare function makeChecker(pubkeyTypes: number[]): (keyVal: KeyValue) => Buffer | undefined; +export declare function makeChecker(pubkeyTypes: number[]): (keyVal: KeyValue) => Uint8Array | undefined; diff --git a/src/esm/lib/converter/shared/checkPubkey.js b/src/esm/lib/converter/shared/checkPubkey.js index 41e1fe3..6ffd454 100644 --- a/src/esm/lib/converter/shared/checkPubkey.js +++ b/src/esm/lib/converter/shared/checkPubkey.js @@ -1,3 +1,4 @@ +import * as tools from 'uint8array-tools'; export function makeChecker(pubkeyTypes) { return checkPubkey; function checkPubkey(keyVal) { @@ -9,7 +10,7 @@ export function makeChecker(pubkeyTypes) { ![2, 3, 4].includes(pubkey[0]) ) { throw new Error( - 'Format Error: invalid pubkey in key 0x' + keyVal.key.toString('hex'), + 'Format Error: invalid pubkey in key 0x' + tools.toHex(keyVal.key), ); } } diff --git a/src/esm/lib/converter/shared/redeemScript.js b/src/esm/lib/converter/shared/redeemScript.js index 075f6c5..8e64416 100644 --- a/src/esm/lib/converter/shared/redeemScript.js +++ b/src/esm/lib/converter/shared/redeemScript.js @@ -1,23 +1,24 @@ +import * as tools from 'uint8array-tools'; export function makeConverter(TYPE_BYTE) { function decode(keyVal) { if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode redeemScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } function encode(data) { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value: data, }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } function canAdd(currentData, newData) { return !!currentData && !!newData && currentData.redeemScript === undefined; diff --git a/src/esm/lib/converter/shared/tapBip32Derivation.js b/src/esm/lib/converter/shared/tapBip32Derivation.js index fa58d4b..b25bbe7 100644 --- a/src/esm/lib/converter/shared/tapBip32Derivation.js +++ b/src/esm/lib/converter/shared/tapBip32Derivation.js @@ -1,41 +1,43 @@ -import * as varuint from '../varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; import * as bip32Derivation from './bip32Derivation.js'; const isValidBIP340Key = pubkey => pubkey.length === 32; export function makeConverter(TYPE_BYTE) { const parent = bip32Derivation.makeConverter(TYPE_BYTE, isValidBIP340Key); function decode(keyVal) { - const nHashes = varuint.decode(keyVal.value); - const nHashesLen = varuint.encodingLength(nHashes); + const { numberValue: nHashes, bytes: nHashesLen } = varuint.decode( + keyVal.value, + ); const base = parent.decode({ key: keyVal.key, - value: keyVal.value.slice(nHashesLen + nHashes * 32), + value: keyVal.value.slice(nHashesLen + Number(nHashes) * 32), }); - const leafHashes = new Array(nHashes); + const leafHashes = new Array(Number(nHashes)); for (let i = 0, _offset = nHashesLen; i < nHashes; i++, _offset += 32) { leafHashes[i] = keyVal.value.slice(_offset, _offset + 32); } - return Object.assign({}, base, { leafHashes }); + return { ...base, leafHashes }; } function encode(data) { const base = parent.encode(data); const nHashesLen = varuint.encodingLength(data.leafHashes.length); - const nHashesBuf = Buffer.allocUnsafe(nHashesLen); + const nHashesBuf = new Uint8Array(nHashesLen); varuint.encode(data.leafHashes.length, nHashesBuf); - const value = Buffer.concat([nHashesBuf, ...data.leafHashes, base.value]); - return Object.assign({}, base, { value }); + const value = tools.concat([nHashesBuf, ...data.leafHashes, base.value]); + return { ...base, value }; } const expected = '{ ' + - 'masterFingerprint: Buffer; ' + - 'pubkey: Buffer; ' + + 'masterFingerprint: Uint8Array; ' + + 'pubkey: Uint8Array; ' + 'path: string; ' + - 'leafHashes: Buffer[]; ' + + 'leafHashes: Uint8Array[]; ' + '}'; function check(data) { return ( Array.isArray(data.leafHashes) && data.leafHashes.every( - leafHash => Buffer.isBuffer(leafHash) && leafHash.length === 32, + leafHash => leafHash instanceof Uint8Array && leafHash.length === 32, ) && parent.check(data) ); diff --git a/src/esm/lib/converter/shared/tapInternalKey.js b/src/esm/lib/converter/shared/tapInternalKey.js index 772027c..252af20 100644 --- a/src/esm/lib/converter/shared/tapInternalKey.js +++ b/src/esm/lib/converter/shared/tapInternalKey.js @@ -1,9 +1,10 @@ +import * as tools from 'uint8array-tools'; export function makeConverter(TYPE_BYTE) { function decode(keyVal) { if (keyVal.key[0] !== TYPE_BYTE || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapInternalKey with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.value.length !== 32) { @@ -14,12 +15,12 @@ export function makeConverter(TYPE_BYTE) { return keyVal.value; } function encode(value) { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data) && data.length === 32; + return data instanceof Uint8Array && data.length === 32; } function canAdd(currentData, newData) { return ( diff --git a/src/esm/lib/converter/shared/witnessScript.js b/src/esm/lib/converter/shared/witnessScript.js index 56d4ab8..0a18693 100644 --- a/src/esm/lib/converter/shared/witnessScript.js +++ b/src/esm/lib/converter/shared/witnessScript.js @@ -1,23 +1,24 @@ +import * as tools from 'uint8array-tools'; export function makeConverter(TYPE_BYTE) { function decode(keyVal) { if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode witnessScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } function encode(data) { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value: data, }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data) { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } function canAdd(currentData, newData) { return ( diff --git a/src/esm/lib/converter/tools.d.ts b/src/esm/lib/converter/tools.d.ts index 53866c8..0fbb8a6 100644 --- a/src/esm/lib/converter/tools.d.ts +++ b/src/esm/lib/converter/tools.d.ts @@ -1,8 +1,5 @@ -/// import { KeyValue } from '../interfaces'; export declare const range: (n: number) => number[]; -export declare function reverseBuffer(buffer: Buffer): Buffer; -export declare function keyValsToBuffer(keyVals: KeyValue[]): Buffer; -export declare function keyValToBuffer(keyVal: KeyValue): Buffer; -export declare function readUInt64LE(buffer: Buffer, offset: number): number; -export declare function writeUInt64LE(buffer: Buffer, value: number, offset: number): number; +export declare function reverseBuffer(buffer: Uint8Array): Uint8Array; +export declare function keyValsToBuffer(keyVals: KeyValue[]): Uint8Array; +export declare function keyValToBuffer(keyVal: KeyValue): Uint8Array; diff --git a/src/esm/lib/converter/tools.js b/src/esm/lib/converter/tools.js index f484d69..07ea8ad 100644 --- a/src/esm/lib/converter/tools.js +++ b/src/esm/lib/converter/tools.js @@ -1,4 +1,5 @@ -import * as varuint from './varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; export const range = n => [...Array(n).keys()]; export function reverseBuffer(buffer) { if (buffer.length < 1) return buffer; @@ -14,43 +15,45 @@ export function reverseBuffer(buffer) { } export function keyValsToBuffer(keyVals) { const buffers = keyVals.map(keyValToBuffer); - buffers.push(Buffer.from([0])); - return Buffer.concat(buffers); + buffers.push(Uint8Array.from([0])); + return tools.concat(buffers); } export function keyValToBuffer(keyVal) { const keyLen = keyVal.key.length; const valLen = keyVal.value.length; const keyVarIntLen = varuint.encodingLength(keyLen); const valVarIntLen = varuint.encodingLength(valLen); - const buffer = Buffer.allocUnsafe( - keyVarIntLen + keyLen + valVarIntLen + valLen, - ); + const buffer = new Uint8Array(keyVarIntLen + keyLen + valVarIntLen + valLen); varuint.encode(keyLen, buffer, 0); - keyVal.key.copy(buffer, keyVarIntLen); + buffer.set(keyVal.key, keyVarIntLen); varuint.encode(valLen, buffer, keyVarIntLen + keyLen); - keyVal.value.copy(buffer, keyVarIntLen + keyLen + valVarIntLen); + buffer.set(keyVal.value, keyVarIntLen + keyLen + valVarIntLen); return buffer; } // https://github.com/feross/buffer/blob/master/index.js#L1127 -function verifuint(value, max) { - if (typeof value !== 'number') - throw new Error('cannot write a non-number as a number'); - if (value < 0) - throw new Error('specified a negative value for writing an unsigned value'); - if (value > max) throw new Error('RangeError: value out of range'); - if (Math.floor(value) !== value) - throw new Error('value has a fractional component'); -} -export function readUInt64LE(buffer, offset) { - const a = buffer.readUInt32LE(offset); - let b = buffer.readUInt32LE(offset + 4); - b *= 0x100000000; - verifuint(b + a, 0x001fffffffffffff); - return b + a; -} -export function writeUInt64LE(buffer, value, offset) { - verifuint(value, 0x001fffffffffffff); - buffer.writeInt32LE(value & -1, offset); - buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); - return offset + 8; -} +// function verifuint(value: number, max: number): void { +// if (typeof value !== 'number') +// throw new Error('cannot write a non-number as a number'); +// if (value < 0) +// throw new Error('specified a negative value for writing an unsigned value'); +// if (value > max) throw new Error('RangeError: value out of range'); +// if (Math.floor(value) !== value) +// throw new Error('value has a fractional component'); +// } +// export function readUInt64LE(buffer: Buffer, offset: number): number { +// const a = buffer.readUInt32LE(offset); +// let b = buffer.readUInt32LE(offset + 4); +// b *= 0x100000000; +// verifuint(b + a, 0x001fffffffffffff); +// return b + a; +// } +// export function writeUInt64LE( +// buffer: Buffer, +// value: number, +// offset: number, +// ): number { +// verifuint(value, 0x001fffffffffffff); +// buffer.writeInt32LE(value & -1, offset); +// buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); +// return offset + 8; +// } diff --git a/src/esm/lib/interfaces.d.ts b/src/esm/lib/interfaces.d.ts index a445c7d..9a5112e 100644 --- a/src/esm/lib/interfaces.d.ts +++ b/src/esm/lib/interfaces.d.ts @@ -1,5 +1,4 @@ -/// -export declare type TransactionFromBuffer = (buffer: Buffer) => Transaction; +export declare type TransactionFromBuffer = (buffer: Uint8Array) => Transaction; export interface Transaction { getInputOutputCounts(): { inputCount: number; @@ -7,11 +6,11 @@ export interface Transaction { }; addInput(objectArg: any): void; addOutput(objectArg: any): void; - toBuffer(): Buffer; + toBuffer(): Uint8Array; } export interface KeyValue { - key: Buffer; - value: Buffer; + key: Uint8Array; + value: Uint8Array; } export interface PsbtGlobal extends PsbtGlobalUpdate { unsignedTx: Transaction; @@ -59,57 +58,57 @@ export interface PsbtOutputExtended extends PsbtOutput { [index: string]: any; } export interface GlobalXpub { - extendedPubkey: Buffer; - masterFingerprint: Buffer; + extendedPubkey: Uint8Array; + masterFingerprint: Uint8Array; path: string; } export interface PartialSig { - pubkey: Buffer; - signature: Buffer; + pubkey: Uint8Array; + signature: Uint8Array; } export interface Bip32Derivation { - masterFingerprint: Buffer; - pubkey: Buffer; + masterFingerprint: Uint8Array; + pubkey: Uint8Array; path: string; } export interface WitnessUtxo { - script: Buffer; - value: number; + script: Uint8Array; + value: bigint; } -export declare type NonWitnessUtxo = Buffer; +export declare type NonWitnessUtxo = Uint8Array; export declare type SighashType = number; -export declare type RedeemScript = Buffer; -export declare type WitnessScript = Buffer; -export declare type FinalScriptSig = Buffer; -export declare type FinalScriptWitness = Buffer; +export declare type RedeemScript = Uint8Array; +export declare type WitnessScript = Uint8Array; +export declare type FinalScriptSig = Uint8Array; +export declare type FinalScriptWitness = Uint8Array; export declare type PorCommitment = string; -export declare type TapKeySig = Buffer; +export declare type TapKeySig = Uint8Array; export interface TapScriptSig extends PartialSig { - leafHash: Buffer; + leafHash: Uint8Array; } interface TapScript { leafVersion: number; - script: Buffer; + script: Uint8Array; } -export declare type ControlBlock = Buffer; +export declare type ControlBlock = Uint8Array; export interface TapLeafScript extends TapScript { controlBlock: ControlBlock; } export interface TapBip32Derivation extends Bip32Derivation { - leafHashes: Buffer[]; + leafHashes: Uint8Array[]; } -export declare type TapInternalKey = Buffer; -export declare type TapMerkleRoot = Buffer; +export declare type TapInternalKey = Uint8Array; +export declare type TapMerkleRoot = Uint8Array; export interface TapLeaf extends TapScript { depth: number; } export interface TapTree { leaves: TapLeaf[]; } -export declare type TransactionIOCountGetter = (txBuffer: Buffer) => { +export declare type TransactionIOCountGetter = (txBuffer: Uint8Array) => { inputCount: number; outputCount: number; }; -export declare type TransactionVersionSetter = (version: number, txBuffer: Buffer) => Buffer; -export declare type TransactionLocktimeSetter = (locktime: number, txBuffer: Buffer) => Buffer; +export declare type TransactionVersionSetter = (version: number, txBuffer: Uint8Array) => Uint8Array; +export declare type TransactionLocktimeSetter = (locktime: number, txBuffer: Uint8Array) => Uint8Array; export {}; diff --git a/src/esm/lib/parser/fromBuffer.d.ts b/src/esm/lib/parser/fromBuffer.d.ts index 87cc125..f59bc3b 100644 --- a/src/esm/lib/parser/fromBuffer.d.ts +++ b/src/esm/lib/parser/fromBuffer.d.ts @@ -1,12 +1,11 @@ -/// import { KeyValue, Transaction, TransactionFromBuffer } from '../interfaces'; import { PsbtAttributes } from './index.js'; -export declare function psbtFromBuffer(buffer: Buffer, txGetter: TransactionFromBuffer): PsbtAttributes; +export declare function psbtFromBuffer(buffer: Uint8Array, txGetter: TransactionFromBuffer): PsbtAttributes; interface PsbtFromKeyValsArg { globalMapKeyVals: KeyValue[]; inputKeyVals: KeyValue[][]; outputKeyVals: KeyValue[][]; } -export declare function checkKeyBuffer(type: string, keyBuf: Buffer, keyNum: number): void; +export declare function checkKeyBuffer(type: string, keyBuf: Uint8Array, keyNum: number): void; export declare function psbtFromKeyVals(unsignedTx: Transaction, { globalMapKeyVals, inputKeyVals, outputKeyVals }: PsbtFromKeyValsArg): PsbtAttributes; export {}; diff --git a/src/esm/lib/parser/fromBuffer.js b/src/esm/lib/parser/fromBuffer.js index 26f91d3..d423142 100644 --- a/src/esm/lib/parser/fromBuffer.js +++ b/src/esm/lib/parser/fromBuffer.js @@ -1,23 +1,25 @@ import * as convert from '../converter/index.js'; import { range } from '../converter/tools.js'; -import * as varuint from '../converter/varint.js'; +// import * as varuint from '../converter/varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; import { GlobalTypes, InputTypes, OutputTypes } from '../typeFields.js'; export function psbtFromBuffer(buffer, txGetter) { let offset = 0; function varSlice() { - const keyLen = varuint.decode(buffer, offset); - offset += varuint.encodingLength(keyLen); - const key = buffer.slice(offset, offset + keyLen); - offset += keyLen; + const { numberValue: keyLen, bytes } = varuint.decode(buffer, offset); + offset += bytes; + const key = buffer.slice(offset, offset + Number(keyLen)); + offset += Number(keyLen); return key; } function readUInt32BE() { - const num = buffer.readUInt32BE(offset); + const num = tools.readUInt32(buffer, offset, 'BE'); offset += 4; return num; } function readUInt8() { - const num = buffer.readUInt8(offset); + const num = tools.readUInt8(buffer, offset); offset += 1; return num; } @@ -33,7 +35,7 @@ export function psbtFromBuffer(buffer, txGetter) { if (offset >= buffer.length) { throw new Error('Format Error: Unexpected End of PSBT'); } - const isEnd = buffer.readUInt8(offset) === 0; + const isEnd = tools.readUInt8(buffer, offset) === 0; if (isEnd) { offset++; } @@ -51,7 +53,7 @@ export function psbtFromBuffer(buffer, txGetter) { const globalKeyIndex = {}; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (globalKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for global keymap: key ' + hexKey, @@ -77,7 +79,7 @@ export function psbtFromBuffer(buffer, txGetter) { const input = []; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (inputKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for each input: ' + @@ -97,7 +99,7 @@ export function psbtFromBuffer(buffer, txGetter) { const output = []; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (outputKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for each output: ' + @@ -119,9 +121,10 @@ export function psbtFromBuffer(buffer, txGetter) { }); } export function checkKeyBuffer(type, keyBuf, keyNum) { - if (!keyBuf.equals(Buffer.from([keyNum]))) { + if (tools.compare(keyBuf, Uint8Array.from([keyNum]))) { throw new Error( - `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + // `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + `Format Error: Invalid ${type} key: ${tools.toHex(keyBuf)}`, ); } } diff --git a/src/esm/lib/parser/toBuffer.d.ts b/src/esm/lib/parser/toBuffer.d.ts index 04d0e19..4e7b230 100644 --- a/src/esm/lib/parser/toBuffer.d.ts +++ b/src/esm/lib/parser/toBuffer.d.ts @@ -1,7 +1,6 @@ -/// import { KeyValue } from '../interfaces'; import { PsbtAttributes } from './index.js'; -export declare function psbtToBuffer({ globalMap, inputs, outputs, }: PsbtAttributes): Buffer; +export declare function psbtToBuffer({ globalMap, inputs, outputs, }: PsbtAttributes): Uint8Array; export declare function psbtToKeyVals({ globalMap, inputs, outputs, }: PsbtAttributes): { globalKeyVals: KeyValue[]; inputKeyVals: KeyValue[][]; diff --git a/src/esm/lib/parser/toBuffer.js b/src/esm/lib/parser/toBuffer.js index 61129a3..054c654 100644 --- a/src/esm/lib/parser/toBuffer.js +++ b/src/esm/lib/parser/toBuffer.js @@ -1,5 +1,6 @@ import * as convert from '../converter/index.js'; import { keyValsToBuffer } from '../converter/tools.js'; +import * as tools from 'uint8array-tools'; export function psbtToBuffer({ globalMap, inputs, outputs }) { const { globalKeyVals, inputKeyVals, outputKeyVals } = psbtToKeyVals({ globalMap, @@ -8,17 +9,19 @@ export function psbtToBuffer({ globalMap, inputs, outputs }) { }); const globalBuffer = keyValsToBuffer(globalKeyVals); const keyValsOrEmptyToBuffer = keyVals => - keyVals.length === 0 ? [Buffer.from([0])] : keyVals.map(keyValsToBuffer); + keyVals.length === 0 + ? [Uint8Array.from([0])] + : keyVals.map(keyValsToBuffer); const inputBuffers = keyValsOrEmptyToBuffer(inputKeyVals); const outputBuffers = keyValsOrEmptyToBuffer(outputKeyVals); - const header = Buffer.allocUnsafe(5); - header.writeUIntBE(0x70736274ff, 0, 5); - return Buffer.concat( + const header = new Uint8Array(5); + header.set([0x70, 0x73, 0x62, 0x74, 0xff], 0); + return tools.concat( [header, globalBuffer].concat(inputBuffers, outputBuffers), ); } const sortKeyVals = (a, b) => { - return a.key.compare(b.key); + return tools.compare(a.key, b.key); }; function keyValsFromMap(keyValMap, converterFactory) { const keyHexSet = new Set(); @@ -31,7 +34,7 @@ function keyValsFromMap(keyValMap, converterFactory) { const encodedKeyVals = (Array.isArray(value) ? value : [value]).map( converter.encode, ); - const keyHexes = encodedKeyVals.map(kv => kv.key.toString('hex')); + const keyHexes = encodedKeyVals.map(kv => tools.toHex(kv.key)); keyHexes.forEach(hex => { if (keyHexSet.has(hex)) throw new Error('Serialize Error: Duplicate key: ' + hex); @@ -42,7 +45,7 @@ function keyValsFromMap(keyValMap, converterFactory) { // Get other keyVals that have not yet been gotten const otherKeyVals = keyValMap.unknownKeyVals ? keyValMap.unknownKeyVals.filter(keyVal => { - return !keyHexSet.has(keyVal.key.toString('hex')); + return !keyHexSet.has(tools.toHex(keyVal.key)); }) : []; return keyVals.concat(otherKeyVals).sort(sortKeyVals); diff --git a/src/esm/lib/psbt.d.ts b/src/esm/lib/psbt.d.ts index 184758c..7044337 100644 --- a/src/esm/lib/psbt.d.ts +++ b/src/esm/lib/psbt.d.ts @@ -1,16 +1,15 @@ -/// -import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, Transaction, TransactionFromBuffer } from './interfaces'; +import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, Transaction, TransactionFromBuffer } from './interfaces.js'; export declare class Psbt { static fromBase64(this: T, data: string, txFromBuffer: TransactionFromBuffer): InstanceType; static fromHex(this: T, data: string, txFromBuffer: TransactionFromBuffer): InstanceType; - static fromBuffer(this: T, buffer: Buffer, txFromBuffer: TransactionFromBuffer): InstanceType; + static fromBuffer(this: T, buffer: Uint8Array, txFromBuffer: TransactionFromBuffer): InstanceType; readonly inputs: PsbtInput[]; readonly outputs: PsbtOutput[]; readonly globalMap: PsbtGlobal; constructor(tx: Transaction); toBase64(): string; toHex(): string; - toBuffer(): Buffer; + toBuffer(): Uint8Array; updateGlobal(updateData: PsbtGlobalUpdate): this; updateInput(inputIndex: number, updateData: PsbtInputUpdate): this; updateOutput(outputIndex: number, updateData: PsbtOutputUpdate): this; @@ -21,5 +20,7 @@ export declare class Psbt { addOutput(outputData: PsbtOutputExtended): this; clearFinalizedInput(inputIndex: number): this; combine(...those: this[]): this; - getTransaction(): Buffer; + getTransaction(): Uint8Array; } +export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo } from "./interfaces.js"; +export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput } from "./utils.js"; diff --git a/src/esm/lib/psbt.js b/src/esm/lib/psbt.js index 2f2369b..b4c64d9 100644 --- a/src/esm/lib/psbt.js +++ b/src/esm/lib/psbt.js @@ -13,6 +13,7 @@ import { updateInput, updateOutput, } from './utils.js'; +import * as tools from 'uint8array-tools'; export class Psbt { constructor(tx) { this.inputs = []; @@ -22,11 +23,11 @@ export class Psbt { }; } static fromBase64(data, txFromBuffer) { - const buffer = Buffer.from(data, 'base64'); + const buffer = tools.fromBase64(data); return this.fromBuffer(buffer, txFromBuffer); } static fromHex(data, txFromBuffer) { - const buffer = Buffer.from(data, 'hex'); + const buffer = tools.fromHex(data); return this.fromBuffer(buffer, txFromBuffer); } static fromBuffer(buffer, txFromBuffer) { @@ -37,11 +38,11 @@ export class Psbt { } toBase64() { const buffer = this.toBuffer(); - return buffer.toString('base64'); + return tools.toBase64(buffer); } toHex() { const buffer = this.toBuffer(); - return buffer.toString('hex'); + return tools.toHex(buffer); } toBuffer() { return psbtToBuffer(this); @@ -146,3 +147,17 @@ export class Psbt { return this.globalMap.unsignedTx.toBuffer(); } } +export { + addInputAttributes, + addOutputAttributes, + checkForInput, + checkForOutput, + checkHasKey, + defaultLocktimeSetter, + defaultVersionSetter, + getEnumLength, + inputCheckUncleanFinalized, + updateGlobal, + updateInput, + updateOutput, +} from './utils.js'; diff --git a/src/esm/lib/utils.d.ts b/src/esm/lib/utils.d.ts index 3ba2cda..40f5e34 100644 --- a/src/esm/lib/utils.d.ts +++ b/src/esm/lib/utils.d.ts @@ -1,5 +1,4 @@ -/// -import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate } from './interfaces'; +import { KeyValue, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate } from './interfaces.js'; export declare function checkForInput(inputs: PsbtInput[], inputIndex: number): PsbtInput; export declare function checkForOutput(outputs: PsbtOutput[], outputIndex: number): PsbtOutput; export declare function checkHasKey(checkKeyVal: KeyValue, keyVals: KeyValue[] | undefined, enumLength: number): void; @@ -10,5 +9,5 @@ export declare const updateInput: (updateData: PsbtInputUpdate, mainData: PsbtIn export declare const updateOutput: (updateData: PsbtOutputUpdate, mainData: PsbtOutput) => void; export declare function addInputAttributes(inputs: PsbtInput[], data: any): void; export declare function addOutputAttributes(outputs: PsbtOutput[], data: any): void; -export declare function defaultVersionSetter(version: number, txBuf: Buffer): Buffer; -export declare function defaultLocktimeSetter(locktime: number, txBuf: Buffer): Buffer; +export declare function defaultVersionSetter(version: number, txBuf: Uint8Array): Uint8Array; +export declare function defaultLocktimeSetter(locktime: number, txBuf: Uint8Array): Uint8Array; diff --git a/src/esm/lib/utils.js b/src/esm/lib/utils.js index 1866586..70acaab 100644 --- a/src/esm/lib/utils.js +++ b/src/esm/lib/utils.js @@ -1,4 +1,5 @@ import * as converter from './converter/index.js'; +import * as tools from 'uint8array-tools'; export function checkForInput(inputs, inputIndex) { const input = inputs[inputIndex]; if (input === undefined) throw new Error(`No input #${inputIndex}`); @@ -17,9 +18,10 @@ export function checkHasKey(checkKeyVal, keyVals, enumLength) { } if ( keyVals && - keyVals.filter(kv => kv.key.equals(checkKeyVal.key)).length !== 0 + keyVals.filter(kv => tools.compare(kv.key, checkKeyVal.key) === 0) + .length !== 0 ) { - throw new Error(`Duplicate Key: ${checkKeyVal.key.toString('hex')}`); + throw new Error(`Duplicate Key: ${tools.toHex(checkKeyVal.key)}`); } } export function getEnumLength(myenum) { @@ -55,6 +57,7 @@ function throwForUpdateMaker(typeName, name, expected, data) { } function updateMaker(typeName) { return (updateData, mainData) => { + // @ts-ignore for (const name of Object.keys(updateData)) { // @ts-ignore const data = updateData[name]; @@ -112,16 +115,16 @@ export function addOutputAttributes(outputs, data) { updateOutput(data, output); } export function defaultVersionSetter(version, txBuf) { - if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { + if (!(txBuf instanceof Uint8Array) || txBuf.length < 4) { throw new Error('Set Version: Invalid Transaction'); } - txBuf.writeUInt32LE(version, 0); + tools.writeUInt32(txBuf, 0, version, 'LE'); return txBuf; } export function defaultLocktimeSetter(locktime, txBuf) { - if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { + if (!(txBuf instanceof Uint8Array) || txBuf.length < 4) { throw new Error('Set Locktime: Invalid Transaction'); } - txBuf.writeUInt32LE(locktime, txBuf.length - 4); + tools.writeUInt32(txBuf, txBuf.length - 4, locktime, 'LE'); return txBuf; } diff --git a/src/esm/tests/addInputOutput.js b/src/esm/tests/addInputOutput.js index a1512eb..eb778c1 100644 --- a/src/esm/tests/addInputOutput.js +++ b/src/esm/tests/addInputOutput.js @@ -36,11 +36,5 @@ tape('Test: add Input Output', t => { 'e18870f2c297fbfca54c5c6f645c7745a5b66eda87000000000000000000', ); t.equal(hex, hex2); - // console.log(jsonA1); - // console.log(jsonA2); - // console.log(jsonB1); - // console.log(jsonB2); - // t.notDeepEqual(JSON.parse(jsonA1), JSON.parse(jsonB1)); - // t.deepEqual(JSON.parse(jsonA2), JSON.parse(jsonB2)); t.end(); }); diff --git a/src/esm/tests/combine.js b/src/esm/tests/combine.js index 6ebffec..f5c1191 100644 --- a/src/esm/tests/combine.js +++ b/src/esm/tests/combine.js @@ -10,10 +10,6 @@ for (const f of fixtures) { psbts[0].combine(psbts[1]); const jsonB1 = jsonify(psbts[0]); const jsonB2 = jsonify(psbts[1]); - // console.log(jsonA1); - // console.log(jsonA2); - // console.log(jsonB1); - // console.log(jsonB2); t.notDeepEqual(JSON.parse(jsonA1), JSON.parse(jsonB1)); t.deepEqual(JSON.parse(jsonA2), JSON.parse(jsonB2)); t.equal(psbts[0].toHex(), f.result); @@ -26,6 +22,8 @@ function jsonify(parsed) { (key, value) => { return key !== undefined && value.type === 'Buffer' ? Buffer.from(value.data).toString('hex') + : typeof value === 'bigint' + ? value.toString() : value; }, 2, diff --git a/src/esm/tests/first.js b/src/esm/tests/first.js index 9f24aba..0667d29 100644 --- a/src/esm/tests/first.js +++ b/src/esm/tests/first.js @@ -2,6 +2,7 @@ import tape from 'tape'; import { Psbt } from '../lib/psbt.js'; import { fixtures } from './fixtures/first.js'; import { transactionFromBuffer } from './utils/txTools.js'; +import * as tools from 'uint8array-tools'; for (const f of fixtures) { tape('Test: ' + f.description, t => { const parsed = Psbt.fromHex(f.input, transactionFromBuffer); @@ -22,8 +23,11 @@ function jsonify(parsed) { return JSON.stringify( parsed, (key, value) => { - return key !== undefined && value !== undefined && value.type === 'Buffer' - ? Buffer.from(value.data).toString('hex') + return (key !== undefined && + value !== undefined && + value instanceof Uint8Array) || + value.type === 'Buffer' + ? tools.toHex(value) : value; }, 2, diff --git a/src/esm/tests/fixtures/create.d.ts b/src/esm/tests/fixtures/create.d.ts index 9bf70d4..716102b 100644 --- a/src/esm/tests/fixtures/create.d.ts +++ b/src/esm/tests/fixtures/create.d.ts @@ -8,7 +8,7 @@ export declare const fixtures: { }[]; addOutputs: { script: Buffer; - value: number; + value: bigint; }[]; updateInputData: ({ nonWitnessUtxo: Buffer; @@ -23,7 +23,7 @@ export declare const fixtures: { } | { witnessUtxo: { script: Buffer; - value: number; + value: bigint; }; redeemScript: Buffer; witnessScript: Buffer; diff --git a/src/esm/tests/fixtures/create.js b/src/esm/tests/fixtures/create.js index 504c4ba..8ce4482 100644 --- a/src/esm/tests/fixtures/create.js +++ b/src/esm/tests/fixtures/create.js @@ -18,11 +18,11 @@ export const fixtures = [ addOutputs: [ { script: b('0014d85c2b71d0060b09c9886aeb815e50991dda124d'), - value: 149990000, + value: 149990000n, }, { script: b('001400aea9a2e5f0f876a588df5546e8742d1d87008f'), - value: 100000000, + value: 100000000n, }, ], updateInputData: [ @@ -60,7 +60,7 @@ export const fixtures = [ { witnessUtxo: { script: b('a914b7f5faf40e3d40a5a459b1db3535f2b72fa921e887'), - value: 200000000, + value: 200000000n, }, redeemScript: b( '00208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903', diff --git a/src/esm/tests/fixtures/keyValsToPsbt.js b/src/esm/tests/fixtures/keyValsToPsbt.js index e4b4571..da7816e 100644 --- a/src/esm/tests/fixtures/keyValsToPsbt.js +++ b/src/esm/tests/fixtures/keyValsToPsbt.js @@ -1,4 +1,6 @@ +// import * as tools from 'uint8array-tools'; const b = hex => Buffer.from(hex, 'hex'); +// const b = (hex: string): Uint8Array => tools.fromHex(hex); export const fixtures = [ { data: { diff --git a/src/esm/tests/fixtures/methods.js b/src/esm/tests/fixtures/methods.js index 4346f61..80a0b7f 100644 --- a/src/esm/tests/fixtures/methods.js +++ b/src/esm/tests/fixtures/methods.js @@ -432,14 +432,14 @@ export const fixtures = { ], exception: 'Data for global key globalXpub is incorrect: Expected { ' + - 'masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; } and got', + 'masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; } and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { nonWitnessUtxo: 'blah' }], exception: - 'Data for input key nonWitnessUtxo is incorrect: Expected Buffer and got', + 'Data for input key nonWitnessUtxo is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', @@ -507,7 +507,7 @@ export const fixtures = { ], exception: 'Data for input key witnessUtxo is incorrect: Expected { ' + - 'script: Buffer; value: number; } and got', + 'script: Uint8Array; value: number; } and got', }, { method: 'updateInput', @@ -532,7 +532,7 @@ export const fixtures = { ], exception: 'Data for input key partialSig is incorrect: Expected { pubkey: ' + - 'Buffer; signature: Buffer; } and got', + 'Uint8Array; signature: Uint8Array; } and got', }, { method: 'updateInput', @@ -546,14 +546,14 @@ export const fixtures = { addInputOutput: true, args: [0, { redeemScript: 'a' }], exception: - 'Data for input key redeemScript is incorrect: Expected Buffer and got', + 'Data for input key redeemScript is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { witnessScript: 'a' }], exception: - 'Data for input key witnessScript is incorrect: Expected Buffer and got', + 'Data for input key witnessScript is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', @@ -570,21 +570,21 @@ export const fixtures = { ], exception: 'Data for input key bip32Derivation is incorrect: Expected { ' + - 'masterFingerprint: Buffer; pubkey: Buffer; path: string; } and got', + 'masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; } and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { finalScriptSig: 8 }], exception: - 'Data for input key finalScriptSig is incorrect: Expected Buffer and got', + 'Data for input key finalScriptSig is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { finalScriptWitness: 8 }], exception: - 'Data for input key finalScriptWitness is incorrect: Expected Buffer and got', + 'Data for input key finalScriptWitness is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', @@ -598,14 +598,14 @@ export const fixtures = { addInputOutput: true, args: [0, { redeemScript: 8 }], exception: - 'Data for output key redeemScript is incorrect: Expected Buffer and got', + 'Data for output key redeemScript is incorrect: Expected Uint8Array and got', }, { method: 'updateOutput', addInputOutput: true, args: [0, { witnessScript: 8 }], exception: - 'Data for output key witnessScript is incorrect: Expected Buffer and got', + 'Data for output key witnessScript is incorrect: Expected Uint8Array and got', }, { method: 'updateOutput', @@ -622,7 +622,7 @@ export const fixtures = { ], exception: 'Data for output key bip32Derivation is incorrect: Expected { ' + - 'masterFingerprint: Buffer; pubkey: Buffer; path: string; } and got', + 'masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; } and got', }, { method: 'updateInput', diff --git a/src/esm/tests/fixtures/update.d.ts b/src/esm/tests/fixtures/update.d.ts index 5cd041d..1cc0435 100644 --- a/src/esm/tests/fixtures/update.d.ts +++ b/src/esm/tests/fixtures/update.d.ts @@ -6,7 +6,7 @@ export declare const fixtures: ({ nonWitnessUtxo: Buffer; witnessUtxo: { script: Buffer; - value: number; + value: bigint; }; redeemScript: Buffer; bip32Derivation: { @@ -18,7 +18,7 @@ export declare const fixtures: ({ } | { witnessUtxo: { script: Buffer; - value: number; + value: bigint; }; redeemScript: Buffer; witnessScript: Buffer; diff --git a/src/esm/tests/fixtures/update.js b/src/esm/tests/fixtures/update.js index b43c233..fe23e0c 100644 --- a/src/esm/tests/fixtures/update.js +++ b/src/esm/tests/fixtures/update.js @@ -20,7 +20,7 @@ export const fixtures = [ ), witnessUtxo: { script: b('0014ce2ef55e561be15ef65dcc79f998117e142d6016'), - value: 10413, + value: 10413n, }, redeemScript: b( '5221029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96' + @@ -47,7 +47,7 @@ export const fixtures = [ { witnessUtxo: { script: b('a914b7f5faf40e3d40a5a459b1db3535f2b72fa921e887'), - value: 200000000, + value: 200000000n, }, redeemScript: b( '00208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903', diff --git a/src/esm/tests/utils/txTools.d.ts b/src/esm/tests/utils/txTools.d.ts index ef5d530..50ad818 100644 --- a/src/esm/tests/utils/txTools.d.ts +++ b/src/esm/tests/utils/txTools.d.ts @@ -5,7 +5,7 @@ export declare function getDefaultTx(version?: number): Transaction; export declare const transactionFromBuffer: TransactionFromBuffer; export declare class Transaction implements ITransaction { tx: BTransaction; - constructor(buffer: Buffer); + constructor(buffer: Uint8Array); getInputOutputCounts(): { inputCount: number; outputCount: number; diff --git a/src/esm/tests/utils/txTools.js b/src/esm/tests/utils/txTools.js index 36a5cc1..82fa399 100644 --- a/src/esm/tests/utils/txTools.js +++ b/src/esm/tests/utils/txTools.js @@ -8,7 +8,7 @@ export function getDefaultTx(version = 1) { export const transactionFromBuffer = buffer => new Transaction(buffer); export class Transaction { constructor(buffer) { - this.tx = BTransaction.fromBuffer(buffer); + this.tx = BTransaction.fromBuffer(Buffer.from(buffer)); if (this.tx.ins.some(input => input.script.length !== 0)) { throw new Error('Format Error: Transaction ScriptSigs are not empty'); } diff --git a/src/esm/tests/validation.js b/src/esm/tests/validation.js index 37d6792..951385a 100644 --- a/src/esm/tests/validation.js +++ b/src/esm/tests/validation.js @@ -5,6 +5,7 @@ import { inputs as convertInputs, } from '../lib/converter/index.js'; import { getDefaultTx } from './utils/txTools.js'; +import * as tools from 'uint8array-tools'; const b = hex => Buffer.from(hex, 'hex'); tape('should not pass isPartialSig with invalid DER signature', t => { const data = { @@ -67,7 +68,8 @@ tape('should not pass isPartialSig with invalid DER signature', t => { }, new RegExp('Decode Error: partialSig has invalid pubkey in key 0x02ff')); keyVal.key = Buffer.concat([b('02'), data.pubkey, data.pubkey.slice(1)]); const result = convertInputs.partialSig.decode(keyVal); - t.assert(result.pubkey.equals(keyVal.key.slice(1))); + // t.assert(result.pubkey.equals(keyVal.key.slice(1))); + t.assert(tools.compare(result.pubkey, keyVal.key.slice(1)) === 0); const psbt1 = { globalMap: { unknownKeyVals: [], diff --git a/ts_src/lib/combiner/index.ts b/ts_src/lib/combiner/index.ts index 0be55d8..bf160ac 100644 --- a/ts_src/lib/combiner/index.ts +++ b/ts_src/lib/combiner/index.ts @@ -4,6 +4,7 @@ import { psbtFromKeyVals, psbtToKeyVals, } from '../parser/index.js'; +import * as tools from 'uint8array-tools'; export function combine(psbts: PsbtAttributes[]): PsbtAttributes { const self = psbts[0]; @@ -23,7 +24,7 @@ export function combine(psbts: PsbtAttributes[]): PsbtAttributes { const otherTx = getTx(other); if ( otherTx === undefined || - !otherTx.toBuffer().equals(selfTx.toBuffer()) + tools.compare(otherTx.toBuffer(), selfTx.toBuffer()) !== 0 ) { throw new Error( 'Combine: One of the Psbts does not have the same transaction.', @@ -76,7 +77,8 @@ function keyPusher( ): (key: string) => void { return (key: string): void => { if (selfSet.has(key)) return; - const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + // const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; + const newKv = otherKeyVals.filter(kv => tools.toHex(kv.key) === key)[0]; selfKeyVals.push(newKv); selfSet.add(key); }; @@ -89,7 +91,8 @@ function getTx(psbt: PsbtAttributes): Transaction | undefined { function getKeySet(keyVals: KeyValue[]): Set { const set: Set = new Set(); keyVals.forEach(keyVal => { - const hex = keyVal.key.toString('hex'); + // const hex = keyVal.key.toString('hex'); + const hex = tools.toHex(keyVal.key); if (set.has(hex)) throw new Error('Combine: KeyValue Map keys should be unique'); set.add(hex); diff --git a/ts_src/lib/converter/global/globalXpub.ts b/ts_src/lib/converter/global/globalXpub.ts index 08f9bcd..54dabce 100644 --- a/ts_src/lib/converter/global/globalXpub.ts +++ b/ts_src/lib/converter/global/globalXpub.ts @@ -1,18 +1,20 @@ import { GlobalXpub, KeyValue } from '../../interfaces'; import { GlobalTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; + const range = (n: number): number[] => [...Array(n).keys()]; export function decode(keyVal: KeyValue): GlobalXpub { if (keyVal.key[0] !== GlobalTypes.GLOBAL_XPUB) { throw new Error( 'Decode Error: could not decode globalXpub with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.key.length !== 79 || ![2, 3].includes(keyVal.key[46])) { throw new Error( 'Decode Error: globalXpub has invalid extended pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.value.length / 4) % 1 !== 0) { @@ -27,7 +29,7 @@ export function decode(keyVal: KeyValue): GlobalXpub { path: 'm', }; for (const i of range(keyVal.value.length / 4 - 1)) { - const val = keyVal.value.readUInt32LE(i * 4 + 4); + const val = tools.readUInt32(keyVal.value, i * 4 + 4, 'LE'); const isHard = !!(val & 0x80000000); const idx = val & 0x7fffffff; data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); @@ -36,20 +38,20 @@ export function decode(keyVal: KeyValue): GlobalXpub { } export function encode(data: GlobalXpub): KeyValue { - const head = Buffer.from([GlobalTypes.GLOBAL_XPUB]); - const key = Buffer.concat([head, data.extendedPubkey]); + const head = new Uint8Array([GlobalTypes.GLOBAL_XPUB]); + const key = tools.concat([head, data.extendedPubkey]); const splitPath = data.path.split('/'); - const value = Buffer.allocUnsafe(splitPath.length * 4); + const value = new Uint8Array(splitPath.length * 4); - data.masterFingerprint.copy(value, 0); + value.set(data.masterFingerprint, 0); let offset = 4; splitPath.slice(1).forEach(level => { const isHard = level.slice(-1) === "'"; let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); if (isHard) num += 0x80000000; - value.writeUInt32LE(num, offset); + tools.writeUInt32(value, offset, num, 'LE'); offset += 4; }); @@ -60,17 +62,17 @@ export function encode(data: GlobalXpub): KeyValue { } export const expected = - '{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }'; + '{ masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; }'; export function check(data: any): data is GlobalXpub { const epk = data.extendedPubkey; const mfp = data.masterFingerprint; const p = data.path; return ( - Buffer.isBuffer(epk) && + epk instanceof Uint8Array && epk.length === 78 && [2, 3].indexOf(epk[45]) > -1 && - Buffer.isBuffer(mfp) && + mfp instanceof Uint8Array && mfp.length === 4 && typeof p === 'string' && !!p.match(/^m(\/\d+'?)*$/) @@ -82,10 +84,11 @@ export function canAddToArray( item: GlobalXpub, dupeSet: Set, ): boolean { - const dupeString = item.extendedPubkey.toString('hex'); + const dupeString = tools.toHex(item.extendedPubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( - array.filter(v => v.extendedPubkey.equals(item.extendedPubkey)).length === 0 + array.filter(v => tools.compare(v.extendedPubkey, item.extendedPubkey)) + .length === 0 ); } diff --git a/ts_src/lib/converter/global/unsignedTx.ts b/ts_src/lib/converter/global/unsignedTx.ts index d229551..92d8163 100644 --- a/ts_src/lib/converter/global/unsignedTx.ts +++ b/ts_src/lib/converter/global/unsignedTx.ts @@ -3,7 +3,7 @@ import { GlobalTypes } from '../../typeFields.js'; export function encode(data: Transaction): KeyValue { return { - key: Buffer.from([GlobalTypes.UNSIGNED_TX]), + key: new Uint8Array([GlobalTypes.UNSIGNED_TX]), value: data.toBuffer(), }; } diff --git a/ts_src/lib/converter/input/finalScriptSig.ts b/ts_src/lib/converter/input/finalScriptSig.ts index c986e43..23598c4 100644 --- a/ts_src/lib/converter/input/finalScriptSig.ts +++ b/ts_src/lib/converter/input/finalScriptSig.ts @@ -1,27 +1,28 @@ import { FinalScriptSig, KeyValue } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): FinalScriptSig { if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTSIG) { throw new Error( 'Decode Error: could not decode finalScriptSig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } export function encode(data: FinalScriptSig): KeyValue { - const key = Buffer.from([InputTypes.FINAL_SCRIPTSIG]); + const key = new Uint8Array([InputTypes.FINAL_SCRIPTSIG]); return { key, value: data, }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data: any): data is FinalScriptSig { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } export function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/input/finalScriptWitness.ts b/ts_src/lib/converter/input/finalScriptWitness.ts index 26c74a0..154b9f7 100644 --- a/ts_src/lib/converter/input/finalScriptWitness.ts +++ b/ts_src/lib/converter/input/finalScriptWitness.ts @@ -1,27 +1,28 @@ import { FinalScriptWitness, KeyValue } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): FinalScriptWitness { if (keyVal.key[0] !== InputTypes.FINAL_SCRIPTWITNESS) { throw new Error( 'Decode Error: could not decode finalScriptWitness with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } export function encode(data: FinalScriptWitness): KeyValue { - const key = Buffer.from([InputTypes.FINAL_SCRIPTWITNESS]); + const key = new Uint8Array([InputTypes.FINAL_SCRIPTWITNESS]); return { key, value: data, }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data: any): data is FinalScriptWitness { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } export function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/input/nonWitnessUtxo.ts b/ts_src/lib/converter/input/nonWitnessUtxo.ts index f689d21..8ba1404 100644 --- a/ts_src/lib/converter/input/nonWitnessUtxo.ts +++ b/ts_src/lib/converter/input/nonWitnessUtxo.ts @@ -1,11 +1,12 @@ import { KeyValue, NonWitnessUtxo } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): NonWitnessUtxo { if (keyVal.key[0] !== InputTypes.NON_WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode nonWitnessUtxo with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; @@ -13,14 +14,14 @@ export function decode(keyVal: KeyValue): NonWitnessUtxo { export function encode(data: NonWitnessUtxo): KeyValue { return { - key: Buffer.from([InputTypes.NON_WITNESS_UTXO]), + key: new Uint8Array([InputTypes.NON_WITNESS_UTXO]), value: data, }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data: any): data is NonWitnessUtxo { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } export function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/input/partialSig.ts b/ts_src/lib/converter/input/partialSig.ts index ee58064..04416a0 100644 --- a/ts_src/lib/converter/input/partialSig.ts +++ b/ts_src/lib/converter/input/partialSig.ts @@ -1,11 +1,12 @@ import { KeyValue, PartialSig } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): PartialSig { if (keyVal.key[0] !== InputTypes.PARTIAL_SIG) { throw new Error( 'Decode Error: could not decode partialSig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ( @@ -14,7 +15,7 @@ export function decode(keyVal: KeyValue): PartialSig { ) { throw new Error( 'Decode Error: partialSig has invalid pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1); @@ -25,26 +26,26 @@ export function decode(keyVal: KeyValue): PartialSig { } export function encode(pSig: PartialSig): KeyValue { - const head = Buffer.from([InputTypes.PARTIAL_SIG]); + const head = new Uint8Array([InputTypes.PARTIAL_SIG]); return { - key: Buffer.concat([head, pSig.pubkey]), + key: tools.concat([head, pSig.pubkey]), value: pSig.signature, }; } -export const expected = '{ pubkey: Buffer; signature: Buffer; }'; +export const expected = '{ pubkey: Uint8Array; signature: Uint8Array; }'; export function check(data: any): data is PartialSig { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.signature) && + data.pubkey instanceof Uint8Array && + data.signature instanceof Uint8Array && [33, 65].includes(data.pubkey.length) && [2, 3, 4].includes(data.pubkey[0]) && isDerSigWithSighash(data.signature) ); } -function isDerSigWithSighash(buf: Buffer): boolean { - if (!Buffer.isBuffer(buf) || buf.length < 9) return false; +function isDerSigWithSighash(buf: Uint8Array): boolean { + if (!(buf instanceof Uint8Array) || buf.length < 9) return false; if (buf[0] !== 0x30) return false; if (buf.length !== buf[1] + 3) return false; if (buf[2] !== 0x02) return false; @@ -62,8 +63,10 @@ export function canAddToArray( item: PartialSig, dupeSet: Set, ): boolean { - const dupeString = item.pubkey.toString('hex'); + const dupeString = tools.toHex(item.pubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); - return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + return ( + array.filter(v => tools.compare(v.pubkey, item.pubkey) === 0).length === 0 + ); } diff --git a/ts_src/lib/converter/input/porCommitment.ts b/ts_src/lib/converter/input/porCommitment.ts index 354d234..33f1f20 100644 --- a/ts_src/lib/converter/input/porCommitment.ts +++ b/ts_src/lib/converter/input/porCommitment.ts @@ -1,21 +1,22 @@ import { KeyValue, PorCommitment } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): PorCommitment { if (keyVal.key[0] !== InputTypes.POR_COMMITMENT) { throw new Error( 'Decode Error: could not decode porCommitment with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - return keyVal.value.toString('utf8'); + return tools.toUtf8(keyVal.value); } export function encode(data: PorCommitment): KeyValue { - const key = Buffer.from([InputTypes.POR_COMMITMENT]); + const key = new Uint8Array([InputTypes.POR_COMMITMENT]); return { key, - value: Buffer.from(data, 'utf8'), + value: tools.fromUtf8(data), }; } diff --git a/ts_src/lib/converter/input/sighashType.ts b/ts_src/lib/converter/input/sighashType.ts index 71e232b..8ef5ced 100644 --- a/ts_src/lib/converter/input/sighashType.ts +++ b/ts_src/lib/converter/input/sighashType.ts @@ -1,20 +1,21 @@ import { KeyValue, SighashType } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): SighashType { if (keyVal.key[0] !== InputTypes.SIGHASH_TYPE) { throw new Error( 'Decode Error: could not decode sighashType with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - return keyVal.value.readUInt32LE(0); + return Number(tools.readUInt32(keyVal.value, 0, 'LE')); } export function encode(data: SighashType): KeyValue { - const key = Buffer.from([InputTypes.SIGHASH_TYPE]); - const value = Buffer.allocUnsafe(4); - value.writeUInt32LE(data, 0); + const key = Uint8Array.from([InputTypes.SIGHASH_TYPE]); + const value = new Uint8Array(4); + tools.writeUInt32(value, 0, data, 'LE'); return { key, value, diff --git a/ts_src/lib/converter/input/tapKeySig.ts b/ts_src/lib/converter/input/tapKeySig.ts index 5cc36c4..18bda77 100644 --- a/ts_src/lib/converter/input/tapKeySig.ts +++ b/ts_src/lib/converter/input/tapKeySig.ts @@ -1,11 +1,12 @@ import { KeyValue, TapKeySig } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): TapKeySig { if (keyVal.key[0] !== InputTypes.TAP_KEY_SIG || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapKeySig with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (!check(keyVal.value)) { @@ -17,13 +18,15 @@ export function decode(keyVal: KeyValue): TapKeySig { } export function encode(value: TapKeySig): KeyValue { - const key = Buffer.from([InputTypes.TAP_KEY_SIG]); + const key = Uint8Array.from([InputTypes.TAP_KEY_SIG]); return { key, value }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data: any): data is TapKeySig { - return Buffer.isBuffer(data) && (data.length === 64 || data.length === 65); + return ( + data instanceof Uint8Array && (data.length === 64 || data.length === 65) + ); } export function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/input/tapLeafScript.ts b/ts_src/lib/converter/input/tapLeafScript.ts index 5ba155e..1f04d25 100644 --- a/ts_src/lib/converter/input/tapLeafScript.ts +++ b/ts_src/lib/converter/input/tapLeafScript.ts @@ -1,17 +1,18 @@ import { KeyValue, TapLeafScript } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): TapLeafScript { if (keyVal.key[0] !== InputTypes.TAP_LEAF_SCRIPT) { throw new Error( 'Decode Error: could not decode tapLeafScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.key.length - 2) % 32 !== 0) { throw new Error( 'Decode Error: tapLeafScript has invalid control block in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } @@ -19,7 +20,7 @@ export function decode(keyVal: KeyValue): TapLeafScript { if ((keyVal.key[1] & 0xfe) !== leafVersion) { throw new Error( 'Decode Error: tapLeafScript bad leaf version in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } @@ -29,23 +30,23 @@ export function decode(keyVal: KeyValue): TapLeafScript { } export function encode(tScript: TapLeafScript): KeyValue { - const head = Buffer.from([InputTypes.TAP_LEAF_SCRIPT]); - const verBuf = Buffer.from([tScript.leafVersion]); + const head = Uint8Array.from([InputTypes.TAP_LEAF_SCRIPT]); + const verBuf = Uint8Array.from([tScript.leafVersion]); return { - key: Buffer.concat([head, tScript.controlBlock]), - value: Buffer.concat([tScript.script, verBuf]), + key: tools.concat([head, tScript.controlBlock]), + value: tools.concat([tScript.script, verBuf]), }; } export const expected = - '{ controlBlock: Buffer; leafVersion: number, script: Buffer; }'; + '{ controlBlock: Uint8Array; leafVersion: number, script: Uint8Array; }'; export function check(data: any): data is TapLeafScript { return ( - Buffer.isBuffer(data.controlBlock) && + data.controlBlock instanceof Uint8Array && (data.controlBlock.length - 1) % 32 === 0 && (data.controlBlock[0] & 0xfe) === data.leafVersion && - Buffer.isBuffer(data.script) + data.script instanceof Uint8Array ); } @@ -54,10 +55,11 @@ export function canAddToArray( item: TapLeafScript, dupeSet: Set, ): boolean { - const dupeString = item.controlBlock.toString('hex'); + const dupeString = tools.toHex(item.controlBlock); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( - array.filter(v => v.controlBlock.equals(item.controlBlock)).length === 0 + array.filter(v => tools.compare(v.controlBlock, item.controlBlock) === 0) + .length === 0 ); } diff --git a/ts_src/lib/converter/input/tapMerkleRoot.ts b/ts_src/lib/converter/input/tapMerkleRoot.ts index d3816ee..09dbdb1 100644 --- a/ts_src/lib/converter/input/tapMerkleRoot.ts +++ b/ts_src/lib/converter/input/tapMerkleRoot.ts @@ -1,11 +1,12 @@ import { KeyValue, TapMerkleRoot } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): TapMerkleRoot { if (keyVal.key[0] !== InputTypes.TAP_MERKLE_ROOT || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapMerkleRoot with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (!check(keyVal.value)) { @@ -15,13 +16,13 @@ export function decode(keyVal: KeyValue): TapMerkleRoot { } export function encode(value: TapMerkleRoot): KeyValue { - const key = Buffer.from([InputTypes.TAP_MERKLE_ROOT]); + const key = Uint8Array.from([InputTypes.TAP_MERKLE_ROOT]); return { key, value }; } -export const expected = 'Buffer'; +export const expected = 'Uint8Array'; export function check(data: any): data is TapMerkleRoot { - return Buffer.isBuffer(data) && data.length === 32; + return data instanceof Uint8Array && data.length === 32; } export function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/input/tapScriptSig.ts b/ts_src/lib/converter/input/tapScriptSig.ts index 0711b8e..3c4aa6e 100644 --- a/ts_src/lib/converter/input/tapScriptSig.ts +++ b/ts_src/lib/converter/input/tapScriptSig.ts @@ -1,23 +1,24 @@ import { KeyValue, TapScriptSig } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): TapScriptSig { if (keyVal.key[0] !== InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + - keyVal.key.toString('hex'), + // keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.key.length !== 65) { throw new Error( - 'Decode Error: tapScriptSig has invalid key 0x' + - keyVal.key.toString('hex'), + 'Decode Error: tapScriptSig has invalid key 0x' + tools.toHex(keyVal.key), ); } if (keyVal.value.length !== 64 && keyVal.value.length !== 65) { throw new Error( 'Decode Error: tapScriptSig has invalid signature in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1, 33); @@ -30,20 +31,20 @@ export function decode(keyVal: KeyValue): TapScriptSig { } export function encode(tSig: TapScriptSig): KeyValue { - const head = Buffer.from([InputTypes.TAP_SCRIPT_SIG]); + const head = Uint8Array.from([InputTypes.TAP_SCRIPT_SIG]); return { - key: Buffer.concat([head, tSig.pubkey, tSig.leafHash]), + key: tools.concat([head, tSig.pubkey, tSig.leafHash]), value: tSig.signature, }; } export const expected = - '{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }'; + '{ pubkey: Uint8Array; leafHash: Uint8Array; signature: Uint8Array; }'; export function check(data: any): data is TapScriptSig { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.leafHash) && - Buffer.isBuffer(data.signature) && + data.pubkey instanceof Uint8Array && + data.leafHash instanceof Uint8Array && + data.signature instanceof Uint8Array && data.pubkey.length === 32 && data.leafHash.length === 32 && (data.signature.length === 64 || data.signature.length === 65) @@ -55,13 +56,14 @@ export function canAddToArray( item: TapScriptSig, dupeSet: Set, ): boolean { - const dupeString = - item.pubkey.toString('hex') + item.leafHash.toString('hex'); + const dupeString = tools.toHex(item.pubkey) + tools.toHex(item.leafHash); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); return ( array.filter( - v => v.pubkey.equals(item.pubkey) && v.leafHash.equals(item.leafHash), + v => + tools.compare(v.pubkey, item.pubkey) === 0 && + tools.compare(v.leafHash, item.leafHash) === 0, ).length === 0 ); } diff --git a/ts_src/lib/converter/input/witnessUtxo.ts b/ts_src/lib/converter/input/witnessUtxo.ts index 3ff0b96..d0e3b14 100644 --- a/ts_src/lib/converter/input/witnessUtxo.ts +++ b/ts_src/lib/converter/input/witnessUtxo.ts @@ -1,19 +1,22 @@ import { KeyValue, WitnessUtxo } from '../../interfaces'; import { InputTypes } from '../../typeFields.js'; -import { readUInt64LE, writeUInt64LE } from '../tools.js'; -import * as varuint from '../varint.js'; +import * as tools from 'uint8array-tools'; +import * as varuint from 'varuint-bitcoin'; export function decode(keyVal: KeyValue): WitnessUtxo { if (keyVal.key[0] !== InputTypes.WITNESS_UTXO) { throw new Error( 'Decode Error: could not decode witnessUtxo with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } - const value = readUInt64LE(keyVal.value, 0); + const value = tools.readInt64(keyVal.value, 0, 'LE'); let _offset = 8; - const scriptLen = varuint.decode(keyVal.value, _offset); - _offset += varuint.encodingLength(scriptLen); + const { numberValue: scriptLen, bytes } = varuint.decode( + keyVal.value, + _offset, + ); + _offset += bytes; const script = keyVal.value.slice(_offset); if (script.length !== scriptLen) { throw new Error('Decode Error: WITNESS_UTXO script is not proper length'); @@ -26,23 +29,23 @@ export function decode(keyVal: KeyValue): WitnessUtxo { export function encode(data: WitnessUtxo): KeyValue { const { script, value } = data; - const varintLen = varuint.encodingLength(script.length); + const varuintlen = varuint.encodingLength(script.length); - const result = Buffer.allocUnsafe(8 + varintLen + script.length); + const result = new Uint8Array(8 + varuintlen + script.length); - writeUInt64LE(result, value, 0); + tools.writeUInt64(result, 0, BigInt(value), 'LE'); varuint.encode(script.length, result, 8); - script.copy(result, 8 + varintLen); + result.set(script, 8 + varuintlen); return { - key: Buffer.from([InputTypes.WITNESS_UTXO]), + key: Uint8Array.from([InputTypes.WITNESS_UTXO]), value: result, }; } -export const expected = '{ script: Buffer; value: number; }'; +export const expected = '{ script: Uint8Array; value: bigint; }'; export function check(data: any): data is WitnessUtxo { - return Buffer.isBuffer(data.script) && typeof data.value === 'number'; + return data.script instanceof Uint8Array && typeof data.value === 'bigint'; } export function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/output/tapTree.ts b/ts_src/lib/converter/output/tapTree.ts index f465483..3373846 100644 --- a/ts_src/lib/converter/output/tapTree.ts +++ b/ts_src/lib/converter/output/tapTree.ts @@ -1,12 +1,14 @@ import { KeyValue, TapLeaf, TapTree } from '../../interfaces'; import { OutputTypes } from '../../typeFields.js'; -import * as varuint from '../varint.js'; +// import * as varuint from '../varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; export function decode(keyVal: KeyValue): TapTree { if (keyVal.key[0] !== OutputTypes.TAP_TREE || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapTree with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } let _offset = 0; @@ -14,35 +16,39 @@ export function decode(keyVal: KeyValue): TapTree { while (_offset < keyVal.value.length) { const depth = keyVal.value[_offset++]; const leafVersion = keyVal.value[_offset++]; - const scriptLen = varuint.decode(keyVal.value, _offset); - _offset += varuint.encodingLength(scriptLen); + const { numberValue: scriptLen, bytes } = varuint.decode( + keyVal.value, + _offset, + ); + _offset += bytes; data.push({ depth, leafVersion, - script: keyVal.value.slice(_offset, _offset + scriptLen), + script: keyVal.value.slice(_offset, _offset + scriptLen!), }); - _offset += scriptLen; + _offset += scriptLen!; } return { leaves: data }; } export function encode(tree: TapTree): KeyValue { - const key = Buffer.from([OutputTypes.TAP_TREE]); - const bufs = ([] as Buffer[]).concat( + const key = Uint8Array.from([OutputTypes.TAP_TREE]); + + const bufs = ([] as Uint8Array[]).concat( ...tree.leaves.map(tapLeaf => [ - Buffer.of(tapLeaf.depth, tapLeaf.leafVersion), - varuint.encode(tapLeaf.script.length), + Uint8Array.of(tapLeaf.depth, tapLeaf.leafVersion), + varuint.encode(BigInt(tapLeaf.script.length)).buffer, tapLeaf.script, ]), ); return { key, - value: Buffer.concat(bufs), + value: tools.concat(bufs), }; } export const expected = - '{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }'; + '{ leaves: [{ depth: number; leafVersion: number, script: Uint8Array; }] }'; export function check(data: any): data is TapTree { return ( Array.isArray(data.leaves) && @@ -51,7 +57,7 @@ export function check(data: any): data is TapTree { tapLeaf.depth >= 0 && tapLeaf.depth <= 128 && (tapLeaf.leafVersion & 0xfe) === tapLeaf.leafVersion && - Buffer.isBuffer(tapLeaf.script), + tapLeaf.script instanceof Uint8Array, ) ); } diff --git a/ts_src/lib/converter/shared/bip32Derivation.ts b/ts_src/lib/converter/shared/bip32Derivation.ts index 5f07a24..fc9afd1 100644 --- a/ts_src/lib/converter/shared/bip32Derivation.ts +++ b/ts_src/lib/converter/shared/bip32Derivation.ts @@ -1,7 +1,8 @@ import { Bip32Derivation, KeyValue } from '../../interfaces'; +import * as tools from 'uint8array-tools'; const range = (n: number): number[] => [...Array(n).keys()]; -const isValidDERKey = (pubkey: Buffer): boolean => +const isValidDERKey = (pubkey: Uint8Array): boolean => (pubkey.length === 33 && [2, 3].includes(pubkey[0])) || (pubkey.length === 65 && 4 === pubkey[0]); @@ -23,14 +24,14 @@ export function makeConverter( if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode bip32Derivation with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } const pubkey = keyVal.key.slice(1); if (!isValidPubkey(pubkey)) { throw new Error( 'Decode Error: bip32Derivation has invalid pubkey in key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if ((keyVal.value.length / 4) % 1 !== 0) { @@ -44,7 +45,7 @@ export function makeConverter( path: 'm', }; for (const i of range(keyVal.value.length / 4 - 1)) { - const val = keyVal.value.readUInt32LE(i * 4 + 4); + const val = tools.readUInt32(keyVal.value, i * 4 + 4, 'LE'); const isHard = !!(val & 0x80000000); const idx = val & 0x7fffffff; data.path += '/' + idx.toString(10) + (isHard ? "'" : ''); @@ -53,20 +54,20 @@ export function makeConverter( } function encode(data: Bip32Derivation): KeyValue { - const head = Buffer.from([TYPE_BYTE]); - const key = Buffer.concat([head, data.pubkey]); + const head = Uint8Array.from([TYPE_BYTE]); + const key = tools.concat([head, data.pubkey]); const splitPath = data.path.split('/'); - const value = Buffer.allocUnsafe(splitPath.length * 4); + const value = new Uint8Array(splitPath.length * 4); - data.masterFingerprint.copy(value, 0); + value.set(data.masterFingerprint, 0); let offset = 4; splitPath.slice(1).forEach(level => { const isHard = level.slice(-1) === "'"; let num = 0x7fffffff & parseInt(isHard ? level.slice(0, -1) : level, 10); if (isHard) num += 0x80000000; - value.writeUInt32LE(num, offset); + tools.writeUInt32(value, offset, num, 'LE'); offset += 4; }); @@ -77,11 +78,11 @@ export function makeConverter( } const expected = - '{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }'; + '{ masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; }'; function check(data: any): data is Bip32Derivation { return ( - Buffer.isBuffer(data.pubkey) && - Buffer.isBuffer(data.masterFingerprint) && + data.pubkey instanceof Uint8Array && + data.masterFingerprint instanceof Uint8Array && typeof data.path === 'string' && isValidPubkey(data.pubkey) && data.masterFingerprint.length === 4 @@ -93,10 +94,12 @@ export function makeConverter( item: Bip32Derivation, dupeSet: Set, ): boolean { - const dupeString = item.pubkey.toString('hex'); + const dupeString = tools.toHex(item.pubkey); if (dupeSet.has(dupeString)) return false; dupeSet.add(dupeString); - return array.filter(v => v.pubkey.equals(item.pubkey)).length === 0; + return ( + array.filter(v => tools.compare(v.pubkey, item.pubkey) === 0).length === 0 + ); } return { diff --git a/ts_src/lib/converter/shared/checkPubkey.ts b/ts_src/lib/converter/shared/checkPubkey.ts index 6d79ada..7eb7f53 100644 --- a/ts_src/lib/converter/shared/checkPubkey.ts +++ b/ts_src/lib/converter/shared/checkPubkey.ts @@ -1,11 +1,11 @@ import { KeyValue } from '../../interfaces'; - +import * as tools from 'uint8array-tools'; export function makeChecker( pubkeyTypes: number[], -): (keyVal: KeyValue) => Buffer | undefined { +): (keyVal: KeyValue) => Uint8Array | undefined { return checkPubkey; - function checkPubkey(keyVal: KeyValue): Buffer | undefined { - let pubkey: Buffer | undefined; + function checkPubkey(keyVal: KeyValue): Uint8Array | undefined { + let pubkey: Uint8Array | undefined; if (pubkeyTypes.includes(keyVal.key[0])) { pubkey = keyVal.key.slice(1); if ( @@ -13,7 +13,7 @@ export function makeChecker( ![2, 3, 4].includes(pubkey[0]) ) { throw new Error( - 'Format Error: invalid pubkey in key 0x' + keyVal.key.toString('hex'), + 'Format Error: invalid pubkey in key 0x' + tools.toHex(keyVal.key), ); } } diff --git a/ts_src/lib/converter/shared/redeemScript.ts b/ts_src/lib/converter/shared/redeemScript.ts index 691f988..bf3d592 100644 --- a/ts_src/lib/converter/shared/redeemScript.ts +++ b/ts_src/lib/converter/shared/redeemScript.ts @@ -1,4 +1,5 @@ import { KeyValue, RedeemScript } from '../../interfaces'; +import * as tools from 'uint8array-tools'; export function makeConverter( TYPE_BYTE: number, @@ -13,23 +14,23 @@ export function makeConverter( if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode redeemScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } function encode(data: RedeemScript): KeyValue { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value: data, }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data: any): data is RedeemScript { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/shared/tapBip32Derivation.ts b/ts_src/lib/converter/shared/tapBip32Derivation.ts index 1392488..6463239 100644 --- a/ts_src/lib/converter/shared/tapBip32Derivation.ts +++ b/ts_src/lib/converter/shared/tapBip32Derivation.ts @@ -1,8 +1,9 @@ import { KeyValue, TapBip32Derivation } from '../../interfaces'; -import * as varuint from '../varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; import * as bip32Derivation from './bip32Derivation.js'; -const isValidBIP340Key = (pubkey: Buffer): boolean => pubkey.length === 32; +const isValidBIP340Key = (pubkey: Uint8Array): boolean => pubkey.length === 32; export function makeConverter( TYPE_BYTE: number, @@ -19,14 +20,15 @@ export function makeConverter( } { const parent = bip32Derivation.makeConverter(TYPE_BYTE, isValidBIP340Key); function decode(keyVal: KeyValue): TapBip32Derivation { - const nHashes = varuint.decode(keyVal.value); - const nHashesLen = varuint.encodingLength(nHashes); + const { numberValue: nHashes, bytes: nHashesLen } = varuint.decode( + keyVal.value, + ); const base = parent.decode({ key: keyVal.key, - value: keyVal.value.slice(nHashesLen + nHashes * 32), + value: keyVal.value.slice(nHashesLen + Number(nHashes) * 32), }); - const leafHashes: Buffer[] = new Array(nHashes); - for (let i = 0, _offset = nHashesLen; i < nHashes; i++, _offset += 32) { + const leafHashes: Uint8Array[] = new Array(Number(nHashes)); + for (let i = 0, _offset = nHashesLen; i < nHashes!; i++, _offset += 32) { leafHashes[i] = keyVal.value.slice(_offset, _offset + 32); } return { ...base, leafHashes }; @@ -35,24 +37,25 @@ export function makeConverter( function encode(data: TapBip32Derivation): KeyValue { const base = parent.encode(data); const nHashesLen = varuint.encodingLength(data.leafHashes.length); - const nHashesBuf = Buffer.allocUnsafe(nHashesLen); + const nHashesBuf = new Uint8Array(nHashesLen); varuint.encode(data.leafHashes.length, nHashesBuf); - const value = Buffer.concat([nHashesBuf, ...data.leafHashes, base.value]); + const value = tools.concat([nHashesBuf, ...data.leafHashes, base.value]); return { ...base, value }; } const expected = '{ ' + - 'masterFingerprint: Buffer; ' + - 'pubkey: Buffer; ' + + 'masterFingerprint: Uint8Array; ' + + 'pubkey: Uint8Array; ' + 'path: string; ' + - 'leafHashes: Buffer[]; ' + + 'leafHashes: Uint8Array[]; ' + '}'; function check(data: any): data is TapBip32Derivation { return ( Array.isArray(data.leafHashes) && data.leafHashes.every( - (leafHash: any) => Buffer.isBuffer(leafHash) && leafHash.length === 32, + (leafHash: any) => + leafHash instanceof Uint8Array && leafHash.length === 32, ) && parent.check(data) ); diff --git a/ts_src/lib/converter/shared/tapInternalKey.ts b/ts_src/lib/converter/shared/tapInternalKey.ts index 5265568..a99e587 100644 --- a/ts_src/lib/converter/shared/tapInternalKey.ts +++ b/ts_src/lib/converter/shared/tapInternalKey.ts @@ -1,4 +1,5 @@ import { KeyValue, TapInternalKey } from '../../interfaces'; +import * as tools from 'uint8array-tools'; export function makeConverter( TYPE_BYTE: number, @@ -13,7 +14,7 @@ export function makeConverter( if (keyVal.key[0] !== TYPE_BYTE || keyVal.key.length !== 1) { throw new Error( 'Decode Error: could not decode tapInternalKey with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } if (keyVal.value.length !== 32) { @@ -25,13 +26,13 @@ export function makeConverter( } function encode(value: TapInternalKey): KeyValue { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data: any): data is TapInternalKey { - return Buffer.isBuffer(data) && data.length === 32; + return data instanceof Uint8Array && data.length === 32; } function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/shared/witnessScript.ts b/ts_src/lib/converter/shared/witnessScript.ts index 3ab2f71..0770503 100644 --- a/ts_src/lib/converter/shared/witnessScript.ts +++ b/ts_src/lib/converter/shared/witnessScript.ts @@ -1,4 +1,5 @@ import { KeyValue, WitnessScript } from '../../interfaces'; +import * as tools from 'uint8array-tools'; export function makeConverter( TYPE_BYTE: number, @@ -13,23 +14,23 @@ export function makeConverter( if (keyVal.key[0] !== TYPE_BYTE) { throw new Error( 'Decode Error: could not decode witnessScript with key 0x' + - keyVal.key.toString('hex'), + tools.toHex(keyVal.key), ); } return keyVal.value; } function encode(data: WitnessScript): KeyValue { - const key = Buffer.from([TYPE_BYTE]); + const key = Uint8Array.from([TYPE_BYTE]); return { key, value: data, }; } - const expected = 'Buffer'; + const expected = 'Uint8Array'; function check(data: any): data is WitnessScript { - return Buffer.isBuffer(data); + return data instanceof Uint8Array; } function canAdd(currentData: any, newData: any): boolean { diff --git a/ts_src/lib/converter/tools.ts b/ts_src/lib/converter/tools.ts index 7e3cad3..1fff4df 100644 --- a/ts_src/lib/converter/tools.ts +++ b/ts_src/lib/converter/tools.ts @@ -1,9 +1,10 @@ import { KeyValue } from '../interfaces'; -import * as varuint from './varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; export const range = (n: number): number[] => [...Array(n).keys()]; -export function reverseBuffer(buffer: Buffer): Buffer { +export function reverseBuffer(buffer: Uint8Array): Uint8Array { if (buffer.length < 1) return buffer; let j = buffer.length - 1; let tmp = 0; @@ -16,58 +17,56 @@ export function reverseBuffer(buffer: Buffer): Buffer { return buffer; } -export function keyValsToBuffer(keyVals: KeyValue[]): Buffer { +export function keyValsToBuffer(keyVals: KeyValue[]): Uint8Array { const buffers = keyVals.map(keyValToBuffer); - buffers.push(Buffer.from([0])); - return Buffer.concat(buffers); + buffers.push(Uint8Array.from([0])); + return tools.concat(buffers); } -export function keyValToBuffer(keyVal: KeyValue): Buffer { +export function keyValToBuffer(keyVal: KeyValue): Uint8Array { const keyLen = keyVal.key.length; const valLen = keyVal.value.length; const keyVarIntLen = varuint.encodingLength(keyLen); const valVarIntLen = varuint.encodingLength(valLen); - const buffer = Buffer.allocUnsafe( - keyVarIntLen + keyLen + valVarIntLen + valLen, - ); + const buffer = new Uint8Array(keyVarIntLen + keyLen + valVarIntLen + valLen); varuint.encode(keyLen, buffer, 0); - keyVal.key.copy(buffer, keyVarIntLen); + buffer.set(keyVal.key, keyVarIntLen); varuint.encode(valLen, buffer, keyVarIntLen + keyLen); - keyVal.value.copy(buffer, keyVarIntLen + keyLen + valVarIntLen); + buffer.set(keyVal.value, keyVarIntLen + keyLen + valVarIntLen); return buffer; } // https://github.com/feross/buffer/blob/master/index.js#L1127 -function verifuint(value: number, max: number): void { - if (typeof value !== 'number') - throw new Error('cannot write a non-number as a number'); - if (value < 0) - throw new Error('specified a negative value for writing an unsigned value'); - if (value > max) throw new Error('RangeError: value out of range'); - if (Math.floor(value) !== value) - throw new Error('value has a fractional component'); -} +// function verifuint(value: number, max: number): void { +// if (typeof value !== 'number') +// throw new Error('cannot write a non-number as a number'); +// if (value < 0) +// throw new Error('specified a negative value for writing an unsigned value'); +// if (value > max) throw new Error('RangeError: value out of range'); +// if (Math.floor(value) !== value) +// throw new Error('value has a fractional component'); +// } -export function readUInt64LE(buffer: Buffer, offset: number): number { - const a = buffer.readUInt32LE(offset); - let b = buffer.readUInt32LE(offset + 4); - b *= 0x100000000; +// export function readUInt64LE(buffer: Buffer, offset: number): number { +// const a = buffer.readUInt32LE(offset); +// let b = buffer.readUInt32LE(offset + 4); +// b *= 0x100000000; - verifuint(b + a, 0x001fffffffffffff); - return b + a; -} +// verifuint(b + a, 0x001fffffffffffff); +// return b + a; +// } -export function writeUInt64LE( - buffer: Buffer, - value: number, - offset: number, -): number { - verifuint(value, 0x001fffffffffffff); +// export function writeUInt64LE( +// buffer: Buffer, +// value: number, +// offset: number, +// ): number { +// verifuint(value, 0x001fffffffffffff); - buffer.writeInt32LE(value & -1, offset); - buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); - return offset + 8; -} +// buffer.writeInt32LE(value & -1, offset); +// buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); +// return offset + 8; +// } diff --git a/ts_src/lib/interfaces.ts b/ts_src/lib/interfaces.ts index d7c344e..d01e834 100644 --- a/ts_src/lib/interfaces.ts +++ b/ts_src/lib/interfaces.ts @@ -1,7 +1,7 @@ // This function should throw if the scriptSig or scriptWitness section for // any input is not empty. And it should throw if the transaction is segwit // format. As per the BIP. -export type TransactionFromBuffer = (buffer: Buffer) => Transaction; +export type TransactionFromBuffer = (buffer: Uint8Array) => Transaction; // This is a light wrapper that will give the information needed for parsing // and modifying the Transaction internally. // This library will have no logical understanding of the Transaction format, @@ -19,12 +19,12 @@ export interface Transaction { // This is primarily used when serializing the PSBT to a binary. // You can implement caching behind the scenes if needed and clear the cache // when addInput or addOutput are called. - toBuffer(): Buffer; + toBuffer(): Uint8Array; } export interface KeyValue { - key: Buffer; - value: Buffer; + key: Uint8Array; + value: Uint8Array; } export interface PsbtGlobal extends PsbtGlobalUpdate { @@ -81,65 +81,65 @@ export interface PsbtOutputExtended extends PsbtOutput { } export interface GlobalXpub { - extendedPubkey: Buffer; - masterFingerprint: Buffer; + extendedPubkey: Uint8Array; + masterFingerprint: Uint8Array; path: string; } export interface PartialSig { - pubkey: Buffer; - signature: Buffer; + pubkey: Uint8Array; + signature: Uint8Array; } export interface Bip32Derivation { - masterFingerprint: Buffer; - pubkey: Buffer; + masterFingerprint: Uint8Array; + pubkey: Uint8Array; path: string; } export interface WitnessUtxo { - script: Buffer; - value: number; + script: Uint8Array; + value: bigint; } -export type NonWitnessUtxo = Buffer; +export type NonWitnessUtxo = Uint8Array; export type SighashType = number; -export type RedeemScript = Buffer; +export type RedeemScript = Uint8Array; -export type WitnessScript = Buffer; +export type WitnessScript = Uint8Array; -export type FinalScriptSig = Buffer; +export type FinalScriptSig = Uint8Array; -export type FinalScriptWitness = Buffer; +export type FinalScriptWitness = Uint8Array; export type PorCommitment = string; -export type TapKeySig = Buffer; +export type TapKeySig = Uint8Array; export interface TapScriptSig extends PartialSig { - leafHash: Buffer; + leafHash: Uint8Array; } interface TapScript { leafVersion: number; - script: Buffer; + script: Uint8Array; } -export type ControlBlock = Buffer; +export type ControlBlock = Uint8Array; export interface TapLeafScript extends TapScript { controlBlock: ControlBlock; } export interface TapBip32Derivation extends Bip32Derivation { - leafHashes: Buffer[]; + leafHashes: Uint8Array[]; } -export type TapInternalKey = Buffer; +export type TapInternalKey = Uint8Array; -export type TapMerkleRoot = Buffer; +export type TapMerkleRoot = Uint8Array; export interface TapLeaf extends TapScript { depth: number; @@ -150,7 +150,7 @@ export interface TapTree { } export type TransactionIOCountGetter = ( - txBuffer: Buffer, + txBuffer: Uint8Array, ) => { inputCount: number; outputCount: number; @@ -158,10 +158,10 @@ export type TransactionIOCountGetter = ( export type TransactionVersionSetter = ( version: number, - txBuffer: Buffer, -) => Buffer; + txBuffer: Uint8Array, +) => Uint8Array; export type TransactionLocktimeSetter = ( locktime: number, - txBuffer: Buffer, -) => Buffer; + txBuffer: Uint8Array, +) => Uint8Array; diff --git a/ts_src/lib/parser/fromBuffer.ts b/ts_src/lib/parser/fromBuffer.ts index 5bfcb7f..94d0c31 100644 --- a/ts_src/lib/parser/fromBuffer.ts +++ b/ts_src/lib/parser/fromBuffer.ts @@ -1,6 +1,8 @@ import * as convert from '../converter/index.js'; import { range } from '../converter/tools.js'; -import * as varuint from '../converter/varint.js'; +// import * as varuint from '../converter/varint.js'; +import * as varuint from 'varuint-bitcoin'; +import * as tools from 'uint8array-tools'; import { KeyValue, PsbtGlobal, @@ -13,27 +15,27 @@ import { GlobalTypes, InputTypes, OutputTypes } from '../typeFields.js'; import { PsbtAttributes } from './index.js'; export function psbtFromBuffer( - buffer: Buffer, + buffer: Uint8Array, txGetter: TransactionFromBuffer, ): PsbtAttributes { let offset = 0; - function varSlice(): Buffer { - const keyLen = varuint.decode(buffer, offset); - offset += varuint.encodingLength(keyLen); - const key = buffer.slice(offset, offset + keyLen); - offset += keyLen; + function varSlice(): Uint8Array { + const { numberValue: keyLen, bytes } = varuint.decode(buffer, offset); + offset += bytes; + const key = buffer.slice(offset, offset + Number(keyLen)); + offset += Number(keyLen); return key; } function readUInt32BE(): number { - const num = buffer.readUInt32BE(offset); + const num = tools.readUInt32(buffer, offset, 'BE'); offset += 4; return num; } function readUInt8(): number { - const num = buffer.readUInt8(offset); + const num = tools.readUInt8(buffer, offset); offset += 1; return num; } @@ -51,7 +53,7 @@ export function psbtFromBuffer( if (offset >= buffer.length) { throw new Error('Format Error: Unexpected End of PSBT'); } - const isEnd = buffer.readUInt8(offset) === 0; + const isEnd = tools.readUInt8(buffer, offset) === 0; if (isEnd) { offset++; } @@ -71,7 +73,7 @@ export function psbtFromBuffer( const globalKeyIndex: { [index: string]: number } = {}; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (globalKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for global keymap: key ' + hexKey, @@ -102,7 +104,7 @@ export function psbtFromBuffer( const input = [] as KeyValue[]; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (inputKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for each input: ' + @@ -123,7 +125,7 @@ export function psbtFromBuffer( const output = [] as KeyValue[]; while (!checkEndOfKeyValPairs()) { const keyVal = getKeyValue(); - const hexKey = keyVal.key.toString('hex'); + const hexKey = tools.toHex(keyVal.key); if (outputKeyIndex[hexKey]) { throw new Error( 'Format Error: Keys must be unique for each output: ' + @@ -154,12 +156,13 @@ interface PsbtFromKeyValsArg { export function checkKeyBuffer( type: string, - keyBuf: Buffer, + keyBuf: Uint8Array, keyNum: number, ): void { - if (!keyBuf.equals(Buffer.from([keyNum]))) { + if (tools.compare(keyBuf, Uint8Array.from([keyNum]))) { throw new Error( - `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + // `Format Error: Invalid ${type} key: ${keyBuf.toString('hex')}`, + `Format Error: Invalid ${type} key: ${tools.toHex(keyBuf)}`, ); } } diff --git a/ts_src/lib/parser/toBuffer.ts b/ts_src/lib/parser/toBuffer.ts index 6fb07e1..71df564 100644 --- a/ts_src/lib/parser/toBuffer.ts +++ b/ts_src/lib/parser/toBuffer.ts @@ -2,12 +2,13 @@ import * as convert from '../converter/index.js'; import { keyValsToBuffer } from '../converter/tools.js'; import { KeyValue, PsbtGlobal, PsbtInput, PsbtOutput } from '../interfaces'; import { PsbtAttributes } from './index.js'; +import * as tools from 'uint8array-tools'; export function psbtToBuffer({ globalMap, inputs, outputs, -}: PsbtAttributes): Buffer { +}: PsbtAttributes): Uint8Array { const { globalKeyVals, inputKeyVals, outputKeyVals } = psbtToKeyVals({ globalMap, inputs, @@ -16,21 +17,23 @@ export function psbtToBuffer({ const globalBuffer = keyValsToBuffer(globalKeyVals); - const keyValsOrEmptyToBuffer = (keyVals: KeyValue[][]): Buffer[] => - keyVals.length === 0 ? [Buffer.from([0])] : keyVals.map(keyValsToBuffer); + const keyValsOrEmptyToBuffer = (keyVals: KeyValue[][]): Uint8Array[] => + keyVals.length === 0 + ? [Uint8Array.from([0])] + : keyVals.map(keyValsToBuffer); const inputBuffers = keyValsOrEmptyToBuffer(inputKeyVals); const outputBuffers = keyValsOrEmptyToBuffer(outputKeyVals); - const header = Buffer.allocUnsafe(5); - header.writeUIntBE(0x70736274ff, 0, 5); - return Buffer.concat( + const header = new Uint8Array(5); + header.set([0x70, 0x73, 0x62, 0x74, 0xff], 0); + return tools.concat( [header, globalBuffer].concat(inputBuffers, outputBuffers), ); } const sortKeyVals = (a: KeyValue, b: KeyValue): number => { - return a.key.compare(b.key); + return tools.compare(a.key, b.key); }; function keyValsFromMap( @@ -50,7 +53,7 @@ function keyValsFromMap( converter.encode, ) as KeyValue[]; - const keyHexes = encodedKeyVals.map(kv => kv.key.toString('hex')); + const keyHexes = encodedKeyVals.map(kv => tools.toHex(kv.key)); keyHexes.forEach(hex => { if (keyHexSet.has(hex)) throw new Error('Serialize Error: Duplicate key: ' + hex); @@ -63,7 +66,7 @@ function keyValsFromMap( // Get other keyVals that have not yet been gotten const otherKeyVals = keyValMap.unknownKeyVals ? keyValMap.unknownKeyVals.filter((keyVal: KeyValue) => { - return !keyHexSet.has(keyVal.key.toString('hex')); + return !keyHexSet.has(tools.toHex(keyVal.key)); }) : []; diff --git a/ts_src/lib/psbt.ts b/ts_src/lib/psbt.ts index b380f0d..a4e990a 100644 --- a/ts_src/lib/psbt.ts +++ b/ts_src/lib/psbt.ts @@ -11,7 +11,7 @@ import { PsbtOutputUpdate, Transaction, TransactionFromBuffer, -} from './interfaces'; +} from './interfaces.js'; import { psbtFromBuffer, psbtToBuffer } from './parser/index.js'; import { GlobalTypes, InputTypes, OutputTypes } from './typeFields.js'; import { @@ -27,13 +27,15 @@ import { updateOutput, } from './utils.js'; +import * as tools from 'uint8array-tools'; + export class Psbt { static fromBase64( this: T, data: string, txFromBuffer: TransactionFromBuffer, ): InstanceType { - const buffer = Buffer.from(data, 'base64'); + const buffer = tools.fromBase64(data); return this.fromBuffer(buffer, txFromBuffer); } static fromHex( @@ -41,12 +43,12 @@ export class Psbt { data: string, txFromBuffer: TransactionFromBuffer, ): InstanceType { - const buffer = Buffer.from(data, 'hex'); + const buffer = tools.fromHex(data); return this.fromBuffer(buffer, txFromBuffer); } static fromBuffer( this: T, - buffer: Buffer, + buffer: Uint8Array, txFromBuffer: TransactionFromBuffer, ): InstanceType { const results = psbtFromBuffer(buffer, txFromBuffer); @@ -67,15 +69,15 @@ export class Psbt { toBase64(): string { const buffer = this.toBuffer(); - return buffer.toString('base64'); + return tools.toBase64(buffer); } toHex(): string { const buffer = this.toBuffer(); - return buffer.toString('hex'); + return tools.toHex(buffer); } - toBuffer(): Buffer { + toBuffer(): Uint8Array { return psbtToBuffer(this); } @@ -185,7 +187,59 @@ export class Psbt { return this; } - getTransaction(): Buffer { + getTransaction(): Uint8Array { return this.globalMap.unsignedTx.toBuffer(); } } + +export { + Bip32Derivation, + NonWitnessUtxo, + ControlBlock, + FinalScriptSig, + FinalScriptWitness, + GlobalXpub, + KeyValue, + PartialSig, + PorCommitment, + PsbtGlobal, + PsbtGlobalUpdate, + PsbtInput, + PsbtInputExtended, + PsbtInputUpdate, + PsbtOutput, + PsbtOutputExtended, + PsbtOutputUpdate, + RedeemScript, + SighashType, + TapBip32Derivation, + TapInternalKey, + TapKeySig, + TapLeaf, + TapLeafScript, + TapMerkleRoot, + TapScriptSig, + TapTree, + Transaction, + TransactionFromBuffer, + TransactionIOCountGetter, + TransactionLocktimeSetter, + TransactionVersionSetter, + WitnessScript, + WitnessUtxo +} from "./interfaces.js"; + +export { + addInputAttributes, + addOutputAttributes, + checkForInput, + checkForOutput, + checkHasKey, + defaultLocktimeSetter, + defaultVersionSetter, + getEnumLength, + inputCheckUncleanFinalized, + updateGlobal, + updateInput, + updateOutput +} from "./utils.js" \ No newline at end of file diff --git a/ts_src/lib/utils.ts b/ts_src/lib/utils.ts index 579fa8c..7862371 100644 --- a/ts_src/lib/utils.ts +++ b/ts_src/lib/utils.ts @@ -7,7 +7,8 @@ import { PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, -} from './interfaces'; +} from './interfaces.js'; +import * as tools from 'uint8array-tools'; export function checkForInput( inputs: PsbtInput[], @@ -39,9 +40,10 @@ export function checkHasKey( } if ( keyVals && - keyVals.filter(kv => kv.key.equals(checkKeyVal.key)).length !== 0 + keyVals.filter(kv => tools.compare(kv.key, checkKeyVal.key) === 0) + .length !== 0 ) { - throw new Error(`Duplicate Key: ${checkKeyVal.key.toString('hex')}`); + throw new Error(`Duplicate Key: ${tools.toHex(checkKeyVal.key)}`); } } @@ -91,6 +93,7 @@ function updateMaker( typeName: string, ): (updateData: T, mainData: Y) => void { return (updateData: T, mainData: Y): void => { + // @ts-ignore for (const name of Object.keys(updateData)) { // @ts-ignore const data = updateData[name]; @@ -150,18 +153,24 @@ export function addOutputAttributes(outputs: PsbtOutput[], data: any): void { updateOutput(data, output); } -export function defaultVersionSetter(version: number, txBuf: Buffer): Buffer { - if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { +export function defaultVersionSetter( + version: number, + txBuf: Uint8Array, +): Uint8Array { + if (!(txBuf instanceof Uint8Array) || txBuf.length < 4) { throw new Error('Set Version: Invalid Transaction'); } - txBuf.writeUInt32LE(version, 0); + tools.writeUInt32(txBuf, 0, version, 'LE'); return txBuf; } -export function defaultLocktimeSetter(locktime: number, txBuf: Buffer): Buffer { - if (!Buffer.isBuffer(txBuf) || txBuf.length < 4) { +export function defaultLocktimeSetter( + locktime: number, + txBuf: Uint8Array, +): Uint8Array { + if (!(txBuf instanceof Uint8Array) || txBuf.length < 4) { throw new Error('Set Locktime: Invalid Transaction'); } - txBuf.writeUInt32LE(locktime, txBuf.length - 4); + tools.writeUInt32(txBuf, txBuf.length - 4, locktime, 'LE'); return txBuf; } diff --git a/ts_src/tests/addInputOutput.ts b/ts_src/tests/addInputOutput.ts index 4a36c75..2ce4d76 100644 --- a/ts_src/tests/addInputOutput.ts +++ b/ts_src/tests/addInputOutput.ts @@ -37,13 +37,5 @@ tape('Test: add Input Output', t => { 'e18870f2c297fbfca54c5c6f645c7745a5b66eda87000000000000000000', ); t.equal(hex, hex2); - - // console.log(jsonA1); - // console.log(jsonA2); - // console.log(jsonB1); - // console.log(jsonB2); - - // t.notDeepEqual(JSON.parse(jsonA1), JSON.parse(jsonB1)); - // t.deepEqual(JSON.parse(jsonA2), JSON.parse(jsonB2)); t.end(); }); diff --git a/ts_src/tests/combine.ts b/ts_src/tests/combine.ts index bccda02..6272a53 100644 --- a/ts_src/tests/combine.ts +++ b/ts_src/tests/combine.ts @@ -12,11 +12,6 @@ for (const f of fixtures) { const jsonB1 = jsonify(psbts[0]); const jsonB2 = jsonify(psbts[1]); - // console.log(jsonA1); - // console.log(jsonA2); - // console.log(jsonB1); - // console.log(jsonB2); - t.notDeepEqual(JSON.parse(jsonA1), JSON.parse(jsonB1)); t.deepEqual(JSON.parse(jsonA2), JSON.parse(jsonB2)); t.equal(psbts[0].toHex(), f.result); @@ -30,6 +25,8 @@ function jsonify(parsed: any): string { (key, value) => { return key !== undefined && value.type === 'Buffer' ? Buffer.from(value.data).toString('hex') + : typeof value === 'bigint' + ? value.toString() : value; }, 2, diff --git a/ts_src/tests/first.ts b/ts_src/tests/first.ts index c5a7cb7..989e3d5 100644 --- a/ts_src/tests/first.ts +++ b/ts_src/tests/first.ts @@ -2,6 +2,7 @@ import tape from 'tape'; import { Psbt } from '../lib/psbt.js'; import { fixtures } from './fixtures/first.js'; import { transactionFromBuffer } from './utils/txTools.js'; +import * as tools from 'uint8array-tools'; for (const f of fixtures) { tape('Test: ' + f.description, t => { @@ -24,8 +25,11 @@ function jsonify(parsed: any): string { return JSON.stringify( parsed, (key, value) => { - return key !== undefined && value !== undefined && value.type === 'Buffer' - ? Buffer.from(value.data).toString('hex') + return (key !== undefined && + value !== undefined && + value instanceof Uint8Array) || + value.type === 'Buffer' + ? tools.toHex(value) : value; }, 2, diff --git a/ts_src/tests/fixtures/create.ts b/ts_src/tests/fixtures/create.ts index bb516a9..996412f 100644 --- a/ts_src/tests/fixtures/create.ts +++ b/ts_src/tests/fixtures/create.ts @@ -19,11 +19,11 @@ export const fixtures = [ addOutputs: [ { script: b('0014d85c2b71d0060b09c9886aeb815e50991dda124d'), - value: 149990000, + value: 149990000n, }, { script: b('001400aea9a2e5f0f876a588df5546e8742d1d87008f'), - value: 100000000, + value: 100000000n, }, ], updateInputData: [ @@ -61,7 +61,7 @@ export const fixtures = [ { witnessUtxo: { script: b('a914b7f5faf40e3d40a5a459b1db3535f2b72fa921e887'), - value: 200000000, + value: 200000000n, }, redeemScript: b( '00208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903', diff --git a/ts_src/tests/fixtures/keyValsToPsbt.ts b/ts_src/tests/fixtures/keyValsToPsbt.ts index 18dda01..ceaee16 100644 --- a/ts_src/tests/fixtures/keyValsToPsbt.ts +++ b/ts_src/tests/fixtures/keyValsToPsbt.ts @@ -1,4 +1,6 @@ +// import * as tools from 'uint8array-tools'; const b = (hex: string): Buffer => Buffer.from(hex, 'hex'); +// const b = (hex: string): Uint8Array => tools.fromHex(hex); export const fixtures = [ { diff --git a/ts_src/tests/fixtures/methods.ts b/ts_src/tests/fixtures/methods.ts index 9eb1dba..267460f 100644 --- a/ts_src/tests/fixtures/methods.ts +++ b/ts_src/tests/fixtures/methods.ts @@ -433,14 +433,14 @@ export const fixtures = { ], exception: 'Data for global key globalXpub is incorrect: Expected { ' + - 'masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; } and got', + 'masterFingerprint: Uint8Array; extendedPubkey: Uint8Array; path: string; } and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { nonWitnessUtxo: 'blah' }], exception: - 'Data for input key nonWitnessUtxo is incorrect: Expected Buffer and got', + 'Data for input key nonWitnessUtxo is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', @@ -508,7 +508,7 @@ export const fixtures = { ], exception: 'Data for input key witnessUtxo is incorrect: Expected { ' + - 'script: Buffer; value: number; } and got', + 'script: Uint8Array; value: number; } and got', }, { method: 'updateInput', @@ -533,7 +533,7 @@ export const fixtures = { ], exception: 'Data for input key partialSig is incorrect: Expected { pubkey: ' + - 'Buffer; signature: Buffer; } and got', + 'Uint8Array; signature: Uint8Array; } and got', }, { method: 'updateInput', @@ -547,14 +547,14 @@ export const fixtures = { addInputOutput: true, args: [0, { redeemScript: 'a' }], exception: - 'Data for input key redeemScript is incorrect: Expected Buffer and got', + 'Data for input key redeemScript is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { witnessScript: 'a' }], exception: - 'Data for input key witnessScript is incorrect: Expected Buffer and got', + 'Data for input key witnessScript is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', @@ -571,21 +571,21 @@ export const fixtures = { ], exception: 'Data for input key bip32Derivation is incorrect: Expected { ' + - 'masterFingerprint: Buffer; pubkey: Buffer; path: string; } and got', + 'masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; } and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { finalScriptSig: 8 }], exception: - 'Data for input key finalScriptSig is incorrect: Expected Buffer and got', + 'Data for input key finalScriptSig is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', addInputOutput: true, args: [0, { finalScriptWitness: 8 }], exception: - 'Data for input key finalScriptWitness is incorrect: Expected Buffer and got', + 'Data for input key finalScriptWitness is incorrect: Expected Uint8Array and got', }, { method: 'updateInput', @@ -599,14 +599,14 @@ export const fixtures = { addInputOutput: true, args: [0, { redeemScript: 8 }], exception: - 'Data for output key redeemScript is incorrect: Expected Buffer and got', + 'Data for output key redeemScript is incorrect: Expected Uint8Array and got', }, { method: 'updateOutput', addInputOutput: true, args: [0, { witnessScript: 8 }], exception: - 'Data for output key witnessScript is incorrect: Expected Buffer and got', + 'Data for output key witnessScript is incorrect: Expected Uint8Array and got', }, { method: 'updateOutput', @@ -623,7 +623,7 @@ export const fixtures = { ], exception: 'Data for output key bip32Derivation is incorrect: Expected { ' + - 'masterFingerprint: Buffer; pubkey: Buffer; path: string; } and got', + 'masterFingerprint: Uint8Array; pubkey: Uint8Array; path: string; } and got', }, { method: 'updateInput', diff --git a/ts_src/tests/fixtures/update.ts b/ts_src/tests/fixtures/update.ts index ec5c495..c68523f 100644 --- a/ts_src/tests/fixtures/update.ts +++ b/ts_src/tests/fixtures/update.ts @@ -20,7 +20,7 @@ export const fixtures = [ ), witnessUtxo: { script: b('0014ce2ef55e561be15ef65dcc79f998117e142d6016'), - value: 10413, + value: 10413n, }, redeemScript: b( '5221029583bf39ae0a609747ad199addd634fa6108559d6c5cd39b4c2183f1ab96' + @@ -47,7 +47,7 @@ export const fixtures = [ { witnessUtxo: { script: b('a914b7f5faf40e3d40a5a459b1db3535f2b72fa921e887'), - value: 200000000, + value: 200000000n, }, redeemScript: b( '00208c2353173743b595dfb4a07b72ba8e42e3797da74e87fe7d9d7497e3b2028903', diff --git a/ts_src/tests/fromBuffer.ts b/ts_src/tests/fromBuffer.ts index dbbc714..70ddc2d 100644 --- a/ts_src/tests/fromBuffer.ts +++ b/ts_src/tests/fromBuffer.ts @@ -3,7 +3,7 @@ import { Psbt } from '../lib/psbt.js'; import { fixtures } from './fixtures/fromBuffer.js'; class Blah { - constructor(public buf: Buffer) {} + constructor(public buf: Uint8Array) {} getInputOutputCounts(): { inputCount: number; @@ -21,12 +21,12 @@ class Blah { addOutput(): void { return; } - toBuffer(): Buffer { + toBuffer(): Uint8Array { return this.buf; } } -const fromBuf = (b: Buffer): Blah => new Blah(b); +const fromBuf = (b: Uint8Array): Blah => new Blah(b); for (const f of fixtures) { tape('From Buffer should throw:', t => { diff --git a/ts_src/tests/utils/txTools.ts b/ts_src/tests/utils/txTools.ts index 624cc6b..ecb5bdc 100644 --- a/ts_src/tests/utils/txTools.ts +++ b/ts_src/tests/utils/txTools.ts @@ -12,13 +12,13 @@ export function getDefaultTx(version: number = 1): Transaction { } export const transactionFromBuffer: TransactionFromBuffer = ( - buffer: Buffer, + buffer: Uint8Array, ): Transaction => new Transaction(buffer); export class Transaction implements ITransaction { tx: BTransaction; - constructor(buffer: Buffer) { - this.tx = BTransaction.fromBuffer(buffer); + constructor(buffer: Uint8Array) { + this.tx = BTransaction.fromBuffer(Buffer.from(buffer)); if (this.tx.ins.some(input => input.script.length !== 0)) { throw new Error('Format Error: Transaction ScriptSigs are not empty'); } diff --git a/ts_src/tests/validation.ts b/ts_src/tests/validation.ts index 1e0947e..14946ad 100644 --- a/ts_src/tests/validation.ts +++ b/ts_src/tests/validation.ts @@ -5,6 +5,7 @@ import { inputs as convertInputs, } from '../lib/converter/index.js'; import { getDefaultTx } from './utils/txTools.js'; +import * as tools from 'uint8array-tools'; const b = (hex: string): Buffer => Buffer.from(hex, 'hex'); @@ -72,7 +73,8 @@ tape('should not pass isPartialSig with invalid DER signature', t => { }, new RegExp('Decode Error: partialSig has invalid pubkey in key 0x02ff')); keyVal.key = Buffer.concat([b('02'), data.pubkey, data.pubkey.slice(1)]); const result = convertInputs.partialSig.decode(keyVal); - t.assert(result.pubkey.equals(keyVal.key.slice(1))); + // t.assert(result.pubkey.equals(keyVal.key.slice(1))); + t.assert(tools.compare(result.pubkey, keyVal.key.slice(1)) === 0); const psbt1: any = { globalMap: { diff --git a/tsconfig.base.json b/tsconfig.base.json index 3c08eba..f3a3cc2 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2015", + "target": "ESNext", "outDir": "./src", "declaration": true, "rootDir": "./ts_src", diff --git a/tslint.json b/tslint.json index 6f10eef..80d3c6f 100644 --- a/tslint.json +++ b/tslint.json @@ -4,11 +4,7 @@ "rules": { "arrow-parens": [true, "ban-single-arg-parens"], "curly": false, - "indent": [ - true, - "spaces", - 2 - ], + "indent": [true, "spaces", 2], "interface-name": [false], "match-default-export-name": true, "max-classes-per-file": [false], @@ -19,6 +15,7 @@ "no-implicit-dependencies": [true, "dev"], "no-return-await": true, "no-var-requires": false, + "ordered-imports": false, "no-unnecessary-callback-wrapper": true, "no-unused-expression": false, "object-literal-sort-keys": false, From 3e791bb8b953de967694de618af0703b1e3e7345 Mon Sep 17 00:00:00 2001 From: ayman Date: Tue, 27 Aug 2024 18:00:09 +0530 Subject: [PATCH 4/9] wip: add bigint to witnessUtxo field --- src/cjs/lib/psbt.d.ts | 4 +- src/esm/lib/psbt.d.ts | 4 +- src/esm/tests/first.js | 2 + src/esm/tests/utils/txTools.d.ts | 3 +- src/esm/tests/utils/txTools.js | 4 +- ts_src/lib/psbt.ts | 90 ++++++++++++++++---------------- ts_src/tests/first.ts | 2 + ts_src/tests/utils/txTools.ts | 6 +-- 8 files changed, 59 insertions(+), 56 deletions(-) diff --git a/src/cjs/lib/psbt.d.ts b/src/cjs/lib/psbt.d.ts index 7044337..177fe81 100644 --- a/src/cjs/lib/psbt.d.ts +++ b/src/cjs/lib/psbt.d.ts @@ -22,5 +22,5 @@ export declare class Psbt { combine(...those: this[]): this; getTransaction(): Uint8Array; } -export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo } from "./interfaces.js"; -export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput } from "./utils.js"; +export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo, } from './interfaces.js'; +export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput, } from './utils.js'; diff --git a/src/esm/lib/psbt.d.ts b/src/esm/lib/psbt.d.ts index 7044337..177fe81 100644 --- a/src/esm/lib/psbt.d.ts +++ b/src/esm/lib/psbt.d.ts @@ -22,5 +22,5 @@ export declare class Psbt { combine(...those: this[]): this; getTransaction(): Uint8Array; } -export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo } from "./interfaces.js"; -export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput } from "./utils.js"; +export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo, } from './interfaces.js'; +export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput, } from './utils.js'; diff --git a/src/esm/tests/first.js b/src/esm/tests/first.js index 0667d29..1a7aedd 100644 --- a/src/esm/tests/first.js +++ b/src/esm/tests/first.js @@ -28,6 +28,8 @@ function jsonify(parsed) { value instanceof Uint8Array) || value.type === 'Buffer' ? tools.toHex(value) + : typeof value === 'bigint' + ? value.toString() : value; }, 2, diff --git a/src/esm/tests/utils/txTools.d.ts b/src/esm/tests/utils/txTools.d.ts index 50ad818..fc27109 100644 --- a/src/esm/tests/utils/txTools.d.ts +++ b/src/esm/tests/utils/txTools.d.ts @@ -1,4 +1,3 @@ -/// import { Transaction as BTransaction } from 'bitcoinjs-lib'; import { Transaction as ITransaction, TransactionFromBuffer } from '../../lib/interfaces'; export declare function getDefaultTx(version?: number): Transaction; @@ -12,5 +11,5 @@ export declare class Transaction implements ITransaction { }; addInput(input: any): void; addOutput(output: any): void; - toBuffer(): Buffer; + toBuffer(): Uint8Array; } diff --git a/src/esm/tests/utils/txTools.js b/src/esm/tests/utils/txTools.js index 82fa399..446974b 100644 --- a/src/esm/tests/utils/txTools.js +++ b/src/esm/tests/utils/txTools.js @@ -27,9 +27,9 @@ export class Transaction { this.tx.addInput(hash, input.index, input.sequence); } addOutput(output) { - this.tx.addOutput(output.script, output.value); + this.tx.addOutput(output.script, Number(output.value)); } toBuffer() { - return this.tx.toBuffer(); + return Uint8Array.from(this.tx.toBuffer()); } } diff --git a/ts_src/lib/psbt.ts b/ts_src/lib/psbt.ts index a4e990a..41b62ac 100644 --- a/ts_src/lib/psbt.ts +++ b/ts_src/lib/psbt.ts @@ -193,53 +193,53 @@ export class Psbt { } export { - Bip32Derivation, - NonWitnessUtxo, - ControlBlock, - FinalScriptSig, - FinalScriptWitness, - GlobalXpub, - KeyValue, - PartialSig, - PorCommitment, - PsbtGlobal, - PsbtGlobalUpdate, - PsbtInput, - PsbtInputExtended, - PsbtInputUpdate, + Bip32Derivation, + NonWitnessUtxo, + ControlBlock, + FinalScriptSig, + FinalScriptWitness, + GlobalXpub, + KeyValue, + PartialSig, + PorCommitment, + PsbtGlobal, + PsbtGlobalUpdate, + PsbtInput, + PsbtInputExtended, + PsbtInputUpdate, PsbtOutput, - PsbtOutputExtended, - PsbtOutputUpdate, - RedeemScript, - SighashType, - TapBip32Derivation, - TapInternalKey, + PsbtOutputExtended, + PsbtOutputUpdate, + RedeemScript, + SighashType, + TapBip32Derivation, + TapInternalKey, TapKeySig, - TapLeaf, - TapLeafScript, - TapMerkleRoot, - TapScriptSig, + TapLeaf, + TapLeafScript, + TapMerkleRoot, + TapScriptSig, TapTree, - Transaction, - TransactionFromBuffer, - TransactionIOCountGetter, - TransactionLocktimeSetter, - TransactionVersionSetter, - WitnessScript, - WitnessUtxo -} from "./interfaces.js"; + Transaction, + TransactionFromBuffer, + TransactionIOCountGetter, + TransactionLocktimeSetter, + TransactionVersionSetter, + WitnessScript, + WitnessUtxo, +} from './interfaces.js'; export { - addInputAttributes, - addOutputAttributes, - checkForInput, - checkForOutput, - checkHasKey, - defaultLocktimeSetter, - defaultVersionSetter, - getEnumLength, - inputCheckUncleanFinalized, - updateGlobal, - updateInput, - updateOutput -} from "./utils.js" \ No newline at end of file + addInputAttributes, + addOutputAttributes, + checkForInput, + checkForOutput, + checkHasKey, + defaultLocktimeSetter, + defaultVersionSetter, + getEnumLength, + inputCheckUncleanFinalized, + updateGlobal, + updateInput, + updateOutput, +} from './utils.js'; diff --git a/ts_src/tests/first.ts b/ts_src/tests/first.ts index 989e3d5..0c2cb4d 100644 --- a/ts_src/tests/first.ts +++ b/ts_src/tests/first.ts @@ -30,6 +30,8 @@ function jsonify(parsed: any): string { value instanceof Uint8Array) || value.type === 'Buffer' ? tools.toHex(value) + : typeof value === 'bigint' + ? value.toString() : value; }, 2, diff --git a/ts_src/tests/utils/txTools.ts b/ts_src/tests/utils/txTools.ts index ecb5bdc..b4fc86b 100644 --- a/ts_src/tests/utils/txTools.ts +++ b/ts_src/tests/utils/txTools.ts @@ -43,10 +43,10 @@ export class Transaction implements ITransaction { } addOutput(output: any): void { - this.tx.addOutput(output.script, output.value); + this.tx.addOutput(output.script, Number(output.value)); } - toBuffer(): Buffer { - return this.tx.toBuffer(); + toBuffer(): Uint8Array { + return Uint8Array.from(this.tx.toBuffer()); } } From b5d87078308b3138b9cc0c75d30acccf7b5abab9 Mon Sep 17 00:00:00 2001 From: ayman Date: Wed, 28 Aug 2024 17:48:34 +0530 Subject: [PATCH 5/9] fix: tests --- package-lock.json | 337 +++------------------ package.json | 2 +- src/cjs/lib/converter/input/witnessUtxo.js | 2 +- src/cjs/lib/converter/varint.d.ts | 4 - src/cjs/lib/converter/varint.js | 77 ----- src/esm/lib/converter/input/witnessUtxo.js | 2 +- src/esm/lib/converter/varint.d.ts | 4 - src/esm/lib/converter/varint.js | 72 ----- src/esm/tests/first.js | 7 +- src/esm/tests/fixtures/methods.d.ts | 6 +- src/esm/tests/fixtures/methods.js | 6 +- src/esm/tests/utils/txTools.d.ts | 3 +- src/esm/tests/utils/txTools.js | 3 +- src/esm/tests/varint.d.ts | 1 - src/esm/tests/varint.js | 78 ----- ts_src/lib/converter/input/witnessUtxo.ts | 2 +- ts_src/lib/converter/varint.ts | 93 ------ ts_src/tests/first.ts | 7 +- ts_src/tests/fixtures/methods.ts | 6 +- ts_src/tests/utils/txTools.ts | 5 +- ts_src/tests/varint.ts | 91 ------ tsconfig.base.json | 3 +- 22 files changed, 72 insertions(+), 739 deletions(-) delete mode 100644 src/cjs/lib/converter/varint.d.ts delete mode 100644 src/cjs/lib/converter/varint.js delete mode 100644 src/esm/lib/converter/varint.d.ts delete mode 100644 src/esm/lib/converter/varint.js delete mode 100644 src/esm/tests/varint.d.ts delete mode 100644 src/esm/tests/varint.js delete mode 100644 ts_src/lib/converter/varint.ts delete mode 100644 ts_src/tests/varint.ts diff --git a/package-lock.json b/package-lock.json index 0a9e5e4..b5c297b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "devDependencies": { "@types/node": "12.0.8", "@types/tape": "4.2.33", - "bitcoinjs-lib": "^5.0.5", + "bitcoinjs-lib": "^6.1.6", "c8": "^10.1.2", "prettier": "^1.18.2", "rimraf": "^2.6.3", @@ -9526,6 +9526,18 @@ "node": ">= 0.4" } }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "dev": true, @@ -9646,89 +9658,38 @@ "license": "MIT" }, "node_modules/base-x": { - "version": "3.0.9", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", + "dev": true }, "node_modules/bech32": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/bindings": { - "version": "1.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", + "dev": true }, "node_modules/bip174": { - "version": "2.1.0", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.1.tgz", + "integrity": "sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } }, - "node_modules/bip32": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "10.12.18", - "bs58check": "^2.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "tiny-secp256k1": "^1.1.3", - "typeforce": "^1.11.5", - "wif": "^2.0.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/bip32/node_modules/@types/node": { - "version": "10.12.18", - "dev": true, - "license": "MIT" - }, - "node_modules/bip66": { - "version": "1.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/bitcoin-ops": { - "version": "1.4.1", - "dev": true, - "license": "MIT" - }, "node_modules/bitcoinjs-lib": { - "version": "5.2.0", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.6.tgz", + "integrity": "sha512-Fk8+Vc+e2rMoDU5gXkW9tD+313rhkm5h6N9HfZxXvYU9LedttVvmXKTgd9k5rsQJjkSfsv6XRM8uhJv94SrvcA==", "dev": true, - "license": "MIT", "dependencies": { - "bech32": "^1.1.2", - "bip174": "^2.0.1", - "bip32": "^2.0.4", - "bip66": "^1.1.0", - "bitcoin-ops": "^1.4.0", - "bs58check": "^2.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.3", - "merkle-lib": "^2.0.10", - "pushdata-bitcoin": "^1.0.1", - "randombytes": "^2.0.1", - "tiny-secp256k1": "^1.1.1", + "@noble/hashes": "^1.2.0", + "bech32": "^2.0.0", + "bip174": "^2.1.1", + "bs58check": "^3.0.1", "typeforce": "^1.11.3", - "varuint-bitcoin": "^1.0.4", - "wif": "^2.0.1" + "varuint-bitcoin": "^1.1.2" }, "engines": { "node": ">=8.0.0" @@ -9743,11 +9704,6 @@ "safe-buffer": "^5.1.1" } }, - "node_modules/bn.js": { - "version": "4.12.0", - "dev": true, - "license": "MIT" - }, "node_modules/brace-expansion": { "version": "1.1.11", "dev": true, @@ -9757,27 +9713,23 @@ "concat-map": "0.0.1" } }, - "node_modules/brorand": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, "node_modules/bs58": { - "version": "4.0.1", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", "dev": true, - "license": "MIT", "dependencies": { - "base-x": "^3.0.2" + "base-x": "^4.0.0" } }, "node_modules/bs58check": { - "version": "2.1.2", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", "dev": true, - "license": "MIT", "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" } }, "node_modules/builtin-modules": { @@ -10239,15 +10191,6 @@ "node": ">=4" } }, - "node_modules/cipher-base": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/color-convert": { "version": "1.9.3", "dev": true, @@ -10271,31 +10214,6 @@ "dev": true, "license": "MIT" }, - "node_modules/create-hash": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "node_modules/data-view-buffer": { "version": "1.0.1", "dev": true, @@ -10439,20 +10357,6 @@ "dev": true, "license": "MIT" }, - "node_modules/elliptic": { - "version": "6.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/es-abstract": { "version": "1.23.3", "dev": true, @@ -10618,11 +10522,6 @@ "node": ">=4" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/for-each": { "version": "0.3.3", "dev": true, @@ -10853,28 +10752,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "node_modules/hasown": { "version": "2.0.2", "dev": true, @@ -10886,16 +10763,6 @@ "node": ">= 0.4" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "dev": true, @@ -11233,31 +11100,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/md5.js": { - "version": "1.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/merkle-lib": { - "version": "2.0.10", - "dev": true, - "license": "MIT" - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/minimatch": { "version": "3.1.2", "dev": true, @@ -11315,11 +11157,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/nan": { - "version": "2.17.0", - "dev": true, - "license": "MIT" - }, "node_modules/object-inspect": { "version": "1.13.1", "dev": true, @@ -11439,35 +11276,6 @@ "node": ">=4" } }, - "node_modules/pushdata-bitcoin": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bitcoin-ops": "^1.3.0" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "dev": true, @@ -11520,15 +11328,6 @@ "rimraf": "bin.js" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "node_modules/safe-array-concat": { "version": "1.1.2", "dev": true, @@ -11619,18 +11418,6 @@ "node": ">= 0.4" } }, - "node_modules/sha.js": { - "version": "2.4.11", - "dev": true, - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "dev": true, @@ -11683,14 +11470,6 @@ "node": ">= 0.4" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", @@ -11876,22 +11655,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tiny-secp256k1": { - "version": "1.1.6", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.3.0", - "bn.js": "^4.11.8", - "create-hmac": "^1.1.7", - "elliptic": "^6.4.0", - "nan": "^2.13.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/tslib": { "version": "1.14.1", "dev": true, @@ -12008,8 +11771,9 @@ }, "node_modules/typeforce": { "version": "1.18.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", + "dev": true }, "node_modules/typescript": { "version": "3.5.2", @@ -12041,11 +11805,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "dev": true, @@ -12118,14 +11877,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wif": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "bs58check": "<3.0.0" - } - }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", diff --git a/package.json b/package.json index 70dc1fc..698cf7e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@types/node": "12.0.8", "@types/tape": "4.2.33", - "bitcoinjs-lib": "^5.0.5", + "bitcoinjs-lib": "^6.1.6", "c8": "^10.1.2", "prettier": "^1.18.2", "rimraf": "^2.6.3", diff --git a/src/cjs/lib/converter/input/witnessUtxo.js b/src/cjs/lib/converter/input/witnessUtxo.js index 174d094..1c56e96 100644 --- a/src/cjs/lib/converter/input/witnessUtxo.js +++ b/src/cjs/lib/converter/input/witnessUtxo.js @@ -42,7 +42,7 @@ function encode(data) { const { script, value } = data; const varuintlen = varuint.encodingLength(script.length); const result = new Uint8Array(8 + varuintlen + script.length); - tools.writeUInt64(result, 0, BigInt(value), 'LE'); + tools.writeInt64(result, 0, BigInt(value), 'LE'); varuint.encode(script.length, result, 8); result.set(script, 8 + varuintlen); return { diff --git a/src/cjs/lib/converter/varint.d.ts b/src/cjs/lib/converter/varint.d.ts deleted file mode 100644 index cff1d08..0000000 --- a/src/cjs/lib/converter/varint.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -export declare function encode(_number: number, buffer?: Buffer, offset?: number): Buffer; -export declare function decode(buffer: Buffer, offset?: number): number; -export declare function encodingLength(_number: number): number; diff --git a/src/cjs/lib/converter/varint.js b/src/cjs/lib/converter/varint.js deleted file mode 100644 index 72a4393..0000000 --- a/src/cjs/lib/converter/varint.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -// Number.MAX_SAFE_INTEGER -const MAX_SAFE_INTEGER = 9007199254740991; -function checkUInt53(n) { - if (n < 0 || n > MAX_SAFE_INTEGER || n % 1 !== 0) - throw new RangeError('value out of range'); -} -function encode(_number, buffer, offset) { - checkUInt53(_number); - if (!buffer) buffer = Buffer.allocUnsafe(encodingLength(_number)); - if (!Buffer.isBuffer(buffer)) - throw new TypeError('buffer must be a Buffer instance'); - if (!offset) offset = 0; - // 8 bit - if (_number < 0xfd) { - buffer.writeUInt8(_number, offset); - Object.assign(encode, { bytes: 1 }); - // 16 bit - } else if (_number <= 0xffff) { - buffer.writeUInt8(0xfd, offset); - buffer.writeUInt16LE(_number, offset + 1); - Object.assign(encode, { bytes: 3 }); - // 32 bit - } else if (_number <= 0xffffffff) { - buffer.writeUInt8(0xfe, offset); - buffer.writeUInt32LE(_number, offset + 1); - Object.assign(encode, { bytes: 5 }); - // 64 bit - } else { - buffer.writeUInt8(0xff, offset); - buffer.writeUInt32LE(_number >>> 0, offset + 1); - buffer.writeUInt32LE((_number / 0x100000000) | 0, offset + 5); - Object.assign(encode, { bytes: 9 }); - } - return buffer; -} -exports.encode = encode; -function decode(buffer, offset) { - if (!Buffer.isBuffer(buffer)) - throw new TypeError('buffer must be a Buffer instance'); - if (!offset) offset = 0; - const first = buffer.readUInt8(offset); - // 8 bit - if (first < 0xfd) { - Object.assign(decode, { bytes: 1 }); - return first; - // 16 bit - } else if (first === 0xfd) { - Object.assign(decode, { bytes: 3 }); - return buffer.readUInt16LE(offset + 1); - // 32 bit - } else if (first === 0xfe) { - Object.assign(decode, { bytes: 5 }); - return buffer.readUInt32LE(offset + 1); - // 64 bit - } else { - Object.assign(decode, { bytes: 9 }); - const lo = buffer.readUInt32LE(offset + 1); - const hi = buffer.readUInt32LE(offset + 5); - const _number = hi * 0x0100000000 + lo; - checkUInt53(_number); - return _number; - } -} -exports.decode = decode; -function encodingLength(_number) { - checkUInt53(_number); - return _number < 0xfd - ? 1 - : _number <= 0xffff - ? 3 - : _number <= 0xffffffff - ? 5 - : 9; -} -exports.encodingLength = encodingLength; diff --git a/src/esm/lib/converter/input/witnessUtxo.js b/src/esm/lib/converter/input/witnessUtxo.js index 6cdb96b..75f6177 100644 --- a/src/esm/lib/converter/input/witnessUtxo.js +++ b/src/esm/lib/converter/input/witnessUtxo.js @@ -28,7 +28,7 @@ export function encode(data) { const { script, value } = data; const varuintlen = varuint.encodingLength(script.length); const result = new Uint8Array(8 + varuintlen + script.length); - tools.writeUInt64(result, 0, BigInt(value), 'LE'); + tools.writeInt64(result, 0, BigInt(value), 'LE'); varuint.encode(script.length, result, 8); result.set(script, 8 + varuintlen); return { diff --git a/src/esm/lib/converter/varint.d.ts b/src/esm/lib/converter/varint.d.ts deleted file mode 100644 index cff1d08..0000000 --- a/src/esm/lib/converter/varint.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -export declare function encode(_number: number, buffer?: Buffer, offset?: number): Buffer; -export declare function decode(buffer: Buffer, offset?: number): number; -export declare function encodingLength(_number: number): number; diff --git a/src/esm/lib/converter/varint.js b/src/esm/lib/converter/varint.js deleted file mode 100644 index 16ffedf..0000000 --- a/src/esm/lib/converter/varint.js +++ /dev/null @@ -1,72 +0,0 @@ -// Number.MAX_SAFE_INTEGER -const MAX_SAFE_INTEGER = 9007199254740991; -function checkUInt53(n) { - if (n < 0 || n > MAX_SAFE_INTEGER || n % 1 !== 0) - throw new RangeError('value out of range'); -} -export function encode(_number, buffer, offset) { - checkUInt53(_number); - if (!buffer) buffer = Buffer.allocUnsafe(encodingLength(_number)); - if (!Buffer.isBuffer(buffer)) - throw new TypeError('buffer must be a Buffer instance'); - if (!offset) offset = 0; - // 8 bit - if (_number < 0xfd) { - buffer.writeUInt8(_number, offset); - Object.assign(encode, { bytes: 1 }); - // 16 bit - } else if (_number <= 0xffff) { - buffer.writeUInt8(0xfd, offset); - buffer.writeUInt16LE(_number, offset + 1); - Object.assign(encode, { bytes: 3 }); - // 32 bit - } else if (_number <= 0xffffffff) { - buffer.writeUInt8(0xfe, offset); - buffer.writeUInt32LE(_number, offset + 1); - Object.assign(encode, { bytes: 5 }); - // 64 bit - } else { - buffer.writeUInt8(0xff, offset); - buffer.writeUInt32LE(_number >>> 0, offset + 1); - buffer.writeUInt32LE((_number / 0x100000000) | 0, offset + 5); - Object.assign(encode, { bytes: 9 }); - } - return buffer; -} -export function decode(buffer, offset) { - if (!Buffer.isBuffer(buffer)) - throw new TypeError('buffer must be a Buffer instance'); - if (!offset) offset = 0; - const first = buffer.readUInt8(offset); - // 8 bit - if (first < 0xfd) { - Object.assign(decode, { bytes: 1 }); - return first; - // 16 bit - } else if (first === 0xfd) { - Object.assign(decode, { bytes: 3 }); - return buffer.readUInt16LE(offset + 1); - // 32 bit - } else if (first === 0xfe) { - Object.assign(decode, { bytes: 5 }); - return buffer.readUInt32LE(offset + 1); - // 64 bit - } else { - Object.assign(decode, { bytes: 9 }); - const lo = buffer.readUInt32LE(offset + 1); - const hi = buffer.readUInt32LE(offset + 5); - const _number = hi * 0x0100000000 + lo; - checkUInt53(_number); - return _number; - } -} -export function encodingLength(_number) { - checkUInt53(_number); - return _number < 0xfd - ? 1 - : _number <= 0xffff - ? 3 - : _number <= 0xffffffff - ? 5 - : 9; -} diff --git a/src/esm/tests/first.js b/src/esm/tests/first.js index 1a7aedd..8cb4852 100644 --- a/src/esm/tests/first.js +++ b/src/esm/tests/first.js @@ -23,13 +23,12 @@ function jsonify(parsed) { return JSON.stringify( parsed, (key, value) => { - return (key !== undefined && + return key !== undefined && value !== undefined && - value instanceof Uint8Array) || - value.type === 'Buffer' + (value.type === 'Buffer' || value instanceof Uint8Array) ? tools.toHex(value) : typeof value === 'bigint' - ? value.toString() + ? Number(value) : value; }, 2, diff --git a/src/esm/tests/fixtures/methods.d.ts b/src/esm/tests/fixtures/methods.d.ts index ba78010..3c47cbf 100644 --- a/src/esm/tests/fixtures/methods.d.ts +++ b/src/esm/tests/fixtures/methods.d.ts @@ -24,7 +24,7 @@ export declare const fixtures: { args: (number | { witnessUtxo: { script: Buffer; - value: number; + value: bigint; }; })[]; expected: string; @@ -269,7 +269,7 @@ export declare const fixtures: { args: (number | { witnessUtxo: { script: Buffer; - value: number; + value: bigint; }; })[]; exception: string; @@ -361,7 +361,7 @@ export declare const fixtures: { } | { method: string; addInputOutput: boolean; - args: import("bitcoinjs-lib").StackElement[]; + args: (number | Buffer)[]; exception: string; twice?: undefined; } | { diff --git a/src/esm/tests/fixtures/methods.js b/src/esm/tests/fixtures/methods.js index 80a0b7f..56351a4 100644 --- a/src/esm/tests/fixtures/methods.js +++ b/src/esm/tests/fixtures/methods.js @@ -71,7 +71,7 @@ export const fixtures = { addInputOutput: true, args: [ 0, - { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890 } }, + { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890n } }, ], expected: 'cHNidP8BAFMBAAAAAdSnb/ld4fTAFho+U+qHapHtlTMa6NAS2B+XE4SYzl2GAwAAAAD/' + @@ -507,7 +507,7 @@ export const fixtures = { ], exception: 'Data for input key witnessUtxo is incorrect: Expected { ' + - 'script: Uint8Array; value: number; } and got', + 'script: Uint8Array; value: bigint; } and got', }, { method: 'updateInput', @@ -515,7 +515,7 @@ export const fixtures = { twice: true, args: [ 0, - { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890 } }, + { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890n } }, ], exception: 'Can not add duplicate data to input', }, diff --git a/src/esm/tests/utils/txTools.d.ts b/src/esm/tests/utils/txTools.d.ts index fc27109..50ad818 100644 --- a/src/esm/tests/utils/txTools.d.ts +++ b/src/esm/tests/utils/txTools.d.ts @@ -1,3 +1,4 @@ +/// import { Transaction as BTransaction } from 'bitcoinjs-lib'; import { Transaction as ITransaction, TransactionFromBuffer } from '../../lib/interfaces'; export declare function getDefaultTx(version?: number): Transaction; @@ -11,5 +12,5 @@ export declare class Transaction implements ITransaction { }; addInput(input: any): void; addOutput(output: any): void; - toBuffer(): Uint8Array; + toBuffer(): Buffer; } diff --git a/src/esm/tests/utils/txTools.js b/src/esm/tests/utils/txTools.js index 446974b..129de64 100644 --- a/src/esm/tests/utils/txTools.js +++ b/src/esm/tests/utils/txTools.js @@ -1,3 +1,4 @@ +// import { Transaction as BTransaction } from './transaction.js'; import { Transaction as BTransaction } from 'bitcoinjs-lib'; import { reverseBuffer } from '../../lib/converter/tools.js'; export function getDefaultTx(version = 1) { @@ -30,6 +31,6 @@ export class Transaction { this.tx.addOutput(output.script, Number(output.value)); } toBuffer() { - return Uint8Array.from(this.tx.toBuffer()); + return this.tx.toBuffer(); } } diff --git a/src/esm/tests/varint.d.ts b/src/esm/tests/varint.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/src/esm/tests/varint.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/esm/tests/varint.js b/src/esm/tests/varint.js deleted file mode 100644 index e16dcb4..0000000 --- a/src/esm/tests/varint.js +++ /dev/null @@ -1,78 +0,0 @@ -import tape from 'tape'; -import * as varuint from '../lib/converter/varint.js'; -import { fixtures } from './fixtures/varint.js'; -fixtures.valid.forEach((fixture, i) => { - tape('valid encode #' + (i + 1), t => { - t.same(varuint.encode(fixture.dec).toString('hex'), fixture.hex); - // @ts-ignore - t.same(varuint.encode.bytes, fixture.hex.length / 2); - t.end(); - }); - tape('valid decode #' + (i + 1), t => { - t.same(varuint.decode(Buffer.from(fixture.hex, 'hex')), fixture.dec); - // @ts-ignore - t.same(varuint.decode.bytes, fixture.hex.length / 2); - t.end(); - }); - tape('valid encodingLength #' + (i + 1), t => { - t.same(varuint.encodingLength(fixture.dec), fixture.hex.length / 2); - t.end(); - }); -}); -fixtures.invalid.forEach((fixture, i) => { - tape('invalid encode #' + (i + 1), t => { - t.throws(() => { - varuint.encode(fixture.dec); - }, new RegExp(fixture.msg)); - t.end(); - }); - tape('invalid encodingLength #' + (i + 1), t => { - t.throws(() => { - varuint.encodingLength(fixture.dec); - }, new RegExp(fixture.msg)); - t.end(); - }); - if (fixture.hex) { - tape('invalid decode #' + (i + 1), t => { - t.throws(() => { - // @ts-ignore - t.decode(varuint.decode(Buffer.from(fixture.hex, 'hex'))); - }, new RegExp(fixture.msg)); - t.end(); - }); - } -}); -tape('encode', t => { - t.test('write to buffer with offset', _t => { - const buffer = Buffer.from([0x00, 0x00]); - _t.same(varuint.encode(0xfc, buffer, 1).toString('hex'), '00fc'); - // @ts-ignore - _t.same(varuint.encode.bytes, 1); - _t.end(); - }); - t.test('should be a buffer', _t => { - _t.throws(() => { - // @ts-ignore - varuint.encode(0, []); - }, new RegExp('buffer must be a Buffer instance')); - _t.end(); - }); - t.end(); -}); -tape('decode', t => { - t.test('read from buffer with offset', _t => { - const buffer = Buffer.from([0x00, 0xfc]); - _t.same(varuint.decode(buffer, 1), 0xfc); - // @ts-ignore - _t.same(varuint.decode.bytes, 1); - _t.end(); - }); - t.test('should be a buffer', _t => { - _t.throws(() => { - // @ts-ignore - varuint.decode([]); - }, new RegExp('buffer must be a Buffer instance')); - _t.end(); - }); - t.end(); -}); diff --git a/ts_src/lib/converter/input/witnessUtxo.ts b/ts_src/lib/converter/input/witnessUtxo.ts index d0e3b14..8f9d632 100644 --- a/ts_src/lib/converter/input/witnessUtxo.ts +++ b/ts_src/lib/converter/input/witnessUtxo.ts @@ -33,7 +33,7 @@ export function encode(data: WitnessUtxo): KeyValue { const result = new Uint8Array(8 + varuintlen + script.length); - tools.writeUInt64(result, 0, BigInt(value), 'LE'); + tools.writeInt64(result, 0, BigInt(value), 'LE'); varuint.encode(script.length, result, 8); result.set(script, 8 + varuintlen); diff --git a/ts_src/lib/converter/varint.ts b/ts_src/lib/converter/varint.ts deleted file mode 100644 index b692128..0000000 --- a/ts_src/lib/converter/varint.ts +++ /dev/null @@ -1,93 +0,0 @@ -// Number.MAX_SAFE_INTEGER -const MAX_SAFE_INTEGER = 9007199254740991; - -function checkUInt53(n: number): void { - if (n < 0 || n > MAX_SAFE_INTEGER || n % 1 !== 0) - throw new RangeError('value out of range'); -} - -export function encode( - _number: number, - buffer?: Buffer, - offset?: number, -): Buffer { - checkUInt53(_number); - - if (!buffer) buffer = Buffer.allocUnsafe(encodingLength(_number)); - if (!Buffer.isBuffer(buffer)) - throw new TypeError('buffer must be a Buffer instance'); - if (!offset) offset = 0; - - // 8 bit - if (_number < 0xfd) { - buffer.writeUInt8(_number, offset); - Object.assign(encode, { bytes: 1 }); - - // 16 bit - } else if (_number <= 0xffff) { - buffer.writeUInt8(0xfd, offset); - buffer.writeUInt16LE(_number, offset + 1); - Object.assign(encode, { bytes: 3 }); - - // 32 bit - } else if (_number <= 0xffffffff) { - buffer.writeUInt8(0xfe, offset); - buffer.writeUInt32LE(_number, offset + 1); - Object.assign(encode, { bytes: 5 }); - - // 64 bit - } else { - buffer.writeUInt8(0xff, offset); - buffer.writeUInt32LE(_number >>> 0, offset + 1); - buffer.writeUInt32LE((_number / 0x100000000) | 0, offset + 5); - Object.assign(encode, { bytes: 9 }); - } - - return buffer; -} - -export function decode(buffer: Buffer, offset?: number): number { - if (!Buffer.isBuffer(buffer)) - throw new TypeError('buffer must be a Buffer instance'); - if (!offset) offset = 0; - - const first = buffer.readUInt8(offset); - - // 8 bit - if (first < 0xfd) { - Object.assign(decode, { bytes: 1 }); - return first; - - // 16 bit - } else if (first === 0xfd) { - Object.assign(decode, { bytes: 3 }); - return buffer.readUInt16LE(offset + 1); - - // 32 bit - } else if (first === 0xfe) { - Object.assign(decode, { bytes: 5 }); - return buffer.readUInt32LE(offset + 1); - - // 64 bit - } else { - Object.assign(decode, { bytes: 9 }); - const lo = buffer.readUInt32LE(offset + 1); - const hi = buffer.readUInt32LE(offset + 5); - const _number = hi * 0x0100000000 + lo; - checkUInt53(_number); - - return _number; - } -} - -export function encodingLength(_number: number): number { - checkUInt53(_number); - - return _number < 0xfd - ? 1 - : _number <= 0xffff - ? 3 - : _number <= 0xffffffff - ? 5 - : 9; -} diff --git a/ts_src/tests/first.ts b/ts_src/tests/first.ts index 0c2cb4d..18beed0 100644 --- a/ts_src/tests/first.ts +++ b/ts_src/tests/first.ts @@ -25,13 +25,12 @@ function jsonify(parsed: any): string { return JSON.stringify( parsed, (key, value) => { - return (key !== undefined && + return key !== undefined && value !== undefined && - value instanceof Uint8Array) || - value.type === 'Buffer' + (value.type === 'Buffer' || value instanceof Uint8Array) ? tools.toHex(value) : typeof value === 'bigint' - ? value.toString() + ? Number(value) : value; }, 2, diff --git a/ts_src/tests/fixtures/methods.ts b/ts_src/tests/fixtures/methods.ts index 267460f..606aee3 100644 --- a/ts_src/tests/fixtures/methods.ts +++ b/ts_src/tests/fixtures/methods.ts @@ -72,7 +72,7 @@ export const fixtures = { addInputOutput: true, args: [ 0, - { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890 } }, + { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890n } }, ], expected: 'cHNidP8BAFMBAAAAAdSnb/ld4fTAFho+U+qHapHtlTMa6NAS2B+XE4SYzl2GAwAAAAD/' + @@ -508,7 +508,7 @@ export const fixtures = { ], exception: 'Data for input key witnessUtxo is incorrect: Expected { ' + - 'script: Uint8Array; value: number; } and got', + 'script: Uint8Array; value: bigint; } and got', }, { method: 'updateInput', @@ -516,7 +516,7 @@ export const fixtures = { twice: true, args: [ 0, - { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890 } }, + { witnessUtxo: { script: Buffer.from([1, 2, 3]), value: 1234567890n } }, ], exception: 'Can not add duplicate data to input', }, diff --git a/ts_src/tests/utils/txTools.ts b/ts_src/tests/utils/txTools.ts index b4fc86b..c06bf09 100644 --- a/ts_src/tests/utils/txTools.ts +++ b/ts_src/tests/utils/txTools.ts @@ -1,3 +1,4 @@ +// import { Transaction as BTransaction } from './transaction.js'; import { Transaction as BTransaction } from 'bitcoinjs-lib'; import { reverseBuffer } from '../../lib/converter/tools.js'; import { @@ -46,7 +47,7 @@ export class Transaction implements ITransaction { this.tx.addOutput(output.script, Number(output.value)); } - toBuffer(): Uint8Array { - return Uint8Array.from(this.tx.toBuffer()); + toBuffer(): Buffer { + return this.tx.toBuffer(); } } diff --git a/ts_src/tests/varint.ts b/ts_src/tests/varint.ts deleted file mode 100644 index 432686d..0000000 --- a/ts_src/tests/varint.ts +++ /dev/null @@ -1,91 +0,0 @@ -import tape from 'tape'; -import * as varuint from '../lib/converter/varint.js'; - -import { fixtures } from './fixtures/varint.js'; - -fixtures.valid.forEach((fixture, i) => { - tape('valid encode #' + (i + 1), t => { - t.same(varuint.encode(fixture.dec).toString('hex'), fixture.hex); - // @ts-ignore - t.same(varuint.encode.bytes, fixture.hex.length / 2); - t.end(); - }); - - tape('valid decode #' + (i + 1), t => { - t.same(varuint.decode(Buffer.from(fixture.hex, 'hex')), fixture.dec); - // @ts-ignore - t.same(varuint.decode.bytes, fixture.hex.length / 2); - t.end(); - }); - - tape('valid encodingLength #' + (i + 1), t => { - t.same(varuint.encodingLength(fixture.dec), fixture.hex.length / 2); - t.end(); - }); -}); - -fixtures.invalid.forEach((fixture, i) => { - tape('invalid encode #' + (i + 1), t => { - t.throws(() => { - varuint.encode(fixture.dec); - }, new RegExp(fixture.msg)); - t.end(); - }); - - tape('invalid encodingLength #' + (i + 1), t => { - t.throws(() => { - varuint.encodingLength(fixture.dec); - }, new RegExp(fixture.msg)); - t.end(); - }); - - if (fixture.hex) { - tape('invalid decode #' + (i + 1), t => { - t.throws(() => { - // @ts-ignore - t.decode(varuint.decode(Buffer.from(fixture.hex, 'hex'))); - }, new RegExp(fixture.msg)); - t.end(); - }); - } -}); - -tape('encode', t => { - t.test('write to buffer with offset', _t => { - const buffer = Buffer.from([0x00, 0x00]); - _t.same(varuint.encode(0xfc, buffer, 1).toString('hex'), '00fc'); - // @ts-ignore - _t.same(varuint.encode.bytes, 1); - _t.end(); - }); - - t.test('should be a buffer', _t => { - _t.throws(() => { - // @ts-ignore - varuint.encode(0, []); - }, new RegExp('buffer must be a Buffer instance')); - _t.end(); - }); - - t.end(); -}); - -tape('decode', t => { - t.test('read from buffer with offset', _t => { - const buffer = Buffer.from([0x00, 0xfc]); - _t.same(varuint.decode(buffer, 1), 0xfc); - // @ts-ignore - _t.same(varuint.decode.bytes, 1); - _t.end(); - }); - - t.test('should be a buffer', _t => { - _t.throws(() => { - // @ts-ignore - varuint.decode([]); - }, new RegExp('buffer must be a Buffer instance')); - _t.end(); - }); - - t.end(); -}); diff --git a/tsconfig.base.json b/tsconfig.base.json index f3a3cc2..212658d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -20,7 +20,8 @@ "module": "ESNext", "resolveJsonModule": true, "allowSyntheticDefaultImports": true, - "esModuleInterop": true + "esModuleInterop": true, + "skipLibCheck": true }, "include": ["ts_src/**/*.ts"], "exclude": ["**/*.spec.ts", "node_modules/**/*"] From 1bff3efa1b8644077e0042e6153396054cb65c17 Mon Sep 17 00:00:00 2001 From: ayman Date: Thu, 29 Aug 2024 20:42:12 +0530 Subject: [PATCH 6/9] chore: remove unnecessary exports from psbt.ts --- package-lock.json | 9352 +------------------------------- package.json | 6 +- src/cjs/lib/converter/tools.js | 27 - src/cjs/lib/psbt.d.ts | 2 +- src/cjs/lib/psbt.js | 10 - src/esm/lib/converter/tools.js | 27 - src/esm/lib/psbt.d.ts | 2 +- src/esm/lib/psbt.js | 15 +- src/esm/tests/utils/txTools.js | 1 - ts_src/lib/converter/tools.ts | 34 +- ts_src/lib/psbt.ts | 10 - ts_src/tests/utils/txTools.ts | 1 - 12 files changed, 32 insertions(+), 9455 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5c297b..a70c9b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "2.1.1", "license": "MIT", "dependencies": { - "uint8array-tools": "../uint8array-tools", - "varuint-bitcoin": "../varuint-bitcoin" + "uint8array-tools": "^0.0.9", + "varuint-bitcoin": "^2.0.0" }, "devDependencies": { "@types/node": "12.0.8", @@ -27,9325 +27,6 @@ "node": ">=18.0.0" } }, - "../uint8array-tools": { - "version": "0.0.8", - "license": "MIT", - "devDependencies": { - "@types/jest": "27.0.2", - "@types/node": "16.11.1", - "@typescript-eslint/eslint-plugin": "5.0.0", - "@typescript-eslint/parser": "5.0.0", - "eslint": "8.0.1", - "eslint-config-prettier": "8.3.0", - "eslint-plugin-prettier": "4.0.0", - "jest": "27.2.5", - "prettier": "2.4.1", - "ts-jest": "27.0.7", - "typescript": "4.4.4" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "../uint8array-tools/node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/@babel/code-frame": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/compat-data": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/core": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "../uint8array-tools/node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../uint8array-tools/node_modules/@babel/generator": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../uint8array-tools/node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/helpers": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/highlight": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/@babel/parser": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "../uint8array-tools/node_modules/@babel/template": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/traverse": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/@babel/types": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../uint8array-tools/node_modules/@humanwhocodes/config-array": { - "version": "0.6.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../uint8array-tools/node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" - }, - "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../uint8array-tools/node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/@jest/console": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/core": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/@jest/environment": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/fake-timers": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/globals": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/reporters": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/@jest/source-map": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/test-result": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/test-sequencer": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/transform": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jest/types": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "../uint8array-tools/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/@sinonjs/commons": { - "version": "1.8.6", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "../uint8array-tools/node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "../uint8array-tools/node_modules/@tootallnate/once": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/@types/babel__core": { - "version": "7.20.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "../uint8array-tools/node_modules/@types/babel__generator": { - "version": "7.6.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "../uint8array-tools/node_modules/@types/babel__template": { - "version": "7.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "../uint8array-tools/node_modules/@types/babel__traverse": { - "version": "7.20.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "../uint8array-tools/node_modules/@types/graceful-fs": { - "version": "4.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "../uint8array-tools/node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "../uint8array-tools/node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "../uint8array-tools/node_modules/@types/jest": { - "version": "27.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-diff": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, - "../uint8array-tools/node_modules/@types/json-schema": { - "version": "7.0.15", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@types/node": { - "version": "16.11.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@types/prettier": { - "version": "2.7.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@types/yargs": { - "version": "16.0.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "../uint8array-tools/node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/experimental-utils": "5.0.0", - "@typescript-eslint/scope-manager": "5.0.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/@typescript-eslint/experimental-utils": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "5.0.0", - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/typescript-estree": "5.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "../uint8array-tools/node_modules/@typescript-eslint/parser": { - "version": "5.0.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.0.0", - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/typescript-estree": "5.0.0", - "debug": "^4.3.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/@typescript-eslint/scope-manager": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/visitor-keys": "5.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../uint8array-tools/node_modules/@typescript-eslint/types": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../uint8array-tools/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.0.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.0.0", - "@typescript-eslint/visitor-keys": "5.0.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.0.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../uint8array-tools/node_modules/abab": { - "version": "2.0.6", - "dev": true, - "license": "BSD-3-Clause" - }, - "../uint8array-tools/node_modules/acorn": { - "version": "8.12.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../uint8array-tools/node_modules/acorn-globals": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, - "../uint8array-tools/node_modules/acorn-globals/node_modules/acorn": { - "version": "7.4.1", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../uint8array-tools/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../uint8array-tools/node_modules/acorn-walk": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "../uint8array-tools/node_modules/agent-base": { - "version": "6.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "../uint8array-tools/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../uint8array-tools/node_modules/ansi-colors": { - "version": "4.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/ansi-escapes": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../uint8array-tools/node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../uint8array-tools/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/asynckit": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/babel-jest": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "../uint8array-tools/node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/babel-plugin-jest-hoist": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../uint8array-tools/node_modules/babel-preset-jest": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^27.5.1", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "../uint8array-tools/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../uint8array-tools/node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/browser-process-hrtime": { - "version": "1.0.0", - "dev": true, - "license": "BSD-2-Clause" - }, - "../uint8array-tools/node_modules/browserslist": { - "version": "4.23.1", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "../uint8array-tools/node_modules/bs-logger": { - "version": "0.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/bser": { - "version": "2.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "../uint8array-tools/node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/caniuse-lite": { - "version": "1.0.30001638", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "../uint8array-tools/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../uint8array-tools/node_modules/char-regex": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/cjs-module-lexer": { - "version": "1.3.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/cliui": { - "version": "7.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "../uint8array-tools/node_modules/co": { - "version": "4.6.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "../uint8array-tools/node_modules/collect-v8-coverage": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../uint8array-tools/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/combined-stream": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "../uint8array-tools/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/cssom": { - "version": "0.4.4", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/cssstyle": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/data-urls": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/debug": { - "version": "4.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/decimal.js": { - "version": "10.4.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/dedent": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/deepmerge": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/delayed-stream": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "../uint8array-tools/node_modules/detect-newline": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/diff-sequences": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/domexception": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "webidl-conversions": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/electron-to-chromium": { - "version": "1.4.812", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/emittery": { - "version": "0.8.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "../uint8array-tools/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/enquirer": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../uint8array-tools/node_modules/error-ex": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "../uint8array-tools/node_modules/escalade": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/escodegen": { - "version": "2.1.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "../uint8array-tools/node_modules/escodegen/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../uint8array-tools/node_modules/eslint": { - "version": "8.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.0.3", - "@humanwhocodes/config-array": "^0.6.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^6.0.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.0.0", - "espree": "^9.0.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.2.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../uint8array-tools/node_modules/eslint-config-prettier": { - "version": "8.3.0", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "../uint8array-tools/node_modules/eslint-plugin-prettier": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../uint8array-tools/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../uint8array-tools/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../uint8array-tools/node_modules/eslint/node_modules/eslint-scope": { - "version": "6.0.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../uint8array-tools/node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../uint8array-tools/node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../uint8array-tools/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../uint8array-tools/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../uint8array-tools/node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../uint8array-tools/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../uint8array-tools/node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../uint8array-tools/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../uint8array-tools/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/execa": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "../uint8array-tools/node_modules/exit": { - "version": "0.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "../uint8array-tools/node_modules/expect": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/fast-diff": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" - }, - "../uint8array-tools/node_modules/fast-glob": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../uint8array-tools/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/fastq": { - "version": "1.17.1", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../uint8array-tools/node_modules/fb-watchman": { - "version": "2.0.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "../uint8array-tools/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../uint8array-tools/node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/flat-cache": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../uint8array-tools/node_modules/flatted": { - "version": "3.3.1", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/form-data": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../uint8array-tools/node_modules/functional-red-black-tree": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../uint8array-tools/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../uint8array-tools/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../uint8array-tools/node_modules/get-stream": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../uint8array-tools/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../uint8array-tools/node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../uint8array-tools/node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^1.0.5" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/http-proxy-agent": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/https-proxy-agent": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/human-signals": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "../uint8array-tools/node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/ignore": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../uint8array-tools/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/import-local": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../uint8array-tools/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../uint8array-tools/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/is-arrayish": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/is-core-module": { - "version": "2.14.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../uint8array-tools/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/is-generator-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../uint8array-tools/node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../uint8array-tools/node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/istanbul-reports": { - "version": "3.1.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/jest": { - "version": "27.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^27.2.5", - "import-local": "^3.0.2", - "jest-cli": "^27.2.5" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/jest-changed-files": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "execa": "^5.0.0", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-circus": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-cli": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/jest-config": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/jest-diff": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-docblock": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-each": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-environment-jsdom": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-environment-node": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-get-type": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-haste-map": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "../uint8array-tools/node_modules/jest-jasmine2": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-leak-detector": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-matcher-utils": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-message-util": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-mock": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/jest-regex-util": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-resolve": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-resolve-dependencies": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-runner": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-runtime": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-serializer": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-snapshot": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-util": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-validate": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^27.5.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "leven": "^3.1.0", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/jest-watcher": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.5.1", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/jest-worker": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "../uint8array-tools/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "../uint8array-tools/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../uint8array-tools/node_modules/jsdom": { - "version": "16.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../uint8array-tools/node_modules/kleur": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/leven": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../uint8array-tools/node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/lodash.memoize": { - "version": "4.1.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "../uint8array-tools/node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/make-error": { - "version": "1.3.6", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/makeerror": { - "version": "1.0.12", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "../uint8array-tools/node_modules/merge-stream": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/micromatch": { - "version": "4.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../uint8array-tools/node_modules/mime-db": { - "version": "1.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "../uint8array-tools/node_modules/mime-types": { - "version": "2.1.35", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "../uint8array-tools/node_modules/mimic-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../uint8array-tools/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/node-releases": { - "version": "2.0.14", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/npm-run-path": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/nwsapi": { - "version": "2.2.10", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../uint8array-tools/node_modules/onetime": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/optionator": { - "version": "0.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../uint8array-tools/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/parse-json": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/parse5": { - "version": "6.0.1", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/picocolors": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../uint8array-tools/node_modules/pirates": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../uint8array-tools/node_modules/prettier": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../uint8array-tools/node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../uint8array-tools/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "../uint8array-tools/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../uint8array-tools/node_modules/progress": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "../uint8array-tools/node_modules/prompts": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "../uint8array-tools/node_modules/psl": { - "version": "1.9.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/punycode": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/querystringify": { - "version": "2.2.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../uint8array-tools/node_modules/react-is": { - "version": "17.0.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../uint8array-tools/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/requires-port": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../uint8array-tools/node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/resolve.exports": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../uint8array-tools/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../uint8array-tools/node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/saxes": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/source-map-support": { - "version": "0.5.21", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "../uint8array-tools/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../uint8array-tools/node_modules/stack-utils": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/string-length": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/strip-final-newline": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/supports-hyperlinks": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../uint8array-tools/node_modules/symbol-tree": { - "version": "3.2.4", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/terminal-link": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/throat": { - "version": "6.0.2", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/tmpl": { - "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "../uint8array-tools/node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../uint8array-tools/node_modules/tough-cookie": { - "version": "4.1.4", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "../uint8array-tools/node_modules/tr46": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "../uint8array-tools/node_modules/ts-jest": { - "version": "27.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@types/jest": { - "optional": true - }, - "babel-jest": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../uint8array-tools/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../uint8array-tools/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../uint8array-tools/node_modules/type-detect": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../uint8array-tools/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../uint8array-tools/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "../uint8array-tools/node_modules/typescript": { - "version": "4.4.4", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../uint8array-tools/node_modules/universalify": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "../uint8array-tools/node_modules/update-browserslist-db": { - "version": "1.0.16", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "../uint8array-tools/node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../uint8array-tools/node_modules/url-parse": { - "version": "1.5.10", - "dev": true, - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "../uint8array-tools/node_modules/v8-compile-cache": { - "version": "2.4.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/v8-to-istanbul": { - "version": "8.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "../uint8array-tools/node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.4", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/w3c-hr-time": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, - "../uint8array-tools/node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/walker": { - "version": "1.0.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "../uint8array-tools/node_modules/webidl-conversions": { - "version": "6.1.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=10.4" - } - }, - "../uint8array-tools/node_modules/whatwg-encoding": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.4.24" - } - }, - "../uint8array-tools/node_modules/whatwg-mimetype": { - "version": "2.3.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/whatwg-url": { - "version": "8.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../uint8array-tools/node_modules/word-wrap": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../uint8array-tools/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../uint8array-tools/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "../uint8array-tools/node_modules/ws": { - "version": "7.5.10", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "../uint8array-tools/node_modules/xml-name-validator": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0" - }, - "../uint8array-tools/node_modules/xmlchars": { - "version": "2.2.0", - "dev": true, - "license": "MIT" - }, - "../uint8array-tools/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "../uint8array-tools/node_modules/yargs": { - "version": "16.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "../uint8array-tools/node_modules/yargs-parser": { - "version": "20.2.9", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../varuint-bitcoin": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "uint8array-tools": "^0.0.8" - }, - "devDependencies": { - "@types/node": "^20.14.8", - "c8": "^10.1.2", - "rimraf": "^5.0.7", - "tape": "^5.3.0", - "ts-standard": "^12.0.2", - "typescript": "^5.1.6" - } - }, - "../varuint-bitcoin/node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "../varuint-bitcoin/node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "../varuint-bitcoin/node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../varuint-bitcoin/node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/@eslint/js": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../varuint-bitcoin/node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "../varuint-bitcoin/node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "../varuint-bitcoin/node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui": { - "version": "8.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "../varuint-bitcoin/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "../varuint-bitcoin/node_modules/@ljharb/resumer": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@ljharb/through": "^2.3.13", - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/@ljharb/through": { - "version": "2.3.13", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "../varuint-bitcoin/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../varuint-bitcoin/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "../varuint-bitcoin/node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "../varuint-bitcoin/node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@types/json-schema": { - "version": "7.0.15", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@types/json5": { - "version": "0.0.29", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@types/node": { - "version": "20.14.9", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "../varuint-bitcoin/node_modules/@types/semver": { - "version": "7.5.8", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/utils/node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../varuint-bitcoin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "../varuint-bitcoin/node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/acorn": { - "version": "8.12.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "../varuint-bitcoin/node_modules/acorn-jsx": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "../varuint-bitcoin/node_modules/ajv": { - "version": "6.12.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "../varuint-bitcoin/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array-includes": { - "version": "3.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.every": { - "version": "1.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.findlast": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.flat": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.toreversed": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, - "../varuint-bitcoin/node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/available-typed-arrays": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../varuint-bitcoin/node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/builtins": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.0.0" - } - }, - "../varuint-bitcoin/node_modules/c8": { - "version": "10.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@istanbuljs/schema": "^0.1.3", - "find-up": "^5.0.0", - "foreground-child": "^3.1.1", - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-report": "^3.0.1", - "istanbul-reports": "^3.1.6", - "test-exclude": "^7.0.1", - "v8-to-istanbul": "^9.0.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1" - }, - "bin": { - "c8": "bin/c8.js" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "monocart-coverage-reports": "^2" - }, - "peerDependenciesMeta": { - "monocart-coverage-reports": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "../varuint-bitcoin/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/cross-spawn": { - "version": "7.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "../varuint-bitcoin/node_modules/data-view-buffer": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/data-view-byte-length": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/data-view-byte-offset": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/debug": { - "version": "4.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/deep-equal": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/define-data-property": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/define-properties": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/defined": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "../varuint-bitcoin/node_modules/dotignore": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "minimatch": "^3.0.4" - }, - "bin": { - "ignored": "bin/ignored" - } - }, - "../varuint-bitcoin/node_modules/eastasianwidth": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/error-ex": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "../varuint-bitcoin/node_modules/es-abstract": { - "version": "1.23.3", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/es-define-property": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/es-errors": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/es-get-iterator": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/es-iterator-helpers": { - "version": "1.0.19", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/es-object-atoms": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/es-set-tostringtag": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/es-shim-unscopables": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - } - }, - "../varuint-bitcoin/node_modules/es-to-primitive": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/escalade": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/eslint": { - "version": "8.57.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../varuint-bitcoin/node_modules/eslint-config-standard-jsx": { - "version": "11.0.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peerDependencies": { - "eslint": "^8.8.0", - "eslint-plugin-react": "^7.28.0" - } - }, - "../varuint-bitcoin/node_modules/eslint-config-standard-with-typescript": { - "version": "23.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint-config-standard": "17.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0", - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0", - "eslint-plugin-promise": "^6.0.0", - "typescript": "*" - } - }, - "../varuint-bitcoin/node_modules/eslint-config-standard-with-typescript/node_modules/eslint-config-standard": { - "version": "17.0.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0", - "eslint-plugin-promise": "^6.0.0" - } - }, - "../varuint-bitcoin/node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "../varuint-bitcoin/node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "../varuint-bitcoin/node_modules/eslint-module-utils": { - "version": "2.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "../varuint-bitcoin/node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-es": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-es/node_modules/eslint-utils": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-import": { - "version": "2.29.1", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-n": { - "version": "15.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "builtins": "^5.0.1", - "eslint-plugin-es": "^4.1.0", - "eslint-utils": "^3.0.0", - "ignore": "^5.1.1", - "is-core-module": "^2.11.0", - "minimatch": "^3.1.2", - "resolve": "^1.22.1", - "semver": "^7.3.8" - }, - "engines": { - "node": ">=12.22.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-promise": { - "version": "6.2.0", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-react": { - "version": "7.34.3", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.19", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.8", - "object.fromentries": "^2.0.8", - "object.hasown": "^1.1.4", - "object.values": "^1.2.0", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "../varuint-bitcoin/node_modules/eslint-scope": { - "version": "7.2.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../varuint-bitcoin/node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "../varuint-bitcoin/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "../varuint-bitcoin/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../varuint-bitcoin/node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/espree": { - "version": "9.6.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "../varuint-bitcoin/node_modules/esquery": { - "version": "1.5.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "../varuint-bitcoin/node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "../varuint-bitcoin/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "../varuint-bitcoin/node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/fast-glob": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "../varuint-bitcoin/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "../varuint-bitcoin/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/fast-levenshtein": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/fastq": { - "version": "1.17.1", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "../varuint-bitcoin/node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../varuint-bitcoin/node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/flat-cache": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "../varuint-bitcoin/node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/flatted": { - "version": "3.3.1", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/for-each": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "../varuint-bitcoin/node_modules/foreground-child": { - "version": "3.2.1", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/function.prototype.name": { - "version": "1.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/functions-have-names": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "../varuint-bitcoin/node_modules/get-intrinsic": { - "version": "1.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "../varuint-bitcoin/node_modules/get-stdin": { - "version": "8.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/get-symbol-description": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "../varuint-bitcoin/node_modules/globalthis": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/gopd": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/graphemer": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/has-bigints": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/has-dynamic-import": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/has-property-descriptors": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/has-proto": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/has-symbols": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/has-tostringtag": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/ignore": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "../varuint-bitcoin/node_modules/import-fresh": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "../varuint-bitcoin/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../varuint-bitcoin/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/internal-slot": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/is-arguments": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-array-buffer": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-arrayish": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/is-async-function": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-bigint": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-boolean-object": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-callable": { - "version": "1.2.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-core-module": { - "version": "2.14.0", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-data-view": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-date-object": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/is-finalizationregistry": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/is-generator-function": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/is-map": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-negative-zero": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "../varuint-bitcoin/node_modules/is-number-object": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/is-regex": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-set": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-string": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-symbol": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-typed-array": { - "version": "1.1.13", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-weakmap": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-weakref": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/is-weakset": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/isarray": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "../varuint-bitcoin/node_modules/istanbul-reports": { - "version": "3.1.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/iterator.prototype": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "reflect.getprototypeof": "^1.0.4", - "set-function-name": "^2.0.1" - } - }, - "../varuint-bitcoin/node_modules/jackspeak": { - "version": "3.4.0", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "../varuint-bitcoin/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/json-parse-better-errors": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/json5": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "../varuint-bitcoin/node_modules/jsx-ast-utils": { - "version": "3.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "../varuint-bitcoin/node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "../varuint-bitcoin/node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../varuint-bitcoin/node_modules/load-json-file": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/loose-envify": { - "version": "1.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "../varuint-bitcoin/node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "../varuint-bitcoin/node_modules/micromatch": { - "version": "4.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "../varuint-bitcoin/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../varuint-bitcoin/node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/minipass": { - "version": "7.1.2", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "../varuint-bitcoin/node_modules/mock-property": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.1", - "functions-have-names": "^1.2.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "hasown": "^2.0.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/object-assign": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/object-inspect": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/object-is": { - "version": "1.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/object-keys": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/object.assign": { - "version": "4.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/object.entries": { - "version": "1.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/object.fromentries": { - "version": "2.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/object.groupby": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/object.hasown": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/object.values": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../varuint-bitcoin/node_modules/optionator": { - "version": "0.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../varuint-bitcoin/node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/package-json-from-dist": { - "version": "1.0.0", - "dev": true, - "license": "BlueOak-1.0.0" - }, - "../varuint-bitcoin/node_modules/parent-module": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/parse-json": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "../varuint-bitcoin/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/path-scurry": { - "version": "1.11.1", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "dev": true, - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "../varuint-bitcoin/node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "../varuint-bitcoin/node_modules/pify": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/pkg-conf": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/pkg-conf/node_modules/find-up": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/pkg-conf/node_modules/locate-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/pkg-conf/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/pkg-conf/node_modules/p-locate": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../varuint-bitcoin/node_modules/possible-typed-array-names": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "../varuint-bitcoin/node_modules/prop-types": { - "version": "15.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "../varuint-bitcoin/node_modules/punycode": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/react-is": { - "version": "16.13.1", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/reflect.getprototypeof": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.1", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", - "which-builtin-type": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "../varuint-bitcoin/node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/resolve-from": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../varuint-bitcoin/node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/rimraf": { - "version": "5.0.7", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/rimraf/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../varuint-bitcoin/node_modules/rimraf/node_modules/glob": { - "version": "10.4.2", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "../varuint-bitcoin/node_modules/safe-array-concat": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/safe-regex-test": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/semver": { - "version": "7.6.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "../varuint-bitcoin/node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/set-function-name": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/signal-exit": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/standard-engine": { - "version": "15.1.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "get-stdin": "^8.0.0", - "minimist": "^1.2.6", - "pkg-conf": "^3.1.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "../varuint-bitcoin/node_modules/stop-iteration-iterator": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "internal-slot": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/string.prototype.matchall": { - "version": "4.0.11", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.7", - "regexp.prototype.flags": "^1.5.2", - "set-function-name": "^2.0.2", - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/string.prototype.trim": { - "version": "1.2.9", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/string.prototype.trimend": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../varuint-bitcoin/node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/tape": { - "version": "5.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@ljharb/resumer": "^0.1.3", - "@ljharb/through": "^2.3.13", - "array.prototype.every": "^1.1.6", - "call-bind": "^1.0.7", - "deep-equal": "^2.2.3", - "defined": "^1.0.1", - "dotignore": "^0.1.2", - "for-each": "^0.3.3", - "get-package-type": "^0.1.0", - "glob": "^7.2.3", - "has-dynamic-import": "^2.1.0", - "hasown": "^2.0.2", - "inherits": "^2.0.4", - "is-regex": "^1.1.4", - "minimist": "^1.2.8", - "mock-property": "^1.0.3", - "object-inspect": "^1.13.1", - "object-is": "^1.1.6", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "resolve": "^2.0.0-next.5", - "string.prototype.trim": "^1.2.9" - }, - "bin": { - "tape": "bin/tape" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/tape/node_modules/resolve": { - "version": "2.0.0-next.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/test-exclude": { - "version": "7.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "../varuint-bitcoin/node_modules/test-exclude/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "../varuint-bitcoin/node_modules/test-exclude/node_modules/glob": { - "version": "10.4.2", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/test-exclude/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../varuint-bitcoin/node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "../varuint-bitcoin/node_modules/ts-standard": { - "version": "12.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^8.0.1", - "eslint-config-standard-jsx": "^11.0.0", - "eslint-config-standard-with-typescript": "^23.0.0", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.28.0", - "minimist": "^1.2.6", - "pkg-conf": "^4.0.0", - "standard-engine": "^15.0.0" - }, - "bin": { - "ts-standard": "cli.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "typescript": "*" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/find-up": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/load-json-file": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/locate-path": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/p-limit": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/p-locate": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/path-exists": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/pkg-conf": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^6.0.0", - "load-json-file": "^7.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/ts-standard/node_modules/yocto-queue": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "../varuint-bitcoin/node_modules/tsconfig-paths": { - "version": "3.15.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "../varuint-bitcoin/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../varuint-bitcoin/node_modules/tsutils": { - "version": "3.21.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "../varuint-bitcoin/node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "../varuint-bitcoin/node_modules/type-fest": { - "version": "0.3.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=6" - } - }, - "../varuint-bitcoin/node_modules/typed-array-buffer": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../varuint-bitcoin/node_modules/typed-array-byte-length": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/typed-array-length": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/typescript": { - "version": "5.5.2", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "../varuint-bitcoin/node_modules/uint8array-tools": { - "resolved": "../uint8array-tools", - "link": true - }, - "../varuint-bitcoin/node_modules/unbox-primitive": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/undici-types": { - "version": "5.26.5", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "../varuint-bitcoin/node_modules/v8-to-istanbul": { - "version": "9.3.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "../varuint-bitcoin/node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "../varuint-bitcoin/node_modules/which-boxed-primitive": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/which-builtin-type": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", - "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", - "is-finalizationregistry": "^1.0.2", - "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/which-collection": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/which-typed-array": { - "version": "1.1.15", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../varuint-bitcoin/node_modules/word-wrap": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "../varuint-bitcoin/node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "../varuint-bitcoin/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "../varuint-bitcoin/node_modules/xdg-basedir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "../varuint-bitcoin/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "../varuint-bitcoin/node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "../varuint-bitcoin/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "../varuint-bitcoin/node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.10", "dev": true, @@ -11347,6 +2028,8 @@ }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -11361,8 +2044,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safe-regex-test": { "version": "1.0.3", @@ -11788,8 +2470,12 @@ } }, "node_modules/uint8array-tools": { - "resolved": "../uint8array-tools", - "link": true + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.9.tgz", + "integrity": "sha512-9vqDWmoSXOoi+K14zNaf6LBV51Q8MayF0/IiQs3GlygIKUYtog603e6virExkjjFosfJUBI4LhbQK1iq8IG11A==", + "engines": { + "node": ">=14.0.0" + } }, "node_modules/unbox-primitive": { "version": "1.0.2", @@ -11824,8 +2510,20 @@ "license": "MIT" }, "node_modules/varuint-bitcoin": { - "resolved": "../varuint-bitcoin", - "link": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-2.0.0.tgz", + "integrity": "sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==", + "dependencies": { + "uint8array-tools": "^0.0.8" + } + }, + "node_modules/varuint-bitcoin/node_modules/uint8array-tools": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.8.tgz", + "integrity": "sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==", + "engines": { + "node": ">=14.0.0" + } }, "node_modules/which-boxed-primitive": { "version": "1.0.2", diff --git a/package.json b/package.json index 698cf7e..fa7f846 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "scripts": { "build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.cjs.json && npm run formatjs", "clean": "rimraf src types", - "coverage": "c8 --check-coverage --exclude='src/esm/tests/**/*.js' --reporter=lcov --reporter=text --branches 90 --functions 90 --lines 90 npm run unit", + "coverage": "c8 --check-coverage --include='src/esm/lib/**/*.js' --reporter=lcov --reporter=text --branches 90 --functions 90 --lines 90 npm run unit", "flb": "npm run format && npm run lint && npm run build", "format": "npm run prettier -- --write", "formatjs": "npm run prettierjs -- --write > /dev/null 2>&1", @@ -40,8 +40,8 @@ "url": "git+https://github.com/bitcoinjs/bip174.git" }, "dependencies": { - "uint8array-tools": "../uint8array-tools", - "varuint-bitcoin": "../varuint-bitcoin" + "uint8array-tools": "^0.0.9", + "varuint-bitcoin": "^2.0.0" }, "devDependencies": { "@types/node": "12.0.8", diff --git a/src/cjs/lib/converter/tools.js b/src/cjs/lib/converter/tools.js index 55b4958..7379f34 100644 --- a/src/cjs/lib/converter/tools.js +++ b/src/cjs/lib/converter/tools.js @@ -46,30 +46,3 @@ function keyValToBuffer(keyVal) { return buffer; } exports.keyValToBuffer = keyValToBuffer; -// https://github.com/feross/buffer/blob/master/index.js#L1127 -// function verifuint(value: number, max: number): void { -// if (typeof value !== 'number') -// throw new Error('cannot write a non-number as a number'); -// if (value < 0) -// throw new Error('specified a negative value for writing an unsigned value'); -// if (value > max) throw new Error('RangeError: value out of range'); -// if (Math.floor(value) !== value) -// throw new Error('value has a fractional component'); -// } -// export function readUInt64LE(buffer: Buffer, offset: number): number { -// const a = buffer.readUInt32LE(offset); -// let b = buffer.readUInt32LE(offset + 4); -// b *= 0x100000000; -// verifuint(b + a, 0x001fffffffffffff); -// return b + a; -// } -// export function writeUInt64LE( -// buffer: Buffer, -// value: number, -// offset: number, -// ): number { -// verifuint(value, 0x001fffffffffffff); -// buffer.writeInt32LE(value & -1, offset); -// buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); -// return offset + 8; -// } diff --git a/src/cjs/lib/psbt.d.ts b/src/cjs/lib/psbt.d.ts index 177fe81..e32f4a4 100644 --- a/src/cjs/lib/psbt.d.ts +++ b/src/cjs/lib/psbt.d.ts @@ -23,4 +23,4 @@ export declare class Psbt { getTransaction(): Uint8Array; } export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo, } from './interfaces.js'; -export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput, } from './utils.js'; +export { checkForInput, checkForOutput, } from './utils.js'; diff --git a/src/cjs/lib/psbt.js b/src/cjs/lib/psbt.js index 72e757c..c41024a 100644 --- a/src/cjs/lib/psbt.js +++ b/src/cjs/lib/psbt.js @@ -159,15 +159,5 @@ class Psbt { } exports.Psbt = Psbt; var utils_js_2 = require('./utils.js'); -exports.addInputAttributes = utils_js_2.addInputAttributes; -exports.addOutputAttributes = utils_js_2.addOutputAttributes; exports.checkForInput = utils_js_2.checkForInput; exports.checkForOutput = utils_js_2.checkForOutput; -exports.checkHasKey = utils_js_2.checkHasKey; -exports.defaultLocktimeSetter = utils_js_2.defaultLocktimeSetter; -exports.defaultVersionSetter = utils_js_2.defaultVersionSetter; -exports.getEnumLength = utils_js_2.getEnumLength; -exports.inputCheckUncleanFinalized = utils_js_2.inputCheckUncleanFinalized; -exports.updateGlobal = utils_js_2.updateGlobal; -exports.updateInput = utils_js_2.updateInput; -exports.updateOutput = utils_js_2.updateOutput; diff --git a/src/esm/lib/converter/tools.js b/src/esm/lib/converter/tools.js index 07ea8ad..3e39cc1 100644 --- a/src/esm/lib/converter/tools.js +++ b/src/esm/lib/converter/tools.js @@ -30,30 +30,3 @@ export function keyValToBuffer(keyVal) { buffer.set(keyVal.value, keyVarIntLen + keyLen + valVarIntLen); return buffer; } -// https://github.com/feross/buffer/blob/master/index.js#L1127 -// function verifuint(value: number, max: number): void { -// if (typeof value !== 'number') -// throw new Error('cannot write a non-number as a number'); -// if (value < 0) -// throw new Error('specified a negative value for writing an unsigned value'); -// if (value > max) throw new Error('RangeError: value out of range'); -// if (Math.floor(value) !== value) -// throw new Error('value has a fractional component'); -// } -// export function readUInt64LE(buffer: Buffer, offset: number): number { -// const a = buffer.readUInt32LE(offset); -// let b = buffer.readUInt32LE(offset + 4); -// b *= 0x100000000; -// verifuint(b + a, 0x001fffffffffffff); -// return b + a; -// } -// export function writeUInt64LE( -// buffer: Buffer, -// value: number, -// offset: number, -// ): number { -// verifuint(value, 0x001fffffffffffff); -// buffer.writeInt32LE(value & -1, offset); -// buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); -// return offset + 8; -// } diff --git a/src/esm/lib/psbt.d.ts b/src/esm/lib/psbt.d.ts index 177fe81..e32f4a4 100644 --- a/src/esm/lib/psbt.d.ts +++ b/src/esm/lib/psbt.d.ts @@ -23,4 +23,4 @@ export declare class Psbt { getTransaction(): Uint8Array; } export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo, } from './interfaces.js'; -export { addInputAttributes, addOutputAttributes, checkForInput, checkForOutput, checkHasKey, defaultLocktimeSetter, defaultVersionSetter, getEnumLength, inputCheckUncleanFinalized, updateGlobal, updateInput, updateOutput, } from './utils.js'; +export { checkForInput, checkForOutput, } from './utils.js'; diff --git a/src/esm/lib/psbt.js b/src/esm/lib/psbt.js index b4c64d9..88cc3ba 100644 --- a/src/esm/lib/psbt.js +++ b/src/esm/lib/psbt.js @@ -147,17 +147,4 @@ export class Psbt { return this.globalMap.unsignedTx.toBuffer(); } } -export { - addInputAttributes, - addOutputAttributes, - checkForInput, - checkForOutput, - checkHasKey, - defaultLocktimeSetter, - defaultVersionSetter, - getEnumLength, - inputCheckUncleanFinalized, - updateGlobal, - updateInput, - updateOutput, -} from './utils.js'; +export { checkForInput, checkForOutput } from './utils.js'; diff --git a/src/esm/tests/utils/txTools.js b/src/esm/tests/utils/txTools.js index 129de64..68ea078 100644 --- a/src/esm/tests/utils/txTools.js +++ b/src/esm/tests/utils/txTools.js @@ -1,4 +1,3 @@ -// import { Transaction as BTransaction } from './transaction.js'; import { Transaction as BTransaction } from 'bitcoinjs-lib'; import { reverseBuffer } from '../../lib/converter/tools.js'; export function getDefaultTx(version = 1) { diff --git a/ts_src/lib/converter/tools.ts b/ts_src/lib/converter/tools.ts index 1fff4df..7086b23 100644 --- a/ts_src/lib/converter/tools.ts +++ b/ts_src/lib/converter/tools.ts @@ -37,36 +37,4 @@ export function keyValToBuffer(keyVal: KeyValue): Uint8Array { buffer.set(keyVal.value, keyVarIntLen + keyLen + valVarIntLen); return buffer; -} - -// https://github.com/feross/buffer/blob/master/index.js#L1127 -// function verifuint(value: number, max: number): void { -// if (typeof value !== 'number') -// throw new Error('cannot write a non-number as a number'); -// if (value < 0) -// throw new Error('specified a negative value for writing an unsigned value'); -// if (value > max) throw new Error('RangeError: value out of range'); -// if (Math.floor(value) !== value) -// throw new Error('value has a fractional component'); -// } - -// export function readUInt64LE(buffer: Buffer, offset: number): number { -// const a = buffer.readUInt32LE(offset); -// let b = buffer.readUInt32LE(offset + 4); -// b *= 0x100000000; - -// verifuint(b + a, 0x001fffffffffffff); -// return b + a; -// } - -// export function writeUInt64LE( -// buffer: Buffer, -// value: number, -// offset: number, -// ): number { -// verifuint(value, 0x001fffffffffffff); - -// buffer.writeInt32LE(value & -1, offset); -// buffer.writeUInt32LE(Math.floor(value / 0x100000000), offset + 4); -// return offset + 8; -// } +} \ No newline at end of file diff --git a/ts_src/lib/psbt.ts b/ts_src/lib/psbt.ts index 41b62ac..8a16c50 100644 --- a/ts_src/lib/psbt.ts +++ b/ts_src/lib/psbt.ts @@ -230,16 +230,6 @@ export { } from './interfaces.js'; export { - addInputAttributes, - addOutputAttributes, checkForInput, checkForOutput, - checkHasKey, - defaultLocktimeSetter, - defaultVersionSetter, - getEnumLength, - inputCheckUncleanFinalized, - updateGlobal, - updateInput, - updateOutput, } from './utils.js'; diff --git a/ts_src/tests/utils/txTools.ts b/ts_src/tests/utils/txTools.ts index c06bf09..d0a50f7 100644 --- a/ts_src/tests/utils/txTools.ts +++ b/ts_src/tests/utils/txTools.ts @@ -1,4 +1,3 @@ -// import { Transaction as BTransaction } from './transaction.js'; import { Transaction as BTransaction } from 'bitcoinjs-lib'; import { reverseBuffer } from '../../lib/converter/tools.js'; import { From 1199d38c5dd4c892262424f35a6ddc0fdc6df55d Mon Sep 17 00:00:00 2001 From: ayman Date: Thu, 29 Aug 2024 20:52:38 +0530 Subject: [PATCH 7/9] chore: remove commented code --- src/cjs/lib/combiner/index.js | 2 -- src/cjs/lib/converter/input/tapScriptSig.js | 1 - src/cjs/lib/converter/output/tapTree.js | 1 - src/cjs/lib/parser/fromBuffer.js | 1 - src/esm/lib/combiner/index.js | 2 -- src/esm/lib/converter/input/tapScriptSig.js | 1 - src/esm/lib/converter/output/tapTree.js | 1 - src/esm/lib/parser/fromBuffer.js | 1 - src/esm/tests/fixtures/keyValsToPsbt.js | 2 -- src/esm/tests/keyValsToPsbt.js | 1 - src/esm/tests/validation.js | 1 - ts_src/lib/combiner/index.ts | 2 -- ts_src/lib/converter/input/tapScriptSig.ts | 1 - ts_src/lib/converter/output/tapTree.ts | 1 - ts_src/lib/parser/fromBuffer.ts | 1 - ts_src/tests/fixtures/keyValsToPsbt.ts | 2 -- ts_src/tests/keyValsToPsbt.ts | 1 - ts_src/tests/validation.ts | 1 - 18 files changed, 23 deletions(-) diff --git a/src/cjs/lib/combiner/index.js b/src/cjs/lib/combiner/index.js index 7a56880..29e44a6 100644 --- a/src/cjs/lib/combiner/index.js +++ b/src/cjs/lib/combiner/index.js @@ -75,7 +75,6 @@ exports.combine = combine; function keyPusher(selfSet, selfKeyVals, otherKeyVals) { return key => { if (selfSet.has(key)) return; - // const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; const newKv = otherKeyVals.filter(kv => tools.toHex(kv.key) === key)[0]; selfKeyVals.push(newKv); selfSet.add(key); @@ -87,7 +86,6 @@ function getTx(psbt) { function getKeySet(keyVals) { const set = new Set(); keyVals.forEach(keyVal => { - // const hex = keyVal.key.toString('hex'); const hex = tools.toHex(keyVal.key); if (set.has(hex)) throw new Error('Combine: KeyValue Map keys should be unique'); diff --git a/src/cjs/lib/converter/input/tapScriptSig.js b/src/cjs/lib/converter/input/tapScriptSig.js index 0b7b44b..ad2b2db 100644 --- a/src/cjs/lib/converter/input/tapScriptSig.js +++ b/src/cjs/lib/converter/input/tapScriptSig.js @@ -17,7 +17,6 @@ function decode(keyVal) { if (keyVal.key[0] !== typeFields_js_1.InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + - // keyVal.key.toString('hex'), tools.toHex(keyVal.key), ); } diff --git a/src/cjs/lib/converter/output/tapTree.js b/src/cjs/lib/converter/output/tapTree.js index 6e87964..ed3aac5 100644 --- a/src/cjs/lib/converter/output/tapTree.js +++ b/src/cjs/lib/converter/output/tapTree.js @@ -12,7 +12,6 @@ var __importStar = }; Object.defineProperty(exports, '__esModule', { value: true }); const typeFields_js_1 = require('../../typeFields.js'); -// import * as varuint from '../varint.js'; const varuint = __importStar(require('varuint-bitcoin')); const tools = __importStar(require('uint8array-tools')); function decode(keyVal) { diff --git a/src/cjs/lib/parser/fromBuffer.js b/src/cjs/lib/parser/fromBuffer.js index 02846d6..91249a4 100644 --- a/src/cjs/lib/parser/fromBuffer.js +++ b/src/cjs/lib/parser/fromBuffer.js @@ -13,7 +13,6 @@ var __importStar = Object.defineProperty(exports, '__esModule', { value: true }); const convert = __importStar(require('../converter/index.js')); const tools_js_1 = require('../converter/tools.js'); -// import * as varuint from '../converter/varint.js'; const varuint = __importStar(require('varuint-bitcoin')); const tools = __importStar(require('uint8array-tools')); const typeFields_js_1 = require('../typeFields.js'); diff --git a/src/esm/lib/combiner/index.js b/src/esm/lib/combiner/index.js index 7242ba9..bb4e01b 100644 --- a/src/esm/lib/combiner/index.js +++ b/src/esm/lib/combiner/index.js @@ -61,7 +61,6 @@ export function combine(psbts) { function keyPusher(selfSet, selfKeyVals, otherKeyVals) { return key => { if (selfSet.has(key)) return; - // const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; const newKv = otherKeyVals.filter(kv => tools.toHex(kv.key) === key)[0]; selfKeyVals.push(newKv); selfSet.add(key); @@ -73,7 +72,6 @@ function getTx(psbt) { function getKeySet(keyVals) { const set = new Set(); keyVals.forEach(keyVal => { - // const hex = keyVal.key.toString('hex'); const hex = tools.toHex(keyVal.key); if (set.has(hex)) throw new Error('Combine: KeyValue Map keys should be unique'); diff --git a/src/esm/lib/converter/input/tapScriptSig.js b/src/esm/lib/converter/input/tapScriptSig.js index e507f5c..03f1307 100644 --- a/src/esm/lib/converter/input/tapScriptSig.js +++ b/src/esm/lib/converter/input/tapScriptSig.js @@ -4,7 +4,6 @@ export function decode(keyVal) { if (keyVal.key[0] !== InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + - // keyVal.key.toString('hex'), tools.toHex(keyVal.key), ); } diff --git a/src/esm/lib/converter/output/tapTree.js b/src/esm/lib/converter/output/tapTree.js index f30caa1..afb4bfb 100644 --- a/src/esm/lib/converter/output/tapTree.js +++ b/src/esm/lib/converter/output/tapTree.js @@ -1,5 +1,4 @@ import { OutputTypes } from '../../typeFields.js'; -// import * as varuint from '../varint.js'; import * as varuint from 'varuint-bitcoin'; import * as tools from 'uint8array-tools'; export function decode(keyVal) { diff --git a/src/esm/lib/parser/fromBuffer.js b/src/esm/lib/parser/fromBuffer.js index d423142..1df0911 100644 --- a/src/esm/lib/parser/fromBuffer.js +++ b/src/esm/lib/parser/fromBuffer.js @@ -1,6 +1,5 @@ import * as convert from '../converter/index.js'; import { range } from '../converter/tools.js'; -// import * as varuint from '../converter/varint.js'; import * as varuint from 'varuint-bitcoin'; import * as tools from 'uint8array-tools'; import { GlobalTypes, InputTypes, OutputTypes } from '../typeFields.js'; diff --git a/src/esm/tests/fixtures/keyValsToPsbt.js b/src/esm/tests/fixtures/keyValsToPsbt.js index da7816e..e4b4571 100644 --- a/src/esm/tests/fixtures/keyValsToPsbt.js +++ b/src/esm/tests/fixtures/keyValsToPsbt.js @@ -1,6 +1,4 @@ -// import * as tools from 'uint8array-tools'; const b = hex => Buffer.from(hex, 'hex'); -// const b = (hex: string): Uint8Array => tools.fromHex(hex); export const fixtures = [ { data: { diff --git a/src/esm/tests/keyValsToPsbt.js b/src/esm/tests/keyValsToPsbt.js index 3585456..360c992 100644 --- a/src/esm/tests/keyValsToPsbt.js +++ b/src/esm/tests/keyValsToPsbt.js @@ -20,7 +20,6 @@ for (const f of fixtures) { const psbt = new Psbt(tx); Object.assign(psbt, data); t.strictEqual(psbt.toBase64(), f.expected); - // else console.log(psbt.toBase64()); t.end(); }); } diff --git a/src/esm/tests/validation.js b/src/esm/tests/validation.js index 951385a..cfe3993 100644 --- a/src/esm/tests/validation.js +++ b/src/esm/tests/validation.js @@ -68,7 +68,6 @@ tape('should not pass isPartialSig with invalid DER signature', t => { }, new RegExp('Decode Error: partialSig has invalid pubkey in key 0x02ff')); keyVal.key = Buffer.concat([b('02'), data.pubkey, data.pubkey.slice(1)]); const result = convertInputs.partialSig.decode(keyVal); - // t.assert(result.pubkey.equals(keyVal.key.slice(1))); t.assert(tools.compare(result.pubkey, keyVal.key.slice(1)) === 0); const psbt1 = { globalMap: { diff --git a/ts_src/lib/combiner/index.ts b/ts_src/lib/combiner/index.ts index bf160ac..68fde8b 100644 --- a/ts_src/lib/combiner/index.ts +++ b/ts_src/lib/combiner/index.ts @@ -77,7 +77,6 @@ function keyPusher( ): (key: string) => void { return (key: string): void => { if (selfSet.has(key)) return; - // const newKv = otherKeyVals.filter(kv => kv.key.toString('hex') === key)[0]; const newKv = otherKeyVals.filter(kv => tools.toHex(kv.key) === key)[0]; selfKeyVals.push(newKv); selfSet.add(key); @@ -91,7 +90,6 @@ function getTx(psbt: PsbtAttributes): Transaction | undefined { function getKeySet(keyVals: KeyValue[]): Set { const set: Set = new Set(); keyVals.forEach(keyVal => { - // const hex = keyVal.key.toString('hex'); const hex = tools.toHex(keyVal.key); if (set.has(hex)) throw new Error('Combine: KeyValue Map keys should be unique'); diff --git a/ts_src/lib/converter/input/tapScriptSig.ts b/ts_src/lib/converter/input/tapScriptSig.ts index 3c4aa6e..2be9e8a 100644 --- a/ts_src/lib/converter/input/tapScriptSig.ts +++ b/ts_src/lib/converter/input/tapScriptSig.ts @@ -6,7 +6,6 @@ export function decode(keyVal: KeyValue): TapScriptSig { if (keyVal.key[0] !== InputTypes.TAP_SCRIPT_SIG) { throw new Error( 'Decode Error: could not decode tapScriptSig with key 0x' + - // keyVal.key.toString('hex'), tools.toHex(keyVal.key), ); } diff --git a/ts_src/lib/converter/output/tapTree.ts b/ts_src/lib/converter/output/tapTree.ts index 3373846..11e262d 100644 --- a/ts_src/lib/converter/output/tapTree.ts +++ b/ts_src/lib/converter/output/tapTree.ts @@ -1,6 +1,5 @@ import { KeyValue, TapLeaf, TapTree } from '../../interfaces'; import { OutputTypes } from '../../typeFields.js'; -// import * as varuint from '../varint.js'; import * as varuint from 'varuint-bitcoin'; import * as tools from 'uint8array-tools'; diff --git a/ts_src/lib/parser/fromBuffer.ts b/ts_src/lib/parser/fromBuffer.ts index 94d0c31..14a0e62 100644 --- a/ts_src/lib/parser/fromBuffer.ts +++ b/ts_src/lib/parser/fromBuffer.ts @@ -1,6 +1,5 @@ import * as convert from '../converter/index.js'; import { range } from '../converter/tools.js'; -// import * as varuint from '../converter/varint.js'; import * as varuint from 'varuint-bitcoin'; import * as tools from 'uint8array-tools'; import { diff --git a/ts_src/tests/fixtures/keyValsToPsbt.ts b/ts_src/tests/fixtures/keyValsToPsbt.ts index ceaee16..18dda01 100644 --- a/ts_src/tests/fixtures/keyValsToPsbt.ts +++ b/ts_src/tests/fixtures/keyValsToPsbt.ts @@ -1,6 +1,4 @@ -// import * as tools from 'uint8array-tools'; const b = (hex: string): Buffer => Buffer.from(hex, 'hex'); -// const b = (hex: string): Uint8Array => tools.fromHex(hex); export const fixtures = [ { diff --git a/ts_src/tests/keyValsToPsbt.ts b/ts_src/tests/keyValsToPsbt.ts index 43082fd..26540ed 100644 --- a/ts_src/tests/keyValsToPsbt.ts +++ b/ts_src/tests/keyValsToPsbt.ts @@ -21,7 +21,6 @@ for (const f of fixtures) { const psbt = new Psbt(tx); Object.assign(psbt, data); t.strictEqual(psbt.toBase64(), f.expected); - // else console.log(psbt.toBase64()); t.end(); }); } diff --git a/ts_src/tests/validation.ts b/ts_src/tests/validation.ts index 14946ad..8f2724f 100644 --- a/ts_src/tests/validation.ts +++ b/ts_src/tests/validation.ts @@ -73,7 +73,6 @@ tape('should not pass isPartialSig with invalid DER signature', t => { }, new RegExp('Decode Error: partialSig has invalid pubkey in key 0x02ff')); keyVal.key = Buffer.concat([b('02'), data.pubkey, data.pubkey.slice(1)]); const result = convertInputs.partialSig.decode(keyVal); - // t.assert(result.pubkey.equals(keyVal.key.slice(1))); t.assert(tools.compare(result.pubkey, keyVal.key.slice(1)) === 0); const psbt1: any = { From e72c0eb146498cce4d5b87c69ecae0570bc938e4 Mon Sep 17 00:00:00 2001 From: ayman Date: Thu, 29 Aug 2024 21:11:37 +0530 Subject: [PATCH 8/9] fix: lint --- ts_src/lib/converter/tools.ts | 2 +- ts_src/lib/psbt.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ts_src/lib/converter/tools.ts b/ts_src/lib/converter/tools.ts index 7086b23..db61bc6 100644 --- a/ts_src/lib/converter/tools.ts +++ b/ts_src/lib/converter/tools.ts @@ -37,4 +37,4 @@ export function keyValToBuffer(keyVal: KeyValue): Uint8Array { buffer.set(keyVal.value, keyVarIntLen + keyLen + valVarIntLen); return buffer; -} \ No newline at end of file +} diff --git a/ts_src/lib/psbt.ts b/ts_src/lib/psbt.ts index 8a16c50..8d7aaa7 100644 --- a/ts_src/lib/psbt.ts +++ b/ts_src/lib/psbt.ts @@ -229,7 +229,4 @@ export { WitnessUtxo, } from './interfaces.js'; -export { - checkForInput, - checkForOutput, -} from './utils.js'; +export { checkForInput, checkForOutput } from './utils.js'; From a475ce6bc50879448b054c3fe6a0d30ae1151b67 Mon Sep 17 00:00:00 2001 From: ayman Date: Thu, 29 Aug 2024 21:13:20 +0530 Subject: [PATCH 9/9] fix: add build --- src/cjs/lib/psbt.d.ts | 2 +- src/esm/lib/psbt.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cjs/lib/psbt.d.ts b/src/cjs/lib/psbt.d.ts index e32f4a4..48bd057 100644 --- a/src/cjs/lib/psbt.d.ts +++ b/src/cjs/lib/psbt.d.ts @@ -23,4 +23,4 @@ export declare class Psbt { getTransaction(): Uint8Array; } export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo, } from './interfaces.js'; -export { checkForInput, checkForOutput, } from './utils.js'; +export { checkForInput, checkForOutput } from './utils.js'; diff --git a/src/esm/lib/psbt.d.ts b/src/esm/lib/psbt.d.ts index e32f4a4..48bd057 100644 --- a/src/esm/lib/psbt.d.ts +++ b/src/esm/lib/psbt.d.ts @@ -23,4 +23,4 @@ export declare class Psbt { getTransaction(): Uint8Array; } export { Bip32Derivation, NonWitnessUtxo, ControlBlock, FinalScriptSig, FinalScriptWitness, GlobalXpub, KeyValue, PartialSig, PorCommitment, PsbtGlobal, PsbtGlobalUpdate, PsbtInput, PsbtInputExtended, PsbtInputUpdate, PsbtOutput, PsbtOutputExtended, PsbtOutputUpdate, RedeemScript, SighashType, TapBip32Derivation, TapInternalKey, TapKeySig, TapLeaf, TapLeafScript, TapMerkleRoot, TapScriptSig, TapTree, Transaction, TransactionFromBuffer, TransactionIOCountGetter, TransactionLocktimeSetter, TransactionVersionSetter, WitnessScript, WitnessUtxo, } from './interfaces.js'; -export { checkForInput, checkForOutput, } from './utils.js'; +export { checkForInput, checkForOutput } from './utils.js';