@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
|
@@ -9,7 +9,7 @@ Audited & minimal JS implementation of elliptic curve cryptography.
|
|
|
9
9
|
- ➰ Short Weierstrass, Edwards, Montgomery curves
|
|
10
10
|
- ✍️ ECDSA, EdDSA, Schnorr, BLS, ECDH, hashing to curves, Poseidon ZK-friendly hash
|
|
11
11
|
- 🔖 SUF-CMA, SBS (non-repudiation), ZIP215 (consensus friendliness) features for ed25519 & ed448
|
|
12
|
-
- 🪶 93KB for everything with hashes, 26KB (11KB gzipped) for single-curve build
|
|
12
|
+
- 🪶 93KB (36KB gzipped) for everything with hashes, 26KB (11KB gzipped) for single-curve build
|
|
13
13
|
|
|
14
14
|
Curves have 4KB sister projects
|
|
15
15
|
[secp256k1](https://github.com/paulmillr/noble-secp256k1) & [ed25519](https://github.com/paulmillr/noble-ed25519).
|
|
@@ -40,40 +40,41 @@ Take a glance at [GitHub Discussions](https://github.com/paulmillr/noble-curves/
|
|
|
40
40
|
|
|
41
41
|
> `deno add jsr:@noble/curves`
|
|
42
42
|
|
|
43
|
-
> `deno doc jsr:@noble/curves`
|
|
43
|
+
> `deno doc jsr:@noble/curves` # command-line documentation
|
|
44
44
|
|
|
45
45
|
We support all major platforms and runtimes.
|
|
46
46
|
For React Native, you may need a [polyfill for getRandomValues](https://github.com/LinusU/react-native-get-random-values).
|
|
47
47
|
A standalone file [noble-curves.js](https://github.com/paulmillr/noble-curves/releases) is also available.
|
|
48
48
|
|
|
49
|
-
```
|
|
49
|
+
```ts
|
|
50
50
|
// import * from '@noble/curves'; // Error: use sub-imports, to ensure small app size
|
|
51
|
-
import { secp256k1 } from '@noble/curves/secp256k1';
|
|
52
|
-
|
|
51
|
+
import { secp256k1, schnorr } from '@noble/curves/secp256k1';
|
|
52
|
+
import { ed25519, ed25519ph, ed25519ctx, x25519 } from '@noble/curves/ed25519';
|
|
53
|
+
import { ed448, ed448ph, ed448ctx, x448 } from '@noble/curves/ed448';
|
|
54
|
+
import { p256, p384, p521 } from '@noble/curves/nist';
|
|
55
|
+
import { bls12_381 } from '@noble/curves/bls12-381';
|
|
56
|
+
import { bn254 } from '@noble/curves/bn254';
|
|
57
|
+
import { jubjub, babyjubjub } from '@noble/curves/misc';
|
|
58
|
+
import { bytesToHex, hexToBytes, concatBytes, utf8ToBytes } from '@noble/curves/abstract/utils';
|
|
53
59
|
```
|
|
54
60
|
|
|
55
|
-
- [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- [Accessing a curve's variables](#accessing-a-curves-variables)
|
|
66
|
-
- [All available imports](#all-available-imports)
|
|
61
|
+
- [ECDSA signatures over secp256k1 and others](#ecdsa-signatures-over-secp256k1-and-others)
|
|
62
|
+
- [Hedged ECDSA with noise](#hedged-ecdsa-with-noise)
|
|
63
|
+
- [ECDH: Diffie-Hellman shared secrets](#ecdh-diffie-hellman-shared-secrets)
|
|
64
|
+
- [secp256k1 Schnorr signatures from BIP340](#secp256k1-schnorr-signatures-from-bip340)
|
|
65
|
+
- [ed25519](#ed25519) / [X25519](#x25519) / [ristretto255](#ristretto255)
|
|
66
|
+
- [ed448](#ed448) / [X448](#x448) / [decaf448](#decaf448)
|
|
67
|
+
- [bls12-381](#bls12-381)
|
|
68
|
+
- [bn254 aka alt_bn128](#bn254-aka-alt_bn128)
|
|
69
|
+
- [misc curves](#misc-curves)
|
|
70
|
+
- [Low-level methods](#low-level-methods)
|
|
67
71
|
- [Abstract API](#abstract-api)
|
|
68
|
-
- [weierstrass
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
72
|
-
- [
|
|
73
|
-
- [
|
|
74
|
-
- [modular: Modular arithmetics utilities](#modular-modular-arithmetics-utilities)
|
|
75
|
-
- [Creating private keys from hashes](#creating-private-keys-from-hashes)
|
|
76
|
-
- [utils: Useful utilities](#utils-useful-utilities)
|
|
72
|
+
- [weierstrass](#weierstrass-short-weierstrass-curve), [edwards](#edwards-twisted-edwards-curve), [montgomery](#montgomery-montgomery-curve), [bls](#bls-barreto-lynn-scott-curves)
|
|
73
|
+
- [hash-to-curve](#hash-to-curve-hashing-strings-to-curve-points), [poseidon](#poseidon-poseidon-hash)
|
|
74
|
+
- [modular](#modular-modular-arithmetics-utilities)
|
|
75
|
+
- [fft](#fft-fast-fourier-transform)
|
|
76
|
+
- [Creating private keys from hashes](#creating-private-keys-from-hashes)
|
|
77
|
+
- [utils](#utils-useful-utilities)
|
|
77
78
|
- [Security](#security)
|
|
78
79
|
- [Speed](#speed)
|
|
79
80
|
- [Upgrading](#upgrading)
|
|
@@ -82,14 +83,11 @@ import { secp256k1 } from '@noble/curves/secp256k1'; // ESM and Common.js
|
|
|
82
83
|
|
|
83
84
|
### Implementations
|
|
84
85
|
|
|
85
|
-
Implementations use [noble-hashes](https://github.com/paulmillr/noble-hashes).
|
|
86
|
-
If you want to use a different hashing library, [abstract API](#abstract-api) doesn't depend on them.
|
|
87
|
-
|
|
88
86
|
#### ECDSA signatures over secp256k1 and others
|
|
89
87
|
|
|
90
88
|
```ts
|
|
91
89
|
import { secp256k1 } from '@noble/curves/secp256k1';
|
|
92
|
-
// import { p256 } from '@noble/curves/
|
|
90
|
+
// import { p256 } from '@noble/curves/nist'; // or p384 / p521
|
|
93
91
|
|
|
94
92
|
const priv = secp256k1.utils.randomPrivateKey();
|
|
95
93
|
const pub = secp256k1.getPublicKey(priv);
|
|
@@ -100,31 +98,40 @@ const isValid = secp256k1.verify(sig, msg, pub) === true;
|
|
|
100
98
|
// hex strings are also supported besides Uint8Array-s:
|
|
101
99
|
const privHex = '46c930bc7bb4db7f55da20798697421b98c4175a52c630294d75a84b9c126236';
|
|
102
100
|
const pub2 = secp256k1.getPublicKey(privHex);
|
|
101
|
+
|
|
102
|
+
// public key recovery
|
|
103
|
+
// let sig = secp256k1.Signature.fromCompact(sigHex); // or .fromDER(sigDERHex)
|
|
104
|
+
// sig = sig.addRecoveryBit(bit); // bit is not serialized into compact / der format
|
|
105
|
+
sig.recoverPublicKey(msg).toRawBytes(); // === pub; // public key recovery
|
|
103
106
|
```
|
|
104
107
|
|
|
105
108
|
The same code would work for NIST P256 (secp256r1), P384 (secp384r1) & P521 (secp521r1).
|
|
106
109
|
|
|
107
|
-
#### ECDSA
|
|
110
|
+
#### Hedged ECDSA with noise
|
|
108
111
|
|
|
109
112
|
```ts
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// extraEntropy https://moderncrypto.org/mail-archive/curves/2017/000925.html
|
|
115
|
-
const sigImprovedSecurity = secp256k1.sign(msg, priv, { extraEntropy: true });
|
|
113
|
+
const noisySignature = secp256k1.sign(msg, priv, { extraEntropy: true });
|
|
114
|
+
const ent = new Uint8Array(32).fill(3); // set custom entropy
|
|
115
|
+
const noisySignature2 = secp256k1.sign(msg, priv, { extraEntropy: ent });
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Hedged ECDSA is add-on, providing improved protection against fault attacks.
|
|
119
|
+
It adds noise to signatures. The technique is used by default in BIP340; we also implement them
|
|
120
|
+
optionally for ECDSA. Check out blog post
|
|
121
|
+
[Deterministic signatures are not your friends](https://paulmillr.com/posts/deterministic-signatures/)
|
|
122
|
+
and [spec draft](https://datatracker.ietf.org/doc/draft-irtf-cfrg-det-sigs-with-noise/).
|
|
123
|
+
|
|
124
|
+
#### ECDH: Diffie-Hellman shared secrets
|
|
119
125
|
|
|
120
126
|
```ts
|
|
121
|
-
// 1. The output includes parity byte. Strip it using shared.slice(1)
|
|
122
|
-
// 2. The output is not hashed. More secure way is sha256(shared) or hkdf(shared)
|
|
123
127
|
const someonesPub = secp256k1.getPublicKey(secp256k1.utils.randomPrivateKey());
|
|
124
128
|
const shared = secp256k1.getSharedSecret(priv, someonesPub);
|
|
129
|
+
// NOTE:
|
|
130
|
+
// - `shared` includes parity byte: strip it using shared.slice(1)
|
|
131
|
+
// - `shared` is not hashed: more secure way is sha256(shared) or hkdf(shared)
|
|
125
132
|
```
|
|
126
133
|
|
|
127
|
-
#### Schnorr signatures
|
|
134
|
+
#### secp256k1 Schnorr signatures from BIP340
|
|
128
135
|
|
|
129
136
|
```ts
|
|
130
137
|
import { schnorr } from '@noble/curves/secp256k1';
|
|
@@ -135,7 +142,7 @@ const sig = schnorr.sign(msg, priv);
|
|
|
135
142
|
const isValid = schnorr.verify(sig, msg, pub);
|
|
136
143
|
```
|
|
137
144
|
|
|
138
|
-
#### ed25519
|
|
145
|
+
#### ed25519
|
|
139
146
|
|
|
140
147
|
```ts
|
|
141
148
|
import { ed25519 } from '@noble/curves/ed25519';
|
|
@@ -144,23 +151,22 @@ const pub = ed25519.getPublicKey(priv);
|
|
|
144
151
|
const msg = new TextEncoder().encode('hello');
|
|
145
152
|
const sig = ed25519.sign(msg, priv);
|
|
146
153
|
ed25519.verify(sig, msg, pub); // Default mode: follows ZIP215
|
|
147
|
-
ed25519.verify(sig, msg, pub, { zip215: false }); // RFC8032 / FIPS 186-5
|
|
154
|
+
ed25519.verify(sig, msg, pub, { zip215: false }); // SBS / e-voting / RFC8032 / FIPS 186-5
|
|
155
|
+
|
|
156
|
+
// Variants from RFC8032: with context, prehashed
|
|
157
|
+
import { ed25519ctx, ed25519ph } from '@noble/curves/ed25519';
|
|
148
158
|
```
|
|
149
159
|
|
|
150
|
-
Default `verify` behavior follows
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
`zip215: false
|
|
154
|
-
|
|
155
|
-
and additionally provides [non-repudiation with SBS](#edwards-twisted-edwards-curve).
|
|
160
|
+
Default `verify` behavior follows ZIP215 and
|
|
161
|
+
can be used in consensus-critical applications.
|
|
162
|
+
If you need SBS (Strongly Binding Signatures) and FIPS 186-5 compliance,
|
|
163
|
+
use `zip215: false`. Check out [Edwards Signatures section for more info](#edwards-twisted-edwards-curve).
|
|
164
|
+
Both options have SUF-CMA (strong unforgeability under chosen message attacks).
|
|
156
165
|
|
|
157
|
-
X25519
|
|
166
|
+
#### X25519
|
|
158
167
|
|
|
159
168
|
```ts
|
|
160
|
-
//
|
|
161
|
-
import { ed25519ctx, ed25519ph } from '@noble/curves/ed25519';
|
|
162
|
-
|
|
163
|
-
// ECDH using curve25519 aka x25519
|
|
169
|
+
// X25519 aka ECDH on Curve25519 from [RFC7748](https://www.rfc-editor.org/rfc/rfc7748)
|
|
164
170
|
import { x25519 } from '@noble/curves/ed25519';
|
|
165
171
|
const priv = 'a546e36bf0527c9d3b16154b82465edd62144c0ac1fc5a18506a2244ba449ac4';
|
|
166
172
|
const pub = 'e6db6867583030db3594c1a424b15f7c726624ec26b3353b10a903a6d0ab1c4c';
|
|
@@ -174,10 +180,10 @@ edwardsToMontgomeryPub(ed25519.getPublicKey(ed25519.utils.randomPrivateKey()));
|
|
|
174
180
|
edwardsToMontgomeryPriv(ed25519.utils.randomPrivateKey());
|
|
175
181
|
```
|
|
176
182
|
|
|
177
|
-
|
|
183
|
+
#### ristretto255
|
|
178
184
|
|
|
179
185
|
```ts
|
|
180
|
-
//
|
|
186
|
+
// ristretto255 from [RFC9496](https://www.rfc-editor.org/rfc/rfc9496)
|
|
181
187
|
import { utf8ToBytes } from '@noble/hashes/utils';
|
|
182
188
|
import { sha512 } from '@noble/hashes/sha512';
|
|
183
189
|
import {
|
|
@@ -201,7 +207,7 @@ RistrettoPoint.hashToCurve(sha512(msg));
|
|
|
201
207
|
hashToRistretto255(msg, { DST: 'ristretto255_XMD:SHA-512_R255MAP_RO_' });
|
|
202
208
|
```
|
|
203
209
|
|
|
204
|
-
#### ed448
|
|
210
|
+
#### ed448
|
|
205
211
|
|
|
206
212
|
```ts
|
|
207
213
|
import { ed448 } from '@noble/curves/ed448';
|
|
@@ -215,9 +221,10 @@ ed448.verify(sig, msg, pub);
|
|
|
215
221
|
import { ed448ph } from '@noble/curves/ed448';
|
|
216
222
|
```
|
|
217
223
|
|
|
218
|
-
|
|
224
|
+
#### X448
|
|
219
225
|
|
|
220
226
|
```ts
|
|
227
|
+
// X448 aka ECDH on Curve448 from [RFC7748](https://www.rfc-editor.org/rfc/rfc7748)
|
|
221
228
|
import { x448 } from '@noble/curves/ed448';
|
|
222
229
|
x448.getSharedSecret(priv, pub) === x448.scalarMult(priv, pub); // aliases
|
|
223
230
|
x448.getPublicKey(priv) === x448.scalarMultBase(priv);
|
|
@@ -227,9 +234,10 @@ import { edwardsToMontgomeryPub } from '@noble/curves/ed448';
|
|
|
227
234
|
edwardsToMontgomeryPub(ed448.getPublicKey(ed448.utils.randomPrivateKey()));
|
|
228
235
|
```
|
|
229
236
|
|
|
230
|
-
|
|
237
|
+
#### decaf448
|
|
231
238
|
|
|
232
239
|
```ts
|
|
240
|
+
// decaf448 from [RFC9496](https://www.rfc-editor.org/rfc/rfc9496)
|
|
233
241
|
import { utf8ToBytes } from '@noble/hashes/utils';
|
|
234
242
|
import { shake256 } from '@noble/hashes/sha3';
|
|
235
243
|
import { hashToCurve, encodeToCurve, DecafPoint, hashToDecaf448 } from '@noble/curves/ed448';
|
|
@@ -248,8 +256,6 @@ DecafPoint.hashToCurve(shake256(msg, { dkLen: 112 }));
|
|
|
248
256
|
hashToDecaf448(msg, { DST: 'decaf448_XOF:SHAKE256_D448MAP_RO_' });
|
|
249
257
|
```
|
|
250
258
|
|
|
251
|
-
Same RFC7748 / RFC8032 / IRTF draft are followed.
|
|
252
|
-
|
|
253
259
|
#### bls12-381
|
|
254
260
|
|
|
255
261
|
```ts
|
|
@@ -275,7 +281,10 @@ const signatureEth = bls.sign(message, privateKey, htfEthereum);
|
|
|
275
281
|
const isValidEth = bls.verify(signature, message, publicKey, htfEthereum);
|
|
276
282
|
|
|
277
283
|
// Aggregation
|
|
278
|
-
const aggregatedKey = bls.aggregatePublicKeys([
|
|
284
|
+
const aggregatedKey = bls.aggregatePublicKeys([
|
|
285
|
+
bls.utils.randomPrivateKey(),
|
|
286
|
+
bls.utils.randomPrivateKey(),
|
|
287
|
+
]);
|
|
279
288
|
// const aggregatedSig = bls.aggregateSignatures(sigs)
|
|
280
289
|
|
|
281
290
|
// Pairings, with and without final exponentiation
|
|
@@ -296,19 +305,17 @@ For example usage, check out [the implementation of BLS EVM precompiles](https:/
|
|
|
296
305
|
```ts
|
|
297
306
|
import { bn254 } from '@noble/curves/bn254';
|
|
298
307
|
|
|
299
|
-
console.log(
|
|
300
|
-
bn254.G1,
|
|
301
|
-
bn254.G2,
|
|
302
|
-
bn254.pairing
|
|
303
|
-
)
|
|
308
|
+
console.log(bn254.G1, bn254.G2, bn254.pairing);
|
|
304
309
|
```
|
|
305
310
|
|
|
306
311
|
The API mirrors [BLS](#bls12-381). The curve was previously called alt_bn128.
|
|
307
312
|
The implementation is compatible with [EIP-196](https://eips.ethereum.org/EIPS/eip-196) and
|
|
308
313
|
[EIP-197](https://eips.ethereum.org/EIPS/eip-197).
|
|
309
314
|
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
We don't implement Point methods toHex / toRawBytes.
|
|
316
|
+
To work around this limitation, has to initialize points on their own from BigInts.
|
|
317
|
+
Reason it's not implemented is because [there is no standard](https://github.com/privacy-scaling-explorations/halo2curves/issues/109).
|
|
318
|
+
Points of divergence:
|
|
312
319
|
|
|
313
320
|
- Endianness: LE vs BE (byte-swapped)
|
|
314
321
|
- Flags as first hex bits (similar to BLS) vs no-flags
|
|
@@ -316,49 +323,43 @@ different implementations of bn254 do it differently - there is no standard. Poi
|
|
|
316
323
|
|
|
317
324
|
For example usage, check out [the implementation of bn254 EVM precompiles](https://github.com/paulmillr/noble-curves/blob/3ed792f8ad9932765b84d1064afea8663a255457/test/bn254.test.js#L697).
|
|
318
325
|
|
|
319
|
-
####
|
|
326
|
+
#### misc curves
|
|
320
327
|
|
|
321
328
|
```ts
|
|
322
|
-
import {
|
|
323
|
-
const p = secp256k1.ProjectivePoint;
|
|
324
|
-
const points = [p.BASE, p.BASE.multiply(2n), p.BASE.multiply(4n), p.BASE.multiply(8n)];
|
|
325
|
-
p.msm(points, [3n, 5n, 7n, 11n]).equals(p.BASE.multiply(129n)); // 129*G
|
|
329
|
+
import { jubjub, babyjubjub } from '@noble/curves/misc';
|
|
326
330
|
```
|
|
327
331
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
332
|
+
Miscellaneous, rarely used curves are contained in the module.
|
|
333
|
+
Jubjub curves have Fp over scalar fields of other curves. They are friendly to ZK proofs.
|
|
334
|
+
jubjub Fp = bls n. babyjubjub Fp = bn254 n.
|
|
331
335
|
|
|
332
|
-
####
|
|
336
|
+
#### Low-level methods
|
|
333
337
|
|
|
334
338
|
```ts
|
|
335
339
|
import { secp256k1 } from '@noble/curves/secp256k1';
|
|
340
|
+
|
|
341
|
+
// Curve's variables
|
|
336
342
|
// Every curve has `CURVE` object that contains its parameters, field, and others
|
|
337
343
|
console.log(secp256k1.CURVE.p); // field modulus
|
|
338
344
|
console.log(secp256k1.CURVE.n); // curve order
|
|
339
345
|
console.log(secp256k1.CURVE.a, secp256k1.CURVE.b); // equation params
|
|
340
346
|
console.log(secp256k1.CURVE.Gx, secp256k1.CURVE.Gy); // base point coordinates
|
|
341
|
-
```
|
|
342
|
-
|
|
343
347
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
import { ed25519, ed25519ph, ed25519ctx, x25519, RistrettoPoint } from '@noble/curves/ed25519';
|
|
349
|
-
import { ed448, ed448ph, ed448ctx, x448 } from '@noble/curves/ed448';
|
|
350
|
-
import { p256 } from '@noble/curves/p256';
|
|
351
|
-
import { p384 } from '@noble/curves/p384';
|
|
352
|
-
import { p521 } from '@noble/curves/p521';
|
|
353
|
-
import { pallas, vesta } from '@noble/curves/pasta';
|
|
354
|
-
import { bls12_381 } from '@noble/curves/bls12-381';
|
|
355
|
-
import { bn254 } from '@noble/curves/bn254'; // also known as alt_bn128
|
|
356
|
-
import { jubjub } from '@noble/curves/jubjub';
|
|
357
|
-
import { bytesToHex, hexToBytes, concatBytes, utf8ToBytes } from '@noble/curves/abstract/utils';
|
|
348
|
+
// MSM
|
|
349
|
+
const p = secp256k1.ProjectivePoint;
|
|
350
|
+
const points = [p.BASE, p.BASE.multiply(2n), p.BASE.multiply(4n), p.BASE.multiply(8n)];
|
|
351
|
+
p.msm(points, [3n, 5n, 7n, 11n]).equals(p.BASE.multiply(129n)); // 129*G
|
|
358
352
|
```
|
|
359
353
|
|
|
354
|
+
Multi-scalar-multiplication (MSM) is basically `(Pa + Qb + Rc + ...)`.
|
|
355
|
+
It's 10-30x faster vs naive addition for large amount of points.
|
|
356
|
+
Pippenger algorithm is used underneath.
|
|
357
|
+
|
|
360
358
|
## Abstract API
|
|
361
359
|
|
|
360
|
+
Implementations use [noble-hashes](https://github.com/paulmillr/noble-hashes).
|
|
361
|
+
If you want to use a different hashing library, abstract API doesn't depend on them.
|
|
362
|
+
|
|
362
363
|
Abstract API allows to define custom curves. All arithmetics is done with JS
|
|
363
364
|
bigints over finite fields, which is defined from `modular` sub-module. For
|
|
364
365
|
scalar multiplication, we use
|
|
@@ -371,171 +372,69 @@ method: check out examples.
|
|
|
371
372
|
|
|
372
373
|
```ts
|
|
373
374
|
import { weierstrass } from '@noble/curves/abstract/weierstrass';
|
|
374
|
-
import { Field } from '@noble/curves/abstract/modular';
|
|
375
|
-
import { sha256 } from '@noble/hashes/sha256';
|
|
376
|
-
import { hmac } from '@noble/hashes/hmac';
|
|
377
|
-
import { concatBytes, randomBytes } from '@noble/hashes/utils';
|
|
375
|
+
import { Field } from '@noble/curves/abstract/modular';
|
|
376
|
+
import { sha256 } from '@noble/hashes/sha256';
|
|
377
|
+
import { hmac } from '@noble/hashes/hmac';
|
|
378
|
+
import { concatBytes, randomBytes } from '@noble/hashes/utils';
|
|
378
379
|
|
|
379
|
-
const hmacSha256 = (key: Uint8Array, ...msgs: Uint8Array[]) =>
|
|
380
|
+
const hmacSha256 = (key: Uint8Array, ...msgs: Uint8Array[]) =>
|
|
381
|
+
hmac(sha256, key, concatBytes(...msgs));
|
|
380
382
|
|
|
381
|
-
// secq256k1
|
|
383
|
+
// secQ (not secP) - secq256k1 is a cycle of secp256k1 with Fp/N flipped.
|
|
382
384
|
// https://personaelabs.org/posts/spartan-ecdsa
|
|
383
385
|
// https://zcash.github.io/halo2/background/curves.html#cycles-of-curves
|
|
384
386
|
const secq256k1 = weierstrass({
|
|
385
|
-
// Curve equation params a, b
|
|
386
387
|
a: 0n,
|
|
387
388
|
b: 7n,
|
|
388
|
-
// Field over which we'll do calculations
|
|
389
389
|
Fp: Field(2n ** 256n - 432420386565659656852420866394968145599n),
|
|
390
|
-
// Curve order, total count of valid points in the field.
|
|
391
390
|
n: 2n ** 256n - 2n ** 32n - 2n ** 9n - 2n ** 8n - 2n ** 7n - 2n ** 6n - 2n ** 4n - 1n,
|
|
392
|
-
// Base point (x, y) aka generator point
|
|
393
391
|
Gx: 55066263022277343669578718895168534326250603453777594175500187360389116729240n,
|
|
394
392
|
Gy: 32670510020758816978083085130507043184471273380659243275938904335757337482424n,
|
|
395
|
-
|
|
396
393
|
hash: sha256,
|
|
397
394
|
hmac: hmacSha256,
|
|
398
395
|
randomBytes,
|
|
399
396
|
});
|
|
400
397
|
|
|
401
|
-
// NIST secp192r1 aka p192
|
|
398
|
+
// NIST secp192r1 aka p192
|
|
399
|
+
// https://www.secg.org/sec2-v2.pdf, https://neuromancer.sk/std/secg/secp192r1
|
|
402
400
|
const secp192r1 = weierstrass({
|
|
403
|
-
a:
|
|
404
|
-
b:
|
|
405
|
-
Fp: Field(
|
|
406
|
-
n:
|
|
407
|
-
Gx:
|
|
408
|
-
Gy:
|
|
409
|
-
h: BigInt(1),
|
|
401
|
+
a: 0xfffffffffffffffffffffffffffffffefffffffffffffffcn,
|
|
402
|
+
b: 0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1n,
|
|
403
|
+
Fp: Field(0xfffffffffffffffffffffffffffffffeffffffffffffffffn),
|
|
404
|
+
n: 0xffffffffffffffffffffffff99def836146bc9b1b4d22831n,
|
|
405
|
+
Gx: 0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012n,
|
|
406
|
+
Gy: 0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811n,
|
|
410
407
|
hash: sha256,
|
|
411
408
|
hmac: hmacSha256,
|
|
412
409
|
randomBytes,
|
|
413
410
|
});
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
// Replace weierstrass() with weierstrassPoints() if you don't need ECDSA, hash, hmac, randomBytes
|
|
417
411
|
```
|
|
418
412
|
|
|
419
413
|
Short Weierstrass curve's formula is `y² = x³ + ax + b`. `weierstrass`
|
|
420
414
|
expects arguments `a`, `b`, field `Fp`, curve order `n`, cofactor `h`
|
|
421
415
|
and coordinates `Gx`, `Gy` of generator point.
|
|
422
|
-
|
|
423
|
-
**`k` generation** is done deterministically, following
|
|
424
|
-
[RFC6979](https://www.rfc-editor.org/rfc/rfc6979). It is suggested to use `extraEntropy`
|
|
425
|
-
option, which incorporates randomness into signatures to increase their security.
|
|
426
|
-
|
|
427
|
-
For k generation, specifying `hmac` & `hash` is required,
|
|
428
|
-
which in our implementations is done by noble-hashes. If
|
|
429
|
-
you're using different hashing library, make sure to wrap it in the following interface:
|
|
430
|
-
|
|
431
|
-
```ts
|
|
432
|
-
type CHash = {
|
|
433
|
-
(message: Uint8Array): Uint8Array;
|
|
434
|
-
blockLen: number;
|
|
435
|
-
outputLen: number;
|
|
436
|
-
create(): any;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
// example
|
|
440
|
-
function sha256(message: Uint8Array) {
|
|
441
|
-
return _internal_lowlvl(message);
|
|
442
|
-
}
|
|
443
|
-
sha256.outputLen = 32; // 32 bytes of output for sha2-256
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
**Message hash** is expected instead of message itself:
|
|
447
|
-
|
|
448
|
-
- `sign(msgHash, privKey)` is default behavior, assuming you pre-hash msg with sha2, or other hash
|
|
449
|
-
- `sign(msg, privKey, {prehash: true})` option can be used if you want to pass the message itself
|
|
416
|
+
`hmac` and `hash` must be specified for deterministic `k` generation.
|
|
450
417
|
|
|
451
418
|
**Weierstrass points:**
|
|
452
419
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
signature: Hex | SignatureType,
|
|
472
|
-
msgHash: Hex,
|
|
473
|
-
publicKey: Hex,
|
|
474
|
-
opts?: { lowS?: boolean; prehash?: boolean; format?: 'compact' | 'der' }
|
|
475
|
-
) => boolean;
|
|
476
|
-
ProjectivePoint: ProjectivePointConstructor;
|
|
477
|
-
Signature: SignatureConstructor;
|
|
478
|
-
utils: {
|
|
479
|
-
normPrivateKeyToScalar: (key: PrivKey) => bigint;
|
|
480
|
-
isValidPrivateKey(key: PrivKey): boolean;
|
|
481
|
-
randomPrivateKey: () => Uint8Array;
|
|
482
|
-
precompute: (windowSize?: number, point?: ProjPointType<bigint>) => ProjPointType<bigint>;
|
|
483
|
-
};
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
// T is usually bigint, but can be something else like complex numbers in BLS curves
|
|
487
|
-
interface ProjPointType<T> extends Group<ProjPointType<T>> {
|
|
488
|
-
readonly px: T;
|
|
489
|
-
readonly py: T;
|
|
490
|
-
readonly pz: T;
|
|
491
|
-
get x(): bigint;
|
|
492
|
-
get y(): bigint;
|
|
493
|
-
multiply(scalar: bigint): ProjPointType<T>;
|
|
494
|
-
multiplyUnsafe(scalar: bigint): ProjPointType<T>;
|
|
495
|
-
multiplyAndAddUnsafe(Q: ProjPointType<T>, a: bigint, b: bigint): ProjPointType<T> | undefined;
|
|
496
|
-
toAffine(iz?: T): AffinePoint<T>;
|
|
497
|
-
isTorsionFree(): boolean;
|
|
498
|
-
clearCofactor(): ProjPointType<T>;
|
|
499
|
-
assertValidity(): void;
|
|
500
|
-
hasEvenY(): boolean;
|
|
501
|
-
toRawBytes(isCompressed?: boolean): Uint8Array;
|
|
502
|
-
toHex(isCompressed?: boolean): string;
|
|
503
|
-
}
|
|
504
|
-
// Static methods for 3d XYZ points
|
|
505
|
-
interface ProjConstructor<T> extends GroupConstructor<ProjPointType<T>> {
|
|
506
|
-
new (x: T, y: T, z: T): ProjPointType<T>;
|
|
507
|
-
fromAffine(p: AffinePoint<T>): ProjPointType<T>;
|
|
508
|
-
fromHex(hex: Hex): ProjPointType<T>;
|
|
509
|
-
fromPrivateKey(privateKey: PrivKey): ProjPointType<T>;
|
|
510
|
-
msm(points: ProjPointType[], scalars: bigint[]): ProjPointType<T>;
|
|
511
|
-
}
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
**ECDSA signatures** are represented by `Signature` instances and can be
|
|
515
|
-
described by the interface:
|
|
516
|
-
|
|
517
|
-
```ts
|
|
518
|
-
interface SignatureType {
|
|
519
|
-
readonly r: bigint;
|
|
520
|
-
readonly s: bigint;
|
|
521
|
-
readonly recovery?: number;
|
|
522
|
-
assertValidity(): void;
|
|
523
|
-
addRecoveryBit(recovery: number): SignatureType;
|
|
524
|
-
hasHighS(): boolean;
|
|
525
|
-
normalizeS(): SignatureType;
|
|
526
|
-
recoverPublicKey(msgHash: Hex): ProjPointType<bigint>;
|
|
527
|
-
toCompactRawBytes(): Uint8Array;
|
|
528
|
-
toCompactHex(): string;
|
|
529
|
-
// DER-encoded
|
|
530
|
-
toDERRawBytes(): Uint8Array;
|
|
531
|
-
toDERHex(): string;
|
|
532
|
-
}
|
|
533
|
-
type SignatureConstructor = {
|
|
534
|
-
new (r: bigint, s: bigint): SignatureType;
|
|
535
|
-
fromCompact(hex: Hex): SignatureType;
|
|
536
|
-
fromDER(hex: Hex): SignatureType;
|
|
537
|
-
};
|
|
538
|
-
```
|
|
420
|
+
- Are exported as `ProjectivePoint`
|
|
421
|
+
- Are represented in projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)
|
|
422
|
+
- Use complete exception-free formulas for addition and doubling
|
|
423
|
+
- Can be decoded/encoded from/to Uint8Array / hex strings using
|
|
424
|
+
`ProjectivePoint.fromHex` and `ProjectivePoint#toRawBytes()`
|
|
425
|
+
- Have `assertValidity()` which checks for being on-curve
|
|
426
|
+
- Have `toAffine()` and `x` / `y` getters which convert to 2d xy affine coordinates
|
|
427
|
+
|
|
428
|
+
**ECDSA signatures:**
|
|
429
|
+
|
|
430
|
+
- Are represented by `Signature` instances with `r, s` and optional `recovery` properties
|
|
431
|
+
- Have `recoverPublicKey()`, `toCompactRawBytes()` and `toDERRawBytes()` methods
|
|
432
|
+
- Can be prehashed, or non-prehashed:
|
|
433
|
+
- `sign(msgHash, privKey)` (default, prehash: false) - you did hashing before
|
|
434
|
+
- `sign(msg, privKey, {prehash: true})` - curves will do hashing for you
|
|
435
|
+
- Are generated deterministically, following [RFC6979](https://www.rfc-editor.org/rfc/rfc6979).
|
|
436
|
+
- Consider [hedged ECDSA with noise](#hedged-ecdsa-with-noise) for adding randomness into
|
|
437
|
+
for signatures, to get improved security against fault attacks.
|
|
539
438
|
|
|
540
439
|
More examples:
|
|
541
440
|
|
|
@@ -599,101 +498,43 @@ const ed25519 = twistedEdwards({
|
|
|
599
498
|
} as const);
|
|
600
499
|
```
|
|
601
500
|
|
|
602
|
-
Twisted Edwards curve's formula is `ax² + y² = 1 + dx²y²`.
|
|
501
|
+
Twisted Edwards curve's formula is `ax² + y² = 1 + dx²y²`.
|
|
502
|
+
You must specify `a`, `d`, field `Fp`, order `n`, cofactor `h`
|
|
603
503
|
and coordinates `Gx`, `Gy` of generator point.
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
We support [non-repudiation](https://eprint.iacr.org/2020/1244), which help in following scenarios:
|
|
608
|
-
|
|
609
|
-
- Contract Signing: if A signed an agreement with B using key that allows repudiation, it can later claim that it signed a different contract
|
|
610
|
-
- E-voting: malicious voters may pick keys that allow repudiation in order to deny results
|
|
611
|
-
- Blockchains: transaction of amount X might also be valid for a different amount Y
|
|
504
|
+
For EdDSA signatures, `hash` param required.
|
|
505
|
+
`adjustScalarBytes` which instructs how to change private scalars could be specified.
|
|
612
506
|
|
|
613
507
|
**Edwards points:**
|
|
614
508
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
pointBytes: Uint8Array;
|
|
639
|
-
};
|
|
640
|
-
};
|
|
641
|
-
};
|
|
642
|
-
|
|
643
|
-
interface ExtPointType extends Group<ExtPointType> {
|
|
644
|
-
readonly ex: bigint;
|
|
645
|
-
readonly ey: bigint;
|
|
646
|
-
readonly ez: bigint;
|
|
647
|
-
readonly et: bigint;
|
|
648
|
-
get x(): bigint;
|
|
649
|
-
get y(): bigint;
|
|
650
|
-
assertValidity(): void;
|
|
651
|
-
multiply(scalar: bigint): ExtPointType;
|
|
652
|
-
multiplyUnsafe(scalar: bigint): ExtPointType;
|
|
653
|
-
isSmallOrder(): boolean;
|
|
654
|
-
isTorsionFree(): boolean;
|
|
655
|
-
clearCofactor(): ExtPointType;
|
|
656
|
-
toAffine(iz?: bigint): AffinePoint<bigint>;
|
|
657
|
-
toRawBytes(isCompressed?: boolean): Uint8Array;
|
|
658
|
-
toHex(isCompressed?: boolean): string;
|
|
659
|
-
}
|
|
660
|
-
// Static methods of Extended Point with coordinates in X, Y, Z, T
|
|
661
|
-
interface ExtPointConstructor extends GroupConstructor<ExtPointType> {
|
|
662
|
-
new (x: bigint, y: bigint, z: bigint, t: bigint): ExtPointType;
|
|
663
|
-
fromAffine(p: AffinePoint<bigint>): ExtPointType;
|
|
664
|
-
fromHex(hex: Hex): ExtPointType;
|
|
665
|
-
fromPrivateKey(privateKey: Hex): ExtPointType;
|
|
666
|
-
msm(points: ExtPointType[], scalars: bigint[]): ExtPointType;
|
|
667
|
-
}
|
|
668
|
-
```
|
|
509
|
+
- Are exported as `ExtendedPoint`
|
|
510
|
+
- Are represented in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z)
|
|
511
|
+
- Use complete exception-free formulas for addition and doubling
|
|
512
|
+
- Can be decoded/encoded from/to Uint8Array / hex strings using `ExtendedPoint.fromHex` and `ExtendedPoint#toRawBytes()`
|
|
513
|
+
- Have `assertValidity()` which checks for being on-curve
|
|
514
|
+
- Have `toAffine()` and `x` / `y` getters which convert to 2d xy affine coordinates
|
|
515
|
+
- Have `isTorsionFree()`, `clearCofactor()` and `isSmallOrder()` utilities to handle torsions
|
|
516
|
+
|
|
517
|
+
**EdDSA signatures:**
|
|
518
|
+
|
|
519
|
+
- `zip215: true` is default behavior. It has slightly looser verification logic
|
|
520
|
+
to be [consensus-friendly](https://hdevalence.ca/blog/2020-10-04-its-25519am), following [ZIP215](https://zips.z.cash/zip-0215) rules
|
|
521
|
+
- `zip215: false` switches verification criteria to strict
|
|
522
|
+
[RFC8032](https://www.rfc-editor.org/rfc/rfc8032) / [FIPS 186-5](https://csrc.nist.gov/publications/detail/fips/186/5/final)
|
|
523
|
+
and additionally provides [non-repudiation with SBS](https://eprint.iacr.org/2020/1244),
|
|
524
|
+
which is useful for:
|
|
525
|
+
- Contract Signing: if A signed an agreement with B using key that allows repudiation, it can later claim that it signed a different contract
|
|
526
|
+
- E-voting: malicious voters may pick keys that allow repudiation in order to deny results
|
|
527
|
+
- Blockchains: transaction of amount X might also be valid for a different amount Y
|
|
528
|
+
- Both modes have SUF-CMA (strong unforgeability under chosen message attacks).
|
|
529
|
+
|
|
530
|
+
Check out [RFC9496](https://www.rfc-editor.org/rfc/rfc9496) for description of
|
|
531
|
+
ristretto and decaf groups which we implement.
|
|
669
532
|
|
|
670
533
|
### montgomery: Montgomery curve
|
|
671
534
|
|
|
672
|
-
```typescript
|
|
673
|
-
import { montgomery } from '@noble/curves/abstract/montgomery';
|
|
674
|
-
import { Field } from '@noble/curves/abstract/modular';
|
|
675
|
-
|
|
676
|
-
const x25519 = montgomery({
|
|
677
|
-
a: 486662n,
|
|
678
|
-
Gu: 9n,
|
|
679
|
-
P: 2n ** 255n - 19n,
|
|
680
|
-
montgomeryBits: 255,
|
|
681
|
-
nByteLength: 32,
|
|
682
|
-
// Optional param
|
|
683
|
-
adjustScalarBytes(bytes) {
|
|
684
|
-
bytes[0] &= 248;
|
|
685
|
-
bytes[31] &= 127;
|
|
686
|
-
bytes[31] |= 64;
|
|
687
|
-
return bytes;
|
|
688
|
-
},
|
|
689
|
-
});
|
|
690
|
-
```
|
|
691
|
-
|
|
692
535
|
The module contains methods for x-only ECDH on Curve25519 / Curve448 from RFC7748.
|
|
693
536
|
Proper Elliptic Curve Points are not implemented yet.
|
|
694
537
|
|
|
695
|
-
You must specify curve params `Fp`, `a`, `Gu` coordinate of u, `montgomeryBits` and `nByteLength`.
|
|
696
|
-
|
|
697
538
|
### bls: Barreto-Lynn-Scott curves
|
|
698
539
|
|
|
699
540
|
The module abstracts BLS (Barreto-Lynn-Scott) pairing-friendly elliptic curve construction.
|
|
@@ -769,26 +610,36 @@ type Opts = {
|
|
|
769
610
|
|
|
770
611
|
### poseidon: Poseidon hash
|
|
771
612
|
|
|
772
|
-
Implements [Poseidon](https://www.poseidon-hash.info) ZK-friendly hash
|
|
613
|
+
Implements [Poseidon](https://www.poseidon-hash.info) ZK-friendly hash:
|
|
614
|
+
permutation and sponge.
|
|
773
615
|
|
|
774
616
|
There are many poseidon variants with different constants.
|
|
775
617
|
We don't provide them: you should construct them manually.
|
|
776
618
|
Check out [micro-starknet](https://github.com/paulmillr/micro-starknet) package for a proper example.
|
|
777
619
|
|
|
778
620
|
```ts
|
|
779
|
-
import { poseidon } from '@noble/curves/abstract/poseidon';
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
621
|
+
import { poseidon, poseidonSponge } from '@noble/curves/abstract/poseidon';
|
|
622
|
+
|
|
623
|
+
const rate = 2;
|
|
624
|
+
const capacity = 1;
|
|
625
|
+
const { mds, roundConstants } = poseidon.grainGenConstants({
|
|
626
|
+
Fp,
|
|
627
|
+
t: rate + capacity,
|
|
628
|
+
roundsFull: 8,
|
|
629
|
+
roundsPartial: 31,
|
|
630
|
+
});
|
|
631
|
+
const opts = {
|
|
632
|
+
Fp,
|
|
633
|
+
rate,
|
|
634
|
+
capacity,
|
|
635
|
+
sboxPower: 17,
|
|
636
|
+
mds,
|
|
637
|
+
roundConstants,
|
|
638
|
+
roundsFull: 8,
|
|
639
|
+
roundsPartial: 31,
|
|
790
640
|
};
|
|
791
|
-
const
|
|
641
|
+
const permutation = poseidon.poseidon(opts);
|
|
642
|
+
const sponge = poseidon.poseidonSponge(opts); // use carefully, not specced
|
|
792
643
|
```
|
|
793
644
|
|
|
794
645
|
### modular: Modular arithmetics utilities
|
|
@@ -821,6 +672,15 @@ DoS (infilite loop) on Tonelli-Shanks square root calculation.
|
|
|
821
672
|
|
|
822
673
|
Unlike `mod.inv`, `mod.invertBatch` won't throw on `0`: make sure to throw an error yourself.
|
|
823
674
|
|
|
675
|
+
### fft: Fast Fourier Transform
|
|
676
|
+
|
|
677
|
+
Experimental implementation of NTT / FFT (Fast Fourier Transform) over finite fields.
|
|
678
|
+
API may change at any time. The code has not been audited. Feature requests are welcome.
|
|
679
|
+
|
|
680
|
+
```ts
|
|
681
|
+
import * as fft from '@noble/curves/abstract/fft.js';
|
|
682
|
+
```
|
|
683
|
+
|
|
824
684
|
#### Creating private keys from hashes
|
|
825
685
|
|
|
826
686
|
You can't simply make a 32-byte private key from a 32-byte hash.
|
|
@@ -835,7 +695,7 @@ Use [abstract/hash-to-curve](#hash-to-curve-hashing-strings-to-curve-points)
|
|
|
835
695
|
if you need to hash to **public key**.
|
|
836
696
|
|
|
837
697
|
```ts
|
|
838
|
-
import { p256 } from '@noble/curves/
|
|
698
|
+
import { p256 } from '@noble/curves/nist';
|
|
839
699
|
import { sha256 } from '@noble/hashes/sha256';
|
|
840
700
|
import { hkdf } from '@noble/hashes/hkdf';
|
|
841
701
|
import * as mod from '@noble/curves/abstract/modular';
|
|
@@ -889,33 +749,37 @@ The library has been independently audited:
|
|
|
889
749
|
- The audit has been funded by [Ryan Shea](https://www.shea.io)
|
|
890
750
|
|
|
891
751
|
It is tested against property-based, cross-library and Wycheproof vectors,
|
|
892
|
-
and
|
|
752
|
+
and is being fuzzed in [the separate repo](https://github.com/paulmillr/fuzzing).
|
|
893
753
|
|
|
894
754
|
If you see anything unusual: investigate and report.
|
|
895
755
|
|
|
896
756
|
### Constant-timeness
|
|
897
757
|
|
|
898
|
-
_JIT-compiler_ and _Garbage Collector_ make "constant time"
|
|
899
|
-
achieve [timing attack](https://en.wikipedia.org/wiki/Timing_attack) resistance
|
|
758
|
+
We're targetting algorithmic constant time. _JIT-compiler_ and _Garbage Collector_ make "constant time"
|
|
759
|
+
extremely hard to achieve [timing attack](https://en.wikipedia.org/wiki/Timing_attack) resistance
|
|
900
760
|
in a scripting language. Which means _any other JS library can't have
|
|
901
761
|
constant-timeness_. Even statically typed Rust, a language without GC,
|
|
902
762
|
[makes it harder to achieve constant-time](https://www.chosenplaintext.ca/open-source/rust-timing-shield/security)
|
|
903
763
|
for some cases. If your goal is absolute security, don't use any JS lib — including bindings to native ones.
|
|
904
|
-
Use low-level libraries & languages.
|
|
764
|
+
Use low-level libraries & languages.
|
|
905
765
|
|
|
906
766
|
### Supply chain security
|
|
907
767
|
|
|
908
|
-
- **Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures
|
|
768
|
+
- **Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures
|
|
909
769
|
- **Releases** are transparent and built on GitHub CI. Make sure to verify [provenance](https://docs.npmjs.com/generating-provenance-statements) logs
|
|
770
|
+
- Use GitHub CLI to verify single-file builds:
|
|
771
|
+
`gh attestation verify --owner paulmillr noble-curves.js`
|
|
910
772
|
- **Rare releasing** is followed to ensure less re-audit need for end-users
|
|
911
|
-
- **Dependencies** are minimized and locked-down:
|
|
912
|
-
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
773
|
+
- **Dependencies** are minimized and locked-down: any dependency could get hacked and users will be downloading malware with every install.
|
|
774
|
+
- We make sure to use as few dependencies as possible
|
|
775
|
+
- Automatic dep updates are prevented by locking-down version ranges; diffs are checked with `npm-diff`
|
|
776
|
+
- **Dev Dependencies** are disabled for end-users; they are only used to develop / build the source code
|
|
777
|
+
|
|
778
|
+
For this package, there is 1 dependency; and a few dev dependencies:
|
|
779
|
+
|
|
780
|
+
- [noble-hashes](https://github.com/paulmillr/noble-hashes) provides cryptographic hashing functionality
|
|
781
|
+
- micro-bmark, micro-should and jsbt are used for benchmarking / testing / build tooling and developed by the same author
|
|
782
|
+
- prettier, fast-check and typescript are used for code quality / test generation / ts compilation. It's hard to audit their source code thoroughly and fully because of their size
|
|
919
783
|
|
|
920
784
|
### Randomness
|
|
921
785
|
|
|
@@ -939,96 +803,114 @@ NIST prohibits classical cryptography (RSA, DSA, ECDSA, ECDH) [after 2035](https
|
|
|
939
803
|
|
|
940
804
|
## Speed
|
|
941
805
|
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
```
|
|
945
|
-
|
|
946
|
-
init
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
806
|
+
```sh
|
|
807
|
+
npm run bench:install && npm run bench
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
During first call of most methods, `init` is done, which calculates base point precomputes.
|
|
811
|
+
The method consumes 20MB+ of memory and takes some time.
|
|
812
|
+
You can adjust how many precomputes are generated,
|
|
813
|
+
by using `_setWindowSize`. Check out the source code.
|
|
814
|
+
|
|
815
|
+
Benchmark results on Apple M4:
|
|
816
|
+
|
|
817
|
+
```
|
|
818
|
+
# secp256k1
|
|
819
|
+
init 10ms
|
|
820
|
+
getPublicKey x 9,099 ops/sec @ 109μs/op
|
|
821
|
+
sign x 7,182 ops/sec @ 139μs/op
|
|
822
|
+
verify x 1,188 ops/sec @ 841μs/op
|
|
823
|
+
getSharedSecret x 735 ops/sec @ 1ms/op
|
|
824
|
+
recoverPublicKey x 1,265 ops/sec @ 790μs/op
|
|
825
|
+
schnorr.sign x 957 ops/sec @ 1ms/op
|
|
826
|
+
schnorr.verify x 1,210 ops/sec @ 825μs/op
|
|
827
|
+
|
|
828
|
+
# ed25519
|
|
829
|
+
init 14ms
|
|
830
|
+
getPublicKey x 14,216 ops/sec @ 70μs/op
|
|
831
|
+
sign x 6,849 ops/sec @ 145μs/op
|
|
832
|
+
verify x 1,400 ops/sec @ 713μs/op
|
|
833
|
+
|
|
834
|
+
# ed448
|
|
835
|
+
init 37ms
|
|
836
|
+
getPublicKey x 5,273 ops/sec @ 189μs/op
|
|
837
|
+
sign x 2,494 ops/sec @ 400μs/op
|
|
838
|
+
verify x 476 ops/sec @ 2ms/op
|
|
839
|
+
|
|
840
|
+
# p256
|
|
841
|
+
init 17ms
|
|
842
|
+
getPublicKey x 8,977 ops/sec @ 111μs/op
|
|
843
|
+
sign x 7,236 ops/sec @ 138μs/op
|
|
844
|
+
verify x 877 ops/sec @ 1ms/op
|
|
845
|
+
|
|
846
|
+
# p384
|
|
847
|
+
init 42ms
|
|
848
|
+
getPublicKey x 4,084 ops/sec @ 244μs/op
|
|
849
|
+
sign x 3,247 ops/sec @ 307μs/op
|
|
850
|
+
verify x 331 ops/sec @ 3ms/op
|
|
851
|
+
|
|
852
|
+
# p521
|
|
853
|
+
init 83ms
|
|
854
|
+
getPublicKey x 2,049 ops/sec @ 487μs/op
|
|
855
|
+
sign x 1,748 ops/sec @ 571μs/op
|
|
856
|
+
verify x 170 ops/sec @ 5ms/op
|
|
857
|
+
|
|
858
|
+
# ristretto255
|
|
859
|
+
add x 931,966 ops/sec @ 1μs/op
|
|
860
|
+
multiply x 15,444 ops/sec @ 64μs/op
|
|
861
|
+
encode x 21,367 ops/sec @ 46μs/op
|
|
862
|
+
decode x 21,715 ops/sec @ 46μs/op
|
|
863
|
+
|
|
864
|
+
# decaf448
|
|
865
|
+
add x 478,011 ops/sec @ 2μs/op
|
|
866
|
+
multiply x 416 ops/sec @ 2ms/op
|
|
867
|
+
encode x 8,562 ops/sec @ 116μs/op
|
|
868
|
+
decode x 8,636 ops/sec @ 115μs/op
|
|
869
|
+
|
|
870
|
+
# ECDH
|
|
871
|
+
x25519 x 1,981 ops/sec @ 504μs/op
|
|
872
|
+
x448 x 743 ops/sec @ 1ms/op
|
|
873
|
+
secp256k1 x 728 ops/sec @ 1ms/op
|
|
874
|
+
p256 x 705 ops/sec @ 1ms/op
|
|
875
|
+
p384 x 268 ops/sec @ 3ms/op
|
|
876
|
+
p521 x 137 ops/sec @ 7ms/op
|
|
877
|
+
|
|
878
|
+
# hash-to-curve
|
|
879
|
+
hashToPrivateScalar x 1,754,385 ops/sec @ 570ns/op
|
|
880
|
+
hash_to_field x 135,703 ops/sec @ 7μs/op
|
|
881
|
+
hashToCurve secp256k1 x 3,194 ops/sec @ 313μs/op
|
|
882
|
+
hashToCurve p256 x 5,962 ops/sec @ 167μs/op
|
|
883
|
+
hashToCurve p384 x 2,230 ops/sec @ 448μs/op
|
|
884
|
+
hashToCurve p521 x 1,063 ops/sec @ 940μs/op
|
|
885
|
+
hashToCurve ed25519 x 4,047 ops/sec @ 247μs/op
|
|
886
|
+
hashToCurve ed448 x 1,691 ops/sec @ 591μs/op
|
|
887
|
+
hash_to_ristretto255 x 8,733 ops/sec @ 114μs/op
|
|
888
|
+
hash_to_decaf448 x 3,882 ops/sec @ 257μs/op
|
|
889
|
+
|
|
890
|
+
# modular over secp256k1 P field
|
|
891
|
+
invert a x 866,551 ops/sec @ 1μs/op
|
|
892
|
+
invert b x 693,962 ops/sec @ 1μs/op
|
|
893
|
+
sqrt p = 3 mod 4 x 25,738 ops/sec @ 38μs/op
|
|
894
|
+
sqrt tonneli-shanks x 847 ops/sec @ 1ms/op
|
|
895
|
+
|
|
896
|
+
# bls12-381
|
|
897
|
+
init 22ms
|
|
898
|
+
getPublicKey x 1,325 ops/sec @ 754μs/op
|
|
899
|
+
sign x 80 ops/sec @ 12ms/op
|
|
900
|
+
verify x 62 ops/sec @ 15ms/op
|
|
901
|
+
pairing x 166 ops/sec @ 6ms/op
|
|
902
|
+
pairing10 x 54 ops/sec @ 18ms/op ± 23.48% (15ms..36ms)
|
|
903
|
+
MSM 4096 scalars x points 3286ms
|
|
904
|
+
aggregatePublicKeys/8 x 173 ops/sec @ 5ms/op
|
|
905
|
+
aggregatePublicKeys/32 x 46 ops/sec @ 21ms/op
|
|
906
|
+
aggregatePublicKeys/128 x 11 ops/sec @ 84ms/op
|
|
907
|
+
aggregatePublicKeys/512 x 2 ops/sec @ 335ms/op
|
|
908
|
+
aggregatePublicKeys/2048 x 0 ops/sec @ 1346ms/op
|
|
909
|
+
aggregateSignatures/8 x 82 ops/sec @ 12ms/op
|
|
910
|
+
aggregateSignatures/32 x 21 ops/sec @ 45ms/op
|
|
911
|
+
aggregateSignatures/128 x 5 ops/sec @ 178ms/op
|
|
912
|
+
aggregateSignatures/512 x 1 ops/sec @ 705ms/op
|
|
913
|
+
aggregateSignatures/2048 x 0 ops/sec @ 2823ms/op
|
|
1032
914
|
```
|
|
1033
915
|
|
|
1034
916
|
## Upgrading
|
|
@@ -1092,10 +974,10 @@ Upgrading from [@noble/bls12-381](https://github.com/paulmillr/noble-bls12-381):
|
|
|
1092
974
|
|
|
1093
975
|
## Contributing & testing
|
|
1094
976
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
977
|
+
- `npm install && npm run build && npm test` will build the code and run tests.
|
|
978
|
+
- `npm run lint` / `npm run format` will run linter / fix linter issues.
|
|
979
|
+
- `npm run bench` will run benchmarks, which may need their deps first (`npm run bench:install`)
|
|
980
|
+
- `npm run build:release` will build single file
|
|
1099
981
|
|
|
1100
982
|
Check out [github.com/paulmillr/guidelines](https://github.com/paulmillr/guidelines)
|
|
1101
983
|
for general coding practices and rules.
|
|
@@ -1104,6 +986,9 @@ See [paulmillr.com/noble](https://paulmillr.com/noble/)
|
|
|
1104
986
|
for useful resources, articles, documentation and demos
|
|
1105
987
|
related to the library.
|
|
1106
988
|
|
|
989
|
+
MuSig2 signature scheme and BIP324 ElligatorSwift mapping for secp256k1
|
|
990
|
+
are available [in a separate package](https://github.com/paulmillr/scure-btc-signer).
|
|
991
|
+
|
|
1107
992
|
## License
|
|
1108
993
|
|
|
1109
994
|
The MIT License (MIT)
|