@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
package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/weierstrass.js
RENAMED
|
@@ -8,6 +8,19 @@ exports.mapToCurveSimpleSWU = mapToCurveSimpleSWU;
|
|
|
8
8
|
/**
|
|
9
9
|
* Short Weierstrass curve methods. The formula is: y² = x³ + ax + b.
|
|
10
10
|
*
|
|
11
|
+
* ### Parameters
|
|
12
|
+
*
|
|
13
|
+
* To initialize a weierstrass curve, one needs to pass following params:
|
|
14
|
+
*
|
|
15
|
+
* * a: formula param
|
|
16
|
+
* * b: formula param
|
|
17
|
+
* * Fp: finite field of prime characteristic P; may be complex (Fp2). Arithmetics is done in field
|
|
18
|
+
* * n: order of prime subgroup a.k.a total amount of valid curve points
|
|
19
|
+
* * Gx: Base point (x, y) aka generator point. Gx = x coordinate
|
|
20
|
+
* * Gy: ...y coordinate
|
|
21
|
+
* * h: cofactor, usually 1. h*n = curve group order (n is only subgroup order)
|
|
22
|
+
* * lowS: whether to enable (default) or disable "low-s" non-malleable signatures
|
|
23
|
+
*
|
|
11
24
|
* ### Design rationale for types
|
|
12
25
|
*
|
|
13
26
|
* * Interaction between classes from different curves should fail:
|
|
@@ -32,44 +45,45 @@ exports.mapToCurveSimpleSWU = mapToCurveSimpleSWU;
|
|
|
32
45
|
* @module
|
|
33
46
|
*/
|
|
34
47
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
48
|
+
// prettier-ignore
|
|
49
|
+
const curve_ts_1 = require("./curve.js");
|
|
50
|
+
// prettier-ignore
|
|
51
|
+
const modular_ts_1 = require("./modular.js");
|
|
52
|
+
// prettier-ignore
|
|
53
|
+
const utils_ts_1 = require("./utils.js");
|
|
39
54
|
function validateSigVerOpts(opts) {
|
|
40
55
|
if (opts.lowS !== undefined)
|
|
41
|
-
(0,
|
|
56
|
+
(0, utils_ts_1.abool)('lowS', opts.lowS);
|
|
42
57
|
if (opts.prehash !== undefined)
|
|
43
|
-
(0,
|
|
58
|
+
(0, utils_ts_1.abool)('prehash', opts.prehash);
|
|
44
59
|
}
|
|
45
60
|
function validatePointOpts(curve) {
|
|
46
|
-
const opts = (0,
|
|
47
|
-
|
|
61
|
+
const opts = (0, curve_ts_1.validateBasic)(curve);
|
|
62
|
+
(0, utils_ts_1.validateObject)(opts, {
|
|
48
63
|
a: 'field',
|
|
49
64
|
b: 'field',
|
|
50
65
|
}, {
|
|
66
|
+
allowInfinityPoint: 'boolean',
|
|
51
67
|
allowedPrivateKeyLengths: 'array',
|
|
52
|
-
wrapPrivateKey: 'boolean',
|
|
53
|
-
isTorsionFree: 'function',
|
|
54
68
|
clearCofactor: 'function',
|
|
55
|
-
allowInfinityPoint: 'boolean',
|
|
56
69
|
fromBytes: 'function',
|
|
70
|
+
isTorsionFree: 'function',
|
|
57
71
|
toBytes: 'function',
|
|
72
|
+
wrapPrivateKey: 'boolean',
|
|
58
73
|
});
|
|
59
74
|
const { endo, Fp, a } = opts;
|
|
60
75
|
if (endo) {
|
|
61
76
|
if (!Fp.eql(a, Fp.ZERO)) {
|
|
62
|
-
throw new Error('invalid
|
|
77
|
+
throw new Error('invalid endo: CURVE.a must be 0');
|
|
63
78
|
}
|
|
64
79
|
if (typeof endo !== 'object' ||
|
|
65
80
|
typeof endo.beta !== 'bigint' ||
|
|
66
81
|
typeof endo.splitScalar !== 'function') {
|
|
67
|
-
throw new Error('invalid
|
|
82
|
+
throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');
|
|
68
83
|
}
|
|
69
84
|
}
|
|
70
85
|
return Object.freeze({ ...opts });
|
|
71
86
|
}
|
|
72
|
-
const { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;
|
|
73
87
|
class DERErr extends Error {
|
|
74
88
|
constructor(m = '') {
|
|
75
89
|
super(m);
|
|
@@ -95,12 +109,12 @@ exports.DER = {
|
|
|
95
109
|
if (data.length & 1)
|
|
96
110
|
throw new E('tlv.encode: unpadded data');
|
|
97
111
|
const dataLen = data.length / 2;
|
|
98
|
-
const len =
|
|
112
|
+
const len = (0, utils_ts_1.numberToHexUnpadded)(dataLen);
|
|
99
113
|
if ((len.length / 2) & 128)
|
|
100
114
|
throw new E('tlv.encode: long form length too big');
|
|
101
115
|
// length of length with long form flag
|
|
102
|
-
const lenLen = dataLen > 127 ?
|
|
103
|
-
const t =
|
|
116
|
+
const lenLen = dataLen > 127 ? (0, utils_ts_1.numberToHexUnpadded)((len.length / 2) | 128) : '';
|
|
117
|
+
const t = (0, utils_ts_1.numberToHexUnpadded)(tag);
|
|
104
118
|
return t + lenLen + len + data;
|
|
105
119
|
},
|
|
106
120
|
// v - value, l - left bytes (unparsed)
|
|
@@ -149,7 +163,7 @@ exports.DER = {
|
|
|
149
163
|
const { Err: E } = exports.DER;
|
|
150
164
|
if (num < _0n)
|
|
151
165
|
throw new E('integer: negative integers are not allowed');
|
|
152
|
-
let hex =
|
|
166
|
+
let hex = (0, utils_ts_1.numberToHexUnpadded)(num);
|
|
153
167
|
// Pad with zero byte if negative flag is present
|
|
154
168
|
if (Number.parseInt(hex[0], 16) & 0b1000)
|
|
155
169
|
hex = '00' + hex;
|
|
@@ -163,14 +177,13 @@ exports.DER = {
|
|
|
163
177
|
throw new E('invalid signature integer: negative');
|
|
164
178
|
if (data[0] === 0x00 && !(data[1] & 128))
|
|
165
179
|
throw new E('invalid signature integer: unnecessary leading zero');
|
|
166
|
-
return
|
|
180
|
+
return (0, utils_ts_1.bytesToNumberBE)(data);
|
|
167
181
|
},
|
|
168
182
|
},
|
|
169
183
|
toSig(hex) {
|
|
170
184
|
// parse DER signature
|
|
171
185
|
const { Err: E, _int: int, _tlv: tlv } = exports.DER;
|
|
172
|
-
const data =
|
|
173
|
-
ut.abytes(data);
|
|
186
|
+
const data = (0, utils_ts_1.ensureBytes)('signature', hex);
|
|
174
187
|
const { v: seqBytes, l: seqLeftBytes } = tlv.decode(0x30, data);
|
|
175
188
|
if (seqLeftBytes.length)
|
|
176
189
|
throw new E('invalid signature: left bytes after parsing');
|
|
@@ -188,17 +201,20 @@ exports.DER = {
|
|
|
188
201
|
return tlv.encode(0x30, seq);
|
|
189
202
|
},
|
|
190
203
|
};
|
|
204
|
+
function numToSizedHex(num, size) {
|
|
205
|
+
return (0, utils_ts_1.bytesToHex)((0, utils_ts_1.numberToBytesBE)(num, size));
|
|
206
|
+
}
|
|
191
207
|
// Be friendly to bad ECMAScript parsers by not using bigint literals
|
|
192
208
|
// prettier-ignore
|
|
193
209
|
const _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);
|
|
194
210
|
function weierstrassPoints(opts) {
|
|
195
211
|
const CURVE = validatePointOpts(opts);
|
|
196
212
|
const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ
|
|
197
|
-
const Fn = (0,
|
|
213
|
+
const Fn = (0, modular_ts_1.Field)(CURVE.n, CURVE.nBitLength);
|
|
198
214
|
const toBytes = CURVE.toBytes ||
|
|
199
215
|
((_c, point, _isCompressed) => {
|
|
200
216
|
const a = point.toAffine();
|
|
201
|
-
return
|
|
217
|
+
return (0, utils_ts_1.concatBytes)(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));
|
|
202
218
|
});
|
|
203
219
|
const fromBytes = CURVE.fromBytes ||
|
|
204
220
|
((bytes) => {
|
|
@@ -210,32 +226,41 @@ function weierstrassPoints(opts) {
|
|
|
210
226
|
return { x, y };
|
|
211
227
|
});
|
|
212
228
|
/**
|
|
213
|
-
* y² = x³ + ax + b: Short weierstrass curve formula
|
|
229
|
+
* y² = x³ + ax + b: Short weierstrass curve formula. Takes x, returns y².
|
|
214
230
|
* @returns y²
|
|
215
231
|
*/
|
|
216
232
|
function weierstrassEquation(x) {
|
|
217
233
|
const { a, b } = CURVE;
|
|
218
234
|
const x2 = Fp.sqr(x); // x * x
|
|
219
|
-
const x3 = Fp.mul(x2, x); //
|
|
220
|
-
return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); //
|
|
235
|
+
const x3 = Fp.mul(x2, x); // x² * x
|
|
236
|
+
return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x³ + a * x + b
|
|
237
|
+
}
|
|
238
|
+
function isValidXY(x, y) {
|
|
239
|
+
const left = Fp.sqr(y); // y²
|
|
240
|
+
const right = weierstrassEquation(x); // x³ + ax + b
|
|
241
|
+
return Fp.eql(left, right);
|
|
221
242
|
}
|
|
222
243
|
// Validate whether the passed curve params are valid.
|
|
223
|
-
//
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
244
|
+
// Test 1: equation y² = x³ + ax + b should work for generator point.
|
|
245
|
+
if (!isValidXY(CURVE.Gx, CURVE.Gy))
|
|
246
|
+
throw new Error('bad curve params: generator point');
|
|
247
|
+
// Test 2: discriminant Δ part should be non-zero: 4a³ + 27b² != 0.
|
|
248
|
+
// Guarantees curve is genus-1, smooth (non-singular).
|
|
249
|
+
const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n), _4n);
|
|
250
|
+
const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));
|
|
251
|
+
if (Fp.is0(Fp.add(_4a3, _27b2)))
|
|
252
|
+
throw new Error('bad curve params: a or b');
|
|
228
253
|
// Valid group elements reside in range 1..n-1
|
|
229
254
|
function isWithinCurveOrder(num) {
|
|
230
|
-
return
|
|
255
|
+
return (0, utils_ts_1.inRange)(num, _1n, CURVE.n);
|
|
231
256
|
}
|
|
232
257
|
// Validates if priv key is valid and converts it to bigint.
|
|
233
258
|
// Supports options allowedPrivateKeyLengths and wrapPrivateKey.
|
|
234
259
|
function normPrivateKeyToScalar(key) {
|
|
235
260
|
const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N } = CURVE;
|
|
236
261
|
if (lengths && typeof key !== 'bigint') {
|
|
237
|
-
if (
|
|
238
|
-
key =
|
|
262
|
+
if ((0, utils_ts_1.isBytes)(key))
|
|
263
|
+
key = (0, utils_ts_1.bytesToHex)(key);
|
|
239
264
|
// Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes
|
|
240
265
|
if (typeof key !== 'string' || !lengths.includes(key.length))
|
|
241
266
|
throw new Error('invalid private key');
|
|
@@ -246,25 +271,25 @@ function weierstrassPoints(opts) {
|
|
|
246
271
|
num =
|
|
247
272
|
typeof key === 'bigint'
|
|
248
273
|
? key
|
|
249
|
-
:
|
|
274
|
+
: (0, utils_ts_1.bytesToNumberBE)((0, utils_ts_1.ensureBytes)('private key', key, nByteLength));
|
|
250
275
|
}
|
|
251
276
|
catch (error) {
|
|
252
277
|
throw new Error('invalid private key, expected hex or ' + nByteLength + ' bytes, got ' + typeof key);
|
|
253
278
|
}
|
|
254
279
|
if (wrapPrivateKey)
|
|
255
|
-
num = (0,
|
|
256
|
-
|
|
280
|
+
num = (0, modular_ts_1.mod)(num, N); // disabled by default, enabled for BLS
|
|
281
|
+
(0, utils_ts_1.aInRange)('private key', num, _1n, N); // num in range [1..N-1]
|
|
257
282
|
return num;
|
|
258
283
|
}
|
|
259
|
-
function
|
|
284
|
+
function aprjpoint(other) {
|
|
260
285
|
if (!(other instanceof Point))
|
|
261
286
|
throw new Error('ProjectivePoint expected');
|
|
262
287
|
}
|
|
263
288
|
// Memoized toAffine / validity check. They are heavy. Points are immutable.
|
|
264
289
|
// Converts Projective point to affine (x, y) coordinates.
|
|
265
290
|
// Can accept precomputed Z^-1 - for example, from invertBatch.
|
|
266
|
-
// (
|
|
267
|
-
const toAffineMemo = (0,
|
|
291
|
+
// (X, Y, Z) ∋ (x=X/Z, y=Y/Z)
|
|
292
|
+
const toAffineMemo = (0, utils_ts_1.memoized)((p, iz) => {
|
|
268
293
|
const { px: x, py: y, pz: z } = p;
|
|
269
294
|
// Fast-path for normalized points
|
|
270
295
|
if (Fp.eql(z, Fp.ONE))
|
|
@@ -285,7 +310,7 @@ function weierstrassPoints(opts) {
|
|
|
285
310
|
});
|
|
286
311
|
// NOTE: on exception this will crash 'cached' and no value will be set.
|
|
287
312
|
// Otherwise true will be return
|
|
288
|
-
const assertValidMemo = (0,
|
|
313
|
+
const assertValidMemo = (0, utils_ts_1.memoized)((p) => {
|
|
289
314
|
if (p.is0()) {
|
|
290
315
|
// (0, 1, 0) aka ZERO is invalid in most contexts.
|
|
291
316
|
// In BLS, ZERO can be serialized, so we allow it.
|
|
@@ -299,30 +324,28 @@ function weierstrassPoints(opts) {
|
|
|
299
324
|
// Check if x, y are valid field elements
|
|
300
325
|
if (!Fp.isValid(x) || !Fp.isValid(y))
|
|
301
326
|
throw new Error('bad point: x or y not FE');
|
|
302
|
-
|
|
303
|
-
const right = weierstrassEquation(x); // x³ + ax + b
|
|
304
|
-
if (!Fp.eql(left, right))
|
|
327
|
+
if (!isValidXY(x, y))
|
|
305
328
|
throw new Error('bad point: equation left != right');
|
|
306
329
|
if (!p.isTorsionFree())
|
|
307
330
|
throw new Error('bad point: not in prime-order subgroup');
|
|
308
331
|
return true;
|
|
309
332
|
});
|
|
310
333
|
/**
|
|
311
|
-
* Projective Point works in 3d / projective (homogeneous) coordinates: (
|
|
334
|
+
* Projective Point works in 3d / projective (homogeneous) coordinates: (X, Y, Z) ∋ (x=X/Z, y=Y/Z)
|
|
312
335
|
* Default Point works in 2d / affine coordinates: (x, y)
|
|
313
336
|
* We're doing calculations in projective, because its operations don't require costly inversion.
|
|
314
337
|
*/
|
|
315
338
|
class Point {
|
|
316
339
|
constructor(px, py, pz) {
|
|
317
|
-
this.px = px;
|
|
318
|
-
this.py = py;
|
|
319
|
-
this.pz = pz;
|
|
320
340
|
if (px == null || !Fp.isValid(px))
|
|
321
341
|
throw new Error('x required');
|
|
322
|
-
if (py == null || !Fp.isValid(py))
|
|
342
|
+
if (py == null || !Fp.isValid(py) || Fp.is0(py))
|
|
323
343
|
throw new Error('y required');
|
|
324
344
|
if (pz == null || !Fp.isValid(pz))
|
|
325
345
|
throw new Error('z required');
|
|
346
|
+
this.px = px;
|
|
347
|
+
this.py = py;
|
|
348
|
+
this.pz = pz;
|
|
326
349
|
Object.freeze(this);
|
|
327
350
|
}
|
|
328
351
|
// Does not validate if the point is on-curve.
|
|
@@ -352,7 +375,7 @@ function weierstrassPoints(opts) {
|
|
|
352
375
|
* Optimization: converts a list of projective points to a list of identical points with Z=1.
|
|
353
376
|
*/
|
|
354
377
|
static normalizeZ(points) {
|
|
355
|
-
const toInv =
|
|
378
|
+
const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.pz));
|
|
356
379
|
return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
|
|
357
380
|
}
|
|
358
381
|
/**
|
|
@@ -360,7 +383,7 @@ function weierstrassPoints(opts) {
|
|
|
360
383
|
* @param hex short/long ECDSA hex
|
|
361
384
|
*/
|
|
362
385
|
static fromHex(hex) {
|
|
363
|
-
const P = Point.fromAffine(fromBytes((0,
|
|
386
|
+
const P = Point.fromAffine(fromBytes((0, utils_ts_1.ensureBytes)('pointHex', hex)));
|
|
364
387
|
P.assertValidity();
|
|
365
388
|
return P;
|
|
366
389
|
}
|
|
@@ -370,7 +393,7 @@ function weierstrassPoints(opts) {
|
|
|
370
393
|
}
|
|
371
394
|
// Multiscalar Multiplication
|
|
372
395
|
static msm(points, scalars) {
|
|
373
|
-
return (0,
|
|
396
|
+
return (0, curve_ts_1.pippenger)(Point, Fn, points, scalars);
|
|
374
397
|
}
|
|
375
398
|
// "Private method", don't use it directly
|
|
376
399
|
_setWindowSize(windowSize) {
|
|
@@ -390,7 +413,7 @@ function weierstrassPoints(opts) {
|
|
|
390
413
|
* Compare one point to another.
|
|
391
414
|
*/
|
|
392
415
|
equals(other) {
|
|
393
|
-
|
|
416
|
+
aprjpoint(other);
|
|
394
417
|
const { px: X1, py: Y1, pz: Z1 } = this;
|
|
395
418
|
const { px: X2, py: Y2, pz: Z2 } = other;
|
|
396
419
|
const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));
|
|
@@ -450,7 +473,7 @@ function weierstrassPoints(opts) {
|
|
|
450
473
|
// https://eprint.iacr.org/2015/1060, algorithm 1
|
|
451
474
|
// Cost: 12M + 0S + 3*a + 3*b3 + 23add.
|
|
452
475
|
add(other) {
|
|
453
|
-
|
|
476
|
+
aprjpoint(other);
|
|
454
477
|
const { px: X1, py: Y1, pz: Z1 } = this;
|
|
455
478
|
const { px: X2, py: Y2, pz: Z2 } = other;
|
|
456
479
|
let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore
|
|
@@ -514,7 +537,7 @@ function weierstrassPoints(opts) {
|
|
|
514
537
|
*/
|
|
515
538
|
multiplyUnsafe(sc) {
|
|
516
539
|
const { endo, n: N } = CURVE;
|
|
517
|
-
|
|
540
|
+
(0, utils_ts_1.aInRange)('scalar', sc, _0n, N);
|
|
518
541
|
const I = Point.ZERO;
|
|
519
542
|
if (sc === _0n)
|
|
520
543
|
return I;
|
|
@@ -524,6 +547,7 @@ function weierstrassPoints(opts) {
|
|
|
524
547
|
if (!endo || wnaf.hasPrecomputes(this))
|
|
525
548
|
return wnaf.wNAFCachedUnsafe(this, sc, Point.normalizeZ);
|
|
526
549
|
// Case c: endomorphism
|
|
550
|
+
/** See docs for {@link EndomorphismOpts} */
|
|
527
551
|
let { k1neg, k1, k2neg, k2 } = endo.splitScalar(sc);
|
|
528
552
|
let k1p = I;
|
|
529
553
|
let k2p = I;
|
|
@@ -555,8 +579,9 @@ function weierstrassPoints(opts) {
|
|
|
555
579
|
*/
|
|
556
580
|
multiply(scalar) {
|
|
557
581
|
const { endo, n: N } = CURVE;
|
|
558
|
-
|
|
582
|
+
(0, utils_ts_1.aInRange)('scalar', scalar, _1n, N);
|
|
559
583
|
let point, fake; // Fake point is used to const-time mult
|
|
584
|
+
/** See docs for {@link EndomorphismOpts} */
|
|
560
585
|
if (endo) {
|
|
561
586
|
const { k1neg, k1, k2neg, k2 } = endo.splitScalar(scalar);
|
|
562
587
|
let { p: k1p, f: f1p } = this.wNAF(k1);
|
|
@@ -611,20 +636,21 @@ function weierstrassPoints(opts) {
|
|
|
611
636
|
return this.multiplyUnsafe(CURVE.h);
|
|
612
637
|
}
|
|
613
638
|
toRawBytes(isCompressed = true) {
|
|
614
|
-
(0,
|
|
639
|
+
(0, utils_ts_1.abool)('isCompressed', isCompressed);
|
|
615
640
|
this.assertValidity();
|
|
616
641
|
return toBytes(Point, this, isCompressed);
|
|
617
642
|
}
|
|
618
643
|
toHex(isCompressed = true) {
|
|
619
|
-
(0,
|
|
620
|
-
return
|
|
644
|
+
(0, utils_ts_1.abool)('isCompressed', isCompressed);
|
|
645
|
+
return (0, utils_ts_1.bytesToHex)(this.toRawBytes(isCompressed));
|
|
621
646
|
}
|
|
622
647
|
}
|
|
648
|
+
// base / generator point
|
|
623
649
|
Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
const
|
|
627
|
-
|
|
650
|
+
// zero / infinity / identity point
|
|
651
|
+
Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO); // 0, 1, 0
|
|
652
|
+
const { endo, nBitLength } = CURVE;
|
|
653
|
+
const wnaf = (0, curve_ts_1.wNAF)(Point, endo ? Math.ceil(nBitLength / 2) : nBitLength);
|
|
628
654
|
return {
|
|
629
655
|
CURVE,
|
|
630
656
|
ProjectivePoint: Point,
|
|
@@ -634,8 +660,8 @@ function weierstrassPoints(opts) {
|
|
|
634
660
|
};
|
|
635
661
|
}
|
|
636
662
|
function validateOpts(curve) {
|
|
637
|
-
const opts = (0,
|
|
638
|
-
|
|
663
|
+
const opts = (0, curve_ts_1.validateBasic)(curve);
|
|
664
|
+
(0, utils_ts_1.validateObject)(opts, {
|
|
639
665
|
hash: 'hash',
|
|
640
666
|
hmac: 'function',
|
|
641
667
|
randomBytes: 'function',
|
|
@@ -655,22 +681,22 @@ function validateOpts(curve) {
|
|
|
655
681
|
*/
|
|
656
682
|
function weierstrass(curveDef) {
|
|
657
683
|
const CURVE = validateOpts(curveDef);
|
|
658
|
-
const { Fp, n: CURVE_ORDER } = CURVE;
|
|
684
|
+
const { Fp, n: CURVE_ORDER, nByteLength, nBitLength } = CURVE;
|
|
659
685
|
const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32
|
|
660
686
|
const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32
|
|
661
687
|
function modN(a) {
|
|
662
|
-
return (0,
|
|
688
|
+
return (0, modular_ts_1.mod)(a, CURVE_ORDER);
|
|
663
689
|
}
|
|
664
690
|
function invN(a) {
|
|
665
|
-
return (0,
|
|
691
|
+
return (0, modular_ts_1.invert)(a, CURVE_ORDER);
|
|
666
692
|
}
|
|
667
693
|
const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({
|
|
668
694
|
...CURVE,
|
|
669
695
|
toBytes(_c, point, isCompressed) {
|
|
670
696
|
const a = point.toAffine();
|
|
671
697
|
const x = Fp.toBytes(a.x);
|
|
672
|
-
const cat =
|
|
673
|
-
(0,
|
|
698
|
+
const cat = utils_ts_1.concatBytes;
|
|
699
|
+
(0, utils_ts_1.abool)('isCompressed', isCompressed);
|
|
674
700
|
if (isCompressed) {
|
|
675
701
|
return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);
|
|
676
702
|
}
|
|
@@ -684,8 +710,8 @@ function weierstrass(curveDef) {
|
|
|
684
710
|
const tail = bytes.subarray(1);
|
|
685
711
|
// this.assertValidity() is done inside of fromHex
|
|
686
712
|
if (len === compressedLen && (head === 0x02 || head === 0x03)) {
|
|
687
|
-
const x =
|
|
688
|
-
if (!
|
|
713
|
+
const x = (0, utils_ts_1.bytesToNumberBE)(tail);
|
|
714
|
+
if (!(0, utils_ts_1.inRange)(x, _1n, Fp.ORDER))
|
|
689
715
|
throw new Error('Point is not on curve');
|
|
690
716
|
const y2 = weierstrassEquation(x); // y² = x³ + ax + b
|
|
691
717
|
let y;
|
|
@@ -715,7 +741,6 @@ function weierstrass(curveDef) {
|
|
|
715
741
|
}
|
|
716
742
|
},
|
|
717
743
|
});
|
|
718
|
-
const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));
|
|
719
744
|
function isBiggerThanHalfOrder(number) {
|
|
720
745
|
const HALF = CURVE_ORDER >> _1n;
|
|
721
746
|
return number > HALF;
|
|
@@ -724,46 +749,50 @@ function weierstrass(curveDef) {
|
|
|
724
749
|
return isBiggerThanHalfOrder(s) ? modN(-s) : s;
|
|
725
750
|
}
|
|
726
751
|
// slice bytes num
|
|
727
|
-
const slcNum = (b, from, to) =>
|
|
752
|
+
const slcNum = (b, from, to) => (0, utils_ts_1.bytesToNumberBE)(b.slice(from, to));
|
|
728
753
|
/**
|
|
729
754
|
* ECDSA signature with its (r, s) properties. Supports DER & compact representations.
|
|
730
755
|
*/
|
|
731
756
|
class Signature {
|
|
732
757
|
constructor(r, s, recovery) {
|
|
758
|
+
(0, utils_ts_1.aInRange)('r', r, _1n, CURVE_ORDER); // r in [1..N]
|
|
759
|
+
(0, utils_ts_1.aInRange)('s', s, _1n, CURVE_ORDER); // s in [1..N]
|
|
733
760
|
this.r = r;
|
|
734
761
|
this.s = s;
|
|
735
|
-
|
|
736
|
-
|
|
762
|
+
if (recovery != null)
|
|
763
|
+
this.recovery = recovery;
|
|
764
|
+
Object.freeze(this);
|
|
737
765
|
}
|
|
738
766
|
// pair (bytes of r, bytes of s)
|
|
739
767
|
static fromCompact(hex) {
|
|
740
|
-
const l =
|
|
741
|
-
hex = (0,
|
|
768
|
+
const l = nByteLength;
|
|
769
|
+
hex = (0, utils_ts_1.ensureBytes)('compactSignature', hex, l * 2);
|
|
742
770
|
return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));
|
|
743
771
|
}
|
|
744
772
|
// DER encoded ECDSA signature
|
|
745
773
|
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
|
746
774
|
static fromDER(hex) {
|
|
747
|
-
const { r, s } = exports.DER.toSig((0,
|
|
775
|
+
const { r, s } = exports.DER.toSig((0, utils_ts_1.ensureBytes)('DER', hex));
|
|
748
776
|
return new Signature(r, s);
|
|
749
777
|
}
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
778
|
+
/**
|
|
779
|
+
* @todo remove
|
|
780
|
+
* @deprecated
|
|
781
|
+
*/
|
|
782
|
+
assertValidity() { }
|
|
754
783
|
addRecoveryBit(recovery) {
|
|
755
784
|
return new Signature(this.r, this.s, recovery);
|
|
756
785
|
}
|
|
757
786
|
recoverPublicKey(msgHash) {
|
|
758
787
|
const { r, s, recovery: rec } = this;
|
|
759
|
-
const h = bits2int_modN((0,
|
|
788
|
+
const h = bits2int_modN((0, utils_ts_1.ensureBytes)('msgHash', msgHash)); // Truncate hash
|
|
760
789
|
if (rec == null || ![0, 1, 2, 3].includes(rec))
|
|
761
790
|
throw new Error('recovery id invalid');
|
|
762
791
|
const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;
|
|
763
792
|
if (radj >= Fp.ORDER)
|
|
764
793
|
throw new Error('recovery id 2 or 3 invalid');
|
|
765
794
|
const prefix = (rec & 1) === 0 ? '02' : '03';
|
|
766
|
-
const R = Point.fromHex(prefix +
|
|
795
|
+
const R = Point.fromHex(prefix + numToSizedHex(radj, Fp.BYTES));
|
|
767
796
|
const ir = invN(radj); // r^-1
|
|
768
797
|
const u1 = modN(-h * ir); // -hr^-1
|
|
769
798
|
const u2 = modN(s * ir); // sr^-1
|
|
@@ -782,17 +811,18 @@ function weierstrass(curveDef) {
|
|
|
782
811
|
}
|
|
783
812
|
// DER-encoded
|
|
784
813
|
toDERRawBytes() {
|
|
785
|
-
return
|
|
814
|
+
return (0, utils_ts_1.hexToBytes)(this.toDERHex());
|
|
786
815
|
}
|
|
787
816
|
toDERHex() {
|
|
788
|
-
return exports.DER.hexFromSig(
|
|
817
|
+
return exports.DER.hexFromSig(this);
|
|
789
818
|
}
|
|
790
819
|
// padded bytes of r, then padded bytes of s
|
|
791
820
|
toCompactRawBytes() {
|
|
792
|
-
return
|
|
821
|
+
return (0, utils_ts_1.hexToBytes)(this.toCompactHex());
|
|
793
822
|
}
|
|
794
823
|
toCompactHex() {
|
|
795
|
-
|
|
824
|
+
const l = nByteLength;
|
|
825
|
+
return numToSizedHex(this.r, l) + numToSizedHex(this.s, l);
|
|
796
826
|
}
|
|
797
827
|
}
|
|
798
828
|
const utils = {
|
|
@@ -811,8 +841,8 @@ function weierstrass(curveDef) {
|
|
|
811
841
|
* (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.
|
|
812
842
|
*/
|
|
813
843
|
randomPrivateKey: () => {
|
|
814
|
-
const length = (0,
|
|
815
|
-
return (0,
|
|
844
|
+
const length = (0, modular_ts_1.getMinHashLength)(CURVE.n);
|
|
845
|
+
return (0, modular_ts_1.mapHashToField)(CURVE.randomBytes(length), CURVE.n);
|
|
816
846
|
},
|
|
817
847
|
/**
|
|
818
848
|
* Creates precompute table for an arbitrary EC point. Makes point "cached".
|
|
@@ -841,16 +871,21 @@ function weierstrass(curveDef) {
|
|
|
841
871
|
* Quick and dirty check for item being public key. Does not validate hex, or being on-curve.
|
|
842
872
|
*/
|
|
843
873
|
function isProbPub(item) {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
const len = (arr || str) && item.length;
|
|
847
|
-
if (arr)
|
|
848
|
-
return len === compressedLen || len === uncompressedLen;
|
|
849
|
-
if (str)
|
|
850
|
-
return len === 2 * compressedLen || len === 2 * uncompressedLen;
|
|
874
|
+
if (typeof item === 'bigint')
|
|
875
|
+
return false;
|
|
851
876
|
if (item instanceof Point)
|
|
852
877
|
return true;
|
|
853
|
-
|
|
878
|
+
const arr = (0, utils_ts_1.ensureBytes)('key', item);
|
|
879
|
+
const len = arr.length;
|
|
880
|
+
const fpl = Fp.BYTES;
|
|
881
|
+
const compLen = fpl + 1; // e.g. 33 for 32
|
|
882
|
+
const uncompLen = 2 * fpl + 1; // e.g. 65 for 32
|
|
883
|
+
if (CURVE.allowedPrivateKeyLengths || nByteLength === compLen) {
|
|
884
|
+
return undefined;
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
return len === compLen || len === uncompLen;
|
|
888
|
+
}
|
|
854
889
|
}
|
|
855
890
|
/**
|
|
856
891
|
* ECDH (Elliptic Curve Diffie Hellman).
|
|
@@ -863,9 +898,9 @@ function weierstrass(curveDef) {
|
|
|
863
898
|
* @returns shared public key
|
|
864
899
|
*/
|
|
865
900
|
function getSharedSecret(privateA, publicB, isCompressed = true) {
|
|
866
|
-
if (isProbPub(privateA))
|
|
901
|
+
if (isProbPub(privateA) === true)
|
|
867
902
|
throw new Error('first arg must be private key');
|
|
868
|
-
if (
|
|
903
|
+
if (isProbPub(publicB) === false)
|
|
869
904
|
throw new Error('second arg must be public key');
|
|
870
905
|
const b = Point.fromHex(publicB); // check for being on-curve
|
|
871
906
|
return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);
|
|
@@ -876,13 +911,13 @@ function weierstrass(curveDef) {
|
|
|
876
911
|
// int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors
|
|
877
912
|
const bits2int = CURVE.bits2int ||
|
|
878
913
|
function (bytes) {
|
|
879
|
-
// Our custom check "just in case"
|
|
914
|
+
// Our custom check "just in case", for protection against DoS
|
|
880
915
|
if (bytes.length > 8192)
|
|
881
916
|
throw new Error('input is too large');
|
|
882
917
|
// For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)
|
|
883
918
|
// for some cases, since bytes.length * 8 is not actual bitLength.
|
|
884
|
-
const num =
|
|
885
|
-
const delta = bytes.length * 8 -
|
|
919
|
+
const num = (0, utils_ts_1.bytesToNumberBE)(bytes); // check for == u8 done here
|
|
920
|
+
const delta = bytes.length * 8 - nBitLength; // truncate to nBitLength leftmost bits
|
|
886
921
|
return delta > 0 ? num >> BigInt(delta) : num;
|
|
887
922
|
};
|
|
888
923
|
const bits2int_modN = CURVE.bits2int_modN ||
|
|
@@ -890,14 +925,14 @@ function weierstrass(curveDef) {
|
|
|
890
925
|
return modN(bits2int(bytes)); // can't use bytesToNumberBE here
|
|
891
926
|
};
|
|
892
927
|
// NOTE: pads output with zero as per spec
|
|
893
|
-
const ORDER_MASK =
|
|
928
|
+
const ORDER_MASK = (0, utils_ts_1.bitMask)(nBitLength);
|
|
894
929
|
/**
|
|
895
930
|
* Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.
|
|
896
931
|
*/
|
|
897
932
|
function int2octets(num) {
|
|
898
|
-
|
|
933
|
+
(0, utils_ts_1.aInRange)('num < 2^' + nBitLength, num, _0n, ORDER_MASK);
|
|
899
934
|
// works with order, can have different size than numToField!
|
|
900
|
-
return
|
|
935
|
+
return (0, utils_ts_1.numberToBytesBE)(num, nByteLength);
|
|
901
936
|
}
|
|
902
937
|
// Steps A, D of RFC6979 3.2
|
|
903
938
|
// Creates RFC6979 seed; converts msg/privKey to numbers.
|
|
@@ -911,10 +946,10 @@ function weierstrass(curveDef) {
|
|
|
911
946
|
let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default
|
|
912
947
|
if (lowS == null)
|
|
913
948
|
lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash
|
|
914
|
-
msgHash = (0,
|
|
949
|
+
msgHash = (0, utils_ts_1.ensureBytes)('msgHash', msgHash);
|
|
915
950
|
validateSigVerOpts(opts);
|
|
916
951
|
if (prehash)
|
|
917
|
-
msgHash = (0,
|
|
952
|
+
msgHash = (0, utils_ts_1.ensureBytes)('prehashed msgHash', hash(msgHash));
|
|
918
953
|
// We can't later call bits2octets, since nested bits2int is broken for curves
|
|
919
954
|
// with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.
|
|
920
955
|
// const bits2octets = (bits) => int2octets(bits2int_modN(bits))
|
|
@@ -925,9 +960,9 @@ function weierstrass(curveDef) {
|
|
|
925
960
|
if (ent != null && ent !== false) {
|
|
926
961
|
// K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')
|
|
927
962
|
const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is
|
|
928
|
-
seedArgs.push((0,
|
|
963
|
+
seedArgs.push((0, utils_ts_1.ensureBytes)('extraEntropy', e)); // check for being bytes
|
|
929
964
|
}
|
|
930
|
-
const seed =
|
|
965
|
+
const seed = (0, utils_ts_1.concatBytes)(...seedArgs); // Step D of RFC6979 3.2
|
|
931
966
|
const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!
|
|
932
967
|
// Converts signature params into point w r/s, checks result for validity.
|
|
933
968
|
function k2sig(kBytes) {
|
|
@@ -974,7 +1009,7 @@ function weierstrass(curveDef) {
|
|
|
974
1009
|
function sign(msgHash, privKey, opts = defaultSigOpts) {
|
|
975
1010
|
const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.
|
|
976
1011
|
const C = CURVE;
|
|
977
|
-
const drbg =
|
|
1012
|
+
const drbg = (0, utils_ts_1.createHmacDrbg)(C.hash.outputLen, C.nByteLength, C.hmac);
|
|
978
1013
|
return drbg(seed, k2sig); // Steps B, C, D, E, F, G
|
|
979
1014
|
}
|
|
980
1015
|
// Enable precomputes. Slows down first publicKey computation by 20ms.
|
|
@@ -995,8 +1030,8 @@ function weierstrass(curveDef) {
|
|
|
995
1030
|
*/
|
|
996
1031
|
function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {
|
|
997
1032
|
const sg = signature;
|
|
998
|
-
msgHash = (0,
|
|
999
|
-
publicKey = (0,
|
|
1033
|
+
msgHash = (0, utils_ts_1.ensureBytes)('msgHash', msgHash);
|
|
1034
|
+
publicKey = (0, utils_ts_1.ensureBytes)('publicKey', publicKey);
|
|
1000
1035
|
const { lowS, prehash, format } = opts;
|
|
1001
1036
|
// Verify opts, deduce signature format
|
|
1002
1037
|
validateSigVerOpts(opts);
|
|
@@ -1004,7 +1039,7 @@ function weierstrass(curveDef) {
|
|
|
1004
1039
|
throw new Error('options.strict was renamed to lowS');
|
|
1005
1040
|
if (format !== undefined && format !== 'compact' && format !== 'der')
|
|
1006
1041
|
throw new Error('format must be compact or der');
|
|
1007
|
-
const isHex = typeof sg === 'string' ||
|
|
1042
|
+
const isHex = typeof sg === 'string' || (0, utils_ts_1.isBytes)(sg);
|
|
1008
1043
|
const isObj = !isHex &&
|
|
1009
1044
|
!format &&
|
|
1010
1045
|
typeof sg === 'object' &&
|
|
@@ -1148,7 +1183,7 @@ function SWUFpSqrtRatio(Fp, Z) {
|
|
|
1148
1183
|
* https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2
|
|
1149
1184
|
*/
|
|
1150
1185
|
function mapToCurveSimpleSWU(Fp, opts) {
|
|
1151
|
-
(0,
|
|
1186
|
+
(0, modular_ts_1.validateField)(Fp);
|
|
1152
1187
|
if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))
|
|
1153
1188
|
throw new Error('mapToCurveSimpleSWU: invalid opts');
|
|
1154
1189
|
const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);
|
|
@@ -1183,7 +1218,8 @@ function mapToCurveSimpleSWU(Fp, opts) {
|
|
|
1183
1218
|
y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)
|
|
1184
1219
|
const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)
|
|
1185
1220
|
y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)
|
|
1186
|
-
|
|
1221
|
+
const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];
|
|
1222
|
+
x = Fp.mul(x, tv4_inv); // 25. x = x / tv4
|
|
1187
1223
|
return { x, y };
|
|
1188
1224
|
};
|
|
1189
1225
|
}
|