@meteora-ag/cp-amm-sdk 1.0.0-rc.9 → 1.0.1-1.rc-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1266 -332
- package/dist/index.d.ts +1266 -332
- package/dist/index.js +1231 -362
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1248 -379
- package/dist/index.mjs.map +1 -1
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +19 -24
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +178 -210
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +19 -24
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +178 -210
- package/node_modules/@babel/runtime/package.json +1 -4
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js +11 -12
- package/node_modules/@coral-xyz/anchor/dist/browser/index.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/browser/src/coder/borsh/idl.d.ts.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.d.ts.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js +8 -9
- package/node_modules/@coral-xyz/anchor/dist/cjs/coder/borsh/idl.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js +3 -3
- package/node_modules/@coral-xyz/anchor/dist/cjs/program/accounts-resolver.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.d.ts.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js +8 -9
- package/node_modules/@coral-xyz/anchor/dist/esm/coder/borsh/idl.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js +3 -3
- package/node_modules/@coral-xyz/anchor/dist/esm/program/accounts-resolver.js.map +1 -1
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/@coral-xyz/anchor/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@coral-xyz/anchor/package.json +3 -3
- package/node_modules/@coral-xyz/anchor-errors/package.json +1 -1
- package/node_modules/@coral-xyz/borsh/package.json +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/README.md +321 -436
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.js +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/bls.d.ts +5 -5
- package/node_modules/@noble/curves/abstract/bls.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/bls.js +15 -16
- package/node_modules/@noble/curves/abstract/bls.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/curve.d.ts +11 -3
- package/node_modules/@noble/curves/abstract/curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/curve.js +93 -81
- package/node_modules/@noble/curves/abstract/curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/edwards.d.ts +2 -2
- package/node_modules/@noble/curves/abstract/edwards.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/edwards.js +72 -72
- package/node_modules/@noble/curves/abstract/edwards.js.map +1 -0
- package/node_modules/@noble/curves/abstract/fft.d.ts +120 -0
- package/node_modules/@noble/curves/abstract/fft.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/fft.js +439 -0
- package/node_modules/@noble/curves/abstract/fft.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/hash-to-curve.d.ts +15 -9
- package/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/hash-to-curve.js +49 -39
- package/node_modules/@noble/curves/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/modular.d.ts +13 -12
- package/node_modules/@noble/curves/abstract/modular.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/modular.js +167 -167
- package/node_modules/@noble/curves/abstract/modular.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/montgomery.d.ts +4 -9
- package/node_modules/@noble/curves/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/montgomery.js +140 -0
- package/node_modules/@noble/curves/abstract/montgomery.js.map +1 -0
- package/node_modules/@noble/curves/abstract/poseidon.d.ts +76 -0
- package/node_modules/@noble/curves/abstract/poseidon.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/poseidon.js +300 -0
- package/node_modules/@noble/curves/abstract/poseidon.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/abstract/tower.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/tower.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/tower.js +17 -18
- package/node_modules/@noble/curves/abstract/tower.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/utils.d.ts +5 -2
- package/node_modules/@noble/curves/abstract/utils.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/utils.js +27 -14
- package/node_modules/@noble/curves/abstract/utils.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/weierstrass.d.ts +45 -10
- package/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/abstract/weierstrass.js +153 -117
- package/node_modules/@noble/curves/abstract/weierstrass.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/bls12-381.d.ts +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bls12-381.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bls12-381.js +50 -64
- package/node_modules/@noble/curves/bls12-381.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bn254.d.ts +3 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bn254.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/bn254.js +39 -29
- package/node_modules/@noble/curves/bn254.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves/esm → @noble/curves}/ed25519.d.ts +26 -10
- package/node_modules/@noble/curves/ed25519.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/ed25519.js +93 -83
- package/node_modules/@noble/curves/ed25519.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/ed448.d.ts +26 -10
- package/node_modules/@noble/curves/ed448.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/ed448.js +92 -82
- package/node_modules/@noble/curves/ed448.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.js +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/bls.d.ts +5 -5
- package/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/bls.js +6 -7
- package/node_modules/@noble/curves/esm/abstract/bls.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/curve.d.ts +11 -3
- package/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/curve.js +90 -78
- package/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/edwards.d.ts +2 -2
- package/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/edwards.js +53 -53
- package/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/fft.d.ts +120 -0
- package/node_modules/@noble/curves/esm/abstract/fft.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/fft.js +426 -0
- package/node_modules/@noble/curves/esm/abstract/fft.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/hash-to-curve.d.ts +15 -9
- package/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/hash-to-curve.js +33 -23
- package/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/modular.d.ts +13 -12
- package/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/modular.js +159 -159
- package/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/montgomery.d.ts +4 -9
- package/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/montgomery.js +137 -0
- package/node_modules/@noble/curves/esm/abstract/montgomery.js.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +76 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.js +291 -0
- package/node_modules/@noble/curves/esm/abstract/poseidon.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/abstract/tower.d.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/tower.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/tower.js +9 -10
- package/node_modules/@noble/curves/esm/abstract/tower.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/utils.d.ts +5 -2
- package/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/utils.js +26 -13
- package/node_modules/@noble/curves/esm/abstract/utils.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/weierstrass.d.ts +45 -10
- package/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/abstract/weierstrass.js +127 -91
- package/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/bls12-381.d.ts +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bls12-381.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bls12-381.js +18 -32
- package/node_modules/@noble/curves/esm/bls12-381.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bn254.d.ts +3 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bn254.d.ts.map +1 -1
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/bn254.js +17 -7
- package/node_modules/@noble/curves/esm/bn254.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble/curves → @noble/curves/esm}/ed25519.d.ts +26 -10
- package/node_modules/@noble/curves/esm/ed25519.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/ed25519.js +48 -38
- package/node_modules/@noble/curves/esm/ed25519.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/ed448.d.ts +26 -10
- package/node_modules/@noble/curves/esm/ed448.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/ed448.js +59 -49
- package/node_modules/@noble/curves/esm/ed448.js.map +1 -0
- package/node_modules/@noble/curves/esm/jubjub.d.ts +12 -0
- package/node_modules/@noble/curves/esm/jubjub.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/jubjub.js +12 -0
- package/node_modules/@noble/curves/esm/jubjub.js.map +1 -0
- package/node_modules/@noble/curves/esm/misc.d.ts +21 -0
- package/node_modules/@noble/curves/esm/misc.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/misc.js +107 -0
- package/node_modules/@noble/curves/esm/misc.js.map +1 -0
- package/node_modules/@noble/curves/esm/nist.d.ts +30 -0
- package/node_modules/@noble/curves/esm/nist.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/nist.js +121 -0
- package/node_modules/@noble/curves/esm/nist.js.map +1 -0
- package/node_modules/@noble/curves/esm/p256.d.ts +12 -0
- package/node_modules/@noble/curves/esm/p256.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/p256.js +12 -0
- package/node_modules/@noble/curves/esm/p256.js.map +1 -0
- package/node_modules/@noble/curves/esm/p384.d.ts +13 -0
- package/node_modules/@noble/curves/esm/p384.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/p384.js +13 -0
- package/node_modules/@noble/curves/esm/p384.js.map +1 -0
- package/node_modules/@noble/curves/esm/p521.d.ts +12 -0
- package/node_modules/@noble/curves/esm/p521.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/p521.js +12 -0
- package/node_modules/@noble/curves/esm/p521.js.map +1 -0
- package/node_modules/@noble/curves/esm/pasta.d.ts +10 -0
- package/node_modules/@noble/curves/esm/pasta.d.ts.map +1 -0
- package/node_modules/@noble/curves/esm/pasta.js +10 -0
- package/node_modules/@noble/curves/esm/pasta.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/secp256k1.d.ts +15 -10
- package/node_modules/@noble/curves/esm/secp256k1.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/secp256k1.js +23 -20
- package/node_modules/@noble/curves/esm/secp256k1.js.map +1 -0
- package/node_modules/@noble/curves/jubjub.d.ts +12 -0
- package/node_modules/@noble/curves/jubjub.d.ts.map +1 -0
- package/node_modules/@noble/curves/jubjub.js +15 -0
- package/node_modules/@noble/curves/jubjub.js.map +1 -0
- package/node_modules/@noble/curves/misc.d.ts +21 -0
- package/node_modules/@noble/curves/misc.d.ts.map +1 -0
- package/node_modules/@noble/curves/misc.js +112 -0
- package/node_modules/@noble/curves/misc.js.map +1 -0
- package/node_modules/@noble/curves/nist.d.ts +30 -0
- package/node_modules/@noble/curves/nist.d.ts.map +1 -0
- package/node_modules/@noble/curves/nist.js +124 -0
- package/node_modules/@noble/curves/nist.js.map +1 -0
- package/node_modules/@noble/curves/p256.d.ts +12 -0
- package/node_modules/@noble/curves/p256.d.ts.map +1 -0
- package/node_modules/@noble/curves/p256.js +9 -0
- package/node_modules/@noble/curves/p256.js.map +1 -0
- package/node_modules/@noble/curves/p384.d.ts +13 -0
- package/node_modules/@noble/curves/p384.d.ts.map +1 -0
- package/node_modules/@noble/curves/p384.js +10 -0
- package/node_modules/@noble/curves/p384.js.map +1 -0
- package/node_modules/@noble/curves/p521.d.ts +12 -0
- package/node_modules/@noble/curves/p521.d.ts.map +1 -0
- package/node_modules/@noble/curves/p521.js +9 -0
- package/node_modules/@noble/curves/p521.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/package.json +126 -13
- package/node_modules/@noble/curves/pasta.d.ts +10 -0
- package/node_modules/@noble/curves/pasta.d.ts.map +1 -0
- package/node_modules/@noble/curves/pasta.js +13 -0
- package/node_modules/@noble/curves/pasta.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/secp256k1.d.ts +15 -10
- package/node_modules/@noble/curves/secp256k1.d.ts.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/secp256k1.js +62 -59
- package/node_modules/@noble/curves/secp256k1.js.map +1 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/_shortw_utils.ts +2 -2
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/bls.ts +10 -10
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/curve.ts +99 -85
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/edwards.ts +71 -64
- package/node_modules/@noble/curves/src/abstract/fft.ts +508 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/hash-to-curve.ts +49 -39
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/modular.ts +155 -154
- package/node_modules/@noble/curves/src/abstract/montgomery.ts +165 -0
- package/node_modules/@noble/curves/src/abstract/poseidon.ts +331 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/tower.ts +10 -11
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/utils.ts +28 -15
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/weierstrass.ts +182 -120
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/bls12-381.ts +21 -37
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/bn254.ts +18 -8
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/ed25519.ts +55 -40
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/ed448.ts +105 -88
- package/node_modules/@noble/curves/src/jubjub.ts +12 -0
- package/node_modules/@noble/curves/src/misc.ts +123 -0
- package/node_modules/@noble/curves/src/nist.ts +155 -0
- package/node_modules/@noble/curves/src/p256.ts +11 -0
- package/node_modules/@noble/curves/src/p384.ts +13 -0
- package/node_modules/@noble/curves/src/p521.ts +11 -0
- package/node_modules/@noble/curves/src/pasta.ts +9 -0
- package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/secp256k1.ts +27 -22
- package/node_modules/@noble/hashes/README.md +217 -268
- package/node_modules/@noble/hashes/_assert.d.ts +12 -18
- package/node_modules/@noble/hashes/_assert.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_assert.js +12 -44
- package/node_modules/@noble/hashes/_assert.js.map +1 -1
- package/node_modules/@noble/hashes/_blake.d.ts +8 -28
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_blake.js +19 -106
- package/node_modules/@noble/hashes/_blake.js.map +1 -1
- package/node_modules/@noble/hashes/_md.d.ts +22 -5
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_md.js +43 -18
- package/node_modules/@noble/hashes/_md.js.map +1 -1
- package/node_modules/@noble/hashes/_u64.d.ts +1 -1
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -1
- package/node_modules/@noble/hashes/_u64.js +6 -5
- package/node_modules/@noble/hashes/_u64.js.map +1 -1
- package/node_modules/@noble/hashes/argon2.d.ts +9 -9
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/argon2.js +62 -57
- package/node_modules/@noble/hashes/argon2.js.map +1 -1
- package/node_modules/@noble/hashes/blake1.d.ts +19 -39
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake1.js +107 -119
- package/node_modules/@noble/hashes/blake1.js.map +1 -1
- package/node_modules/@noble/hashes/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2.js +420 -0
- package/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/blake2b.d.ts +6 -48
- package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake2b.js +6 -189
- package/node_modules/@noble/hashes/blake2b.js.map +1 -1
- package/node_modules/@noble/hashes/blake2s.d.ts +14 -55
- package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake2s.js +17 -125
- package/node_modules/@noble/hashes/blake2s.js.map +1 -1
- package/node_modules/@noble/hashes/blake3.d.ts +6 -6
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/blake3.js +62 -62
- package/node_modules/@noble/hashes/blake3.js.map +1 -1
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/eskdf.js +18 -20
- package/node_modules/@noble/hashes/eskdf.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_assert.d.ts +12 -18
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_assert.js +10 -39
- package/node_modules/@noble/hashes/esm/_assert.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_blake.d.ts +8 -28
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_blake.js +16 -104
- package/node_modules/@noble/hashes/esm/_blake.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_md.d.ts +22 -5
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_md.js +35 -10
- package/node_modules/@noble/hashes/esm/_md.js.map +1 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts +1 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/_u64.js +5 -4
- package/node_modules/@noble/hashes/esm/_u64.js.map +1 -1
- package/node_modules/@noble/hashes/esm/argon2.d.ts +9 -9
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/argon2.js +44 -39
- package/node_modules/@noble/hashes/esm/argon2.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake1.d.ts +19 -39
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake1.js +84 -96
- package/node_modules/@noble/hashes/esm/blake1.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.js +413 -0
- package/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +6 -48
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2b.js +6 -188
- package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +14 -55
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake2s.js +16 -120
- package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -1
- package/node_modules/@noble/hashes/esm/blake3.d.ts +6 -6
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/blake3.js +46 -57
- package/node_modules/@noble/hashes/esm/blake3.js.map +1 -1
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/eskdf.js +9 -11
- package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +1 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/hkdf.js +10 -11
- package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts +6 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/hmac.js +5 -3
- package/node_modules/@noble/hashes/esm/hmac.js.map +1 -1
- package/node_modules/@noble/hashes/esm/index.js +3 -5
- package/node_modules/@noble/hashes/esm/index.js.map +1 -1
- package/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.js +281 -0
- package/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +4 -4
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/pbkdf2.js +8 -8
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -1
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +6 -17
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/ripemd160.js +6 -96
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -1
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +3 -3
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/scrypt.js +14 -19
- package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha1.d.ts +6 -17
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha1.js +6 -79
- package/node_modules/@noble/hashes/esm/sha1.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha2.d.ts +155 -3
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha2.js +371 -4
- package/node_modules/@noble/hashes/esm/sha2.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha256.d.ts +10 -22
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha256.js +10 -120
- package/node_modules/@noble/hashes/esm/sha256.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +16 -4
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.js +27 -21
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3.d.ts +7 -6
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha3.js +42 -35
- package/node_modules/@noble/hashes/esm/sha3.js.map +1 -1
- package/node_modules/@noble/hashes/esm/sha512.d.ts +18 -108
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/sha512.js +18 -234
- package/node_modules/@noble/hashes/esm/sha512.js.map +1 -1
- package/node_modules/@noble/hashes/esm/utils.d.ts +60 -19
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -1
- package/node_modules/@noble/hashes/esm/utils.js +94 -25
- package/node_modules/@noble/hashes/esm/utils.js.map +1 -1
- package/node_modules/@noble/hashes/hkdf.d.ts +1 -1
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -1
- package/node_modules/@noble/hashes/hkdf.js +15 -16
- package/node_modules/@noble/hashes/hkdf.js.map +1 -1
- package/node_modules/@noble/hashes/hmac.d.ts +6 -1
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -1
- package/node_modules/@noble/hashes/hmac.js +11 -9
- package/node_modules/@noble/hashes/hmac.js.map +1 -1
- package/node_modules/@noble/hashes/index.js +3 -5
- package/node_modules/@noble/hashes/index.js.map +1 -1
- package/node_modules/@noble/hashes/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/legacy.js +287 -0
- package/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +104 -6
- package/node_modules/@noble/hashes/pbkdf2.d.ts +4 -4
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/pbkdf2.js +17 -17
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -1
- package/node_modules/@noble/hashes/ripemd160.d.ts +6 -17
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -1
- package/node_modules/@noble/hashes/ripemd160.js +6 -97
- package/node_modules/@noble/hashes/ripemd160.js.map +1 -1
- package/node_modules/@noble/hashes/scrypt.d.ts +3 -3
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -1
- package/node_modules/@noble/hashes/scrypt.js +60 -65
- package/node_modules/@noble/hashes/scrypt.js.map +1 -1
- package/node_modules/@noble/hashes/sha1.d.ts +6 -17
- package/node_modules/@noble/hashes/sha1.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha1.js +6 -80
- package/node_modules/@noble/hashes/sha1.js.map +1 -1
- package/node_modules/@noble/hashes/sha2.d.ts +155 -3
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha2.js +378 -11
- package/node_modules/@noble/hashes/sha2.js.map +1 -1
- package/node_modules/@noble/hashes/sha256.d.ts +10 -22
- package/node_modules/@noble/hashes/sha256.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha256.js +11 -122
- package/node_modules/@noble/hashes/sha256.js.map +1 -1
- package/node_modules/@noble/hashes/sha3-addons.d.ts +16 -4
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha3-addons.js +41 -35
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -1
- package/node_modules/@noble/hashes/sha3.d.ts +7 -6
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha3.js +52 -45
- package/node_modules/@noble/hashes/sha3.js.map +1 -1
- package/node_modules/@noble/hashes/sha512.d.ts +18 -108
- package/node_modules/@noble/hashes/sha512.d.ts.map +1 -1
- package/node_modules/@noble/hashes/sha512.js +19 -239
- package/node_modules/@noble/hashes/sha512.js.map +1 -1
- package/node_modules/@noble/hashes/src/_assert.ts +18 -50
- package/node_modules/@noble/hashes/src/_blake.ts +18 -115
- package/node_modules/@noble/hashes/src/_md.ts +47 -12
- package/node_modules/@noble/hashes/src/_u64.ts +5 -9
- package/node_modules/@noble/hashes/src/argon2.ts +60 -49
- package/node_modules/@noble/hashes/src/blake1.ts +112 -126
- package/node_modules/@noble/hashes/src/blake2.ts +486 -0
- package/node_modules/@noble/hashes/src/blake2b.ts +6 -205
- package/node_modules/@noble/hashes/src/blake2s.ts +16 -150
- package/node_modules/@noble/hashes/src/blake3.ts +53 -62
- package/node_modules/@noble/hashes/src/eskdf.ts +9 -11
- package/node_modules/@noble/hashes/src/hkdf.ts +10 -11
- package/node_modules/@noble/hashes/src/hmac.ts +5 -3
- package/node_modules/@noble/hashes/src/index.ts +3 -5
- package/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +20 -18
- package/node_modules/@noble/hashes/src/ripemd160.ts +6 -103
- package/node_modules/@noble/hashes/src/scrypt.ts +25 -20
- package/node_modules/@noble/hashes/src/sha1.ts +6 -79
- package/node_modules/@noble/hashes/src/sha2.ts +399 -4
- package/node_modules/@noble/hashes/src/sha256.ts +15 -127
- package/node_modules/@noble/hashes/src/sha3-addons.ts +34 -23
- package/node_modules/@noble/hashes/src/sha3.ts +59 -45
- package/node_modules/@noble/hashes/src/sha512.ts +27 -250
- package/node_modules/@noble/hashes/src/utils.ts +132 -42
- package/node_modules/@noble/hashes/utils.d.ts +60 -19
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -1
- package/node_modules/@noble/hashes/utils.js +110 -33
- package/node_modules/@noble/hashes/utils.js.map +1 -1
- package/node_modules/{file-uri-to-path → @solana/codecs-core}/LICENSE +8 -8
- package/node_modules/@solana/codecs-core/README.md +662 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.cjs +504 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.cjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.mjs +460 -0
- package/node_modules/@solana/codecs-core/dist/index.browser.mjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.native.mjs +460 -0
- package/node_modules/@solana/codecs-core/dist/index.native.mjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.node.cjs +504 -0
- package/node_modules/@solana/codecs-core/dist/index.node.cjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/index.node.mjs +460 -0
- package/node_modules/@solana/codecs-core/dist/index.node.mjs.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-sentinel.d.ts +70 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-sentinel.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-size-prefix.d.ts +67 -0
- package/node_modules/@solana/codecs-core/dist/types/add-codec-size-prefix.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/assertions.d.ts +62 -0
- package/node_modules/@solana/codecs-core/dist/types/assertions.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/bytes.d.ts +92 -0
- package/node_modules/@solana/codecs-core/dist/types/bytes.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/codec.d.ts +827 -0
- package/node_modules/@solana/codecs-core/dist/types/codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/combine-codec.d.ts +75 -0
- package/node_modules/@solana/codecs-core/dist/types/combine-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/fix-codec-size.d.ts +111 -0
- package/node_modules/@solana/codecs-core/dist/types/fix-codec-size.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/index.d.ts +667 -0
- package/node_modules/@solana/codecs-core/dist/types/index.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/offset-codec.d.ts +328 -0
- package/node_modules/@solana/codecs-core/dist/types/offset-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/pad-codec.d.ts +162 -0
- package/node_modules/@solana/codecs-core/dist/types/pad-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/readonly-uint8array.d.ts +19 -0
- package/node_modules/@solana/codecs-core/dist/types/readonly-uint8array.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/resize-codec.d.ts +129 -0
- package/node_modules/@solana/codecs-core/dist/types/resize-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/reverse-codec.d.ts +92 -0
- package/node_modules/@solana/codecs-core/dist/types/reverse-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/dist/types/transform-codec.d.ts +114 -0
- package/node_modules/@solana/codecs-core/dist/types/transform-codec.d.ts.map +1 -0
- package/node_modules/@solana/codecs-core/package.json +83 -0
- package/node_modules/@solana/codecs-numbers/LICENSE +20 -0
- package/node_modules/@solana/codecs-numbers/README.md +130 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.cjs +331 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.cjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.mjs +289 -0
- package/node_modules/@solana/codecs-numbers/dist/index.browser.mjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.native.mjs +289 -0
- package/node_modules/@solana/codecs-numbers/dist/index.native.mjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.cjs +331 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.cjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.mjs +289 -0
- package/node_modules/@solana/codecs-numbers/dist/index.node.mjs.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/assertions.d.ts +27 -0
- package/node_modules/@solana/codecs-numbers/dist/types/assertions.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/common.d.ts +84 -0
- package/node_modules/@solana/codecs-numbers/dist/types/common.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f32.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f32.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f64.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/f64.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i128.d.ts +91 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i128.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i16.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i16.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i32.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i32.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i64.d.ts +90 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i64.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i8.d.ts +75 -0
- package/node_modules/@solana/codecs-numbers/dist/types/i8.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/index.d.ts +26 -0
- package/node_modules/@solana/codecs-numbers/dist/types/index.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/short-u16.d.ts +96 -0
- package/node_modules/@solana/codecs-numbers/dist/types/short-u16.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u128.d.ts +87 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u128.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u16.d.ts +85 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u16.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u32.d.ts +85 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u32.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u64.d.ts +88 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u64.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u8.d.ts +71 -0
- package/node_modules/@solana/codecs-numbers/dist/types/u8.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/dist/types/utils.d.ts +18 -0
- package/node_modules/@solana/codecs-numbers/dist/types/utils.d.ts.map +1 -0
- package/node_modules/@solana/codecs-numbers/package.json +83 -0
- package/node_modules/@solana/errors/LICENSE +20 -0
- package/node_modules/@solana/errors/README.md +87 -0
- package/node_modules/@solana/errors/bin/cli.mjs +7 -0
- package/node_modules/@solana/errors/dist/cli.mjs +570 -0
- package/node_modules/@solana/errors/dist/index.browser.cjs +1084 -0
- package/node_modules/@solana/errors/dist/index.browser.cjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.browser.mjs +852 -0
- package/node_modules/@solana/errors/dist/index.browser.mjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.native.mjs +852 -0
- package/node_modules/@solana/errors/dist/index.native.mjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.node.cjs +1084 -0
- package/node_modules/@solana/errors/dist/index.node.cjs.map +1 -0
- package/node_modules/@solana/errors/dist/index.node.mjs +852 -0
- package/node_modules/@solana/errors/dist/index.node.mjs.map +1 -0
- package/node_modules/@solana/errors/dist/types/codes.d.ts +275 -0
- package/node_modules/@solana/errors/dist/types/codes.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/context.d.ts +398 -0
- package/node_modules/@solana/errors/dist/types/context.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/error.d.ts +75 -0
- package/node_modules/@solana/errors/dist/types/error.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/index.d.ts +72 -0
- package/node_modules/@solana/errors/dist/types/index.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/instruction-error.d.ts +9 -0
- package/node_modules/@solana/errors/dist/types/instruction-error.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/json-rpc-error.d.ts +51 -0
- package/node_modules/@solana/errors/dist/types/json-rpc-error.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/message-formatter.d.ts +4 -0
- package/node_modules/@solana/errors/dist/types/message-formatter.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/messages.d.ts +16 -0
- package/node_modules/@solana/errors/dist/types/messages.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/rpc-enum-errors.d.ts +31 -0
- package/node_modules/@solana/errors/dist/types/rpc-enum-errors.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/stack-trace.d.ts +2 -0
- package/node_modules/@solana/errors/dist/types/stack-trace.d.ts.map +1 -0
- package/node_modules/@solana/errors/dist/types/transaction-error.d.ts +5 -0
- package/node_modules/@solana/errors/dist/types/transaction-error.d.ts.map +1 -0
- package/node_modules/@solana/errors/node_modules/chalk/package.json +83 -0
- package/node_modules/@solana/errors/node_modules/chalk/readme.md +297 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/index.d.ts +325 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/index.js +225 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/utilities.js +33 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/node_modules/@solana/errors/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/node_modules/{bindings/LICENSE.md → @solana/errors/node_modules/commander/LICENSE} +1 -1
- package/node_modules/@solana/errors/node_modules/commander/Readme.md +1149 -0
- package/node_modules/@solana/errors/node_modules/commander/esm.mjs +16 -0
- package/node_modules/@solana/errors/node_modules/commander/index.js +24 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/error.js +39 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/help.js +709 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/option.js +367 -0
- package/node_modules/@solana/errors/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/@solana/errors/node_modules/commander/package-support.json +16 -0
- package/node_modules/@solana/errors/node_modules/commander/package.json +82 -0
- package/node_modules/@solana/errors/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/@solana/errors/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/@solana/errors/package.json +84 -0
- package/node_modules/@solana/web3.js/README.md +4 -4
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js +10 -20
- package/node_modules/@solana/web3.js/lib/index.browser.cjs.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js +8 -18
- package/node_modules/@solana/web3.js/lib/index.browser.esm.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.cjs.js +10 -20
- package/node_modules/@solana/web3.js/lib/index.cjs.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.esm.js +8 -18
- package/node_modules/@solana/web3.js/lib/index.esm.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.iife.js +213 -88
- package/node_modules/@solana/web3.js/lib/index.iife.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.iife.min.js +2 -2
- package/node_modules/@solana/web3.js/lib/index.iife.min.js.map +1 -1
- package/node_modules/@solana/web3.js/lib/index.native.js +10 -20
- package/node_modules/@solana/web3.js/lib/index.native.js.map +1 -1
- package/node_modules/@solana/web3.js/package.json +5 -5
- package/node_modules/@solana/web3.js/src/programs/address-lookup-table/index.ts +5 -2
- package/node_modules/@solana/web3.js/src/utils/bigint.ts +14 -33
- package/node_modules/@swc/helpers/_/_overload_yield/package.json +4 -0
- package/node_modules/@swc/helpers/cjs/_async_generator.cjs +10 -12
- package/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs +11 -7
- package/node_modules/@swc/helpers/cjs/_await_async_generator.cjs +2 -2
- package/node_modules/@swc/helpers/cjs/_overload_yield.cjs +8 -0
- package/node_modules/@swc/helpers/cjs/index.cjs +4 -0
- package/node_modules/@swc/helpers/esm/_async_generator.js +10 -12
- package/node_modules/@swc/helpers/esm/_async_generator_delegate.js +11 -7
- package/node_modules/@swc/helpers/esm/_await_async_generator.js +2 -2
- package/node_modules/@swc/helpers/esm/_overload_yield.js +6 -0
- package/node_modules/@swc/helpers/esm/index.js +1 -0
- package/node_modules/@swc/helpers/package.json +219 -1
- package/node_modules/@swc/helpers/scripts/build.js +15 -3
- package/node_modules/@swc/helpers/src/_overload_yield.mjs +1 -0
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +7 -48
- package/node_modules/@types/node/async_hooks.d.ts +64 -2
- package/node_modules/@types/node/buffer.buffer.d.ts +3 -0
- package/node_modules/@types/node/buffer.d.ts +2 -2
- package/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +8 -9
- package/node_modules/@types/node/diagnostics_channel.d.ts +20 -1
- package/node_modules/@types/node/fs/promises.d.ts +21 -24
- package/node_modules/@types/node/fs.d.ts +93 -9
- package/node_modules/@types/node/globals.d.ts +141 -281
- package/node_modules/@types/node/http.d.ts +22 -1
- package/node_modules/@types/node/http2.d.ts +3 -4
- package/node_modules/@types/node/inspector.d.ts +36 -0
- package/node_modules/@types/node/module.d.ts +25 -0
- package/node_modules/@types/node/net.d.ts +14 -8
- package/node_modules/@types/node/package.json +7 -2
- package/node_modules/@types/node/process.d.ts +22 -0
- package/node_modules/@types/node/querystring.d.ts +2 -3
- package/node_modules/@types/node/readline.d.ts +6 -1
- package/node_modules/@types/node/sqlite.d.ts +36 -13
- package/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/node/test.d.ts +54 -6
- package/node_modules/@types/node/tls.d.ts +34 -1
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +3 -0
- package/node_modules/@types/node/util.d.ts +232 -94
- package/node_modules/@types/node/v8.d.ts +81 -0
- package/node_modules/@types/node/vm.d.ts +20 -5
- package/node_modules/@types/node/zlib.d.ts +167 -36
- package/node_modules/bn.js/README.md +2 -2
- package/node_modules/bn.js/lib/bn.js +1 -0
- package/node_modules/bn.js/package.json +1 -1
- package/node_modules/{jsonparse/README.markdown → camelcase/license} +2 -4
- package/node_modules/jayson/lib/utils.js +11 -8
- package/node_modules/jayson/package.json +10 -7
- package/node_modules/rpc-websockets/node_modules/ws/lib/permessage-deflate.js +14 -0
- package/node_modules/rpc-websockets/node_modules/ws/lib/websocket.js +1 -1
- package/node_modules/rpc-websockets/node_modules/ws/package.json +2 -2
- package/node_modules/stream-chain/LICENSE +11 -0
- package/node_modules/stream-chain/README.md +334 -0
- package/node_modules/stream-chain/defs.js +22 -0
- package/node_modules/stream-chain/index.js +203 -0
- package/node_modules/stream-chain/package.json +31 -0
- package/node_modules/stream-chain/utils/FromIterable.js +94 -0
- package/node_modules/stream-chain/utils/Reduce.js +40 -0
- package/node_modules/stream-chain/utils/asFun.js +85 -0
- package/node_modules/stream-chain/utils/asGen.js +77 -0
- package/node_modules/stream-chain/utils/comp.js +20 -0
- package/node_modules/stream-chain/utils/fold.js +43 -0
- package/node_modules/stream-chain/utils/gen.js +24 -0
- package/node_modules/stream-chain/utils/scan.js +41 -0
- package/node_modules/stream-chain/utils/skip.js +32 -0
- package/node_modules/stream-chain/utils/skipWhile.js +46 -0
- package/node_modules/stream-chain/utils/take.js +39 -0
- package/node_modules/stream-chain/utils/takeWhile.js +47 -0
- package/node_modules/stream-json/Assembler.js +154 -0
- package/node_modules/stream-json/Disassembler.js +209 -0
- package/node_modules/stream-json/Emitter.js +22 -0
- package/node_modules/stream-json/LICENSE +34 -0
- package/node_modules/stream-json/Parser.js +545 -0
- package/node_modules/stream-json/README.md +128 -0
- package/node_modules/stream-json/Stringer.js +153 -0
- package/node_modules/stream-json/filters/Filter.js +130 -0
- package/node_modules/stream-json/filters/FilterBase.js +201 -0
- package/node_modules/stream-json/filters/Ignore.js +24 -0
- package/node_modules/stream-json/filters/Pick.js +58 -0
- package/node_modules/stream-json/filters/Replace.js +115 -0
- package/node_modules/stream-json/index.js +11 -0
- package/node_modules/stream-json/jsonl/Parser.js +131 -0
- package/node_modules/stream-json/jsonl/Stringer.js +29 -0
- package/node_modules/stream-json/package.json +45 -0
- package/node_modules/stream-json/streamers/StreamArray.js +44 -0
- package/node_modules/stream-json/streamers/StreamBase.js +101 -0
- package/node_modules/stream-json/streamers/StreamObject.js +43 -0
- package/node_modules/stream-json/streamers/StreamValues.js +33 -0
- package/node_modules/stream-json/utils/Batch.js +44 -0
- package/node_modules/stream-json/utils/Utf8Stream.js +53 -0
- package/node_modules/stream-json/utils/Verifier.js +485 -0
- package/node_modules/stream-json/utils/emit.js +5 -0
- package/node_modules/stream-json/utils/withParser.js +10 -0
- package/package.json +2 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/bls.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/edwards.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/hash-to-curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/modular.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js +0 -160
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/montgomery.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js +0 -121
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/poseidon.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/tower.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/abstract/weierstrass.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bls12-381.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/bn254.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed25519.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/ed448.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/bls.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/hash-to-curve.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js +0 -157
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/montgomery.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts +0 -39
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js +0 -116
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/poseidon.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/tower.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bls12-381.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/bn254.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed448.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts +0 -5
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js +0 -61
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/jubjub.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js +0 -49
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p256.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js +0 -53
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p384.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts +0 -12
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js +0 -61
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/p521.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts +0 -8
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js +0 -34
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/pasta.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts +0 -5
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js +0 -66
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/jubjub.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js +0 -52
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p256.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts +0 -11
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js +0 -56
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p384.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts +0 -12
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js +0 -64
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/p521.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts +0 -8
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js +0 -37
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/pasta.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.d.ts.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/secp256k1.js.map +0 -1
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/montgomery.ts +0 -196
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/abstract/poseidon.ts +0 -136
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/jubjub.ts +0 -63
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p256.ts +0 -54
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p384.ts +0 -58
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/p521.ts +0 -75
- package/node_modules/@solana/web3.js/node_modules/@noble/curves/src/pasta.ts +0 -39
- package/node_modules/JSONStream/.travis.yml +0 -8
- package/node_modules/JSONStream/LICENSE.APACHE2 +0 -15
- package/node_modules/JSONStream/LICENSE.MIT +0 -24
- package/node_modules/JSONStream/bin.js +0 -12
- package/node_modules/JSONStream/examples/all_docs.js +0 -13
- package/node_modules/JSONStream/index.js +0 -247
- package/node_modules/JSONStream/package.json +0 -40
- package/node_modules/JSONStream/readme.markdown +0 -207
- package/node_modules/JSONStream/test/bool.js +0 -41
- package/node_modules/JSONStream/test/browser.js +0 -18
- package/node_modules/JSONStream/test/destroy_missing.js +0 -27
- package/node_modules/JSONStream/test/doubledot1.js +0 -29
- package/node_modules/JSONStream/test/doubledot2.js +0 -30
- package/node_modules/JSONStream/test/empty.js +0 -44
- package/node_modules/JSONStream/test/error_contents.js +0 -45
- package/node_modules/JSONStream/test/fixtures/all_npm.json +0 -4030
- package/node_modules/JSONStream/test/fixtures/couch_sample.json +0 -18
- package/node_modules/JSONStream/test/fixtures/depth.json +0 -15
- package/node_modules/JSONStream/test/fixtures/error.json +0 -1
- package/node_modules/JSONStream/test/fixtures/header_footer.json +0 -19
- package/node_modules/JSONStream/test/fn.js +0 -39
- package/node_modules/JSONStream/test/gen.js +0 -135
- package/node_modules/JSONStream/test/header_footer.js +0 -55
- package/node_modules/JSONStream/test/issues.js +0 -34
- package/node_modules/JSONStream/test/keys.js +0 -105
- package/node_modules/JSONStream/test/map.js +0 -40
- package/node_modules/JSONStream/test/multiple_objects.js +0 -36
- package/node_modules/JSONStream/test/multiple_objects_error.js +0 -29
- package/node_modules/JSONStream/test/null.js +0 -28
- package/node_modules/JSONStream/test/parsejson.js +0 -29
- package/node_modules/JSONStream/test/run.js +0 -13
- package/node_modules/JSONStream/test/stringify.js +0 -41
- package/node_modules/JSONStream/test/stringify_object.js +0 -47
- package/node_modules/JSONStream/test/test.js +0 -35
- package/node_modules/JSONStream/test/test2.js +0 -29
- package/node_modules/JSONStream/test/two-ways.js +0 -41
- package/node_modules/bigint-buffer/.travis.yml +0 -51
- package/node_modules/bigint-buffer/LICENSE +0 -202
- package/node_modules/bigint-buffer/README.md +0 -121
- package/node_modules/bigint-buffer/binding.gyp +0 -8
- package/node_modules/bigint-buffer/build/Makefile +0 -347
- package/node_modules/bigint-buffer/build/Release/.deps/Release/bigint_buffer.node.d +0 -1
- package/node_modules/bigint-buffer/build/Release/.deps/Release/obj.target/bigint_buffer/src/bigint-buffer.o.d +0 -12
- package/node_modules/bigint-buffer/build/Release/bigint_buffer.node +0 -0
- package/node_modules/bigint-buffer/build/Release/obj.target/bigint_buffer/src/bigint-buffer.o +0 -0
- package/node_modules/bigint-buffer/build/bigint_buffer.target.mk +0 -180
- package/node_modules/bigint-buffer/build/binding.Makefile +0 -6
- package/node_modules/bigint-buffer/build/config.gypi +0 -450
- package/node_modules/bigint-buffer/build/gyp-mac-tool +0 -772
- package/node_modules/bigint-buffer/dist/browser.js +0 -69
- package/node_modules/bigint-buffer/dist/index.bench.d.ts +0 -1
- package/node_modules/bigint-buffer/dist/index.d.ts +0 -27
- package/node_modules/bigint-buffer/dist/index.spec.d.ts +0 -1
- package/node_modules/bigint-buffer/dist/node.js +0 -77
- package/node_modules/bigint-buffer/helper/bigint.d.ts +0 -3
- package/node_modules/bigint-buffer/karma.conf.js +0 -62
- package/node_modules/bigint-buffer/package.json +0 -89
- package/node_modules/bigint-buffer/rollup.config.js +0 -13
- package/node_modules/bigint-buffer/src/bigint-buffer.c +0 -203
- package/node_modules/bigint-buffer/src/index.bench.ts +0 -207
- package/node_modules/bigint-buffer/src/index.spec.ts +0 -288
- package/node_modules/bigint-buffer/src/index.ts +0 -84
- package/node_modules/bigint-buffer/tsconfig.json +0 -19
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -28
- package/node_modules/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -32
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/node_modules/jsonparse/.npmignore +0 -1
- package/node_modules/jsonparse/LICENSE +0 -24
- package/node_modules/jsonparse/bench.js +0 -26
- package/node_modules/jsonparse/examples/twitterfeed.js +0 -30
- package/node_modules/jsonparse/jsonparse.js +0 -413
- package/node_modules/jsonparse/package.json +0 -22
- package/node_modules/jsonparse/samplejson/basic.json +0 -167
- package/node_modules/jsonparse/samplejson/basic2.json +0 -180
- package/node_modules/jsonparse/test/big-token.js +0 -24
- package/node_modules/jsonparse/test/boundary.js +0 -110
- package/node_modules/jsonparse/test/offset.js +0 -67
- package/node_modules/jsonparse/test/primitives.js +0 -57
- package/node_modules/jsonparse/test/surrogate.js +0 -26
- package/node_modules/jsonparse/test/unvalid.js +0 -15
- package/node_modules/jsonparse/test/utf8.js +0 -38
- package/node_modules/regenerator-runtime/LICENSE +0 -21
- package/node_modules/regenerator-runtime/README.md +0 -31
- package/node_modules/regenerator-runtime/package.json +0 -19
- package/node_modules/regenerator-runtime/path.js +0 -11
- package/node_modules/regenerator-runtime/runtime.js +0 -761
- package/node_modules/through/.travis.yml +0 -5
- package/node_modules/through/LICENSE.APACHE2 +0 -15
- package/node_modules/through/LICENSE.MIT +0 -24
- package/node_modules/through/index.js +0 -108
- package/node_modules/through/package.json +0 -36
- package/node_modules/through/readme.markdown +0 -64
- package/node_modules/through/test/async.js +0 -28
- package/node_modules/through/test/auto-destroy.js +0 -30
- package/node_modules/through/test/buffering.js +0 -71
- package/node_modules/through/test/end.js +0 -45
- package/node_modules/through/test/index.js +0 -133
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/LICENSE +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/_shortw_utils.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/_shortw_utils.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.d.ts +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.js +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/index.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/esm/package.json +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.d.ts +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.d.ts.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.js +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/index.js.map +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/index.ts +0 -0
- /package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/package.json +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → @solana/errors/node_modules/chalk}/license +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/index.d.ts +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/index.js +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/package.json +0 -0
- /package/node_modules/{@coral-xyz/anchor/node_modules/camelcase → camelcase}/readme.md +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/CopyrightNotice.txt +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/LICENSE.txt +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/README.md +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/SECURITY.md +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/modules/index.d.ts +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/modules/index.js +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/modules/package.json +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/package.json +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.d.ts +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.es6.html +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.es6.js +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.es6.mjs +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.html +0 -0
- /package/node_modules/{@swc/helpers/node_modules/tslib → tslib}/tslib.js +0 -0
package/node_modules/{@solana/web3.js/node_modules/@noble → @noble}/curves/src/abstract/modular.ts
RENAMED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8
|
+
import { anumber } from '@noble/hashes/utils';
|
|
8
9
|
import {
|
|
9
10
|
bitMask,
|
|
10
11
|
bytesToNumberBE,
|
|
@@ -13,14 +14,12 @@ import {
|
|
|
13
14
|
numberToBytesBE,
|
|
14
15
|
numberToBytesLE,
|
|
15
16
|
validateObject,
|
|
16
|
-
} from './utils.
|
|
17
|
+
} from './utils.ts';
|
|
17
18
|
|
|
18
19
|
// prettier-ignore
|
|
19
20
|
const _0n = BigInt(0), _1n = BigInt(1), _2n = /* @__PURE__ */ BigInt(2), _3n = /* @__PURE__ */ BigInt(3);
|
|
20
21
|
// prettier-ignore
|
|
21
22
|
const _4n = /* @__PURE__ */ BigInt(4), _5n = /* @__PURE__ */ BigInt(5), _8n = /* @__PURE__ */ BigInt(8);
|
|
22
|
-
// prettier-ignore
|
|
23
|
-
const _9n =/* @__PURE__ */ BigInt(9), _16n = /* @__PURE__ */ BigInt(16);
|
|
24
23
|
|
|
25
24
|
// Calculates a modulo b
|
|
26
25
|
export function mod(a: bigint, b: bigint): bigint {
|
|
@@ -30,21 +29,12 @@ export function mod(a: bigint, b: bigint): bigint {
|
|
|
30
29
|
/**
|
|
31
30
|
* Efficiently raise num to power and do modular division.
|
|
32
31
|
* Unsafe in some contexts: uses ladder, so can expose bigint bits.
|
|
33
|
-
*
|
|
32
|
+
* TODO: remove.
|
|
34
33
|
* @example
|
|
35
34
|
* pow(2n, 6n, 11n) // 64n % 11n == 9n
|
|
36
35
|
*/
|
|
37
36
|
export function pow(num: bigint, power: bigint, modulo: bigint): bigint {
|
|
38
|
-
|
|
39
|
-
if (modulo <= _0n) throw new Error('invalid modulus');
|
|
40
|
-
if (modulo === _1n) return _0n;
|
|
41
|
-
let res = _1n;
|
|
42
|
-
while (power > _0n) {
|
|
43
|
-
if (power & _1n) res = (res * num) % modulo;
|
|
44
|
-
num = (num * num) % modulo;
|
|
45
|
-
power >>= _1n;
|
|
46
|
-
}
|
|
47
|
-
return res;
|
|
37
|
+
return FpPow(Field(modulo), num, power);
|
|
48
38
|
}
|
|
49
39
|
|
|
50
40
|
/** Does `x^(2^power)` mod p. `pow2(30, 4)` == `30^(2^4)` */
|
|
@@ -83,138 +73,141 @@ export function invert(number: bigint, modulo: bigint): bigint {
|
|
|
83
73
|
return mod(x, modulo);
|
|
84
74
|
}
|
|
85
75
|
|
|
76
|
+
// Not all roots are possible! Example which will throw:
|
|
77
|
+
// const NUM =
|
|
78
|
+
// n = 72057594037927816n;
|
|
79
|
+
// Fp = Field(BigInt('0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab'));
|
|
80
|
+
function sqrt3mod4<T>(Fp: IField<T>, n: T) {
|
|
81
|
+
const p1div4 = (Fp.ORDER + _1n) / _4n;
|
|
82
|
+
const root = Fp.pow(n, p1div4);
|
|
83
|
+
// Throw if root^2 != n
|
|
84
|
+
if (!Fp.eql(Fp.sqr(root), n)) throw new Error('Cannot find square root');
|
|
85
|
+
return root;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function sqrt5mod8<T>(Fp: IField<T>, n: T) {
|
|
89
|
+
const p5div8 = (Fp.ORDER - _5n) / _8n;
|
|
90
|
+
const n2 = Fp.mul(n, _2n);
|
|
91
|
+
const v = Fp.pow(n2, p5div8);
|
|
92
|
+
const nv = Fp.mul(n, v);
|
|
93
|
+
const i = Fp.mul(Fp.mul(nv, _2n), v);
|
|
94
|
+
const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));
|
|
95
|
+
if (!Fp.eql(Fp.sqr(root), n)) throw new Error('Cannot find square root');
|
|
96
|
+
return root;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// TODO: Commented-out for now. Provide test vectors.
|
|
100
|
+
// Tonelli is too slow for extension fields Fp2.
|
|
101
|
+
// That means we can't use sqrt (c1, c2...) even for initialization constants.
|
|
102
|
+
// if (P % _16n === _9n) return sqrt9mod16;
|
|
103
|
+
// // prettier-ignore
|
|
104
|
+
// function sqrt9mod16<T>(Fp: IField<T>, n: T, p7div16?: bigint) {
|
|
105
|
+
// if (p7div16 === undefined) p7div16 = (Fp.ORDER + BigInt(7)) / _16n;
|
|
106
|
+
// const c1 = Fp.sqrt(Fp.neg(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F
|
|
107
|
+
// const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F
|
|
108
|
+
// const c3 = Fp.sqrt(Fp.neg(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F
|
|
109
|
+
// const c4 = p7div16; // 4. c4 = (q + 7) / 16 # Integer arithmetic
|
|
110
|
+
// let tv1 = Fp.pow(n, c4); // 1. tv1 = x^c4
|
|
111
|
+
// let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1
|
|
112
|
+
// const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1
|
|
113
|
+
// let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1
|
|
114
|
+
// const e1 = Fp.eql(Fp.sqr(tv2), n); // 5. e1 = (tv2^2) == x
|
|
115
|
+
// const e2 = Fp.eql(Fp.sqr(tv3), n); // 6. e2 = (tv3^2) == x
|
|
116
|
+
// tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x
|
|
117
|
+
// tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x
|
|
118
|
+
// const e3 = Fp.eql(Fp.sqr(tv2), n); // 9. e3 = (tv2^2) == x
|
|
119
|
+
// return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2
|
|
120
|
+
// }
|
|
121
|
+
|
|
86
122
|
/**
|
|
87
123
|
* Tonelli-Shanks square root search algorithm.
|
|
88
124
|
* 1. https://eprint.iacr.org/2012/685.pdf (page 12)
|
|
89
125
|
* 2. Square Roots from 1; 24, 51, 10 to Dan Shanks
|
|
90
|
-
* Will start an infinite loop if field order P is not prime.
|
|
91
126
|
* @param P field order
|
|
92
127
|
* @returns function that takes field Fp (created from P) and number n
|
|
93
128
|
*/
|
|
94
129
|
export function tonelliShanks(P: bigint): <T>(Fp: IField<T>, n: T) => T {
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// Step 1: By factoring out powers of 2 from p - 1,
|
|
104
|
-
// find q and s such that p - 1 = q*(2^s) with q odd
|
|
105
|
-
for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++);
|
|
106
|
-
|
|
107
|
-
// Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq
|
|
108
|
-
for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++) {
|
|
109
|
-
// Crash instead of infinity loop, we cannot reasonable count until P.
|
|
110
|
-
if (Z > 1000) throw new Error('Cannot find square root: likely non-prime P');
|
|
130
|
+
// Initialization (precomputation).
|
|
131
|
+
if (P < BigInt(3)) throw new Error('sqrt is not defined for small field');
|
|
132
|
+
// Factor P - 1 = Q * 2^S, where Q is odd
|
|
133
|
+
let Q = P - _1n;
|
|
134
|
+
let S = 0;
|
|
135
|
+
while (Q % _2n === _0n) {
|
|
136
|
+
Q /= _2n;
|
|
137
|
+
S++;
|
|
111
138
|
}
|
|
112
139
|
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
140
|
+
// Find the first quadratic non-residue Z >= 2
|
|
141
|
+
let Z = _2n;
|
|
142
|
+
const _Fp = Field(P);
|
|
143
|
+
while (FpLegendre(_Fp, Z) === 1) {
|
|
144
|
+
// Basic primality test for P. After x iterations, chance of
|
|
145
|
+
// not finding quadratic non-residue is 2^x, so 2^1000.
|
|
146
|
+
if (Z++ > 1000) throw new Error('Cannot find square root: probably non-prime P');
|
|
121
147
|
}
|
|
148
|
+
// Fast-path; usually done before Z, but we do "primality test".
|
|
149
|
+
if (S === 1) return sqrt3mod4;
|
|
122
150
|
|
|
123
151
|
// Slow-path
|
|
152
|
+
// TODO: test on Fp2 and others
|
|
153
|
+
let cc = _Fp.pow(Z, Q); // c = z^Q
|
|
124
154
|
const Q1div2 = (Q + _1n) / _2n;
|
|
125
155
|
return function tonelliSlow<T>(Fp: IField<T>, n: T): T {
|
|
126
|
-
|
|
127
|
-
if
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
let
|
|
132
|
-
let
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
if (Fp.is0(n)) return n;
|
|
157
|
+
// Check if n is a quadratic residue using Legendre symbol
|
|
158
|
+
if (FpLegendre(Fp, n) !== 1) throw new Error('Cannot find square root');
|
|
159
|
+
|
|
160
|
+
// Initialize variables for the main loop
|
|
161
|
+
let M = S;
|
|
162
|
+
let c = Fp.mul(Fp.ONE, cc); // c = z^Q, move cc from field _Fp into field Fp
|
|
163
|
+
let t = Fp.pow(n, Q); // t = n^Q, first guess at the fudge factor
|
|
164
|
+
let R = Fp.pow(n, Q1div2); // R = n^((Q+1)/2), first guess at the square root
|
|
165
|
+
|
|
166
|
+
// Main loop
|
|
167
|
+
// while t != 1
|
|
168
|
+
while (!Fp.eql(t, Fp.ONE)) {
|
|
169
|
+
if (Fp.is0(t)) return Fp.ZERO; // if t=0 return R=0
|
|
170
|
+
let i = 1;
|
|
171
|
+
|
|
172
|
+
// Find the smallest i >= 1 such that t^(2^i) ≡ 1 (mod P)
|
|
173
|
+
let t_tmp = Fp.sqr(t); // t^(2^1)
|
|
174
|
+
while (!Fp.eql(t_tmp, Fp.ONE)) {
|
|
175
|
+
i++;
|
|
176
|
+
t_tmp = Fp.sqr(t_tmp); // t^(2^2)...
|
|
177
|
+
if (i === M) throw new Error('Cannot find square root');
|
|
141
178
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
179
|
+
|
|
180
|
+
// Calculate the exponent for b: 2^(M - i - 1)
|
|
181
|
+
const exponent = _1n << BigInt(M - i - 1); // bigint is important
|
|
182
|
+
const b = Fp.pow(c, exponent); // b = 2^(M - i - 1)
|
|
183
|
+
|
|
184
|
+
// Update variables
|
|
185
|
+
M = i;
|
|
186
|
+
c = Fp.sqr(b); // c = b^2
|
|
187
|
+
t = Fp.mul(t, c); // t = (t * b^2)
|
|
188
|
+
R = Fp.mul(R, b); // R = R*b
|
|
148
189
|
}
|
|
149
|
-
return
|
|
190
|
+
return R;
|
|
150
191
|
};
|
|
151
192
|
}
|
|
152
193
|
|
|
153
194
|
/**
|
|
154
|
-
* Square root for a finite field.
|
|
195
|
+
* Square root for a finite field. Will try optimized versions first:
|
|
155
196
|
*
|
|
156
197
|
* 1. P ≡ 3 (mod 4)
|
|
157
198
|
* 2. P ≡ 5 (mod 8)
|
|
158
|
-
* 3.
|
|
159
|
-
* 4. Tonelli-Shanks algorithm
|
|
199
|
+
* 3. Tonelli-Shanks algorithm
|
|
160
200
|
*
|
|
161
201
|
* Different algorithms can give different roots, it is up to user to decide which one they want.
|
|
162
202
|
* For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).
|
|
163
203
|
*/
|
|
164
204
|
export function FpSqrt(P: bigint): <T>(Fp: IField<T>, n: T) => T {
|
|
165
|
-
// P ≡ 3 (mod 4)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
// const NUM = 72057594037927816n;
|
|
172
|
-
const p1div4 = (P + _1n) / _4n;
|
|
173
|
-
return function sqrt3mod4<T>(Fp: IField<T>, n: T) {
|
|
174
|
-
const root = Fp.pow(n, p1div4);
|
|
175
|
-
// Throw if root**2 != n
|
|
176
|
-
if (!Fp.eql(Fp.sqr(root), n)) throw new Error('Cannot find square root');
|
|
177
|
-
return root;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)
|
|
182
|
-
if (P % _8n === _5n) {
|
|
183
|
-
const c1 = (P - _5n) / _8n;
|
|
184
|
-
return function sqrt5mod8<T>(Fp: IField<T>, n: T) {
|
|
185
|
-
const n2 = Fp.mul(n, _2n);
|
|
186
|
-
const v = Fp.pow(n2, c1);
|
|
187
|
-
const nv = Fp.mul(n, v);
|
|
188
|
-
const i = Fp.mul(Fp.mul(nv, _2n), v);
|
|
189
|
-
const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));
|
|
190
|
-
if (!Fp.eql(Fp.sqr(root), n)) throw new Error('Cannot find square root');
|
|
191
|
-
return root;
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// P ≡ 9 (mod 16)
|
|
196
|
-
if (P % _16n === _9n) {
|
|
197
|
-
// NOTE: tonelli is too slow for bls-Fp2 calculations even on start
|
|
198
|
-
// Means we cannot use sqrt for constants at all!
|
|
199
|
-
//
|
|
200
|
-
// const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F
|
|
201
|
-
// const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F
|
|
202
|
-
// const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F
|
|
203
|
-
// const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic
|
|
204
|
-
// sqrt = (x) => {
|
|
205
|
-
// let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4
|
|
206
|
-
// let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1
|
|
207
|
-
// const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1
|
|
208
|
-
// let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1
|
|
209
|
-
// const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x
|
|
210
|
-
// const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x
|
|
211
|
-
// tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x
|
|
212
|
-
// tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x
|
|
213
|
-
// const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x
|
|
214
|
-
// return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2
|
|
215
|
-
// }
|
|
216
|
-
}
|
|
217
|
-
// Other cases: Tonelli-Shanks algorithm
|
|
205
|
+
// P ≡ 3 (mod 4) => √n = n^((P+1)/4)
|
|
206
|
+
if (P % _4n === _3n) return sqrt3mod4;
|
|
207
|
+
// P ≡ 5 (mod 8) => Atkin algorithm, page 10 of https://eprint.iacr.org/2012/685.pdf
|
|
208
|
+
if (P % _8n === _5n) return sqrt5mod8;
|
|
209
|
+
// P ≡ 9 (mod 16) not implemented, see above
|
|
210
|
+
// Tonelli-Shanks algorithm
|
|
218
211
|
return tonelliShanks(P);
|
|
219
212
|
}
|
|
220
213
|
|
|
@@ -258,7 +251,6 @@ export interface IField<T> {
|
|
|
258
251
|
// NOTE: sgn0 is 'negative in LE', which is same as odd. And negative in LE is kinda strange definition anyway.
|
|
259
252
|
isOdd?(num: T): boolean; // Odd instead of even since we have it for Fp2
|
|
260
253
|
// legendre?(num: T): T;
|
|
261
|
-
pow(lhs: T, power: bigint): T;
|
|
262
254
|
invertBatch: (lst: T[]) => T[];
|
|
263
255
|
toBytes(num: T): Uint8Array;
|
|
264
256
|
fromBytes(bytes: Uint8Array): T;
|
|
@@ -291,17 +283,15 @@ export function validateField<T>(field: IField<T>): IField<T> {
|
|
|
291
283
|
* Same as `pow` but for Fp: non-constant-time.
|
|
292
284
|
* Unsafe in some contexts: uses ladder, so can expose bigint bits.
|
|
293
285
|
*/
|
|
294
|
-
export function FpPow<T>(
|
|
295
|
-
// Should have same speed as pow for bigints
|
|
296
|
-
// TODO: benchmark!
|
|
286
|
+
export function FpPow<T>(Fp: IField<T>, num: T, power: bigint): T {
|
|
297
287
|
if (power < _0n) throw new Error('invalid exponent, negatives unsupported');
|
|
298
|
-
if (power === _0n) return
|
|
288
|
+
if (power === _0n) return Fp.ONE;
|
|
299
289
|
if (power === _1n) return num;
|
|
300
|
-
let p =
|
|
290
|
+
let p = Fp.ONE;
|
|
301
291
|
let d = num;
|
|
302
292
|
while (power > _0n) {
|
|
303
|
-
if (power & _1n) p =
|
|
304
|
-
d =
|
|
293
|
+
if (power & _1n) p = Fp.mul(p, d);
|
|
294
|
+
d = Fp.sqr(d);
|
|
305
295
|
power >>= _1n;
|
|
306
296
|
}
|
|
307
297
|
return p;
|
|
@@ -309,49 +299,58 @@ export function FpPow<T>(f: IField<T>, num: T, power: bigint): T {
|
|
|
309
299
|
|
|
310
300
|
/**
|
|
311
301
|
* Efficiently invert an array of Field elements.
|
|
312
|
-
*
|
|
302
|
+
* Exception-free. Will return `undefined` for 0 elements.
|
|
303
|
+
* @param passZero map 0 to 0 (instead of undefined)
|
|
313
304
|
*/
|
|
314
|
-
export function FpInvertBatch<T>(
|
|
315
|
-
const
|
|
305
|
+
export function FpInvertBatch<T>(Fp: IField<T>, nums: T[], passZero = false): T[] {
|
|
306
|
+
const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : undefined);
|
|
316
307
|
// Walk from first to last, multiply them by each other MOD p
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
319
|
-
|
|
320
|
-
return
|
|
321
|
-
},
|
|
308
|
+
const multipliedAcc = nums.reduce((acc, num, i) => {
|
|
309
|
+
if (Fp.is0(num)) return acc;
|
|
310
|
+
inverted[i] = acc;
|
|
311
|
+
return Fp.mul(acc, num);
|
|
312
|
+
}, Fp.ONE);
|
|
322
313
|
// Invert last element
|
|
323
|
-
const
|
|
314
|
+
const invertedAcc = Fp.inv(multipliedAcc);
|
|
324
315
|
// Walk from last to first, multiply them by inverted each other MOD p
|
|
325
316
|
nums.reduceRight((acc, num, i) => {
|
|
326
|
-
if (
|
|
327
|
-
|
|
328
|
-
return
|
|
329
|
-
},
|
|
330
|
-
return
|
|
317
|
+
if (Fp.is0(num)) return acc;
|
|
318
|
+
inverted[i] = Fp.mul(acc, inverted[i]);
|
|
319
|
+
return Fp.mul(acc, num);
|
|
320
|
+
}, invertedAcc);
|
|
321
|
+
return inverted;
|
|
331
322
|
}
|
|
332
323
|
|
|
333
|
-
|
|
334
|
-
|
|
324
|
+
// TODO: remove
|
|
325
|
+
export function FpDiv<T>(Fp: IField<T>, lhs: T, rhs: T | bigint): T {
|
|
326
|
+
return Fp.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, Fp.ORDER) : Fp.inv(rhs));
|
|
335
327
|
}
|
|
336
328
|
|
|
337
329
|
/**
|
|
338
330
|
* Legendre symbol.
|
|
331
|
+
* Legendre constant is used to calculate Legendre symbol (a | p)
|
|
332
|
+
* which denotes the value of a^((p-1)/2) (mod p).
|
|
333
|
+
*
|
|
339
334
|
* * (a | p) ≡ 1 if a is a square (mod p), quadratic residue
|
|
340
335
|
* * (a | p) ≡ -1 if a is not a square (mod p), quadratic non residue
|
|
341
336
|
* * (a | p) ≡ 0 if a ≡ 0 (mod p)
|
|
342
337
|
*/
|
|
343
|
-
export function FpLegendre
|
|
344
|
-
|
|
345
|
-
|
|
338
|
+
export function FpLegendre<T>(Fp: IField<T>, n: T): -1 | 0 | 1 {
|
|
339
|
+
// We can use 3rd argument as optional cache of this value
|
|
340
|
+
// but seems unneeded for now. The operation is very fast.
|
|
341
|
+
const p1mod2 = (Fp.ORDER - _1n) / _2n;
|
|
342
|
+
const powered = Fp.pow(n, p1mod2);
|
|
343
|
+
const yes = Fp.eql(powered, Fp.ONE);
|
|
344
|
+
const zero = Fp.eql(powered, Fp.ZERO);
|
|
345
|
+
const no = Fp.eql(powered, Fp.neg(Fp.ONE));
|
|
346
|
+
if (!yes && !zero && !no) throw new Error('invalid Legendre symbol result');
|
|
347
|
+
return yes ? 1 : zero ? 0 : -1;
|
|
346
348
|
}
|
|
347
349
|
|
|
348
350
|
// This function returns True whenever the value x is a square in the field F.
|
|
349
|
-
export function FpIsSquare<T>(
|
|
350
|
-
const
|
|
351
|
-
return
|
|
352
|
-
const p = legendre(f, x);
|
|
353
|
-
return f.eql(p, f.ZERO) || f.eql(p, f.ONE);
|
|
354
|
-
};
|
|
351
|
+
export function FpIsSquare<T>(Fp: IField<T>, n: T): boolean {
|
|
352
|
+
const l = FpLegendre(Fp, n);
|
|
353
|
+
return l === 1;
|
|
355
354
|
}
|
|
356
355
|
|
|
357
356
|
// CURVE.n lengths
|
|
@@ -363,6 +362,7 @@ export function nLength(
|
|
|
363
362
|
nByteLength: number;
|
|
364
363
|
} {
|
|
365
364
|
// Bit size, byte size of CURVE.n
|
|
365
|
+
if (nBitLength !== undefined) anumber(nBitLength);
|
|
366
366
|
const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
|
|
367
367
|
const nByteLength = Math.ceil(_nBitLength / 8);
|
|
368
368
|
return { nBitLength: _nBitLength, nByteLength };
|
|
@@ -433,16 +433,17 @@ export function Field(
|
|
|
433
433
|
if (!sqrtP) sqrtP = FpSqrt(ORDER);
|
|
434
434
|
return sqrtP(f, n);
|
|
435
435
|
}),
|
|
436
|
-
invertBatch: (lst) => FpInvertBatch(f, lst),
|
|
437
|
-
// TODO: do we really need constant cmov?
|
|
438
|
-
// We don't have const-time bigints anyway, so probably will be not very useful
|
|
439
|
-
cmov: (a, b, c) => (c ? b : a),
|
|
440
436
|
toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),
|
|
441
437
|
fromBytes: (bytes) => {
|
|
442
438
|
if (bytes.length !== BYTES)
|
|
443
439
|
throw new Error('Field.fromBytes: expected ' + BYTES + ' bytes, got ' + bytes.length);
|
|
444
440
|
return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);
|
|
445
441
|
},
|
|
442
|
+
// TODO: we don't need it here, move out to separate fn
|
|
443
|
+
invertBatch: (lst) => FpInvertBatch(f, lst),
|
|
444
|
+
// We can't move this out because Fp6, Fp12 implement it
|
|
445
|
+
// and it's unclear what to return in there.
|
|
446
|
+
cmov: (a, b, c) => (c ? b : a),
|
|
446
447
|
} as FpField);
|
|
447
448
|
return Object.freeze(f);
|
|
448
449
|
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Montgomery curve methods. It's not really whole montgomery curve,
|
|
3
|
+
* just bunch of very specific methods for X25519 / X448 from
|
|
4
|
+
* [RFC 7748](https://www.rfc-editor.org/rfc/rfc7748)
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8
|
+
import { mod } from './modular.ts';
|
|
9
|
+
import {
|
|
10
|
+
aInRange,
|
|
11
|
+
bytesToNumberLE,
|
|
12
|
+
ensureBytes,
|
|
13
|
+
numberToBytesLE,
|
|
14
|
+
validateObject,
|
|
15
|
+
} from './utils.ts';
|
|
16
|
+
|
|
17
|
+
const _0n = BigInt(0);
|
|
18
|
+
const _1n = BigInt(1);
|
|
19
|
+
const _2n = BigInt(2);
|
|
20
|
+
type Hex = string | Uint8Array;
|
|
21
|
+
|
|
22
|
+
export type CurveType = {
|
|
23
|
+
P: bigint; // finite field prime
|
|
24
|
+
type: 'x25519' | 'x448';
|
|
25
|
+
adjustScalarBytes: (bytes: Uint8Array) => Uint8Array;
|
|
26
|
+
powPminus2: (x: bigint) => bigint;
|
|
27
|
+
randomBytes: (bytesLength?: number) => Uint8Array;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type CurveFn = {
|
|
31
|
+
scalarMult: (scalar: Hex, u: Hex) => Uint8Array;
|
|
32
|
+
scalarMultBase: (scalar: Hex) => Uint8Array;
|
|
33
|
+
getSharedSecret: (privateKeyA: Hex, publicKeyB: Hex) => Uint8Array;
|
|
34
|
+
getPublicKey: (privateKey: Hex) => Uint8Array;
|
|
35
|
+
utils: { randomPrivateKey: () => Uint8Array };
|
|
36
|
+
GuBytes: Uint8Array;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
function validateOpts(curve: CurveType) {
|
|
40
|
+
validateObject(curve, {
|
|
41
|
+
adjustScalarBytes: 'function',
|
|
42
|
+
powPminus2: 'function',
|
|
43
|
+
});
|
|
44
|
+
return Object.freeze({ ...curve } as const);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function montgomery(curveDef: CurveType): CurveFn {
|
|
48
|
+
const CURVE = validateOpts(curveDef);
|
|
49
|
+
const { P, type, adjustScalarBytes, powPminus2 } = CURVE;
|
|
50
|
+
const is25519 = type === 'x25519';
|
|
51
|
+
if (!is25519 && type !== 'x448') throw new Error('invalid type');
|
|
52
|
+
|
|
53
|
+
const montgomeryBits = is25519 ? 255 : 448;
|
|
54
|
+
const fieldLen = is25519 ? 32 : 56;
|
|
55
|
+
const Gu = is25519 ? BigInt(9) : BigInt(5);
|
|
56
|
+
// RFC 7748 #5:
|
|
57
|
+
// The constant a24 is (486662 - 2) / 4 = 121665 for curve25519/X25519 and
|
|
58
|
+
// (156326 - 2) / 4 = 39081 for curve448/X448
|
|
59
|
+
// const a = is25519 ? 156326n : 486662n;
|
|
60
|
+
const a24 = is25519 ? BigInt(121665) : BigInt(39081);
|
|
61
|
+
// RFC: x25519 "the resulting integer is of the form 2^254 plus
|
|
62
|
+
// eight times a value between 0 and 2^251 - 1 (inclusive)"
|
|
63
|
+
// x448: "2^447 plus four times a value between 0 and 2^445 - 1 (inclusive)"
|
|
64
|
+
const minScalar = is25519 ? _2n ** BigInt(254) : _2n ** BigInt(447);
|
|
65
|
+
const maxAdded = is25519
|
|
66
|
+
? BigInt(8) * _2n ** BigInt(251) - _1n
|
|
67
|
+
: BigInt(4) * _2n ** BigInt(445) - _1n;
|
|
68
|
+
const maxScalar = minScalar + maxAdded + _1n; // (inclusive)
|
|
69
|
+
const modP = (n: bigint) => mod(n, P);
|
|
70
|
+
const GuBytes = encodeU(Gu);
|
|
71
|
+
function encodeU(u: bigint): Uint8Array {
|
|
72
|
+
return numberToBytesLE(modP(u), fieldLen);
|
|
73
|
+
}
|
|
74
|
+
function decodeU(u: Hex): bigint {
|
|
75
|
+
const _u = ensureBytes('u coordinate', u, fieldLen);
|
|
76
|
+
// RFC: When receiving such an array, implementations of X25519
|
|
77
|
+
// (but not X448) MUST mask the most significant bit in the final byte.
|
|
78
|
+
if (is25519) _u[31] &= 127; // 0b0111_1111
|
|
79
|
+
// RFC: Implementations MUST accept non-canonical values and process them as
|
|
80
|
+
// if they had been reduced modulo the field prime. The non-canonical
|
|
81
|
+
// values are 2^255 - 19 through 2^255 - 1 for X25519 and 2^448 - 2^224
|
|
82
|
+
// - 1 through 2^448 - 1 for X448.
|
|
83
|
+
return modP(bytesToNumberLE(_u));
|
|
84
|
+
}
|
|
85
|
+
function decodeScalar(scalar: Hex): bigint {
|
|
86
|
+
return bytesToNumberLE(adjustScalarBytes(ensureBytes('scalar', scalar, fieldLen)));
|
|
87
|
+
}
|
|
88
|
+
function scalarMult(scalar: Hex, u: Hex): Uint8Array {
|
|
89
|
+
const pu = montgomeryLadder(decodeU(u), decodeScalar(scalar));
|
|
90
|
+
// Some public keys are useless, of low-order. Curve author doesn't think
|
|
91
|
+
// it needs to be validated, but we do it nonetheless.
|
|
92
|
+
// https://cr.yp.to/ecdh.html#validate
|
|
93
|
+
if (pu === _0n) throw new Error('invalid private or public key received');
|
|
94
|
+
return encodeU(pu);
|
|
95
|
+
}
|
|
96
|
+
// Computes public key from private. By doing scalar multiplication of base point.
|
|
97
|
+
function scalarMultBase(scalar: Hex): Uint8Array {
|
|
98
|
+
return scalarMult(scalar, GuBytes);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// cswap from RFC7748 "example code"
|
|
102
|
+
function cswap(swap: bigint, x_2: bigint, x_3: bigint): { x_2: bigint; x_3: bigint } {
|
|
103
|
+
// dummy = mask(swap) AND (x_2 XOR x_3)
|
|
104
|
+
// Where mask(swap) is the all-1 or all-0 word of the same length as x_2
|
|
105
|
+
// and x_3, computed, e.g., as mask(swap) = 0 - swap.
|
|
106
|
+
const dummy = modP(swap * (x_2 - x_3));
|
|
107
|
+
x_2 = modP(x_2 - dummy); // x_2 = x_2 XOR dummy
|
|
108
|
+
x_3 = modP(x_3 + dummy); // x_3 = x_3 XOR dummy
|
|
109
|
+
return { x_2, x_3 };
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Montgomery x-only multiplication ladder.
|
|
114
|
+
* @param pointU u coordinate (x) on Montgomery Curve 25519
|
|
115
|
+
* @param scalar by which the point would be multiplied
|
|
116
|
+
* @returns new Point on Montgomery curve
|
|
117
|
+
*/
|
|
118
|
+
function montgomeryLadder(u: bigint, scalar: bigint): bigint {
|
|
119
|
+
aInRange('u', u, _0n, P);
|
|
120
|
+
aInRange('scalar', scalar, minScalar, maxScalar);
|
|
121
|
+
const k = scalar;
|
|
122
|
+
const x_1 = u;
|
|
123
|
+
let x_2 = _1n;
|
|
124
|
+
let z_2 = _0n;
|
|
125
|
+
let x_3 = u;
|
|
126
|
+
let z_3 = _1n;
|
|
127
|
+
let swap = _0n;
|
|
128
|
+
for (let t = BigInt(montgomeryBits - 1); t >= _0n; t--) {
|
|
129
|
+
const k_t = (k >> t) & _1n;
|
|
130
|
+
swap ^= k_t;
|
|
131
|
+
({ x_2, x_3 } = cswap(swap, x_2, x_3));
|
|
132
|
+
({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));
|
|
133
|
+
swap = k_t;
|
|
134
|
+
|
|
135
|
+
const A = x_2 + z_2;
|
|
136
|
+
const AA = modP(A * A);
|
|
137
|
+
const B = x_2 - z_2;
|
|
138
|
+
const BB = modP(B * B);
|
|
139
|
+
const E = AA - BB;
|
|
140
|
+
const C = x_3 + z_3;
|
|
141
|
+
const D = x_3 - z_3;
|
|
142
|
+
const DA = modP(D * A);
|
|
143
|
+
const CB = modP(C * B);
|
|
144
|
+
const dacb = DA + CB;
|
|
145
|
+
const da_cb = DA - CB;
|
|
146
|
+
x_3 = modP(dacb * dacb);
|
|
147
|
+
z_3 = modP(x_1 * modP(da_cb * da_cb));
|
|
148
|
+
x_2 = modP(AA * BB);
|
|
149
|
+
z_2 = modP(E * (AA + modP(a24 * E)));
|
|
150
|
+
}
|
|
151
|
+
({ x_2, x_3 } = cswap(swap, x_2, x_3));
|
|
152
|
+
({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));
|
|
153
|
+
const z2 = powPminus2(z_2); // `Fp.pow(x, P - _2n)` is much slower equivalent
|
|
154
|
+
return modP(x_2 * z2); // Return x_2 * (z_2^(p - 2))
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
scalarMult,
|
|
159
|
+
scalarMultBase,
|
|
160
|
+
getSharedSecret: (privateKey: Hex, publicKey: Hex) => scalarMult(privateKey, publicKey),
|
|
161
|
+
getPublicKey: (privateKey: Hex): Uint8Array => scalarMultBase(privateKey),
|
|
162
|
+
utils: { randomPrivateKey: () => CURVE.randomBytes!(fieldLen) },
|
|
163
|
+
GuBytes: GuBytes.slice(),
|
|
164
|
+
};
|
|
165
|
+
}
|