@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
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# stream-chain [![NPM version][npm-img]][npm-url]
|
|
2
|
+
|
|
3
|
+
[npm-img]: https://img.shields.io/npm/v/stream-chain.svg
|
|
4
|
+
[npm-url]: https://npmjs.org/package/stream-chain
|
|
5
|
+
|
|
6
|
+
`stream-chain` creates a chain of streams out of regular functions, asynchronous functions, generator functions, and existing streams, while properly handling [backpressure](https://nodejs.org/en/docs/guides/backpressuring-in-streams/). The resulting chain is represented as a [Duplex](https://nodejs.org/api/stream.html#stream_class_stream_duplex) stream, which can be combined with other streams the usual way. It eliminates a boilerplate helping to concentrate on functionality without losing the performance especially make it easy to build object mode data processing pipelines.
|
|
7
|
+
|
|
8
|
+
Originally `stream-chain` was used internally with [stream-fork](https://www.npmjs.com/package/stream-fork) and [stream-json](https://www.npmjs.com/package/stream-json) to create flexible data processing pipelines.
|
|
9
|
+
|
|
10
|
+
`stream-chain` is a lightweight, no-dependencies micro-package. It is distributed under New BSD license.
|
|
11
|
+
|
|
12
|
+
## Intro
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
const Chain = require('stream-chain');
|
|
16
|
+
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
const zlib = require('zlib');
|
|
19
|
+
const {Transform} = require('stream');
|
|
20
|
+
|
|
21
|
+
// the chain will work on a stream of number objects
|
|
22
|
+
const chain = new Chain([
|
|
23
|
+
// transforms a value
|
|
24
|
+
x => x * x,
|
|
25
|
+
// returns several values
|
|
26
|
+
x => [x - 1, x, x + 1],
|
|
27
|
+
// waits for an asynchronous operation
|
|
28
|
+
async x => await getTotalFromDatabaseByKey(x),
|
|
29
|
+
// returns multiple values with a generator
|
|
30
|
+
function* (x) {
|
|
31
|
+
for (let i = x; i > 0; --i) {
|
|
32
|
+
yield i;
|
|
33
|
+
}
|
|
34
|
+
return 0;
|
|
35
|
+
},
|
|
36
|
+
// filters out even values
|
|
37
|
+
x => x % 2 ? x : null,
|
|
38
|
+
// uses an arbitrary transform stream
|
|
39
|
+
new Transform({
|
|
40
|
+
writableObjectMode: true,
|
|
41
|
+
transform(x, _, callback) {
|
|
42
|
+
// transform to text
|
|
43
|
+
callback(null, x.toString());
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
46
|
+
// compress
|
|
47
|
+
zlib.createGzip()
|
|
48
|
+
]);
|
|
49
|
+
// log errors
|
|
50
|
+
chain.on('error', error => console.log(error));
|
|
51
|
+
// use the chain, and save the result to a file
|
|
52
|
+
dataSource.pipe(chain).pipe(fs.createWriteStream('output.txt.gz'));
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Making processing pipelines appears to be easy: just chain functions one after another, and we are done. Real life pipelines filter objects out and/or produce more objects out of a few ones. On top of that we have to deal with asynchronous operations, while processing or producing data: networking, databases, files, user responses, and so on. Unequal number of values per stage, and unequal throughput of stages introduced problems like [backpressure](https://nodejs.org/en/docs/guides/backpressuring-in-streams/), which requires algorithms implemented by [streams](https://nodejs.org/api/stream.html).
|
|
56
|
+
|
|
57
|
+
While a lot of API improvements were made to make streams easy to use, in reality, a lot of boilerplate is required when creating a pipeline. `stream-chain` eliminates most of it.
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm i --save stream-chain
|
|
63
|
+
# or: yarn add stream-chain
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
`Chain`, which is returned by `require('stream-chain')`, is based on [Duplex](https://nodejs.org/api/stream.html#stream_class_stream_duplex). It chains its dependents in a single pipeline optionally binding `error` events.
|
|
69
|
+
|
|
70
|
+
Many details about this package can be discovered by looking at test files located in `tests/` and in the source code (`index.js`).
|
|
71
|
+
|
|
72
|
+
### Constructor: `new Chain(fns[, options])`
|
|
73
|
+
|
|
74
|
+
The constructor accepts the following arguments:
|
|
75
|
+
|
|
76
|
+
* `fns` is an array of functions arrays or stream instances.
|
|
77
|
+
* If a value is a function, a [Transform](https://nodejs.org/api/stream.html#stream_class_stream_transform) stream is created, which calls this function with two parameters: `chunk` (an object), and an optional `encoding`. See [Node's documentation](https://nodejs.org/api/stream.html#stream_transform_transform_chunk_encoding_callback) for more details on those parameters. The function will be called in the context of the created stream.
|
|
78
|
+
* If it is a regular function, it can return:
|
|
79
|
+
* Regular value:
|
|
80
|
+
* *(deprecated since 2.1.0)* Array of values to pass several or zero values to the next stream as they are.
|
|
81
|
+
```js
|
|
82
|
+
// produces no values:
|
|
83
|
+
x => []
|
|
84
|
+
// produces two values:
|
|
85
|
+
x => [x, x + 1]
|
|
86
|
+
// produces one array value:
|
|
87
|
+
x => [[x, x + 1]]
|
|
88
|
+
```
|
|
89
|
+
* Single value.
|
|
90
|
+
* If it is `undefined` or `null`, no value shall be passed.
|
|
91
|
+
* Otherwise, the value will be passed to the next stream.
|
|
92
|
+
```js
|
|
93
|
+
// produces no values:
|
|
94
|
+
x => null
|
|
95
|
+
x => undefined
|
|
96
|
+
// produces one value:
|
|
97
|
+
x => x
|
|
98
|
+
```
|
|
99
|
+
* Special value:
|
|
100
|
+
* If it is an instance of [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or "thenable" (an object with a method called `then()`), it will be waited for. Its result should be a regular value.
|
|
101
|
+
```js
|
|
102
|
+
// delays by 0.5s:
|
|
103
|
+
x => new Promise(
|
|
104
|
+
resolve => setTimeout(() => resolve(x), 500))
|
|
105
|
+
```
|
|
106
|
+
* If it is an instance of a generator or "nextable" (an object with a method called `next()`), it will be iterated according to the [generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator) protocol. The results should be regular values.
|
|
107
|
+
```js
|
|
108
|
+
// produces multiple values:
|
|
109
|
+
class Nextable {
|
|
110
|
+
constructor(x) {
|
|
111
|
+
this.x = x;
|
|
112
|
+
this.i = -1;
|
|
113
|
+
}
|
|
114
|
+
next() {
|
|
115
|
+
return {
|
|
116
|
+
done: this.i <= 1,
|
|
117
|
+
value: this.x + this.i++
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
x => new Nextable(x)
|
|
122
|
+
```
|
|
123
|
+
`next()` can return a `Promise` according to the [asynchronous generator](https://zaiste.net/nodejs_10_asynchronous_iteration_async_generators/) protocol.
|
|
124
|
+
* Any thrown exception will be caught and passed to a callback function effectively generating an error event.
|
|
125
|
+
```js
|
|
126
|
+
// fails
|
|
127
|
+
x => { throw new Error('Bad!'); }
|
|
128
|
+
```
|
|
129
|
+
* If it is an asynchronous function, it can return a regular value.
|
|
130
|
+
* In essence, it is covered under "special values" as a function that returns a promise.
|
|
131
|
+
```js
|
|
132
|
+
// delays by 0.5s:
|
|
133
|
+
async x => {
|
|
134
|
+
await new Promise(resolve => setTimeout(() => resolve(), 500));
|
|
135
|
+
return x;
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
* If it is a generator function, each yield should produce a regular value.
|
|
139
|
+
* In essence, it is covered under "special values" as a function that returns a generator object.
|
|
140
|
+
```js
|
|
141
|
+
// produces multiple values:
|
|
142
|
+
function* (x) {
|
|
143
|
+
for (let i = -1; i <= 1; ++i) {
|
|
144
|
+
if (i) yield x + i;
|
|
145
|
+
}
|
|
146
|
+
return x;
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
* *(since 2.2.0)* If it is an asynchronous generator function, each yield should produce a regular value.
|
|
150
|
+
* In essence, it is covered under "special values" as a function that returns a generator object.
|
|
151
|
+
```js
|
|
152
|
+
// produces multiple values:
|
|
153
|
+
async function* (x) {
|
|
154
|
+
for (let i = -1; i <= 1; ++i) {
|
|
155
|
+
if (i) {
|
|
156
|
+
await new Promise(resolve => setTimeout(() => resolve(), 50));
|
|
157
|
+
yield x + i;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return x;
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
* *(since 2.1.0)* If a value is an array, it is assumed to be an array of regular functions.
|
|
164
|
+
Their values are passed in a chain. All values (including `null`, `undefined`, and arrays) are allowed
|
|
165
|
+
and passed without modifications. The last value is a subject to processing defined above for regular functions.
|
|
166
|
+
* Empty arrays are ignored.
|
|
167
|
+
* If any function returns a value produced by `Chain.final(value)` (see below), it terminates the chain using
|
|
168
|
+
`value` as the final value of the chain.
|
|
169
|
+
* This feature bypasses streams. It is implemented for performance reasons.
|
|
170
|
+
* If a value is a valid stream, it is included as is in the pipeline.
|
|
171
|
+
* [Transform](https://nodejs.org/api/stream.html#stream_class_stream_transform).
|
|
172
|
+
* [Duplex](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
|
|
173
|
+
* The very first stream can be [Readable](https://nodejs.org/api/stream.html#stream_class_stream_readable).
|
|
174
|
+
* In this case a `Chain` instance ignores all possible writes to the front, and ends when the first stream ends.
|
|
175
|
+
* The very last stream can be [Writable](https://nodejs.org/api/stream.html#stream_class_stream_writable).
|
|
176
|
+
* In this case a `Chain` instance does not produce any output, and finishes when the last stream finishes.
|
|
177
|
+
* Because `'data'` event is not used in this case, the instance resumes itself automatically. Read about it in Node's documentation:
|
|
178
|
+
* [Two modes](https://nodejs.org/api/stream.html#stream_two_modes).
|
|
179
|
+
* [readable.resume()](https://nodejs.org/api/stream.html#stream_readable_resume).
|
|
180
|
+
* `options` is an optional object detailed in the [Node's documentation](https://nodejs.org/api/stream.html#stream_new_stream_duplex_options).
|
|
181
|
+
* If `options` is not specified, or falsy, it is assumed to be:
|
|
182
|
+
```js
|
|
183
|
+
{writableObjectMode: true, readableObjectMode: true}
|
|
184
|
+
```
|
|
185
|
+
* Always make sure that `writableObjectMode` is the same as the corresponding object mode of the first stream, and `readableObjectMode` is the same as the corresponding object mode of the last stream.
|
|
186
|
+
* Eventually both these modes can be deduced, but Node does not define the standard way to determine it, so currently it cannot be done reliably.
|
|
187
|
+
* Additionally the following custom properties are recognized:
|
|
188
|
+
* `skipEvents` is an optional flag. If it is falsy (the default), `'error'` events from all streams are forwarded to the created instance. If it is truthy, no event forwarding is made. A user can always do so externally or in a constructor of derived classes.
|
|
189
|
+
|
|
190
|
+
An instance can be used to attach handlers for stream events.
|
|
191
|
+
|
|
192
|
+
```js
|
|
193
|
+
const chain = new Chain([x => x * x, x => [x - 1, x, x + 1]]);
|
|
194
|
+
chain.on('error', error => console.error(error));
|
|
195
|
+
dataSource.pipe(chain);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Properties
|
|
199
|
+
|
|
200
|
+
Following public properties are available:
|
|
201
|
+
|
|
202
|
+
* `streams` is an array of streams created by a constructor. Its values either [Transform](https://nodejs.org/api/stream.html#stream_class_stream_transform) streams that use corresponding functions from a constructor parameter, or user-provided streams. All streams are piped sequentially starting from the beginning.
|
|
203
|
+
* `input` is the beginning of the pipeline. Effectively it is the first item of `streams`.
|
|
204
|
+
* `output` is the end of the pipeline. Effectively it is the last item of `streams`.
|
|
205
|
+
|
|
206
|
+
Generally, a `Chain` instance should be used to represent a chain:
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
const chain = new Chain([
|
|
210
|
+
x => x * x,
|
|
211
|
+
x => [x - 1, x, x + 1],
|
|
212
|
+
new Transform({
|
|
213
|
+
writableObjectMode: true,
|
|
214
|
+
transform(chunk, _, callback) {
|
|
215
|
+
callback(null, chunk.toString());
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
]);
|
|
219
|
+
dataSource
|
|
220
|
+
.pipe(chain);
|
|
221
|
+
.pipe(zlib.createGzip())
|
|
222
|
+
.pipe(fs.createWriteStream('output.txt.gz'));
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
But in some cases `input` and `output` provide a better control over how a data processing pipeline should be organized:
|
|
226
|
+
|
|
227
|
+
```js
|
|
228
|
+
chain.output
|
|
229
|
+
.pipe(zlib.createGzip())
|
|
230
|
+
.pipe(fs.createWriteStream('output.txt.gz'));
|
|
231
|
+
dataSource.pipe(chain.input);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Please select what style you want to use, and never mix them together with the same object.
|
|
235
|
+
|
|
236
|
+
### Static methods
|
|
237
|
+
|
|
238
|
+
Following static methods are available:
|
|
239
|
+
|
|
240
|
+
* `chain(fns[, options)` is a helper factory function, which has the same arguments as the constructor and returns a `Chain` instance.
|
|
241
|
+
```js
|
|
242
|
+
const {chain} = require('stream-chain');
|
|
243
|
+
|
|
244
|
+
// simple
|
|
245
|
+
dataSource
|
|
246
|
+
.pipe(chain([x => x * x, x => [x - 1, x, x + 1]]));
|
|
247
|
+
|
|
248
|
+
// all inclusive
|
|
249
|
+
chain([
|
|
250
|
+
dataSource,
|
|
251
|
+
x => x * x,
|
|
252
|
+
x => [x - 1, x, x + 1],
|
|
253
|
+
zlib.createGzip(),
|
|
254
|
+
fs.createWriteStream('output.txt.gz')
|
|
255
|
+
])
|
|
256
|
+
```
|
|
257
|
+
* *(since 2.1.0)* `final(value)` is a helper factory function, which can be used in by chained functions (see above the array of functions).
|
|
258
|
+
It returns a special value, which terminates the chain and uses the passed value as the result of the chain.
|
|
259
|
+
```js
|
|
260
|
+
const {chain, final} = require('stream-chain');
|
|
261
|
+
|
|
262
|
+
// simple
|
|
263
|
+
dataSource
|
|
264
|
+
.pipe(chain([[x => x * x, x => 2 * x + 1]]));
|
|
265
|
+
// faster than [x => x * x, x => 2 * x + 1]
|
|
266
|
+
|
|
267
|
+
// final
|
|
268
|
+
dataSource
|
|
269
|
+
.pipe(chain([[
|
|
270
|
+
x => x * x,
|
|
271
|
+
x => final(x),
|
|
272
|
+
x => 2 * x + 1
|
|
273
|
+
]]));
|
|
274
|
+
// the same as [[x => x * x, x => x]]
|
|
275
|
+
// the same as [[x => x * x]]
|
|
276
|
+
// the same as [x => x * x]
|
|
277
|
+
|
|
278
|
+
// final as a terminator
|
|
279
|
+
dataSource
|
|
280
|
+
.pipe(chain([[
|
|
281
|
+
x => x * x,
|
|
282
|
+
x => final(),
|
|
283
|
+
x => 2 * x + 1
|
|
284
|
+
]]));
|
|
285
|
+
// produces no values, because the final value is undefined,
|
|
286
|
+
// which is interpreted as "no value shall be passed"
|
|
287
|
+
// see the doc above
|
|
288
|
+
|
|
289
|
+
// final() as a filter
|
|
290
|
+
dataSource
|
|
291
|
+
.pipe(chain([[
|
|
292
|
+
x => x * x,
|
|
293
|
+
x => x % 2 ? final() : x,
|
|
294
|
+
x => 2 * x + 1
|
|
295
|
+
]]));
|
|
296
|
+
// only even values are passed, odd values are ignored
|
|
297
|
+
|
|
298
|
+
// if you want to be really performant...
|
|
299
|
+
const none = final();
|
|
300
|
+
dataSource
|
|
301
|
+
.pipe(chain([[
|
|
302
|
+
x => x * x,
|
|
303
|
+
x => x % 2 ? none : x,
|
|
304
|
+
x => 2 * x + 1
|
|
305
|
+
]]));
|
|
306
|
+
```
|
|
307
|
+
* *(since 2.1.0)* `many(array)` is a helper factory function, which is used to wrap arrays to be interpreted as multiple values returned from a function.
|
|
308
|
+
At the moment it is redundant: you can use a simple array to indicate that, but a naked array is being deprecated and in future versions it will be passed as is.
|
|
309
|
+
The thinking is that using `many()` is better indicates the intention. Additionally, in the future versions it will be used by array of functions (see above).
|
|
310
|
+
```js
|
|
311
|
+
const {chain, many} = require('stream-chain');
|
|
312
|
+
|
|
313
|
+
dataSource
|
|
314
|
+
.pipe(chain([x => many([x, x + 1, x + 2])]));
|
|
315
|
+
// currently the same as [x => [x, x + 1, x + 2]]
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Release History
|
|
319
|
+
|
|
320
|
+
- 2.2.5 *Relaxed the definition of a stream (thx [Rich Hodgkins](https://github.com/rhodgkins)).*
|
|
321
|
+
- 2.2.4 *Bugfix: wrong `const`-ness in the async generator branch (thx [Patrick Pang](https://github.com/patrickpang)).*
|
|
322
|
+
- 2.2.3 *Technical release. No need to upgrade.*
|
|
323
|
+
- 2.2.2 *Technical release. No need to upgrade.*
|
|
324
|
+
- 2.2.1 *Technical release: new symbols namespace, explicit license (thx [Keen Yee Liau](https://github.com/kyliau)), added Greenkeeper.*
|
|
325
|
+
- 2.2.0 *Added utilities: `take`, `takeWhile`, `skip`, `skipWhile`, `fold`, `scan`, `Reduce`, `comp`.*
|
|
326
|
+
- 2.1.0 *Added simple transducers, dropped Node 6.*
|
|
327
|
+
- 2.0.3 *Added TypeScript typings and the badge.*
|
|
328
|
+
- 2.0.2 *Workaround for Node 6: use `'finish'` event instead of `_final()`.*
|
|
329
|
+
- 2.0.1 *Improved documentation.*
|
|
330
|
+
- 2.0.0 *Upgraded to use Duplex instead of EventEmitter as the base.*
|
|
331
|
+
- 1.0.3 *Improved documentation.*
|
|
332
|
+
- 1.0.2 *Better README.*
|
|
333
|
+
- 1.0.1 *Fixed the README.*
|
|
334
|
+
- 1.0.0 *The initial release.*
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const none = Symbol.for('object-stream.none');
|
|
4
|
+
const finalSymbol = Symbol.for('object-stream.final');
|
|
5
|
+
const manySymbol = Symbol.for('object-stream.many');
|
|
6
|
+
|
|
7
|
+
const final = value => ({[finalSymbol]: value});
|
|
8
|
+
const many = values => ({[manySymbol]: values});
|
|
9
|
+
|
|
10
|
+
const isFinal = o => o && typeof o == 'object' && finalSymbol in o;
|
|
11
|
+
const isMany = o => o && typeof o == 'object' && manySymbol in o;
|
|
12
|
+
|
|
13
|
+
const getFinalValue = o => o[finalSymbol];
|
|
14
|
+
const getManyValues = o => o[manySymbol];
|
|
15
|
+
|
|
16
|
+
module.exports.none = none;
|
|
17
|
+
module.exports.final = final;
|
|
18
|
+
module.exports.isFinal = isFinal;
|
|
19
|
+
module.exports.getFinalValue = getFinalValue;
|
|
20
|
+
module.exports.many = many;
|
|
21
|
+
module.exports.isMany = isMany;
|
|
22
|
+
module.exports.getManyValues = getManyValues;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {Readable, Writable, Duplex, Transform} = require('stream');
|
|
4
|
+
|
|
5
|
+
const none = Symbol.for('object-stream.none');
|
|
6
|
+
const finalSymbol = Symbol.for('object-stream.final');
|
|
7
|
+
const manySymbol = Symbol.for('object-stream.many');
|
|
8
|
+
|
|
9
|
+
const final = value => ({[finalSymbol]: value});
|
|
10
|
+
const many = values => ({[manySymbol]: values});
|
|
11
|
+
|
|
12
|
+
const isFinal = o => o && typeof o == 'object' && finalSymbol in o;
|
|
13
|
+
const isMany = o => o && typeof o == 'object' && manySymbol in o;
|
|
14
|
+
|
|
15
|
+
const getFinalValue = o => o[finalSymbol];
|
|
16
|
+
const getManyValues = o => o[manySymbol];
|
|
17
|
+
|
|
18
|
+
const runAsyncGenerator = async (gen, stream) => {
|
|
19
|
+
for (;;) {
|
|
20
|
+
let data = gen.next();
|
|
21
|
+
if (data && typeof data.then == 'function') {
|
|
22
|
+
data = await data;
|
|
23
|
+
}
|
|
24
|
+
if (data.done) break;
|
|
25
|
+
let value = data.value;
|
|
26
|
+
if (value && typeof value.then == 'function') {
|
|
27
|
+
value = await value;
|
|
28
|
+
}
|
|
29
|
+
Chain.sanitize(value, stream);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const wrapFunction = fn =>
|
|
34
|
+
new Transform({
|
|
35
|
+
writableObjectMode: true,
|
|
36
|
+
readableObjectMode: true,
|
|
37
|
+
transform(chunk, encoding, callback) {
|
|
38
|
+
try {
|
|
39
|
+
const result = fn.call(this, chunk, encoding);
|
|
40
|
+
if (result && typeof result.then == 'function') {
|
|
41
|
+
// thenable
|
|
42
|
+
result.then(
|
|
43
|
+
result => (Chain.sanitize(result, this), callback(null)),
|
|
44
|
+
error => callback(error)
|
|
45
|
+
);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (result && typeof result.next == 'function') {
|
|
49
|
+
// generator
|
|
50
|
+
runAsyncGenerator(result, this).then(
|
|
51
|
+
() => callback(null),
|
|
52
|
+
error => callback(error)
|
|
53
|
+
);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
Chain.sanitize(result, this);
|
|
57
|
+
callback(null);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
callback(error);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const wrapArray = fns =>
|
|
65
|
+
new Transform({
|
|
66
|
+
writableObjectMode: true,
|
|
67
|
+
readableObjectMode: true,
|
|
68
|
+
transform(chunk, encoding, callback) {
|
|
69
|
+
try {
|
|
70
|
+
let value = chunk;
|
|
71
|
+
for (let i = 0; i < fns.length; ++i) {
|
|
72
|
+
const result = fns[i].call(this, value, encoding);
|
|
73
|
+
if (result === Chain.none) {
|
|
74
|
+
callback(null);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (Chain.isFinal(result)) {
|
|
78
|
+
value = Chain.getFinalValue(result);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
value = result;
|
|
82
|
+
}
|
|
83
|
+
Chain.sanitize(value, this);
|
|
84
|
+
callback(null);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
callback(error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// is*NodeStream functions taken from https://github.com/nodejs/node/blob/master/lib/internal/streams/utils.js
|
|
92
|
+
const isReadableNodeStream = obj =>
|
|
93
|
+
obj &&
|
|
94
|
+
typeof obj.pipe === 'function' &&
|
|
95
|
+
typeof obj.on === 'function' &&
|
|
96
|
+
(!obj._writableState || (typeof obj._readableState === 'object' ? obj._readableState.readable : null) !== false) && // Duplex
|
|
97
|
+
(!obj._writableState || obj._readableState); // Writable has .pipe.
|
|
98
|
+
|
|
99
|
+
const isWritableNodeStream = obj =>
|
|
100
|
+
obj &&
|
|
101
|
+
typeof obj.write === 'function' &&
|
|
102
|
+
typeof obj.on === 'function' &&
|
|
103
|
+
(!obj._readableState || (typeof obj._writableState === 'object' ? obj._writableState.writable : null) !== false); // Duplex
|
|
104
|
+
|
|
105
|
+
const isDuplexNodeStream = obj =>
|
|
106
|
+
obj && typeof obj.pipe === 'function' && obj._readableState && typeof obj.on === 'function' && typeof obj.write === 'function';
|
|
107
|
+
|
|
108
|
+
class Chain extends Duplex {
|
|
109
|
+
constructor(fns, options) {
|
|
110
|
+
super(options || {writableObjectMode: true, readableObjectMode: true});
|
|
111
|
+
|
|
112
|
+
if (!(fns instanceof Array) || !fns.length) {
|
|
113
|
+
throw Error("Chain's argument should be a non-empty array.");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
this.streams = fns
|
|
117
|
+
.filter(fn => fn)
|
|
118
|
+
.map((fn, index, fns) => {
|
|
119
|
+
if (typeof fn === 'function' || fn instanceof Array) return Chain.convertToTransform(fn);
|
|
120
|
+
if (isDuplexNodeStream(fn) || (!index && isReadableNodeStream(fn)) || (index === fns.length - 1 && isWritableNodeStream(fn))) {
|
|
121
|
+
return fn;
|
|
122
|
+
}
|
|
123
|
+
throw Error('Arguments should be functions, arrays or streams.');
|
|
124
|
+
})
|
|
125
|
+
.filter(s => s);
|
|
126
|
+
this.input = this.streams[0];
|
|
127
|
+
this.output = this.streams.reduce((output, stream) => (output && output.pipe(stream)) || stream);
|
|
128
|
+
|
|
129
|
+
if (!isWritableNodeStream(this.input)) {
|
|
130
|
+
this._write = (_1, _2, callback) => callback(null);
|
|
131
|
+
this._final = callback => callback(null); // unavailable in Node 6
|
|
132
|
+
this.input.on('end', () => this.end());
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (isReadableNodeStream(this.output)) {
|
|
136
|
+
this.output.on('data', chunk => !this.push(chunk) && this.output.pause());
|
|
137
|
+
this.output.on('end', () => this.push(null));
|
|
138
|
+
} else {
|
|
139
|
+
this._read = () => {}; // nop
|
|
140
|
+
this.resume();
|
|
141
|
+
this.output.on('finish', () => this.push(null));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// connect events
|
|
145
|
+
if (!options || !options.skipEvents) {
|
|
146
|
+
this.streams.forEach(stream => stream.on('error', error => this.emit('error', error)));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
_write(chunk, encoding, callback) {
|
|
150
|
+
let error = null;
|
|
151
|
+
try {
|
|
152
|
+
this.input.write(chunk, encoding, e => callback(e || error));
|
|
153
|
+
} catch (e) {
|
|
154
|
+
error = e;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
_final(callback) {
|
|
158
|
+
let error = null;
|
|
159
|
+
try {
|
|
160
|
+
this.input.end(null, null, e => callback(e || error));
|
|
161
|
+
} catch (e) {
|
|
162
|
+
error = e;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
_read() {
|
|
166
|
+
this.output.resume();
|
|
167
|
+
}
|
|
168
|
+
static make(fns, options) {
|
|
169
|
+
return new Chain(fns, options);
|
|
170
|
+
}
|
|
171
|
+
static sanitize(result, stream) {
|
|
172
|
+
if (Chain.isFinal(result)) {
|
|
173
|
+
result = Chain.getFinalValue(result);
|
|
174
|
+
} else if (Chain.isMany(result)) {
|
|
175
|
+
result = Chain.getManyValues(result);
|
|
176
|
+
}
|
|
177
|
+
if (result !== undefined && result !== null && result !== Chain.none) {
|
|
178
|
+
if (result instanceof Array) {
|
|
179
|
+
result.forEach(value => value !== undefined && value !== null && stream.push(value));
|
|
180
|
+
} else {
|
|
181
|
+
stream.push(result);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
static convertToTransform(fn) {
|
|
186
|
+
if (typeof fn === 'function') return wrapFunction(fn);
|
|
187
|
+
if (fn instanceof Array) return fn.length ? wrapArray(fn) : null;
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
Chain.none = none;
|
|
193
|
+
Chain.final = final;
|
|
194
|
+
Chain.isFinal = isFinal;
|
|
195
|
+
Chain.getFinalValue = getFinalValue;
|
|
196
|
+
Chain.many = many;
|
|
197
|
+
Chain.isMany = isMany;
|
|
198
|
+
Chain.getManyValues = getManyValues;
|
|
199
|
+
|
|
200
|
+
Chain.chain = Chain.make;
|
|
201
|
+
Chain.make.Constructor = Chain;
|
|
202
|
+
|
|
203
|
+
module.exports = Chain;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stream-chain",
|
|
3
|
+
"version": "2.2.5",
|
|
4
|
+
"description": "Chain functions as transform streams.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"debug": "node --inspect-brk tests/tests.js",
|
|
8
|
+
"test": "node tests/tests.js"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/uhop/stream-chain.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"stream",
|
|
16
|
+
"chain"
|
|
17
|
+
],
|
|
18
|
+
"author": "Eugene Lazutkin <eugene.lazutkin@gmail.com> (http://lazutkin.com/)",
|
|
19
|
+
"license": "BSD-3-Clause",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/uhop/stream-chain/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/uhop/stream-chain#readme",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"heya-unit": "^0.3.0"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"/*.js",
|
|
29
|
+
"/utils"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {Readable} = require('stream');
|
|
4
|
+
|
|
5
|
+
class FromIterable extends Readable {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(Object.assign({}, options, {objectMode: true}));
|
|
8
|
+
this._iterable = null;
|
|
9
|
+
this._next = null;
|
|
10
|
+
if (options) {
|
|
11
|
+
'iterable' in options && (this._iterable = options.iterable);
|
|
12
|
+
}
|
|
13
|
+
!this._iterable && (this._read = this._readStop);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
_read() {
|
|
17
|
+
if (Symbol.asyncIterator && typeof this._iterable[Symbol.asyncIterator] == 'function') {
|
|
18
|
+
this._next = this._iterable[Symbol.asyncIterator]();
|
|
19
|
+
this._iterable = null;
|
|
20
|
+
this._read = this._readNext;
|
|
21
|
+
this._readNext();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (Symbol.iterator && typeof this._iterable[Symbol.iterator] == 'function') {
|
|
25
|
+
this._next = this._iterable[Symbol.iterator]();
|
|
26
|
+
this._iterable = null;
|
|
27
|
+
this._read = this._readNext;
|
|
28
|
+
this._readNext();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (typeof this._iterable.next == 'function') {
|
|
32
|
+
this._next = this._iterable;
|
|
33
|
+
this._iterable = null;
|
|
34
|
+
this._read = this._readNext;
|
|
35
|
+
this._readNext();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const result = this._iterable();
|
|
39
|
+
this._iterable = null;
|
|
40
|
+
if (result && typeof result.then == 'function') {
|
|
41
|
+
result.then(value => this.push(value), error => this.emit('error', error));
|
|
42
|
+
this._read = this._readStop;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (result && typeof result.next == 'function') {
|
|
46
|
+
this._next = result;
|
|
47
|
+
this._read = this._readNext;
|
|
48
|
+
this._readNext();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.push(result);
|
|
52
|
+
this._read = this._readStop;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_readNext() {
|
|
56
|
+
for (;;) {
|
|
57
|
+
const result = this._next.next();
|
|
58
|
+
if (result && typeof result.then == 'function') {
|
|
59
|
+
result.then(
|
|
60
|
+
value => {
|
|
61
|
+
if (value.done || value.value === null) {
|
|
62
|
+
this.push(null);
|
|
63
|
+
this._next = null;
|
|
64
|
+
this._read = this._readStop;
|
|
65
|
+
} else {
|
|
66
|
+
this.push(value.value);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
error => this.emit('error', error)
|
|
70
|
+
);
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
if (result.done || result.value === null) {
|
|
74
|
+
this.push(null);
|
|
75
|
+
this._next = null;
|
|
76
|
+
this._read = this._readStop;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
if (!this.push(result.value)) break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
_readStop() {
|
|
84
|
+
this.push(null);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static make(iterable) {
|
|
88
|
+
return new FromIterable(typeof iterable == 'object' && iterable.iterable ? iterable : {iterable});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
FromIterable.fromIterable = FromIterable.make;
|
|
92
|
+
FromIterable.make.Constructor = FromIterable;
|
|
93
|
+
|
|
94
|
+
module.exports = FromIterable;
|