@meteora-ag/cp-amm-sdk 1.0.0 → 1.0.1-1.rc-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1266 -332
- package/dist/index.d.ts +1266 -332
- package/dist/index.js +1231 -362
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1248 -379
- package/dist/index.mjs.map +1 -1
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +19 -24
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +178 -210
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +19 -24
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +178 -210
- package/node_modules/@babel/runtime/package.json +1 -4
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js +11 -12
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/idl.d.ts.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.d.ts.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js +8 -9
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js +3 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.d.ts.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js +8 -9
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js +3 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@coral-xyz/anchor/package.json +3 -3
- package/node_modules/@coral-xyz/anchor-errors/package.json +1 -1
- package/node_modules/@coral-xyz/borsh/package.json +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/README.md +321 -436
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.js +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/bls.d.ts +5 -5
- package/node_modules/@noble/curves/abstract/bls.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/bls.js +15 -16
- package/node_modules/@noble/curves/abstract/bls.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/curve.d.ts +11 -3
- package/node_modules/@noble/curves/abstract/curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/curve.js +93 -81
- package/node_modules/@noble/curves/abstract/curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/edwards.d.ts +2 -2
- package/node_modules/@noble/curves/abstract/edwards.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/edwards.js +72 -72
- package/node_modules/@noble/curves/abstract/edwards.js.map +1 -0
- package/node_modules/@noble/curves/abstract/fft.d.ts +120 -0
- package/node_modules/@noble/curves/abstract/fft.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/fft.js +439 -0
- package/node_modules/@noble/curves/abstract/fft.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/hash-to-curve.d.ts +15 -9
- package/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/hash-to-curve.js +49 -39
- package/node_modules/@noble/curves/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/modular.d.ts +13 -12
- package/node_modules/@noble/curves/abstract/modular.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/modular.js +167 -167
- package/node_modules/@noble/curves/abstract/modular.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/montgomery.d.ts +4 -9
- package/node_modules/@noble/curves/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/montgomery.js +140 -0
- package/node_modules/@noble/curves/abstract/montgomery.js.map +1 -0
- package/node_modules/@noble/curves/abstract/poseidon.d.ts +76 -0
- package/node_modules/@noble/curves/abstract/poseidon.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/poseidon.js +300 -0
- package/node_modules/@noble/curves/abstract/poseidon.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/tower.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/tower.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/tower.js +17 -18
- package/node_modules/@noble/curves/abstract/tower.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/utils.d.ts +5 -2
- package/node_modules/@noble/curves/abstract/utils.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/utils.js +27 -14
- package/node_modules/@noble/curves/abstract/utils.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/weierstrass.d.ts +45 -10
- package/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/weierstrass.js +153 -117
- package/node_modules/@noble/curves/abstract/weierstrass.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/bls12-381.d.ts +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bls12-381.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bls12-381.js +50 -64
- package/node_modules/@noble/curves/bls12-381.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bn254.d.ts +3 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bn254.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bn254.js +39 -29
- package/node_modules/@noble/curves/bn254.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/ed25519.d.ts +26 -10
- package/node_modules/@noble/curves/ed25519.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/ed25519.js +93 -83
- package/node_modules/@noble/curves/ed25519.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/ed448.d.ts +26 -10
- package/node_modules/@noble/curves/ed448.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/ed448.js +92 -82
- package/node_modules/@noble/curves/ed448.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.js +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/bls.d.ts +5 -5
- package/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/bls.js +6 -7
- package/node_modules/@noble/curves/esm/abstract/bls.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/curve.d.ts +11 -3
- package/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/curve.js +90 -78
- package/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/edwards.d.ts +2 -2
- package/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/edwards.js +53 -53
- package/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/fft.d.ts +120 -0
- package/node_modules/@noble/curves/esm/abstract/fft.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/fft.js +426 -0
- package/node_modules/@noble/curves/esm/abstract/fft.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/hash-to-curve.d.ts +15 -9
- package/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/hash-to-curve.js +33 -23
- package/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/modular.d.ts +13 -12
- package/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/modular.js +159 -159
- package/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/montgomery.d.ts +4 -9
- package/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/montgomery.js +137 -0
- package/node_modules/@noble/curves/esm/abstract/montgomery.js.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +76 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.js +291 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/tower.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/tower.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/tower.js +9 -10
- package/node_modules/@noble/curves/esm/abstract/tower.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/utils.d.ts +5 -2
- package/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/utils.js +26 -13
- package/node_modules/@noble/curves/esm/abstract/utils.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/weierstrass.d.ts +45 -10
- package/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/weierstrass.js +127 -91
- package/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/bls12-381.d.ts +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bls12-381.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bls12-381.js +18 -32
- package/node_modules/@noble/curves/esm/bls12-381.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bn254.d.ts +3 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bn254.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bn254.js +17 -7
- package/node_modules/@noble/curves/esm/bn254.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/ed25519.d.ts +26 -10
- package/node_modules/@noble/curves/esm/ed25519.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/ed25519.js +48 -38
- package/node_modules/@noble/curves/esm/ed25519.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/ed448.d.ts +26 -10
- package/node_modules/@noble/curves/esm/ed448.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/ed448.js +59 -49
- package/node_modules/@noble/curves/esm/ed448.js.map +1 -0
- package/node_modules/@noble/curves/esm/jubjub.d.ts +12 -0
- package/node_modules/@noble/curves/esm/jubjub.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/jubjub.js +12 -0
- package/node_modules/@noble/curves/esm/jubjub.js.map +1 -0
- package/node_modules/@noble/curves/esm/misc.d.ts +21 -0
- package/node_modules/@noble/curves/esm/misc.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/misc.js +107 -0
- package/node_modules/@noble/curves/esm/misc.js.map +1 -0
- package/node_modules/@noble/curves/esm/nist.d.ts +30 -0
- package/node_modules/@noble/curves/esm/nist.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/nist.js +121 -0
- package/node_modules/@noble/curves/esm/nist.js.map +1 -0
- package/node_modules/@noble/curves/esm/p256.d.ts +12 -0
- package/node_modules/@noble/curves/esm/p256.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/p256.js +12 -0
- package/node_modules/@noble/curves/esm/p256.js.map +1 -0
- package/node_modules/@noble/curves/esm/p384.d.ts +13 -0
- package/node_modules/@noble/curves/esm/p384.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/p384.js +13 -0
- package/node_modules/@noble/curves/esm/p384.js.map +1 -0
- package/node_modules/@noble/curves/esm/p521.d.ts +12 -0
- package/node_modules/@noble/curves/esm/p521.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/p521.js +12 -0
- package/node_modules/@noble/curves/esm/p521.js.map +1 -0
- package/node_modules/@noble/curves/esm/pasta.d.ts +10 -0
- package/node_modules/@noble/curves/esm/pasta.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/pasta.js +10 -0
- package/node_modules/@noble/curves/esm/pasta.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/secp256k1.d.ts +15 -10
- package/node_modules/@noble/curves/esm/secp256k1.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/secp256k1.js +23 -20
- package/node_modules/@noble/curves/esm/secp256k1.js.map +1 -0
- package/node_modules/@noble/curves/jubjub.d.ts +12 -0
- package/node_modules/@noble/curves/jubjub.d.ts.map +1 -0
- package/node_modules/@noble/curves/jubjub.js +15 -0
- package/node_modules/@noble/curves/jubjub.js.map +1 -0
- package/node_modules/@noble/curves/misc.d.ts +21 -0
- package/node_modules/@noble/curves/misc.d.ts.map +1 -0
- package/node_modules/@noble/curves/misc.js +112 -0
- package/node_modules/@noble/curves/misc.js.map +1 -0
- package/node_modules/@noble/curves/nist.d.ts +30 -0
- package/node_modules/@noble/curves/nist.d.ts.map +1 -0
- package/node_modules/@noble/curves/nist.js +124 -0
- package/node_modules/@noble/curves/nist.js.map +1 -0
- package/node_modules/@noble/curves/p256.d.ts +12 -0
- package/node_modules/@noble/curves/p256.d.ts.map +1 -0
- package/node_modules/@noble/curves/p256.js +9 -0
- package/node_modules/@noble/curves/p256.js.map +1 -0
- package/node_modules/@noble/curves/p384.d.ts +13 -0
- package/node_modules/@noble/curves/p384.d.ts.map +1 -0
- package/node_modules/@noble/curves/p384.js +10 -0
- package/node_modules/@noble/curves/p384.js.map +1 -0
- package/node_modules/@noble/curves/p521.d.ts +12 -0
- package/node_modules/@noble/curves/p521.d.ts.map +1 -0
- package/node_modules/@noble/curves/p521.js +9 -0
- package/node_modules/@noble/curves/p521.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/package.json +126 -13
- package/node_modules/@noble/curves/pasta.d.ts +10 -0
- package/node_modules/@noble/curves/pasta.d.ts.map +1 -0
- package/node_modules/@noble/curves/pasta.js +13 -0
- package/node_modules/@noble/curves/pasta.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/secp256k1.d.ts +15 -10
- package/node_modules/@noble/curves/secp256k1.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/secp256k1.js +62 -59
- package/node_modules/@noble/curves/secp256k1.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/_shortw_utils.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/bls.ts +10 -10
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/curve.ts +99 -85
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/edwards.ts +71 -64
- package/node_modules/@noble/curves/src/abstract/fft.ts +508 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/hash-to-curve.ts +49 -39
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/modular.ts +155 -154
- package/node_modules/@noble/curves/src/abstract/montgomery.ts +165 -0
- package/node_modules/@noble/curves/src/abstract/poseidon.ts +331 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/tower.ts +10 -11
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/utils.ts +28 -15
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/weierstrass.ts +182 -120
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/bls12-381.ts +21 -37
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/bn254.ts +18 -8
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/ed25519.ts +55 -40
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/ed448.ts +105 -88
- package/node_modules/@noble/curves/src/jubjub.ts +12 -0
- package/node_modules/@noble/curves/src/misc.ts +123 -0
- package/node_modules/@noble/curves/src/nist.ts +155 -0
- package/node_modules/@noble/curves/src/p256.ts +11 -0
- package/node_modules/@noble/curves/src/p384.ts +13 -0
- package/node_modules/@noble/curves/src/p521.ts +11 -0
- package/node_modules/@noble/curves/src/pasta.ts +9 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/secp256k1.ts +27 -22
- package/node_modules/@noble/hashes/README.md +217 -268
- package/node_modules/@noble/hashes/_assert.d.ts +12 -18
- package/node_modules/@noble/hashes/_assert.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_assert.js +12 -44
- package/node_modules/@noble/hashes/_assert.js.map +1 -1
- package/node_modules/@noble/hashes/_blake.d.ts +8 -28
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_blake.js +19 -106
- package/node_modules/@noble/hashes/_blake.js.map +1 -1
- package/node_modules/@noble/hashes/_md.d.ts +22 -5
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_md.js +43 -18
- package/node_modules/@noble/hashes/_md.js.map +1 -1
- package/node_modules/@noble/hashes/_u64.d.ts +1 -1
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_u64.js +6 -5
- package/node_modules/@noble/hashes/_u64.js.map +1 -1
- package/node_modules/@noble/hashes/argon2.d.ts +9 -9
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/argon2.js +62 -57
- package/node_modules/@noble/hashes/argon2.js.map +1 -1
- package/node_modules/@noble/hashes/blake1.d.ts +19 -39
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake1.js +107 -119
- package/node_modules/@noble/hashes/blake1.js.map +1 -1
- package/node_modules/@noble/hashes/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2.js +420 -0
- package/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/blake2b.d.ts +6 -48
- package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake2b.js +6 -189
- package/node_modules/@noble/hashes/blake2b.js.map +1 -1
- package/node_modules/@noble/hashes/blake2s.d.ts +14 -55
- package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake2s.js +17 -125
- package/node_modules/@noble/hashes/blake2s.js.map +1 -1
- package/node_modules/@noble/hashes/blake3.d.ts +6 -6
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake3.js +62 -62
- package/node_modules/@noble/hashes/blake3.js.map +1 -1
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/eskdf.js +18 -20
- package/node_modules/@noble/hashes/eskdf.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_assert.d.ts +12 -18
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_assert.js +10 -39
- package/node_modules/@noble/hashes/esm/_assert.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_blake.d.ts +8 -28
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_blake.js +16 -104
- package/node_modules/@noble/hashes/esm/_blake.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_md.d.ts +22 -5
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_md.js +35 -10
- package/node_modules/@noble/hashes/esm/_md.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts +1 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_u64.js +5 -4
- package/node_modules/@noble/hashes/esm/_u64.js.map +1 -1
- package/node_modules/@noble/hashes/esm/argon2.d.ts +9 -9
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/argon2.js +44 -39
- package/node_modules/@noble/hashes/esm/argon2.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake1.d.ts +19 -39
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake1.js +84 -96
- package/node_modules/@noble/hashes/esm/blake1.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.js +413 -0
- package/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +6 -48
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2b.js +6 -188
- package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +14 -55
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2s.js +16 -120
- package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake3.d.ts +6 -6
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake3.js +46 -57
- package/node_modules/@noble/hashes/esm/blake3.js.map +1 -1
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/eskdf.js +9 -11
- package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +1 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/hkdf.js +10 -11
- package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts +6 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/hmac.js +5 -3
- package/node_modules/@noble/hashes/esm/hmac.js.map +1 -1
- package/node_modules/@noble/hashes/esm/index.js +3 -5
- package/node_modules/@noble/hashes/esm/index.js.map +1 -1
- package/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.js +281 -0
- package/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +4 -4
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/pbkdf2.js +8 -8
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -1
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +6 -17
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/ripemd160.js +6 -96
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -1
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +3 -3
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/scrypt.js +14 -19
- package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha1.d.ts +6 -17
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha1.js +6 -79
- package/node_modules/@noble/hashes/esm/sha1.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha2.d.ts +155 -3
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha2.js +371 -4
- package/node_modules/@noble/hashes/esm/sha2.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha256.d.ts +10 -22
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha256.js +10 -120
- package/node_modules/@noble/hashes/esm/sha256.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +16 -4
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.js +27 -21
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3.d.ts +7 -6
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3.js +42 -35
- package/node_modules/@noble/hashes/esm/sha3.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha512.d.ts +18 -108
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha512.js +18 -234
- package/node_modules/@noble/hashes/esm/sha512.js.map +1 -1
- package/node_modules/@noble/hashes/esm/utils.d.ts +60 -19
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/utils.js +94 -25
- package/node_modules/@noble/hashes/esm/utils.js.map +1 -1
- package/node_modules/@noble/hashes/hkdf.d.ts +1 -1
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/hkdf.js +15 -16
- package/node_modules/@noble/hashes/hkdf.js.map +1 -1
- package/node_modules/@noble/hashes/hmac.d.ts +6 -1
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -1
- package/node_modules/@noble/hashes/hmac.js +11 -9
- package/node_modules/@noble/hashes/hmac.js.map +1 -1
- package/node_modules/@noble/hashes/index.js +3 -5
- package/node_modules/@noble/hashes/index.js.map +1 -1
- package/node_modules/@noble/hashes/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/legacy.js +287 -0
- package/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +104 -6
- package/node_modules/@noble/hashes/pbkdf2.d.ts +4 -4
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/pbkdf2.js +17 -17
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -1
- package/node_modules/@noble/hashes/ripemd160.d.ts +6 -17
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -1
- package/node_modules/@noble/hashes/ripemd160.js +6 -97
- package/node_modules/@noble/hashes/ripemd160.js.map +1 -1
- package/node_modules/@noble/hashes/scrypt.d.ts +3 -3
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -1
- package/node_modules/@noble/hashes/scrypt.js +60 -65
- package/node_modules/@noble/hashes/scrypt.js.map +1 -1
- package/node_modules/@noble/hashes/sha1.d.ts +6 -17
- package/node_modules/@noble/hashes/sha1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha1.js +6 -80
- package/node_modules/@noble/hashes/sha1.js.map +1 -1
- package/node_modules/@noble/hashes/sha2.d.ts +155 -3
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha2.js +378 -11
- package/node_modules/@noble/hashes/sha2.js.map +1 -1
- package/node_modules/@noble/hashes/sha256.d.ts +10 -22
- package/node_modules/@noble/hashes/sha256.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha256.js +11 -122
- package/node_modules/@noble/hashes/sha256.js.map +1 -1
- package/node_modules/@noble/hashes/sha3-addons.d.ts +16 -4
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha3-addons.js +41 -35
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -1
- package/node_modules/@noble/hashes/sha3.d.ts +7 -6
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha3.js +52 -45
- package/node_modules/@noble/hashes/sha3.js.map +1 -1
- package/node_modules/@noble/hashes/sha512.d.ts +18 -108
- package/node_modules/@noble/hashes/sha512.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha512.js +19 -239
- package/node_modules/@noble/hashes/sha512.js.map +1 -1
- package/node_modules/@noble/hashes/src/_assert.ts +18 -50
- package/node_modules/@noble/hashes/src/_blake.ts +18 -115
- package/node_modules/@noble/hashes/src/_md.ts +47 -12
- package/node_modules/@noble/hashes/src/_u64.ts +5 -9
- package/node_modules/@noble/hashes/src/argon2.ts +60 -49
- package/node_modules/@noble/hashes/src/blake1.ts +112 -126
- package/node_modules/@noble/hashes/src/blake2.ts +486 -0
- package/node_modules/@noble/hashes/src/blake2b.ts +6 -205
- package/node_modules/@noble/hashes/src/blake2s.ts +16 -150
- package/node_modules/@noble/hashes/src/blake3.ts +53 -62
- package/node_modules/@noble/hashes/src/eskdf.ts +9 -11
- package/node_modules/@noble/hashes/src/hkdf.ts +10 -11
- package/node_modules/@noble/hashes/src/hmac.ts +5 -3
- package/node_modules/@noble/hashes/src/index.ts +3 -5
- package/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +20 -18
- package/node_modules/@noble/hashes/src/ripemd160.ts +6 -103
- package/node_modules/@noble/hashes/src/scrypt.ts +25 -20
- package/node_modules/@noble/hashes/src/sha1.ts +6 -79
- package/node_modules/@noble/hashes/src/sha2.ts +399 -4
- package/node_modules/@noble/hashes/src/sha256.ts +15 -127
- package/node_modules/@noble/hashes/src/sha3-addons.ts +34 -23
- package/node_modules/@noble/hashes/src/sha3.ts +59 -45
- package/node_modules/@noble/hashes/src/sha512.ts +27 -250
- package/node_modules/@noble/hashes/src/utils.ts +132 -42
- package/node_modules/@noble/hashes/utils.d.ts +60 -19
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -1
- package/node_modules/@noble/hashes/utils.js +110 -33
- package/node_modules/@noble/hashes/utils.js.map +1 -1
- package/node_modules/{file-uri-to-path → @solana/codecs-core}/LICENSE +8 -8
- package/node_modules/@solana/codecs-core/README.md +662 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.cjs +504 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.cjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.mjs +460 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.mjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.native.mjs +460 -0
- package/node_modules/@solana/codecs-core/dist/index.native.mjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.node.cjs +504 -0
- package/node_modules/@solana/codecs-core/dist/index.node.cjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.node.mjs +460 -0
- package/node_modules/@solana/codecs-core/dist/index.node.mjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-sentinel.d.ts +70 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-sentinel.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-size-prefix.d.ts +67 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-size-prefix.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/assertions.d.ts +62 -0
- package/node_modules/@solana/codecs-core/dist/types/assertions.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/bytes.d.ts +92 -0
- package/node_modules/@solana/codecs-core/dist/types/bytes.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/codec.d.ts +827 -0
- package/node_modules/@solana/codecs-core/dist/types/codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/combine-codec.d.ts +75 -0
- package/node_modules/@solana/codecs-core/dist/types/combine-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/fix-codec-size.d.ts +111 -0
- package/node_modules/@solana/codecs-core/dist/types/fix-codec-size.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/index.d.ts +667 -0
- package/node_modules/@solana/codecs-core/dist/types/index.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/offset-codec.d.ts +328 -0
- package/node_modules/@solana/codecs-core/dist/types/offset-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/pad-codec.d.ts +162 -0
- package/node_modules/@solana/codecs-core/dist/types/pad-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/readonly-uint8array.d.ts +19 -0
- package/node_modules/@solana/codecs-core/dist/types/readonly-uint8array.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/resize-codec.d.ts +129 -0
- package/node_modules/@solana/codecs-core/dist/types/resize-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/reverse-codec.d.ts +92 -0
- package/node_modules/@solana/codecs-core/dist/types/reverse-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/transform-codec.d.ts +114 -0
- package/node_modules/@solana/codecs-core/dist/types/transform-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/package.json +83 -0
- package/node_modules/@solana/codecs-numbers/LICENSE +20 -0
- package/node_modules/@solana/codecs-numbers/README.md +130 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.cjs +331 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.cjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.mjs +289 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.mjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.native.mjs +289 -0
- package/node_modules/@solana/codecs-numbers/dist/index.native.mjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.cjs +331 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.cjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.mjs +289 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.mjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/assertions.d.ts +27 -0
- package/node_modules/@solana/codecs-numbers/dist/types/assertions.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/common.d.ts +84 -0
- package/node_modules/@solana/codecs-numbers/dist/types/common.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f32.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f32.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f64.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f64.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i128.d.ts +91 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i128.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i16.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i16.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i32.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i32.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i64.d.ts +90 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i64.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i8.d.ts +75 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i8.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/index.d.ts +26 -0
- package/node_modules/@solana/codecs-numbers/dist/types/index.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/short-u16.d.ts +96 -0
- package/node_modules/@solana/codecs-numbers/dist/types/short-u16.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u128.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u128.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u16.d.ts +85 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u16.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u32.d.ts +85 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u32.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u64.d.ts +88 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u64.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u8.d.ts +71 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u8.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/utils.d.ts +18 -0
- package/node_modules/@solana/codecs-numbers/dist/types/utils.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/package.json +83 -0
- package/node_modules/@solana/errors/LICENSE +20 -0
- package/node_modules/@solana/errors/README.md +87 -0
- package/node_modules/@solana/errors/bin/cli.mjs +7 -0
- package/node_modules/@solana/errors/dist/cli.mjs +570 -0
- package/node_modules/@solana/errors/dist/index.browser.cjs +1084 -0
- package/node_modules/@solana/errors/dist/index.browser.cjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.browser.mjs +852 -0
- package/node_modules/@solana/errors/dist/index.browser.mjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.native.mjs +852 -0
- package/node_modules/@solana/errors/dist/index.native.mjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.node.cjs +1084 -0
- package/node_modules/@solana/errors/dist/index.node.cjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.node.mjs +852 -0
- package/node_modules/@solana/errors/dist/index.node.mjs.map +1 -0
- package/node_modules/@solana/errors/dist/types/codes.d.ts +275 -0
- package/node_modules/@solana/errors/dist/types/codes.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/context.d.ts +398 -0
- package/node_modules/@solana/errors/dist/types/context.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/error.d.ts +75 -0
- package/node_modules/@solana/errors/dist/types/error.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/index.d.ts +72 -0
- package/node_modules/@solana/errors/dist/types/index.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/instruction-error.d.ts +9 -0
- package/node_modules/@solana/errors/dist/types/instruction-error.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/json-rpc-error.d.ts +51 -0
- package/node_modules/@solana/errors/dist/types/json-rpc-error.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/message-formatter.d.ts +4 -0
- package/node_modules/@solana/errors/dist/types/message-formatter.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/messages.d.ts +16 -0
- package/node_modules/@solana/errors/dist/types/messages.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/rpc-enum-errors.d.ts +31 -0
- package/node_modules/@solana/errors/dist/types/rpc-enum-errors.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/stack-trace.d.ts +2 -0
- package/node_modules/@solana/errors/dist/types/stack-trace.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/transaction-error.d.ts +5 -0
- package/node_modules/@solana/errors/dist/types/transaction-error.d.ts.map +1 -0
- package/node_modules/@solana/errors/node_modules/chalk/package.json +83 -0
- package/node_modules/@solana/errors/node_modules/chalk/readme.md +297 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/index.d.ts +325 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/index.js +225 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/utilities.js +33 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/node_modules/{bindings/LICENSE.md → @solana/errors/node_modules/commander/LICENSE} +1 -1
- package/node_modules/@solana/errors/node_modules/commander/Readme.md +1149 -0
- package/node_modules/@solana/errors/node_modules/commander/esm.mjs +16 -0
- package/node_modules/@solana/errors/node_modules/commander/index.js +24 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/error.js +39 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/help.js +709 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/option.js +367 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/@solana/errors/node_modules/commander/package-support.json +16 -0
- package/node_modules/@solana/errors/node_modules/commander/package.json +82 -0
- package/node_modules/@solana/errors/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/@solana/errors/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/@solana/errors/package.json +84 -0
- package/node_modules/@solana/web3.js/README.md +4 -4
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js +10 -20
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js +8 -18
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.cjs.js +10 -20
- package/node_modules/@solana/web3.js/lib/index.cjs.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.esm.js +8 -18
- package/node_modules/@solana/web3.js/lib/index.esm.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.iife.js +213 -88
- package/node_modules/@solana/web3.js/lib/index.iife.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.iife.min.js +2 -2
- package/node_modules/@solana/web3.js/lib/index.iife.min.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.native.js +10 -20
- package/node_modules/@solana/web3.js/lib/index.native.js.map +1 -1
- package/node_modules/@solana/web3.js/package.json +5 -5
- package/node_modules/@solana/web3.js/src/programs/address-lookup-table/index.ts +5 -2
- package/node_modules/@solana/web3.js/src/utils/bigint.ts +14 -33
- package/node_modules/@swc/helpers/_/_overload_yield/package.json +4 -0
- package/node_modules/@swc/helpers/cjs/_async_generator.cjs +10 -12
- package/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs +11 -7
- package/node_modules/@swc/helpers/cjs/_await_async_generator.cjs +2 -2
- package/node_modules/@swc/helpers/cjs/_overload_yield.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/index.cjs +4 -0
- package/node_modules/@swc/helpers/esm/_async_generator.js +10 -12
- package/node_modules/@swc/helpers/esm/_async_generator_delegate.js +11 -7
- package/node_modules/@swc/helpers/esm/_await_async_generator.js +2 -2
- package/node_modules/@swc/helpers/esm/_overload_yield.js +6 -0
- package/node_modules/@swc/helpers/esm/index.js +1 -0
- package/node_modules/@swc/helpers/package.json +219 -1
- package/node_modules/@swc/helpers/scripts/build.js +15 -3
- package/node_modules/@swc/helpers/src/_overload_yield.mjs +1 -0
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +7 -48
- package/node_modules/@types/node/async_hooks.d.ts +64 -2
- package/node_modules/@types/node/buffer.buffer.d.ts +3 -0
- package/node_modules/@types/node/buffer.d.ts +2 -2
- package/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +8 -9
- package/node_modules/@types/node/diagnostics_channel.d.ts +20 -1
- package/node_modules/@types/node/fs/promises.d.ts +21 -24
- package/node_modules/@types/node/fs.d.ts +93 -9
- package/node_modules/@types/node/globals.d.ts +141 -281
- package/node_modules/@types/node/http.d.ts +22 -1
- package/node_modules/@types/node/http2.d.ts +3 -4
- package/node_modules/@types/node/inspector.d.ts +36 -0
- package/node_modules/@types/node/module.d.ts +25 -0
- package/node_modules/@types/node/net.d.ts +14 -8
- package/node_modules/@types/node/package.json +7 -2
- package/node_modules/@types/node/process.d.ts +22 -0
- package/node_modules/@types/node/querystring.d.ts +2 -3
- package/node_modules/@types/node/readline.d.ts +6 -1
- package/node_modules/@types/node/sqlite.d.ts +36 -13
- package/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +54 -6
- package/node_modules/@types/node/tls.d.ts +34 -1
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +3 -0
- package/node_modules/@types/node/util.d.ts +232 -94
- package/node_modules/@types/node/v8.d.ts +81 -0
- package/node_modules/@types/node/vm.d.ts +20 -5
- package/node_modules/@types/node/zlib.d.ts +167 -36
- package/node_modules/bn.js/README.md +2 -2
- package/node_modules/bn.js/lib/bn.js +1 -0
- package/node_modules/bn.js/package.json +1 -1
- package/node_modules/{jsonparse/README.markdown → camelcase/license} +2 -4
- package/node_modules/jayson/lib/utils.js +11 -8
- package/node_modules/jayson/package.json +10 -7
- package/node_modules/rpc-websockets/node_modules/ws/lib/permessage-deflate.js +14 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/websocket.js +1 -1
- package/node_modules/rpc-websockets/node_modules/ws/package.json +2 -2
- package/node_modules/stream-chain/LICENSE +11 -0
- package/node_modules/stream-chain/README.md +334 -0
- package/node_modules/stream-chain/defs.js +22 -0
- package/node_modules/stream-chain/index.js +203 -0
- package/node_modules/stream-chain/package.json +31 -0
- package/node_modules/stream-chain/utils/FromIterable.js +94 -0
- package/node_modules/stream-chain/utils/Reduce.js +40 -0
- package/node_modules/stream-chain/utils/asFun.js +85 -0
- package/node_modules/stream-chain/utils/asGen.js +77 -0
- package/node_modules/stream-chain/utils/comp.js +20 -0
- package/node_modules/stream-chain/utils/fold.js +43 -0
- package/node_modules/stream-chain/utils/gen.js +24 -0
- package/node_modules/stream-chain/utils/scan.js +41 -0
- package/node_modules/stream-chain/utils/skip.js +32 -0
- package/node_modules/stream-chain/utils/skipWhile.js +46 -0
- package/node_modules/stream-chain/utils/take.js +39 -0
- package/node_modules/stream-chain/utils/takeWhile.js +47 -0
- package/node_modules/stream-json/Assembler.js +154 -0
- package/node_modules/stream-json/Disassembler.js +209 -0
- package/node_modules/stream-json/Emitter.js +22 -0
- package/node_modules/stream-json/LICENSE +34 -0
- package/node_modules/stream-json/Parser.js +545 -0
- package/node_modules/stream-json/README.md +128 -0
- package/node_modules/stream-json/Stringer.js +153 -0
- package/node_modules/stream-json/filters/Filter.js +130 -0
- package/node_modules/stream-json/filters/FilterBase.js +201 -0
- package/node_modules/stream-json/filters/Ignore.js +24 -0
- package/node_modules/stream-json/filters/Pick.js +58 -0
- package/node_modules/stream-json/filters/Replace.js +115 -0
- package/node_modules/stream-json/index.js +11 -0
- package/node_modules/stream-json/jsonl/Parser.js +131 -0
- package/node_modules/stream-json/jsonl/Stringer.js +29 -0
- package/node_modules/stream-json/package.json +45 -0
- package/node_modules/stream-json/streamers/StreamArray.js +44 -0
- package/node_modules/stream-json/streamers/StreamBase.js +101 -0
- package/node_modules/stream-json/streamers/StreamObject.js +43 -0
- package/node_modules/stream-json/streamers/StreamValues.js +33 -0
- package/node_modules/stream-json/utils/Batch.js +44 -0
- package/node_modules/stream-json/utils/Utf8Stream.js +53 -0
- package/node_modules/stream-json/utils/Verifier.js +485 -0
- package/node_modules/stream-json/utils/emit.js +5 -0
- package/node_modules/stream-json/utils/withParser.js +10 -0
- package/package.json +2 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js +0 -160
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js +0 -121
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js +0 -157
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js +0 -116
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts +0 -5
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js +0 -61
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js +0 -49
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js +0 -53
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts +0 -12
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js +0 -61
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts +0 -8
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js +0 -34
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts +0 -5
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js +0 -66
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js +0 -52
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js +0 -56
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts +0 -12
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js +0 -64
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts +0 -8
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js +0 -37
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/montgomery.ts +0 -196
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/poseidon.ts +0 -136
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/jubjub.ts +0 -63
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p256.ts +0 -54
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p384.ts +0 -58
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p521.ts +0 -75
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/pasta.ts +0 -39
- package/node_modules/JSONStream/.travis.yml +0 -8
- package/node_modules/JSONStream/LICENSE.APACHE2 +0 -15
- package/node_modules/JSONStream/LICENSE.MIT +0 -24
- package/node_modules/JSONStream/bin.js +0 -12
- package/node_modules/JSONStream/examples/all_docs.js +0 -13
- package/node_modules/JSONStream/index.js +0 -247
- package/node_modules/JSONStream/package.json +0 -40
- package/node_modules/JSONStream/readme.markdown +0 -207
- package/node_modules/JSONStream/test/bool.js +0 -41
- package/node_modules/JSONStream/test/browser.js +0 -18
- package/node_modules/JSONStream/test/destroy_missing.js +0 -27
- package/node_modules/JSONStream/test/doubledot1.js +0 -29
- package/node_modules/JSONStream/test/doubledot2.js +0 -30
- package/node_modules/JSONStream/test/empty.js +0 -44
- package/node_modules/JSONStream/test/error_contents.js +0 -45
- package/node_modules/JSONStream/test/fixtures/all_npm.json +0 -4030
- package/node_modules/JSONStream/test/fixtures/couch_sample.json +0 -18
- package/node_modules/JSONStream/test/fixtures/depth.json +0 -15
- package/node_modules/JSONStream/test/fixtures/error.json +0 -1
- package/node_modules/JSONStream/test/fixtures/header_footer.json +0 -19
- package/node_modules/JSONStream/test/fn.js +0 -39
- package/node_modules/JSONStream/test/gen.js +0 -135
- package/node_modules/JSONStream/test/header_footer.js +0 -55
- package/node_modules/JSONStream/test/issues.js +0 -34
- package/node_modules/JSONStream/test/keys.js +0 -105
- package/node_modules/JSONStream/test/map.js +0 -40
- package/node_modules/JSONStream/test/multiple_objects.js +0 -36
- package/node_modules/JSONStream/test/multiple_objects_error.js +0 -29
- package/node_modules/JSONStream/test/null.js +0 -28
- package/node_modules/JSONStream/test/parsejson.js +0 -29
- package/node_modules/JSONStream/test/run.js +0 -13
- package/node_modules/JSONStream/test/stringify.js +0 -41
- package/node_modules/JSONStream/test/stringify_object.js +0 -47
- package/node_modules/JSONStream/test/test.js +0 -35
- package/node_modules/JSONStream/test/test2.js +0 -29
- package/node_modules/JSONStream/test/two-ways.js +0 -41
- package/node_modules/bigint-buffer/.travis.yml +0 -51
- package/node_modules/bigint-buffer/LICENSE +0 -202
- package/node_modules/bigint-buffer/README.md +0 -121
- package/node_modules/bigint-buffer/binding.gyp +0 -8
- package/node_modules/bigint-buffer/build/Makefile +0 -347
- package/node_modules/bigint-buffer/build/Release/.deps/Release/bigint_buffer.node.d +0 -1
- package/node_modules/bigint-buffer/build/Release/.deps/Release/obj.target/bigint_buffer/src/bigint-buffer.o.d +0 -12
- package/node_modules/bigint-buffer/build/Release/bigint_buffer.node +0 -0
- package/node_modules/bigint-buffer/build/Release/obj.target/bigint_buffer/src/bigint-buffer.o +0 -0
- package/node_modules/bigint-buffer/build/bigint_buffer.target.mk +0 -180
- package/node_modules/bigint-buffer/build/binding.Makefile +0 -6
- package/node_modules/bigint-buffer/build/config.gypi +0 -450
- package/node_modules/bigint-buffer/build/gyp-mac-tool +0 -772
- package/node_modules/bigint-buffer/dist/browser.js +0 -69
- package/node_modules/bigint-buffer/dist/index.bench.d.ts +0 -1
- package/node_modules/bigint-buffer/dist/index.d.ts +0 -27
- package/node_modules/bigint-buffer/dist/index.spec.d.ts +0 -1
- package/node_modules/bigint-buffer/dist/node.js +0 -77
- package/node_modules/bigint-buffer/helper/bigint.d.ts +0 -3
- package/node_modules/bigint-buffer/karma.conf.js +0 -62
- package/node_modules/bigint-buffer/package.json +0 -89
- package/node_modules/bigint-buffer/rollup.config.js +0 -13
- package/node_modules/bigint-buffer/src/bigint-buffer.c +0 -203
- package/node_modules/bigint-buffer/src/index.bench.ts +0 -207
- package/node_modules/bigint-buffer/src/index.spec.ts +0 -288
- package/node_modules/bigint-buffer/src/index.ts +0 -84
- package/node_modules/bigint-buffer/tsconfig.json +0 -19
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -28
- package/node_modules/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -32
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/node_modules/jsonparse/.npmignore +0 -1
- package/node_modules/jsonparse/LICENSE +0 -24
- package/node_modules/jsonparse/bench.js +0 -26
- package/node_modules/jsonparse/examples/twitterfeed.js +0 -30
- package/node_modules/jsonparse/jsonparse.js +0 -413
- package/node_modules/jsonparse/package.json +0 -22
- package/node_modules/jsonparse/samplejson/basic.json +0 -167
- package/node_modules/jsonparse/samplejson/basic2.json +0 -180
- package/node_modules/jsonparse/test/big-token.js +0 -24
- package/node_modules/jsonparse/test/boundary.js +0 -110
- package/node_modules/jsonparse/test/offset.js +0 -67
- package/node_modules/jsonparse/test/primitives.js +0 -57
- package/node_modules/jsonparse/test/surrogate.js +0 -26
- package/node_modules/jsonparse/test/unvalid.js +0 -15
- package/node_modules/jsonparse/test/utf8.js +0 -38
- package/node_modules/regenerator-runtime/LICENSE +0 -21
- package/node_modules/regenerator-runtime/README.md +0 -31
- package/node_modules/regenerator-runtime/package.json +0 -19
- package/node_modules/regenerator-runtime/path.js +0 -11
- package/node_modules/regenerator-runtime/runtime.js +0 -761
- package/node_modules/through/.travis.yml +0 -5
- package/node_modules/through/LICENSE.APACHE2 +0 -15
- package/node_modules/through/LICENSE.MIT +0 -24
- package/node_modules/through/index.js +0 -108
- package/node_modules/through/package.json +0 -36
- package/node_modules/through/readme.markdown +0 -64
- package/node_modules/through/test/async.js +0 -28
- package/node_modules/through/test/auto-destroy.js +0 -30
- package/node_modules/through/test/buffering.js +0 -71
- package/node_modules/through/test/end.js +0 -45
- package/node_modules/through/test/index.js +0 -133
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/LICENSE +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.d.ts +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.js +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/package.json +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.d.ts +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.js +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/index.ts +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/package.json +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → @solana/errors/node_modules/chalk}/license +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/index.d.ts +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/index.js +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/package.json +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/readme.md +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/CopyrightNotice.txt +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/LICENSE.txt +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/README.md +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/SECURITY.md +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/modules/index.d.ts +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/modules/index.js +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/modules/package.json +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/package.json +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.d.ts +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.es6.html +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.es6.js +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.es6.mjs +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.html +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.js +0 -0
|
@@ -4,254 +4,31 @@
|
|
|
4
4
|
* Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
|
|
5
5
|
* [the paper on truncated SHA512/256](https://eprint.iacr.org/2010/548.pdf).
|
|
6
6
|
* @module
|
|
7
|
+
* @deprecated
|
|
7
8
|
*/
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'
|
|
35
|
-
].map(n => BigInt(n))))();
|
|
36
|
-
|
|
37
|
-
// Temporary buffer, not used to store anything between runs
|
|
38
|
-
const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
|
|
39
|
-
const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
|
|
40
|
-
export class SHA512 extends HashMD<SHA512> {
|
|
41
|
-
// We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.
|
|
42
|
-
// Also looks cleaner and easier to verify with spec.
|
|
43
|
-
// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):
|
|
44
|
-
// h -- high 32 bits, l -- low 32 bits
|
|
45
|
-
protected Ah: number = 0x6a09e667 | 0;
|
|
46
|
-
protected Al: number = 0xf3bcc908 | 0;
|
|
47
|
-
protected Bh: number = 0xbb67ae85 | 0;
|
|
48
|
-
protected Bl: number = 0x84caa73b | 0;
|
|
49
|
-
protected Ch: number = 0x3c6ef372 | 0;
|
|
50
|
-
protected Cl: number = 0xfe94f82b | 0;
|
|
51
|
-
protected Dh: number = 0xa54ff53a | 0;
|
|
52
|
-
protected Dl: number = 0x5f1d36f1 | 0;
|
|
53
|
-
protected Eh: number = 0x510e527f | 0;
|
|
54
|
-
protected El: number = 0xade682d1 | 0;
|
|
55
|
-
protected Fh: number = 0x9b05688c | 0;
|
|
56
|
-
protected Fl: number = 0x2b3e6c1f | 0;
|
|
57
|
-
protected Gh: number = 0x1f83d9ab | 0;
|
|
58
|
-
protected Gl: number = 0xfb41bd6b | 0;
|
|
59
|
-
protected Hh: number = 0x5be0cd19 | 0;
|
|
60
|
-
protected Hl: number = 0x137e2179 | 0;
|
|
61
|
-
|
|
62
|
-
constructor() {
|
|
63
|
-
super(128, 64, 16, false);
|
|
64
|
-
}
|
|
65
|
-
// prettier-ignore
|
|
66
|
-
protected get(): [
|
|
67
|
-
number, number, number, number, number, number, number, number,
|
|
68
|
-
number, number, number, number, number, number, number, number
|
|
69
|
-
] {
|
|
70
|
-
const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
|
71
|
-
return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
|
|
72
|
-
}
|
|
73
|
-
// prettier-ignore
|
|
74
|
-
protected set(
|
|
75
|
-
Ah: number, Al: number, Bh: number, Bl: number, Ch: number, Cl: number, Dh: number, Dl: number,
|
|
76
|
-
Eh: number, El: number, Fh: number, Fl: number, Gh: number, Gl: number, Hh: number, Hl: number
|
|
77
|
-
): void {
|
|
78
|
-
this.Ah = Ah | 0;
|
|
79
|
-
this.Al = Al | 0;
|
|
80
|
-
this.Bh = Bh | 0;
|
|
81
|
-
this.Bl = Bl | 0;
|
|
82
|
-
this.Ch = Ch | 0;
|
|
83
|
-
this.Cl = Cl | 0;
|
|
84
|
-
this.Dh = Dh | 0;
|
|
85
|
-
this.Dl = Dl | 0;
|
|
86
|
-
this.Eh = Eh | 0;
|
|
87
|
-
this.El = El | 0;
|
|
88
|
-
this.Fh = Fh | 0;
|
|
89
|
-
this.Fl = Fl | 0;
|
|
90
|
-
this.Gh = Gh | 0;
|
|
91
|
-
this.Gl = Gl | 0;
|
|
92
|
-
this.Hh = Hh | 0;
|
|
93
|
-
this.Hl = Hl | 0;
|
|
94
|
-
}
|
|
95
|
-
protected process(view: DataView, offset: number): void {
|
|
96
|
-
// Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array
|
|
97
|
-
for (let i = 0; i < 16; i++, offset += 4) {
|
|
98
|
-
SHA512_W_H[i] = view.getUint32(offset);
|
|
99
|
-
SHA512_W_L[i] = view.getUint32((offset += 4));
|
|
100
|
-
}
|
|
101
|
-
for (let i = 16; i < 80; i++) {
|
|
102
|
-
// s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
|
|
103
|
-
const W15h = SHA512_W_H[i - 15] | 0;
|
|
104
|
-
const W15l = SHA512_W_L[i - 15] | 0;
|
|
105
|
-
const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
|
|
106
|
-
const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
|
|
107
|
-
// s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
|
|
108
|
-
const W2h = SHA512_W_H[i - 2] | 0;
|
|
109
|
-
const W2l = SHA512_W_L[i - 2] | 0;
|
|
110
|
-
const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
|
|
111
|
-
const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
|
|
112
|
-
// SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
|
|
113
|
-
const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
|
|
114
|
-
const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
|
|
115
|
-
SHA512_W_H[i] = SUMh | 0;
|
|
116
|
-
SHA512_W_L[i] = SUMl | 0;
|
|
117
|
-
}
|
|
118
|
-
let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
|
119
|
-
// Compression function main loop, 80 rounds
|
|
120
|
-
for (let i = 0; i < 80; i++) {
|
|
121
|
-
// S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
|
|
122
|
-
const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
|
|
123
|
-
const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
|
|
124
|
-
//const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
|
125
|
-
const CHIh = (Eh & Fh) ^ (~Eh & Gh);
|
|
126
|
-
const CHIl = (El & Fl) ^ (~El & Gl);
|
|
127
|
-
// T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
|
|
128
|
-
// prettier-ignore
|
|
129
|
-
const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
|
|
130
|
-
const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
|
|
131
|
-
const T1l = T1ll | 0;
|
|
132
|
-
// S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
|
|
133
|
-
const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
|
|
134
|
-
const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
|
|
135
|
-
const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
|
|
136
|
-
const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
|
|
137
|
-
Hh = Gh | 0;
|
|
138
|
-
Hl = Gl | 0;
|
|
139
|
-
Gh = Fh | 0;
|
|
140
|
-
Gl = Fl | 0;
|
|
141
|
-
Fh = Eh | 0;
|
|
142
|
-
Fl = El | 0;
|
|
143
|
-
({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
|
|
144
|
-
Dh = Ch | 0;
|
|
145
|
-
Dl = Cl | 0;
|
|
146
|
-
Ch = Bh | 0;
|
|
147
|
-
Cl = Bl | 0;
|
|
148
|
-
Bh = Ah | 0;
|
|
149
|
-
Bl = Al | 0;
|
|
150
|
-
const All = u64.add3L(T1l, sigma0l, MAJl);
|
|
151
|
-
Ah = u64.add3H(All, T1h, sigma0h, MAJh);
|
|
152
|
-
Al = All | 0;
|
|
153
|
-
}
|
|
154
|
-
// Add the compressed chunk to the current hash value
|
|
155
|
-
({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
|
|
156
|
-
({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
|
|
157
|
-
({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
|
|
158
|
-
({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
|
|
159
|
-
({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
|
|
160
|
-
({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
|
|
161
|
-
({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
|
|
162
|
-
({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
|
|
163
|
-
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
|
|
164
|
-
}
|
|
165
|
-
protected roundClean(): void {
|
|
166
|
-
SHA512_W_H.fill(0);
|
|
167
|
-
SHA512_W_L.fill(0);
|
|
168
|
-
}
|
|
169
|
-
destroy(): void {
|
|
170
|
-
this.buffer.fill(0);
|
|
171
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export class SHA512_224 extends SHA512 {
|
|
176
|
-
// h -- high 32 bits, l -- low 32 bits
|
|
177
|
-
protected Ah: number = 0x8c3d37c8 | 0;
|
|
178
|
-
protected Al: number = 0x19544da2 | 0;
|
|
179
|
-
protected Bh: number = 0x73e19966 | 0;
|
|
180
|
-
protected Bl: number = 0x89dcd4d6 | 0;
|
|
181
|
-
protected Ch: number = 0x1dfab7ae | 0;
|
|
182
|
-
protected Cl: number = 0x32ff9c82 | 0;
|
|
183
|
-
protected Dh: number = 0x679dd514 | 0;
|
|
184
|
-
protected Dl: number = 0x582f9fcf | 0;
|
|
185
|
-
protected Eh: number = 0x0f6d2b69 | 0;
|
|
186
|
-
protected El: number = 0x7bd44da8 | 0;
|
|
187
|
-
protected Fh: number = 0x77e36f73 | 0;
|
|
188
|
-
protected Fl: number = 0x04c48942 | 0;
|
|
189
|
-
protected Gh: number = 0x3f9d85a8 | 0;
|
|
190
|
-
protected Gl: number = 0x6a1d36c8 | 0;
|
|
191
|
-
protected Hh: number = 0x1112e6ad | 0;
|
|
192
|
-
protected Hl: number = 0x91d692a1 | 0;
|
|
193
|
-
|
|
194
|
-
constructor() {
|
|
195
|
-
super();
|
|
196
|
-
this.outputLen = 28;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export class SHA512_256 extends SHA512 {
|
|
201
|
-
// h -- high 32 bits, l -- low 32 bits
|
|
202
|
-
protected Ah: number = 0x22312194 | 0;
|
|
203
|
-
protected Al: number = 0xfc2bf72c | 0;
|
|
204
|
-
protected Bh: number = 0x9f555fa3 | 0;
|
|
205
|
-
protected Bl: number = 0xc84c64c2 | 0;
|
|
206
|
-
protected Ch: number = 0x2393b86b | 0;
|
|
207
|
-
protected Cl: number = 0x6f53b151 | 0;
|
|
208
|
-
protected Dh: number = 0x96387719 | 0;
|
|
209
|
-
protected Dl: number = 0x5940eabd | 0;
|
|
210
|
-
protected Eh: number = 0x96283ee2 | 0;
|
|
211
|
-
protected El: number = 0xa88effe3 | 0;
|
|
212
|
-
protected Fh: number = 0xbe5e1e25 | 0;
|
|
213
|
-
protected Fl: number = 0x53863992 | 0;
|
|
214
|
-
protected Gh: number = 0x2b0199fc | 0;
|
|
215
|
-
protected Gl: number = 0x2c85b8aa | 0;
|
|
216
|
-
protected Hh: number = 0x0eb72ddc | 0;
|
|
217
|
-
protected Hl: number = 0x81c52ca2 | 0;
|
|
218
|
-
|
|
219
|
-
constructor() {
|
|
220
|
-
super();
|
|
221
|
-
this.outputLen = 32;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export class SHA384 extends SHA512 {
|
|
226
|
-
// h -- high 32 bits, l -- low 32 bits
|
|
227
|
-
protected Ah: number = 0xcbbb9d5d | 0;
|
|
228
|
-
protected Al: number = 0xc1059ed8 | 0;
|
|
229
|
-
protected Bh: number = 0x629a292a | 0;
|
|
230
|
-
protected Bl: number = 0x367cd507 | 0;
|
|
231
|
-
protected Ch: number = 0x9159015a | 0;
|
|
232
|
-
protected Cl: number = 0x3070dd17 | 0;
|
|
233
|
-
protected Dh: number = 0x152fecd8 | 0;
|
|
234
|
-
protected Dl: number = 0xf70e5939 | 0;
|
|
235
|
-
protected Eh: number = 0x67332667 | 0;
|
|
236
|
-
protected El: number = 0xffc00b31 | 0;
|
|
237
|
-
protected Fh: number = 0x8eb44a87 | 0;
|
|
238
|
-
protected Fl: number = 0x68581511 | 0;
|
|
239
|
-
protected Gh: number = 0xdb0c2e0d | 0;
|
|
240
|
-
protected Gl: number = 0x64f98fa7 | 0;
|
|
241
|
-
protected Hh: number = 0x47b5481d | 0;
|
|
242
|
-
protected Hl: number = 0xbefa4fa4 | 0;
|
|
243
|
-
|
|
244
|
-
constructor() {
|
|
245
|
-
super();
|
|
246
|
-
this.outputLen = 48;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/** SHA2-512 hash function. */
|
|
251
|
-
export const sha512: CHash = /* @__PURE__ */ wrapConstructor(() => new SHA512());
|
|
252
|
-
/** SHA2-512/224 "truncated" hash function, with improved resistance to length extension attacks. */
|
|
253
|
-
export const sha512_224: CHash = /* @__PURE__ */ wrapConstructor(() => new SHA512_224());
|
|
254
|
-
/** SHA2-512/256 "truncated" hash function, with improved resistance to length extension attacks. */
|
|
255
|
-
export const sha512_256: CHash = /* @__PURE__ */ wrapConstructor(() => new SHA512_256());
|
|
256
|
-
/** SHA2-384 hash function. */
|
|
257
|
-
export const sha384: CHash = /* @__PURE__ */ wrapConstructor(() => new SHA384());
|
|
9
|
+
import {
|
|
10
|
+
SHA384 as SHA384n,
|
|
11
|
+
sha384 as sha384n,
|
|
12
|
+
sha512_224 as sha512_224n,
|
|
13
|
+
SHA512_224 as SHA512_224n,
|
|
14
|
+
sha512_256 as sha512_256n,
|
|
15
|
+
SHA512_256 as SHA512_256n,
|
|
16
|
+
SHA512 as SHA512n,
|
|
17
|
+
sha512 as sha512n,
|
|
18
|
+
} from './sha2.ts';
|
|
19
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
20
|
+
export const SHA512: typeof SHA512n = SHA512n;
|
|
21
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
22
|
+
export const sha512: typeof sha512n = sha512n;
|
|
23
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
24
|
+
export const SHA384: typeof SHA384n = SHA384n;
|
|
25
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
26
|
+
export const sha384: typeof sha384n = sha384n;
|
|
27
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
28
|
+
export const SHA512_224: typeof SHA512_224n = SHA512_224n;
|
|
29
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
30
|
+
export const sha512_224: typeof sha512_224n = sha512_224n;
|
|
31
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
32
|
+
export const SHA512_256: typeof SHA512_256n = SHA512_256n;
|
|
33
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
34
|
+
export const sha512_256: typeof sha512_256n = sha512_256n;
|
|
@@ -11,26 +11,70 @@
|
|
|
11
11
|
// Makes the utils un-importable in browsers without a bundler.
|
|
12
12
|
// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.
|
|
13
13
|
import { crypto } from '@noble/hashes/crypto';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// We can't reuse isBytes from _assert, because somehow this causes huge perf issues
|
|
14
|
+
|
|
15
|
+
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
17
16
|
export function isBytes(a: unknown): a is Uint8Array {
|
|
18
17
|
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
|
|
19
18
|
}
|
|
20
19
|
|
|
20
|
+
/** Asserts something is positive integer. */
|
|
21
|
+
export function anumber(n: number): void {
|
|
22
|
+
if (!Number.isSafeInteger(n) || n < 0) throw new Error('positive integer expected, got ' + n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Asserts something is Uint8Array. */
|
|
26
|
+
export function abytes(b: Uint8Array | undefined, ...lengths: number[]): void {
|
|
27
|
+
if (!isBytes(b)) throw new Error('Uint8Array expected');
|
|
28
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
29
|
+
throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Asserts something is hash */
|
|
33
|
+
export function ahash(h: IHash): void {
|
|
34
|
+
if (typeof h !== 'function' || typeof h.create !== 'function')
|
|
35
|
+
throw new Error('Hash should be wrapped by utils.createHasher');
|
|
36
|
+
anumber(h.outputLen);
|
|
37
|
+
anumber(h.blockLen);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Asserts a hash instance has not been destroyed / finished */
|
|
41
|
+
export function aexists(instance: any, checkFinished = true): void {
|
|
42
|
+
if (instance.destroyed) throw new Error('Hash instance has been destroyed');
|
|
43
|
+
if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Asserts output is properly-sized byte array */
|
|
47
|
+
export function aoutput(out: any, instance: any): void {
|
|
48
|
+
abytes(out);
|
|
49
|
+
const min = instance.outputLen;
|
|
50
|
+
if (out.length < min) {
|
|
51
|
+
throw new Error('digestInto() expects output buffer of length at least ' + min);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Generic type encompassing 8/16/32-byte arrays - but not 64-byte. */
|
|
21
56
|
// prettier-ignore
|
|
22
57
|
export type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |
|
|
23
58
|
Uint16Array | Int16Array | Uint32Array | Int32Array;
|
|
24
59
|
|
|
25
|
-
|
|
60
|
+
/** Cast u8 / u16 / u32 to u8. */
|
|
26
61
|
export function u8(arr: TypedArray): Uint8Array {
|
|
27
62
|
return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28
63
|
}
|
|
64
|
+
|
|
65
|
+
/** Cast u8 / u16 / u32 to u32. */
|
|
29
66
|
export function u32(arr: TypedArray): Uint32Array {
|
|
30
67
|
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
31
68
|
}
|
|
32
69
|
|
|
33
|
-
|
|
70
|
+
/** Zeroize a byte array. Warning: JS provides no guarantees. */
|
|
71
|
+
export function clean(...arrays: TypedArray[]): void {
|
|
72
|
+
for (let i = 0; i < arrays.length; i++) {
|
|
73
|
+
arrays[i].fill(0);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Create DataView of an array for easy byte-level manipulation. */
|
|
34
78
|
export function createView(arr: TypedArray): DataView {
|
|
35
79
|
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
36
80
|
}
|
|
@@ -39,6 +83,7 @@ export function createView(arr: TypedArray): DataView {
|
|
|
39
83
|
export function rotr(word: number, shift: number): number {
|
|
40
84
|
return (word << (32 - shift)) | (word >>> shift);
|
|
41
85
|
}
|
|
86
|
+
|
|
42
87
|
/** The rotate left (circular left shift) operation for uint32 */
|
|
43
88
|
export function rotl(word: number, shift: number): number {
|
|
44
89
|
return (word << shift) | ((word >>> (32 - shift)) >>> 0);
|
|
@@ -47,7 +92,8 @@ export function rotl(word: number, shift: number): number {
|
|
|
47
92
|
/** Is current platform little-endian? Most are. Big-Endian platform: IBM */
|
|
48
93
|
export const isLE: boolean = /* @__PURE__ */ (() =>
|
|
49
94
|
new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();
|
|
50
|
-
|
|
95
|
+
|
|
96
|
+
/** The byte swap operation for uint32 */
|
|
51
97
|
export function byteSwap(word: number): number {
|
|
52
98
|
return (
|
|
53
99
|
((word << 24) & 0xff000000) |
|
|
@@ -57,27 +103,42 @@ export function byteSwap(word: number): number {
|
|
|
57
103
|
);
|
|
58
104
|
}
|
|
59
105
|
/** Conditionally byte swap if on a big-endian platform */
|
|
60
|
-
export const
|
|
106
|
+
export const swap8IfBE: (n: number) => number = isLE
|
|
61
107
|
? (n: number) => n
|
|
62
108
|
: (n: number) => byteSwap(n);
|
|
63
109
|
|
|
110
|
+
/** @deprecated */
|
|
111
|
+
export const byteSwapIfBE: typeof swap8IfBE = swap8IfBE;
|
|
64
112
|
/** In place byte swap for Uint32Array */
|
|
65
|
-
export function byteSwap32(arr: Uint32Array):
|
|
113
|
+
export function byteSwap32(arr: Uint32Array): Uint32Array {
|
|
66
114
|
for (let i = 0; i < arr.length; i++) {
|
|
67
115
|
arr[i] = byteSwap(arr[i]);
|
|
68
116
|
}
|
|
117
|
+
return arr;
|
|
69
118
|
}
|
|
70
119
|
|
|
120
|
+
export const swap32IfBE: (u: Uint32Array) => Uint32Array = isLE
|
|
121
|
+
? (u: Uint32Array) => u
|
|
122
|
+
: byteSwap32;
|
|
123
|
+
|
|
124
|
+
// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex
|
|
125
|
+
const hasHexBuiltin: boolean = /* @__PURE__ */ (() =>
|
|
126
|
+
// @ts-ignore
|
|
127
|
+
typeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();
|
|
128
|
+
|
|
71
129
|
// Array where index 0xf0 (240) is mapped to string 'f0'
|
|
72
130
|
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>
|
|
73
131
|
i.toString(16).padStart(2, '0')
|
|
74
132
|
);
|
|
133
|
+
|
|
75
134
|
/**
|
|
76
|
-
* Convert byte array to hex string.
|
|
135
|
+
* Convert byte array to hex string. Uses built-in function, when available.
|
|
77
136
|
* @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
|
|
78
137
|
*/
|
|
79
138
|
export function bytesToHex(bytes: Uint8Array): string {
|
|
80
139
|
abytes(bytes);
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
if (hasHexBuiltin) return bytes.toHex();
|
|
81
142
|
// pre-caching improves the speed 6x
|
|
82
143
|
let hex = '';
|
|
83
144
|
for (let i = 0; i < bytes.length; i++) {
|
|
@@ -96,11 +157,13 @@ function asciiToBase16(ch: number): number | undefined {
|
|
|
96
157
|
}
|
|
97
158
|
|
|
98
159
|
/**
|
|
99
|
-
* Convert hex string to byte array.
|
|
160
|
+
* Convert hex string to byte array. Uses built-in function, when available.
|
|
100
161
|
* @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
|
|
101
162
|
*/
|
|
102
163
|
export function hexToBytes(hex: string): Uint8Array {
|
|
103
164
|
if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
if (hasHexBuiltin) return Uint8Array.fromHex(hex);
|
|
104
167
|
const hl = hex.length;
|
|
105
168
|
const al = hl / 2;
|
|
106
169
|
if (hl % 2) throw new Error('hex string expected, got unpadded hex of length ' + hl);
|
|
@@ -141,21 +204,29 @@ export async function asyncLoop(
|
|
|
141
204
|
}
|
|
142
205
|
}
|
|
143
206
|
|
|
144
|
-
// Global symbols
|
|
145
|
-
// See https://github.com/microsoft/TypeScript/issues/31535
|
|
207
|
+
// Global symbols, but ts doesn't see them: https://github.com/microsoft/TypeScript/issues/31535
|
|
146
208
|
declare const TextEncoder: any;
|
|
209
|
+
declare const TextDecoder: any;
|
|
147
210
|
|
|
148
211
|
/**
|
|
149
|
-
*
|
|
150
|
-
* @example utf8ToBytes('abc') //
|
|
212
|
+
* Converts string to bytes using UTF8 encoding.
|
|
213
|
+
* @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])
|
|
151
214
|
*/
|
|
152
215
|
export function utf8ToBytes(str: string): Uint8Array {
|
|
153
|
-
if (typeof str !== 'string') throw new Error('
|
|
216
|
+
if (typeof str !== 'string') throw new Error('string expected');
|
|
154
217
|
return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809
|
|
155
218
|
}
|
|
156
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Converts bytes to string using UTF8 encoding.
|
|
222
|
+
* @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'
|
|
223
|
+
*/
|
|
224
|
+
export function bytesToUtf8(bytes: Uint8Array): string {
|
|
225
|
+
return new TextDecoder().decode(bytes);
|
|
226
|
+
}
|
|
227
|
+
|
|
157
228
|
/** Accepted input of hash functions. Strings are converted to byte arrays. */
|
|
158
|
-
export type Input =
|
|
229
|
+
export type Input = string | Uint8Array;
|
|
159
230
|
/**
|
|
160
231
|
* Normalizes (non-hex) string or Uint8Array to Uint8Array.
|
|
161
232
|
* Warning: when Uint8Array is passed, it would NOT get copied.
|
|
@@ -167,9 +238,19 @@ export function toBytes(data: Input): Uint8Array {
|
|
|
167
238
|
return data;
|
|
168
239
|
}
|
|
169
240
|
|
|
241
|
+
/** KDFs can accept string or Uint8Array for user convenience. */
|
|
242
|
+
export type KDFInput = string | Uint8Array;
|
|
170
243
|
/**
|
|
171
|
-
*
|
|
244
|
+
* Helper for KDFs: consumes uint8array or string.
|
|
245
|
+
* When string is passed, does utf8 decoding, using TextDecoder.
|
|
172
246
|
*/
|
|
247
|
+
export function kdfInputToBytes(data: KDFInput): Uint8Array {
|
|
248
|
+
if (typeof data === 'string') data = utf8ToBytes(data);
|
|
249
|
+
abytes(data);
|
|
250
|
+
return data;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** Copies several Uint8Arrays into one. */
|
|
173
254
|
export function concatBytes(...arrays: Uint8Array[]): Uint8Array {
|
|
174
255
|
let sum = 0;
|
|
175
256
|
for (let i = 0; i < arrays.length; i++) {
|
|
@@ -186,6 +267,25 @@ export function concatBytes(...arrays: Uint8Array[]): Uint8Array {
|
|
|
186
267
|
return res;
|
|
187
268
|
}
|
|
188
269
|
|
|
270
|
+
type EmptyObj = {};
|
|
271
|
+
export function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(
|
|
272
|
+
defaults: T1,
|
|
273
|
+
opts?: T2
|
|
274
|
+
): T1 & T2 {
|
|
275
|
+
if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')
|
|
276
|
+
throw new Error('options should be object or undefined');
|
|
277
|
+
const merged = Object.assign(defaults, opts);
|
|
278
|
+
return merged as T1 & T2;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Hash interface. */
|
|
282
|
+
export type IHash = {
|
|
283
|
+
(data: Uint8Array): Uint8Array;
|
|
284
|
+
blockLen: number;
|
|
285
|
+
outputLen: number;
|
|
286
|
+
create: any;
|
|
287
|
+
};
|
|
288
|
+
|
|
189
289
|
/** For runtime check if class implements interface */
|
|
190
290
|
export abstract class Hash<T extends Hash<T>> {
|
|
191
291
|
abstract blockLen: number; // Bytes per block
|
|
@@ -209,9 +309,7 @@ export abstract class Hash<T extends Hash<T>> {
|
|
|
209
309
|
*/
|
|
210
310
|
abstract _cloneInto(to?: T): T;
|
|
211
311
|
// Safe version that clones internal state
|
|
212
|
-
clone(): T
|
|
213
|
-
return this._cloneInto();
|
|
214
|
-
}
|
|
312
|
+
abstract clone(): T;
|
|
215
313
|
}
|
|
216
314
|
|
|
217
315
|
/**
|
|
@@ -225,26 +323,15 @@ export type HashXOF<T extends Hash<T>> = Hash<T> & {
|
|
|
225
323
|
xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf
|
|
226
324
|
};
|
|
227
325
|
|
|
228
|
-
type EmptyObj = {};
|
|
229
|
-
export function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(
|
|
230
|
-
defaults: T1,
|
|
231
|
-
opts?: T2
|
|
232
|
-
): T1 & T2 {
|
|
233
|
-
if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')
|
|
234
|
-
throw new Error('Options should be object or undefined');
|
|
235
|
-
const merged = Object.assign(defaults, opts);
|
|
236
|
-
return merged as T1 & T2;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
326
|
/** Hash function */
|
|
240
|
-
export type CHash = ReturnType<typeof
|
|
327
|
+
export type CHash = ReturnType<typeof createHasher>;
|
|
241
328
|
/** Hash function with output */
|
|
242
|
-
export type CHashO = ReturnType<typeof
|
|
329
|
+
export type CHashO = ReturnType<typeof createOptHasher>;
|
|
243
330
|
/** XOF with output */
|
|
244
|
-
export type CHashXO = ReturnType<typeof
|
|
331
|
+
export type CHashXO = ReturnType<typeof createXOFer>;
|
|
245
332
|
|
|
246
333
|
/** Wraps hash function, creating an interface on top of it */
|
|
247
|
-
export function
|
|
334
|
+
export function createHasher<T extends Hash<T>>(
|
|
248
335
|
hashCons: () => Hash<T>
|
|
249
336
|
): {
|
|
250
337
|
(msg: Input): Uint8Array;
|
|
@@ -260,37 +347,40 @@ export function wrapConstructor<T extends Hash<T>>(
|
|
|
260
347
|
return hashC;
|
|
261
348
|
}
|
|
262
349
|
|
|
263
|
-
export function
|
|
350
|
+
export function createOptHasher<H extends Hash<H>, T extends Object>(
|
|
264
351
|
hashCons: (opts?: T) => Hash<H>
|
|
265
352
|
): {
|
|
266
353
|
(msg: Input, opts?: T): Uint8Array;
|
|
267
354
|
outputLen: number;
|
|
268
355
|
blockLen: number;
|
|
269
|
-
create(opts
|
|
356
|
+
create(opts?: T): Hash<H>;
|
|
270
357
|
} {
|
|
271
358
|
const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();
|
|
272
359
|
const tmp = hashCons({} as T);
|
|
273
360
|
hashC.outputLen = tmp.outputLen;
|
|
274
361
|
hashC.blockLen = tmp.blockLen;
|
|
275
|
-
hashC.create = (opts
|
|
362
|
+
hashC.create = (opts?: T) => hashCons(opts);
|
|
276
363
|
return hashC;
|
|
277
364
|
}
|
|
278
365
|
|
|
279
|
-
export function
|
|
366
|
+
export function createXOFer<H extends HashXOF<H>, T extends Object>(
|
|
280
367
|
hashCons: (opts?: T) => HashXOF<H>
|
|
281
368
|
): {
|
|
282
369
|
(msg: Input, opts?: T): Uint8Array;
|
|
283
370
|
outputLen: number;
|
|
284
371
|
blockLen: number;
|
|
285
|
-
create(opts
|
|
372
|
+
create(opts?: T): HashXOF<H>;
|
|
286
373
|
} {
|
|
287
374
|
const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();
|
|
288
375
|
const tmp = hashCons({} as T);
|
|
289
376
|
hashC.outputLen = tmp.outputLen;
|
|
290
377
|
hashC.blockLen = tmp.blockLen;
|
|
291
|
-
hashC.create = (opts
|
|
378
|
+
hashC.create = (opts?: T) => hashCons(opts);
|
|
292
379
|
return hashC;
|
|
293
380
|
}
|
|
381
|
+
export const wrapConstructor: typeof createHasher = createHasher;
|
|
382
|
+
export const wrapConstructorWithOpts: typeof createOptHasher = createOptHasher;
|
|
383
|
+
export const wrapXOFConstructorWithOpts: typeof createXOFer = createXOFer;
|
|
294
384
|
|
|
295
385
|
/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */
|
|
296
386
|
export function randomBytes(bytesLength = 32): Uint8Array {
|
|
@@ -299,7 +389,7 @@ export function randomBytes(bytesLength = 32): Uint8Array {
|
|
|
299
389
|
}
|
|
300
390
|
// Legacy Node.js compatibility
|
|
301
391
|
if (crypto && typeof crypto.randomBytes === 'function') {
|
|
302
|
-
return crypto.randomBytes(bytesLength);
|
|
392
|
+
return Uint8Array.from(crypto.randomBytes(bytesLength));
|
|
303
393
|
}
|
|
304
394
|
throw new Error('crypto.getRandomValues must be defined');
|
|
305
395
|
}
|