@openclaw/nostr 2026.5.20 → 2026.5.22
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/node_modules/@noble/ciphers/LICENSE +22 -0
- package/node_modules/@noble/ciphers/README.md +608 -0
- package/node_modules/@noble/ciphers/_arx.d.ts +81 -0
- package/node_modules/@noble/ciphers/_arx.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/_arx.js +258 -0
- package/node_modules/@noble/ciphers/_arx.js.map +1 -0
- package/node_modules/@noble/ciphers/_poly1305.d.ts +48 -0
- package/node_modules/@noble/ciphers/_poly1305.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/_poly1305.js +319 -0
- package/node_modules/@noble/ciphers/_poly1305.js.map +1 -0
- package/node_modules/@noble/ciphers/_polyval.d.ts +62 -0
- package/node_modules/@noble/ciphers/_polyval.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/_polyval.js +231 -0
- package/node_modules/@noble/ciphers/_polyval.js.map +1 -0
- package/node_modules/@noble/ciphers/aes.d.ts +231 -0
- package/node_modules/@noble/ciphers/aes.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/aes.js +1281 -0
- package/node_modules/@noble/ciphers/aes.js.map +1 -0
- package/node_modules/@noble/ciphers/chacha.d.ts +75 -0
- package/node_modules/@noble/ciphers/chacha.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/chacha.js +385 -0
- package/node_modules/@noble/ciphers/chacha.js.map +1 -0
- package/node_modules/@noble/ciphers/ff1.d.ts +9 -0
- package/node_modules/@noble/ciphers/ff1.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/ff1.js +160 -0
- package/node_modules/@noble/ciphers/ff1.js.map +1 -0
- package/node_modules/@noble/ciphers/index.d.ts +2 -0
- package/node_modules/@noble/ciphers/index.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/index.js +27 -0
- package/node_modules/@noble/ciphers/index.js.map +1 -0
- package/node_modules/@noble/ciphers/package.json +81 -0
- package/node_modules/@noble/ciphers/salsa.d.ts +30 -0
- package/node_modules/@noble/ciphers/salsa.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/salsa.js +260 -0
- package/node_modules/@noble/ciphers/salsa.js.map +1 -0
- package/node_modules/@noble/ciphers/src/_arx.ts +338 -0
- package/node_modules/@noble/ciphers/src/_poly1305.ts +360 -0
- package/node_modules/@noble/ciphers/src/_polyval.ts +272 -0
- package/node_modules/@noble/ciphers/src/aes.ts +1439 -0
- package/node_modules/@noble/ciphers/src/chacha.ts +367 -0
- package/node_modules/@noble/ciphers/src/ff1.ts +162 -0
- package/node_modules/@noble/ciphers/src/index.ts +25 -0
- package/node_modules/@noble/ciphers/src/salsa.ts +255 -0
- package/node_modules/@noble/ciphers/src/utils.ts +497 -0
- package/node_modules/@noble/ciphers/src/webcrypto.ts +125 -0
- package/node_modules/@noble/ciphers/utils.d.ts +171 -0
- package/node_modules/@noble/ciphers/utils.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/utils.js +343 -0
- package/node_modules/@noble/ciphers/utils.js.map +1 -0
- package/node_modules/@noble/ciphers/webcrypto.d.ts +30 -0
- package/node_modules/@noble/ciphers/webcrypto.d.ts.map +1 -0
- package/node_modules/@noble/ciphers/webcrypto.js +99 -0
- package/node_modules/@noble/ciphers/webcrypto.js.map +1 -0
- package/node_modules/@noble/curves/LICENSE +21 -0
- package/node_modules/@noble/curves/README.md +1037 -0
- package/node_modules/@noble/curves/abstract/bls.d.ts +128 -0
- package/node_modules/@noble/curves/abstract/bls.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/bls.js +372 -0
- package/node_modules/@noble/curves/abstract/bls.js.map +1 -0
- package/node_modules/@noble/curves/abstract/curve.d.ts +195 -0
- package/node_modules/@noble/curves/abstract/curve.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/curve.js +457 -0
- package/node_modules/@noble/curves/abstract/curve.js.map +1 -0
- package/node_modules/@noble/curves/abstract/edwards.d.ts +184 -0
- package/node_modules/@noble/curves/abstract/edwards.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/edwards.js +558 -0
- package/node_modules/@noble/curves/abstract/edwards.js.map +1 -0
- package/node_modules/@noble/curves/abstract/fft.d.ts +127 -0
- package/node_modules/@noble/curves/abstract/fft.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/fft.js +426 -0
- package/node_modules/@noble/curves/abstract/fft.js.map +1 -0
- package/node_modules/@noble/curves/abstract/hash-to-curve.d.ts +90 -0
- package/node_modules/@noble/curves/abstract/hash-to-curve.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/hash-to-curve.js +207 -0
- package/node_modules/@noble/curves/abstract/hash-to-curve.js.map +1 -0
- package/node_modules/@noble/curves/abstract/modular.d.ts +159 -0
- package/node_modules/@noble/curves/abstract/modular.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/modular.js +555 -0
- package/node_modules/@noble/curves/abstract/modular.js.map +1 -0
- package/node_modules/@noble/curves/abstract/montgomery.d.ts +25 -0
- package/node_modules/@noble/curves/abstract/montgomery.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/montgomery.js +153 -0
- package/node_modules/@noble/curves/abstract/montgomery.js.map +1 -0
- package/node_modules/@noble/curves/abstract/oprf.d.ts +282 -0
- package/node_modules/@noble/curves/abstract/oprf.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/oprf.js +297 -0
- package/node_modules/@noble/curves/abstract/oprf.js.map +1 -0
- package/node_modules/@noble/curves/abstract/poseidon.d.ts +68 -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/@noble/curves/abstract/tower.d.ts +95 -0
- package/node_modules/@noble/curves/abstract/tower.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/tower.js +742 -0
- package/node_modules/@noble/curves/abstract/tower.js.map +1 -0
- package/node_modules/@noble/curves/abstract/weierstrass.d.ts +325 -0
- package/node_modules/@noble/curves/abstract/weierstrass.d.ts.map +1 -0
- package/node_modules/@noble/curves/abstract/weierstrass.js +1222 -0
- package/node_modules/@noble/curves/abstract/weierstrass.js.map +1 -0
- package/node_modules/@noble/curves/bls12-381.d.ts +10 -0
- package/node_modules/@noble/curves/bls12-381.d.ts.map +1 -0
- package/node_modules/@noble/curves/bls12-381.js +688 -0
- package/node_modules/@noble/curves/bls12-381.js.map +1 -0
- package/node_modules/@noble/curves/bn254.d.ts +66 -0
- package/node_modules/@noble/curves/bn254.d.ts.map +1 -0
- package/node_modules/@noble/curves/bn254.js +190 -0
- package/node_modules/@noble/curves/bn254.js.map +1 -0
- package/node_modules/@noble/curves/ed25519.d.ts +101 -0
- package/node_modules/@noble/curves/ed25519.d.ts.map +1 -0
- package/node_modules/@noble/curves/ed25519.js +462 -0
- package/node_modules/@noble/curves/ed25519.js.map +1 -0
- package/node_modules/@noble/curves/ed448.d.ts +91 -0
- package/node_modules/@noble/curves/ed448.d.ts.map +1 -0
- package/node_modules/@noble/curves/ed448.js +442 -0
- package/node_modules/@noble/curves/ed448.js.map +1 -0
- package/node_modules/@noble/curves/index.d.ts +2 -0
- package/node_modules/@noble/curves/index.d.ts.map +1 -0
- package/node_modules/@noble/curves/index.js +33 -0
- package/node_modules/@noble/curves/index.js.map +1 -0
- package/node_modules/@noble/curves/misc.d.ts +15 -0
- package/node_modules/@noble/curves/misc.d.ts.map +1 -0
- package/node_modules/@noble/curves/misc.js +103 -0
- package/node_modules/@noble/curves/misc.js.map +1 -0
- package/node_modules/@noble/curves/nist.d.ts +36 -0
- package/node_modules/@noble/curves/nist.d.ts.map +1 -0
- package/node_modules/@noble/curves/nist.js +146 -0
- package/node_modules/@noble/curves/nist.js.map +1 -0
- package/node_modules/@noble/curves/package.json +98 -0
- package/node_modules/@noble/curves/secp256k1.d.ts +76 -0
- package/node_modules/@noble/curves/secp256k1.d.ts.map +1 -0
- package/node_modules/@noble/curves/secp256k1.js +283 -0
- package/node_modules/@noble/curves/secp256k1.js.map +1 -0
- package/node_modules/@noble/curves/src/abstract/bls.ts +604 -0
- package/node_modules/@noble/curves/src/abstract/curve.ts +633 -0
- package/node_modules/@noble/curves/src/abstract/edwards.ts +789 -0
- package/node_modules/@noble/curves/src/abstract/fft.ts +521 -0
- package/node_modules/@noble/curves/src/abstract/hash-to-curve.ts +292 -0
- package/node_modules/@noble/curves/src/abstract/modular.ts +621 -0
- package/node_modules/@noble/curves/src/abstract/montgomery.ts +187 -0
- package/node_modules/@noble/curves/src/abstract/oprf.ts +600 -0
- package/node_modules/@noble/curves/src/abstract/poseidon.ts +333 -0
- package/node_modules/@noble/curves/src/abstract/tower.ts +864 -0
- package/node_modules/@noble/curves/src/abstract/weierstrass.ts +1562 -0
- package/node_modules/@noble/curves/src/bls12-381.ts +775 -0
- package/node_modules/@noble/curves/src/bn254.ts +219 -0
- package/node_modules/@noble/curves/src/ed25519.ts +533 -0
- package/node_modules/@noble/curves/src/ed448.ts +525 -0
- package/node_modules/@noble/curves/src/index.ts +31 -0
- package/node_modules/@noble/curves/src/misc.ts +140 -0
- package/node_modules/@noble/curves/src/nist.ts +204 -0
- package/node_modules/@noble/curves/src/secp256k1.ts +327 -0
- package/node_modules/@noble/curves/src/utils.ts +306 -0
- package/node_modules/@noble/curves/src/webcrypto.ts +403 -0
- package/node_modules/@noble/curves/utils.d.ts +103 -0
- package/node_modules/@noble/curves/utils.d.ts.map +1 -0
- package/node_modules/@noble/curves/utils.js +241 -0
- package/node_modules/@noble/curves/utils.js.map +1 -0
- package/node_modules/@noble/curves/webcrypto.d.ts +99 -0
- package/node_modules/@noble/curves/webcrypto.d.ts.map +1 -0
- package/node_modules/@noble/curves/webcrypto.js +256 -0
- package/node_modules/@noble/curves/webcrypto.js.map +1 -0
- package/node_modules/@noble/hashes/LICENSE +21 -0
- package/node_modules/@noble/hashes/README.md +575 -0
- package/node_modules/@noble/hashes/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_blake.js +45 -0
- package/node_modules/@noble/hashes/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/_md.d.ts +49 -0
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_md.js +147 -0
- package/node_modules/@noble/hashes/_md.js.map +1 -0
- package/node_modules/@noble/hashes/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_u64.js +67 -0
- package/node_modules/@noble/hashes/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/argon2.js +391 -0
- package/node_modules/@noble/hashes/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/blake1.d.ts +110 -0
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake1.js +485 -0
- package/node_modules/@noble/hashes/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/blake2.d.ts +120 -0
- package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2.js +417 -0
- package/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake3.js +255 -0
- package/node_modules/@noble/hashes/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/eskdf.d.ts +50 -0
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/eskdf.js +161 -0
- package/node_modules/@noble/hashes/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hkdf.js +84 -0
- package/node_modules/@noble/hashes/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/hmac.d.ts +36 -0
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hmac.js +90 -0
- package/node_modules/@noble/hashes/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/index.d.ts +2 -0
- package/node_modules/@noble/hashes/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/index.js +34 -0
- package/node_modules/@noble/hashes/index.js.map +1 -0
- 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 +281 -0
- package/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +93 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts +29 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/pbkdf2.js +97 -0
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/scrypt.d.ts +33 -0
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/scrypt.js +216 -0
- package/node_modules/@noble/hashes/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/sha2.d.ts +199 -0
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha2.js +397 -0
- package/node_modules/@noble/hashes/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts +149 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.js +420 -0
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/sha3.d.ts +58 -0
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3.js +254 -0
- package/node_modules/@noble/hashes/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/src/_blake.ts +50 -0
- package/node_modules/@noble/hashes/src/_md.ts +156 -0
- package/node_modules/@noble/hashes/src/_u64.ts +91 -0
- package/node_modules/@noble/hashes/src/argon2.ts +493 -0
- package/node_modules/@noble/hashes/src/blake1.ts +536 -0
- package/node_modules/@noble/hashes/src/blake2.ts +489 -0
- package/node_modules/@noble/hashes/src/blake3.ts +275 -0
- package/node_modules/@noble/hashes/src/eskdf.ts +188 -0
- package/node_modules/@noble/hashes/src/hkdf.ts +94 -0
- package/node_modules/@noble/hashes/src/hmac.ts +94 -0
- package/node_modules/@noble/hashes/src/index.ts +32 -0
- package/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +129 -0
- package/node_modules/@noble/hashes/src/scrypt.ts +249 -0
- package/node_modules/@noble/hashes/src/sha2.ts +469 -0
- package/node_modules/@noble/hashes/src/sha3-addons.ts +530 -0
- package/node_modules/@noble/hashes/src/sha3.ts +295 -0
- package/node_modules/@noble/hashes/src/utils.ts +338 -0
- package/node_modules/@noble/hashes/src/webcrypto.ts +168 -0
- package/node_modules/@noble/hashes/utils.d.ts +130 -0
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/utils.js +242 -0
- package/node_modules/@noble/hashes/utils.js.map +1 -0
- package/node_modules/@noble/hashes/webcrypto.d.ts +62 -0
- package/node_modules/@noble/hashes/webcrypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/webcrypto.js +126 -0
- package/node_modules/@noble/hashes/webcrypto.js.map +1 -0
- package/node_modules/@scure/base/LICENSE +21 -0
- package/node_modules/@scure/base/README.md +226 -0
- package/node_modules/@scure/base/index.d.ts +294 -0
- package/node_modules/@scure/base/index.d.ts.map +1 -0
- package/node_modules/@scure/base/index.js +704 -0
- package/node_modules/@scure/base/index.js.map +1 -0
- package/node_modules/@scure/base/index.ts +857 -0
- package/node_modules/@scure/base/package.json +58 -0
- package/node_modules/@scure/bip32/LICENSE +21 -0
- package/node_modules/@scure/bip32/README.md +158 -0
- package/node_modules/@scure/bip32/index.d.ts +60 -0
- package/node_modules/@scure/bip32/index.d.ts.map +1 -0
- package/node_modules/@scure/bip32/index.js +283 -0
- package/node_modules/@scure/bip32/index.js.map +1 -0
- package/node_modules/@scure/bip32/index.ts +317 -0
- package/node_modules/@scure/bip32/package.json +57 -0
- package/node_modules/@scure/bip39/LICENSE +21 -0
- package/node_modules/@scure/bip39/README.md +134 -0
- package/node_modules/@scure/bip39/index.d.ts +75 -0
- package/node_modules/@scure/bip39/index.js +149 -0
- package/node_modules/@scure/bip39/package.json +70 -0
- package/node_modules/@scure/bip39/src/index.ts +161 -0
- package/node_modules/@scure/bip39/wordlists/czech.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/czech.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/english.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/english.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/french.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/french.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/italian.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/italian.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/japanese.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/japanese.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/korean.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/korean.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/portuguese.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/portuguese.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/simplified-chinese.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/spanish.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/spanish.js +2048 -0
- package/node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts +1 -0
- package/node_modules/@scure/bip39/wordlists/traditional-chinese.js +2048 -0
- package/node_modules/nostr-tools/LICENSE +24 -0
- package/node_modules/nostr-tools/README.md +454 -0
- package/node_modules/nostr-tools/lib/cjs/abstract-pool.js +889 -0
- package/node_modules/nostr-tools/lib/cjs/abstract-pool.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/abstract-relay.js +596 -0
- package/node_modules/nostr-tools/lib/cjs/abstract-relay.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/core.js +63 -0
- package/node_modules/nostr-tools/lib/cjs/core.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/fakejson.js +66 -0
- package/node_modules/nostr-tools/lib/cjs/fakejson.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/filter.js +111 -0
- package/node_modules/nostr-tools/lib/cjs/filter.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/index.js +3666 -0
- package/node_modules/nostr-tools/lib/cjs/index.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/kinds.js +273 -0
- package/node_modules/nostr-tools/lib/cjs/kinds.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip04.js +61 -0
- package/node_modules/nostr-tools/lib/cjs/nip04.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip05.js +76 -0
- package/node_modules/nostr-tools/lib/cjs/nip05.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip06.js +82 -0
- package/node_modules/nostr-tools/lib/cjs/nip06.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip07.js +18 -0
- package/node_modules/nostr-tools/lib/cjs/nip07.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip10.js +124 -0
- package/node_modules/nostr-tools/lib/cjs/nip10.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip11.js +39 -0
- package/node_modules/nostr-tools/lib/cjs/nip11.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip13.js +83 -0
- package/node_modules/nostr-tools/lib/cjs/nip13.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip17.js +343 -0
- package/node_modules/nostr-tools/lib/cjs/nip17.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip18.js +188 -0
- package/node_modules/nostr-tools/lib/cjs/nip18.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip19.js +217 -0
- package/node_modules/nostr-tools/lib/cjs/nip19.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip21.js +140 -0
- package/node_modules/nostr-tools/lib/cjs/nip21.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip22.js +154 -0
- package/node_modules/nostr-tools/lib/cjs/nip22.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip25.js +159 -0
- package/node_modules/nostr-tools/lib/cjs/nip25.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip27.js +269 -0
- package/node_modules/nostr-tools/lib/cjs/nip27.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip28.js +220 -0
- package/node_modules/nostr-tools/lib/cjs/nip28.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip29.js +499 -0
- package/node_modules/nostr-tools/lib/cjs/nip29.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip30.js +53 -0
- package/node_modules/nostr-tools/lib/cjs/nip30.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip39.js +42 -0
- package/node_modules/nostr-tools/lib/cjs/nip39.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip40.js +63 -0
- package/node_modules/nostr-tools/lib/cjs/nip40.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip42.js +41 -0
- package/node_modules/nostr-tools/lib/cjs/nip42.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip44.js +167 -0
- package/node_modules/nostr-tools/lib/cjs/nip44.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip46.js +1455 -0
- package/node_modules/nostr-tools/lib/cjs/nip46.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip47.js +168 -0
- package/node_modules/nostr-tools/lib/cjs/nip47.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip49.js +77 -0
- package/node_modules/nostr-tools/lib/cjs/nip49.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip54.js +35 -0
- package/node_modules/nostr-tools/lib/cjs/nip54.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip55.js +103 -0
- package/node_modules/nostr-tools/lib/cjs/nip55.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip57.js +274 -0
- package/node_modules/nostr-tools/lib/cjs/nip57.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip58.js +117 -0
- package/node_modules/nostr-tools/lib/cjs/nip58.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip59.js +320 -0
- package/node_modules/nostr-tools/lib/cjs/nip59.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip75.js +70 -0
- package/node_modules/nostr-tools/lib/cjs/nip75.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip77.js +519 -0
- package/node_modules/nostr-tools/lib/cjs/nip77.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip94.js +142 -0
- package/node_modules/nostr-tools/lib/cjs/nip94.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip98.js +230 -0
- package/node_modules/nostr-tools/lib/cjs/nip98.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nip99.js +153 -0
- package/node_modules/nostr-tools/lib/cjs/nip99.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/nipb7.js +184 -0
- package/node_modules/nostr-tools/lib/cjs/nipb7.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/package.json +1 -0
- package/node_modules/nostr-tools/lib/cjs/pool.js +989 -0
- package/node_modules/nostr-tools/lib/cjs/pool.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/pure.js +130 -0
- package/node_modules/nostr-tools/lib/cjs/pure.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/references.js +210 -0
- package/node_modules/nostr-tools/lib/cjs/references.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/relay.js +704 -0
- package/node_modules/nostr-tools/lib/cjs/relay.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/signer.js +130 -0
- package/node_modules/nostr-tools/lib/cjs/signer.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/utils.js +150 -0
- package/node_modules/nostr-tools/lib/cjs/utils.js.map +7 -0
- package/node_modules/nostr-tools/lib/cjs/wasm.js +103 -0
- package/node_modules/nostr-tools/lib/cjs/wasm.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/abstract-pool.js +866 -0
- package/node_modules/nostr-tools/lib/esm/abstract-pool.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/abstract-relay.js +573 -0
- package/node_modules/nostr-tools/lib/esm/abstract-relay.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/core.js +42 -0
- package/node_modules/nostr-tools/lib/esm/core.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/fakejson.js +45 -0
- package/node_modules/nostr-tools/lib/esm/fakejson.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/filter.js +88 -0
- package/node_modules/nostr-tools/lib/esm/filter.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/index.js +3649 -0
- package/node_modules/nostr-tools/lib/esm/index.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/kinds.js +250 -0
- package/node_modules/nostr-tools/lib/esm/kinds.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip04.js +40 -0
- package/node_modules/nostr-tools/lib/esm/nip04.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip05.js +55 -0
- package/node_modules/nostr-tools/lib/esm/nip05.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip06.js +61 -0
- package/node_modules/nostr-tools/lib/esm/nip06.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip07.js +0 -0
- package/node_modules/nostr-tools/lib/esm/nip07.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip10.js +103 -0
- package/node_modules/nostr-tools/lib/esm/nip10.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip11.js +18 -0
- package/node_modules/nostr-tools/lib/esm/nip11.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip13.js +62 -0
- package/node_modules/nostr-tools/lib/esm/nip13.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip17.js +320 -0
- package/node_modules/nostr-tools/lib/esm/nip17.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip18.js +165 -0
- package/node_modules/nostr-tools/lib/esm/nip18.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip19.js +196 -0
- package/node_modules/nostr-tools/lib/esm/nip19.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip21.js +117 -0
- package/node_modules/nostr-tools/lib/esm/nip21.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip22.js +133 -0
- package/node_modules/nostr-tools/lib/esm/nip22.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip25.js +136 -0
- package/node_modules/nostr-tools/lib/esm/nip25.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip27.js +246 -0
- package/node_modules/nostr-tools/lib/esm/nip27.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip28.js +197 -0
- package/node_modules/nostr-tools/lib/esm/nip28.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip29.js +476 -0
- package/node_modules/nostr-tools/lib/esm/nip29.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip30.js +32 -0
- package/node_modules/nostr-tools/lib/esm/nip30.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip39.js +21 -0
- package/node_modules/nostr-tools/lib/esm/nip39.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip40.js +42 -0
- package/node_modules/nostr-tools/lib/esm/nip40.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip42.js +18 -0
- package/node_modules/nostr-tools/lib/esm/nip42.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip44.js +146 -0
- package/node_modules/nostr-tools/lib/esm/nip44.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip46.js +1432 -0
- package/node_modules/nostr-tools/lib/esm/nip46.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip47.js +145 -0
- package/node_modules/nostr-tools/lib/esm/nip47.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip49.js +56 -0
- package/node_modules/nostr-tools/lib/esm/nip49.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip54.js +14 -0
- package/node_modules/nostr-tools/lib/esm/nip54.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip55.js +82 -0
- package/node_modules/nostr-tools/lib/esm/nip55.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip57.js +253 -0
- package/node_modules/nostr-tools/lib/esm/nip57.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip58.js +94 -0
- package/node_modules/nostr-tools/lib/esm/nip58.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip59.js +297 -0
- package/node_modules/nostr-tools/lib/esm/nip59.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip75.js +47 -0
- package/node_modules/nostr-tools/lib/esm/nip75.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip77.js +498 -0
- package/node_modules/nostr-tools/lib/esm/nip77.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip94.js +119 -0
- package/node_modules/nostr-tools/lib/esm/nip94.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip98.js +209 -0
- package/node_modules/nostr-tools/lib/esm/nip98.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nip99.js +130 -0
- package/node_modules/nostr-tools/lib/esm/nip99.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/nipb7.js +163 -0
- package/node_modules/nostr-tools/lib/esm/nipb7.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/pool.js +966 -0
- package/node_modules/nostr-tools/lib/esm/pool.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/pure.js +109 -0
- package/node_modules/nostr-tools/lib/esm/pure.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/references.js +187 -0
- package/node_modules/nostr-tools/lib/esm/references.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/relay.js +681 -0
- package/node_modules/nostr-tools/lib/esm/relay.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/signer.js +107 -0
- package/node_modules/nostr-tools/lib/esm/signer.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/utils.js +129 -0
- package/node_modules/nostr-tools/lib/esm/utils.js.map +7 -0
- package/node_modules/nostr-tools/lib/esm/wasm.js +82 -0
- package/node_modules/nostr-tools/lib/esm/wasm.js.map +7 -0
- package/node_modules/nostr-tools/lib/nostr.bundle.js +7336 -0
- package/node_modules/nostr-tools/lib/nostr.bundle.js.map +7 -0
- package/node_modules/nostr-tools/lib/types/abstract-pool.d.ts +60 -0
- package/node_modules/nostr-tools/lib/types/abstract-relay.d.ts +110 -0
- package/node_modules/nostr-tools/lib/types/benchmarks.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/core.d.ts +32 -0
- package/node_modules/nostr-tools/lib/types/core.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/fakejson.d.ts +6 -0
- package/node_modules/nostr-tools/lib/types/fakejson.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/filter.d.ts +19 -0
- package/node_modules/nostr-tools/lib/types/filter.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/helpers.d.ts +2 -0
- package/node_modules/nostr-tools/lib/types/index.d.ts +31 -0
- package/node_modules/nostr-tools/lib/types/kinds.d.ts +200 -0
- package/node_modules/nostr-tools/lib/types/kinds.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip04.d.ts +2 -0
- package/node_modules/nostr-tools/lib/types/nip04.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip05.d.ts +17 -0
- package/node_modules/nostr-tools/lib/types/nip05.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip06.d.ts +15 -0
- package/node_modules/nostr-tools/lib/types/nip06.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip07.d.ts +13 -0
- package/node_modules/nostr-tools/lib/types/nip10.d.ts +24 -0
- package/node_modules/nostr-tools/lib/types/nip10.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip11.d.ts +266 -0
- package/node_modules/nostr-tools/lib/types/nip11.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip13.d.ts +8 -0
- package/node_modules/nostr-tools/lib/types/nip13.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip17.d.ts +15 -0
- package/node_modules/nostr-tools/lib/types/nip17.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip18.d.ts +22 -0
- package/node_modules/nostr-tools/lib/types/nip18.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip19.d.ts +81 -0
- package/node_modules/nostr-tools/lib/types/nip19.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip21.d.ts +34 -0
- package/node_modules/nostr-tools/lib/types/nip21.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip22.d.ts +36 -0
- package/node_modules/nostr-tools/lib/types/nip22.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip25.d.ts +15 -0
- package/node_modules/nostr-tools/lib/types/nip25.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip27.d.ts +32 -0
- package/node_modules/nostr-tools/lib/types/nip27.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip28.d.ts +46 -0
- package/node_modules/nostr-tools/lib/types/nip28.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip29.d.ts +265 -0
- package/node_modules/nostr-tools/lib/types/nip30.d.ts +22 -0
- package/node_modules/nostr-tools/lib/types/nip30.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip39.d.ts +2 -0
- package/node_modules/nostr-tools/lib/types/nip39.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip40.d.ts +10 -0
- package/node_modules/nostr-tools/lib/types/nip40.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip42.d.ts +5 -0
- package/node_modules/nostr-tools/lib/types/nip42.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip44.d.ts +18 -0
- package/node_modules/nostr-tools/lib/types/nip44.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip46.d.ts +119 -0
- package/node_modules/nostr-tools/lib/types/nip47.d.ts +11 -0
- package/node_modules/nostr-tools/lib/types/nip47.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip49.d.ts +3 -0
- package/node_modules/nostr-tools/lib/types/nip49.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip54.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip54.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip55.d.ts +30 -0
- package/node_modules/nostr-tools/lib/types/nip55.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip57.d.ts +25 -0
- package/node_modules/nostr-tools/lib/types/nip57.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip58.d.ts +134 -0
- package/node_modules/nostr-tools/lib/types/nip58.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip59.d.ts +12 -0
- package/node_modules/nostr-tools/lib/types/nip59.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip75.d.ts +61 -0
- package/node_modules/nostr-tools/lib/types/nip75.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip77.d.ts +102 -0
- package/node_modules/nostr-tools/lib/types/nip77.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip94.d.ts +87 -0
- package/node_modules/nostr-tools/lib/types/nip94.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip98.d.ts +74 -0
- package/node_modules/nostr-tools/lib/types/nip98.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nip99.d.ts +92 -0
- package/node_modules/nostr-tools/lib/types/nip99.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/nipb7.d.ts +23 -0
- package/node_modules/nostr-tools/lib/types/nipb7.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/pool.d.ts +6 -0
- package/node_modules/nostr-tools/lib/types/pool.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/pure.d.ts +8 -0
- package/node_modules/nostr-tools/lib/types/pure.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/references.d.ts +10 -0
- package/node_modules/nostr-tools/lib/types/references.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/relay.d.ts +11 -0
- package/node_modules/nostr-tools/lib/types/relay.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/signer.d.ts +11 -0
- package/node_modules/nostr-tools/lib/types/test-helpers.d.ts +14 -0
- package/node_modules/nostr-tools/lib/types/utils.d.ts +9 -0
- package/node_modules/nostr-tools/lib/types/utils.test.d.ts +1 -0
- package/node_modules/nostr-tools/lib/types/wasm.d.ts +8 -0
- package/node_modules/nostr-tools/package.json +330 -0
- package/node_modules/nostr-wasm/README.md +91 -0
- package/node_modules/nostr-wasm/dist/api/emsimp.d.ts +3 -0
- package/node_modules/nostr-wasm/dist/api/nostr.d.ts +45 -0
- package/node_modules/nostr-wasm/dist/api/secp256k1-types.d.ts +124 -0
- package/node_modules/nostr-wasm/dist/api/secp256k1.d.ts +41 -0
- package/node_modules/nostr-wasm/dist/api/types.d.ts +124 -0
- package/node_modules/nostr-wasm/dist/api/wasm-env.d.ts +3 -0
- package/node_modules/nostr-wasm/dist/gen/wasm.d.ts +27 -0
- package/node_modules/nostr-wasm/dist/generate.d.ts +1 -0
- package/node_modules/nostr-wasm/dist/gzipped.d.ts +3 -0
- package/node_modules/nostr-wasm/dist/gzipped.js +44 -0
- package/node_modules/nostr-wasm/dist/headless.d.ts +2 -0
- package/node_modules/nostr-wasm/dist/main.d.ts +3 -0
- package/node_modules/nostr-wasm/dist/main.js +9 -0
- package/node_modules/nostr-wasm/dist/nostr.js +248 -0
- package/node_modules/nostr-wasm/dist/secp256k1.js +230 -0
- package/node_modules/nostr-wasm/dist/types.d.ts +22 -0
- package/node_modules/nostr-wasm/package.json +37 -0
- package/node_modules/nostr-wasm/public/out/secp256k1.js +1 -0
- package/node_modules/nostr-wasm/public/out/secp256k1.wasm +0 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1823 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +52 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +41 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +85 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +78 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +113 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +152 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +125 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/npm-shrinkwrap.json +137 -0
- package/package.json +9 -8
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
// nip44.ts
|
|
2
|
+
import { chacha20 } from "@noble/ciphers/chacha.js";
|
|
3
|
+
import { equalBytes } from "@noble/ciphers/utils.js";
|
|
4
|
+
import { secp256k1 } from "@noble/curves/secp256k1.js";
|
|
5
|
+
import { extract as hkdf_extract, expand as hkdf_expand } from "@noble/hashes/hkdf.js";
|
|
6
|
+
import { hmac } from "@noble/hashes/hmac.js";
|
|
7
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
8
|
+
import { concatBytes, hexToBytes as hexToBytes2, randomBytes } from "@noble/hashes/utils.js";
|
|
9
|
+
import { base64 } from "@scure/base";
|
|
10
|
+
|
|
11
|
+
// utils.ts
|
|
12
|
+
import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
|
|
13
|
+
var utf8Decoder = new TextDecoder("utf-8");
|
|
14
|
+
var utf8Encoder = new TextEncoder();
|
|
15
|
+
|
|
16
|
+
// nip44.ts
|
|
17
|
+
var minPlaintextSize = 1;
|
|
18
|
+
var maxPlaintextSize = 4294967295;
|
|
19
|
+
var extendedPrefixThreshold = 65536;
|
|
20
|
+
function getConversationKey(privkeyA, pubkeyB) {
|
|
21
|
+
const sharedX = secp256k1.getSharedSecret(privkeyA, hexToBytes2("02" + pubkeyB)).subarray(1, 33);
|
|
22
|
+
return hkdf_extract(sha256, sharedX, utf8Encoder.encode("nip44-v2"));
|
|
23
|
+
}
|
|
24
|
+
function getMessageKeys(conversationKey, nonce) {
|
|
25
|
+
const keys = hkdf_expand(sha256, conversationKey, nonce, 76);
|
|
26
|
+
return {
|
|
27
|
+
chacha_key: keys.subarray(0, 32),
|
|
28
|
+
chacha_nonce: keys.subarray(32, 44),
|
|
29
|
+
hmac_key: keys.subarray(44, 76)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function calcPaddedLen(len) {
|
|
33
|
+
if (!Number.isSafeInteger(len) || len < 1)
|
|
34
|
+
throw new Error("expected positive integer");
|
|
35
|
+
if (len <= 32)
|
|
36
|
+
return 32;
|
|
37
|
+
const nextPower = 2 ** (Math.floor(Math.log2(len - 1)) + 1);
|
|
38
|
+
const chunk = nextPower <= 256 ? 32 : nextPower / 8;
|
|
39
|
+
return chunk * (Math.floor((len - 1) / chunk) + 1);
|
|
40
|
+
}
|
|
41
|
+
function writeU16BE(num) {
|
|
42
|
+
if (!Number.isSafeInteger(num) || num < minPlaintextSize || num > 65535)
|
|
43
|
+
throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");
|
|
44
|
+
const arr = new Uint8Array(2);
|
|
45
|
+
new DataView(arr.buffer).setUint16(0, num, false);
|
|
46
|
+
return arr;
|
|
47
|
+
}
|
|
48
|
+
function writeU32BE(num) {
|
|
49
|
+
if (!Number.isSafeInteger(num) || num < extendedPrefixThreshold || num > maxPlaintextSize)
|
|
50
|
+
throw new Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");
|
|
51
|
+
const arr = new Uint8Array(4);
|
|
52
|
+
new DataView(arr.buffer).setUint32(0, num, false);
|
|
53
|
+
return arr;
|
|
54
|
+
}
|
|
55
|
+
function pad(plaintext) {
|
|
56
|
+
const unpadded = utf8Encoder.encode(plaintext);
|
|
57
|
+
const unpaddedLen = unpadded.length;
|
|
58
|
+
if (unpaddedLen < minPlaintextSize || unpaddedLen > maxPlaintextSize)
|
|
59
|
+
throw new Error("invalid plaintext size: must be between 1 and 4294967295 bytes");
|
|
60
|
+
const prefix = unpaddedLen >= extendedPrefixThreshold ? concatBytes(new Uint8Array([0, 0]), writeU32BE(unpaddedLen)) : writeU16BE(unpaddedLen);
|
|
61
|
+
const suffix = new Uint8Array(calcPaddedLen(unpaddedLen) - unpaddedLen);
|
|
62
|
+
return concatBytes(prefix, unpadded, suffix);
|
|
63
|
+
}
|
|
64
|
+
function unpad(padded) {
|
|
65
|
+
const dv = new DataView(padded.buffer, padded.byteOffset, padded.byteLength);
|
|
66
|
+
const firstTwo = dv.getUint16(0);
|
|
67
|
+
let unpaddedLen;
|
|
68
|
+
let prefixLen;
|
|
69
|
+
if (firstTwo === 0) {
|
|
70
|
+
unpaddedLen = dv.getUint32(2);
|
|
71
|
+
if (unpaddedLen < extendedPrefixThreshold)
|
|
72
|
+
throw new Error("invalid padding");
|
|
73
|
+
prefixLen = 6;
|
|
74
|
+
} else {
|
|
75
|
+
unpaddedLen = firstTwo;
|
|
76
|
+
prefixLen = 2;
|
|
77
|
+
}
|
|
78
|
+
const unpadded = padded.subarray(prefixLen, prefixLen + unpaddedLen);
|
|
79
|
+
if (unpaddedLen < minPlaintextSize || unpaddedLen > maxPlaintextSize || unpadded.length !== unpaddedLen || padded.length !== prefixLen + calcPaddedLen(unpaddedLen))
|
|
80
|
+
throw new Error("invalid padding");
|
|
81
|
+
return utf8Decoder.decode(unpadded);
|
|
82
|
+
}
|
|
83
|
+
function hmacAad(key, message, aad) {
|
|
84
|
+
if (aad.length !== 32)
|
|
85
|
+
throw new Error("AAD associated data must be 32 bytes");
|
|
86
|
+
const combined = concatBytes(aad, message);
|
|
87
|
+
return hmac(sha256, key, combined);
|
|
88
|
+
}
|
|
89
|
+
function decodePayload(payload) {
|
|
90
|
+
if (typeof payload !== "string")
|
|
91
|
+
throw new Error("payload must be a valid string");
|
|
92
|
+
const plen = payload.length;
|
|
93
|
+
if (plen < 132)
|
|
94
|
+
throw new Error("invalid payload length: " + plen);
|
|
95
|
+
if (payload[0] === "#")
|
|
96
|
+
throw new Error("unknown encryption version");
|
|
97
|
+
let data;
|
|
98
|
+
try {
|
|
99
|
+
data = base64.decode(payload);
|
|
100
|
+
} catch (error) {
|
|
101
|
+
throw new Error("invalid base64: " + error.message);
|
|
102
|
+
}
|
|
103
|
+
const dlen = data.length;
|
|
104
|
+
if (dlen < 99)
|
|
105
|
+
throw new Error("invalid data length: " + dlen);
|
|
106
|
+
const vers = data[0];
|
|
107
|
+
if (vers !== 2)
|
|
108
|
+
throw new Error("unknown encryption version " + vers);
|
|
109
|
+
return {
|
|
110
|
+
nonce: data.subarray(1, 33),
|
|
111
|
+
ciphertext: data.subarray(33, -32),
|
|
112
|
+
mac: data.subarray(-32)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function encrypt(plaintext, conversationKey, nonce = randomBytes(32)) {
|
|
116
|
+
const { chacha_key, chacha_nonce, hmac_key } = getMessageKeys(conversationKey, nonce);
|
|
117
|
+
const padded = pad(plaintext);
|
|
118
|
+
const ciphertext = chacha20(chacha_key, chacha_nonce, padded);
|
|
119
|
+
const mac = hmacAad(hmac_key, ciphertext, nonce);
|
|
120
|
+
return base64.encode(concatBytes(new Uint8Array([2]), nonce, ciphertext, mac));
|
|
121
|
+
}
|
|
122
|
+
function decrypt(payload, conversationKey) {
|
|
123
|
+
const { nonce, ciphertext, mac } = decodePayload(payload);
|
|
124
|
+
const { chacha_key, chacha_nonce, hmac_key } = getMessageKeys(conversationKey, nonce);
|
|
125
|
+
const calculatedMac = hmacAad(hmac_key, ciphertext, nonce);
|
|
126
|
+
if (!equalBytes(calculatedMac, mac))
|
|
127
|
+
throw new Error("invalid MAC");
|
|
128
|
+
const padded = chacha20(chacha_key, chacha_nonce, ciphertext);
|
|
129
|
+
return unpad(padded);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// pure.ts
|
|
133
|
+
import { schnorr } from "@noble/curves/secp256k1.js";
|
|
134
|
+
import { bytesToHex as bytesToHex2, hexToBytes as hexToBytes3 } from "@noble/hashes/utils.js";
|
|
135
|
+
|
|
136
|
+
// core.ts
|
|
137
|
+
var verifiedSymbol = Symbol("verified");
|
|
138
|
+
var isRecord = (obj) => obj instanceof Object;
|
|
139
|
+
function validateEvent(event) {
|
|
140
|
+
if (!isRecord(event))
|
|
141
|
+
return false;
|
|
142
|
+
if (typeof event.kind !== "number")
|
|
143
|
+
return false;
|
|
144
|
+
if (typeof event.content !== "string")
|
|
145
|
+
return false;
|
|
146
|
+
if (typeof event.created_at !== "number")
|
|
147
|
+
return false;
|
|
148
|
+
if (typeof event.pubkey !== "string")
|
|
149
|
+
return false;
|
|
150
|
+
if (!event.pubkey.match(/^[a-f0-9]{64}$/))
|
|
151
|
+
return false;
|
|
152
|
+
if (!Array.isArray(event.tags))
|
|
153
|
+
return false;
|
|
154
|
+
for (let i2 = 0; i2 < event.tags.length; i2++) {
|
|
155
|
+
let tag = event.tags[i2];
|
|
156
|
+
if (!Array.isArray(tag))
|
|
157
|
+
return false;
|
|
158
|
+
for (let j = 0; j < tag.length; j++) {
|
|
159
|
+
if (typeof tag[j] !== "string")
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// pure.ts
|
|
167
|
+
import { sha256 as sha2562 } from "@noble/hashes/sha2.js";
|
|
168
|
+
var JS = class {
|
|
169
|
+
generateSecretKey() {
|
|
170
|
+
return schnorr.utils.randomSecretKey();
|
|
171
|
+
}
|
|
172
|
+
getPublicKey(secretKey) {
|
|
173
|
+
return bytesToHex2(schnorr.getPublicKey(secretKey));
|
|
174
|
+
}
|
|
175
|
+
finalizeEvent(t, secretKey) {
|
|
176
|
+
const event = t;
|
|
177
|
+
event.pubkey = bytesToHex2(schnorr.getPublicKey(secretKey));
|
|
178
|
+
event.id = getEventHash(event);
|
|
179
|
+
event.sig = bytesToHex2(schnorr.sign(hexToBytes3(getEventHash(event)), secretKey));
|
|
180
|
+
event[verifiedSymbol] = true;
|
|
181
|
+
return event;
|
|
182
|
+
}
|
|
183
|
+
verifyEvent(event) {
|
|
184
|
+
if (typeof event[verifiedSymbol] === "boolean")
|
|
185
|
+
return event[verifiedSymbol];
|
|
186
|
+
try {
|
|
187
|
+
const hash = getEventHash(event);
|
|
188
|
+
if (hash !== event.id) {
|
|
189
|
+
event[verifiedSymbol] = false;
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
const valid = schnorr.verify(hexToBytes3(event.sig), hexToBytes3(hash), hexToBytes3(event.pubkey));
|
|
193
|
+
event[verifiedSymbol] = valid;
|
|
194
|
+
return valid;
|
|
195
|
+
} catch (err) {
|
|
196
|
+
event[verifiedSymbol] = false;
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
function serializeEvent(evt) {
|
|
202
|
+
if (!validateEvent(evt))
|
|
203
|
+
throw new Error("can't serialize event with wrong or missing properties");
|
|
204
|
+
return JSON.stringify([0, evt.pubkey, evt.created_at, evt.kind, evt.tags, evt.content]);
|
|
205
|
+
}
|
|
206
|
+
function getEventHash(event) {
|
|
207
|
+
let eventHash = sha2562(utf8Encoder.encode(serializeEvent(event)));
|
|
208
|
+
return bytesToHex2(eventHash);
|
|
209
|
+
}
|
|
210
|
+
var i = new JS();
|
|
211
|
+
var generateSecretKey = i.generateSecretKey;
|
|
212
|
+
var getPublicKey = i.getPublicKey;
|
|
213
|
+
var finalizeEvent = i.finalizeEvent;
|
|
214
|
+
var verifyEvent = i.verifyEvent;
|
|
215
|
+
|
|
216
|
+
// kinds.ts
|
|
217
|
+
var Seal = 13;
|
|
218
|
+
var GiftWrap = 1059;
|
|
219
|
+
|
|
220
|
+
// nip59.ts
|
|
221
|
+
var TWO_DAYS = 2 * 24 * 60 * 60;
|
|
222
|
+
var now = () => Math.round(Date.now() / 1e3);
|
|
223
|
+
var randomNow = () => Math.round(now() - Math.random() * TWO_DAYS);
|
|
224
|
+
var nip44ConversationKey = (privateKey, publicKey) => getConversationKey(privateKey, publicKey);
|
|
225
|
+
var nip44Encrypt = (data, privateKey, publicKey) => encrypt(JSON.stringify(data), nip44ConversationKey(privateKey, publicKey));
|
|
226
|
+
var nip44Decrypt = (data, privateKey) => JSON.parse(decrypt(data.content, nip44ConversationKey(privateKey, data.pubkey)));
|
|
227
|
+
function createRumor(event, privateKey) {
|
|
228
|
+
const rumor = {
|
|
229
|
+
created_at: now(),
|
|
230
|
+
content: "",
|
|
231
|
+
tags: [],
|
|
232
|
+
...event,
|
|
233
|
+
pubkey: getPublicKey(privateKey)
|
|
234
|
+
};
|
|
235
|
+
rumor.id = getEventHash(rumor);
|
|
236
|
+
return rumor;
|
|
237
|
+
}
|
|
238
|
+
function createSeal(rumor, privateKey, recipientPublicKey) {
|
|
239
|
+
return finalizeEvent(
|
|
240
|
+
{
|
|
241
|
+
kind: Seal,
|
|
242
|
+
content: nip44Encrypt(rumor, privateKey, recipientPublicKey),
|
|
243
|
+
created_at: randomNow(),
|
|
244
|
+
tags: []
|
|
245
|
+
},
|
|
246
|
+
privateKey
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
function createWrap(seal, recipientPublicKey) {
|
|
250
|
+
const randomKey = generateSecretKey();
|
|
251
|
+
return finalizeEvent(
|
|
252
|
+
{
|
|
253
|
+
kind: GiftWrap,
|
|
254
|
+
content: nip44Encrypt(seal, randomKey, recipientPublicKey),
|
|
255
|
+
created_at: randomNow(),
|
|
256
|
+
tags: [["p", recipientPublicKey]]
|
|
257
|
+
},
|
|
258
|
+
randomKey
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
function wrapEvent(event, senderPrivateKey, recipientPublicKey) {
|
|
262
|
+
const rumor = createRumor(event, senderPrivateKey);
|
|
263
|
+
const seal = createSeal(rumor, senderPrivateKey, recipientPublicKey);
|
|
264
|
+
return createWrap(seal, recipientPublicKey);
|
|
265
|
+
}
|
|
266
|
+
function wrapManyEvents(event, senderPrivateKey, recipientsPublicKeys) {
|
|
267
|
+
if (!recipientsPublicKeys || recipientsPublicKeys.length === 0) {
|
|
268
|
+
throw new Error("At least one recipient is required.");
|
|
269
|
+
}
|
|
270
|
+
const senderPublicKey = getPublicKey(senderPrivateKey);
|
|
271
|
+
const wrappeds = [wrapEvent(event, senderPrivateKey, senderPublicKey)];
|
|
272
|
+
recipientsPublicKeys.forEach((recipientPublicKey) => {
|
|
273
|
+
wrappeds.push(wrapEvent(event, senderPrivateKey, recipientPublicKey));
|
|
274
|
+
});
|
|
275
|
+
return wrappeds;
|
|
276
|
+
}
|
|
277
|
+
function unwrapEvent(wrap, recipientPrivateKey) {
|
|
278
|
+
const unwrappedSeal = nip44Decrypt(wrap, recipientPrivateKey);
|
|
279
|
+
return nip44Decrypt(unwrappedSeal, recipientPrivateKey);
|
|
280
|
+
}
|
|
281
|
+
function unwrapManyEvents(wrappedEvents, recipientPrivateKey) {
|
|
282
|
+
let unwrappedEvents = [];
|
|
283
|
+
wrappedEvents.forEach((e) => {
|
|
284
|
+
unwrappedEvents.push(unwrapEvent(e, recipientPrivateKey));
|
|
285
|
+
});
|
|
286
|
+
unwrappedEvents.sort((a, b) => a.created_at - b.created_at);
|
|
287
|
+
return unwrappedEvents;
|
|
288
|
+
}
|
|
289
|
+
export {
|
|
290
|
+
createRumor,
|
|
291
|
+
createSeal,
|
|
292
|
+
createWrap,
|
|
293
|
+
unwrapEvent,
|
|
294
|
+
unwrapManyEvents,
|
|
295
|
+
wrapEvent,
|
|
296
|
+
wrapManyEvents
|
|
297
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../nip44.ts", "../../utils.ts", "../../pure.ts", "../../core.ts", "../../kinds.ts", "../../nip59.ts"],
|
|
4
|
+
"sourcesContent": ["import { chacha20 } from '@noble/ciphers/chacha.js'\nimport { equalBytes } from '@noble/ciphers/utils.js'\nimport { secp256k1 } from '@noble/curves/secp256k1.js'\nimport { extract as hkdf_extract, expand as hkdf_expand } from '@noble/hashes/hkdf.js'\nimport { hmac } from '@noble/hashes/hmac.js'\nimport { sha256 } from '@noble/hashes/sha2.js'\nimport { concatBytes, hexToBytes, randomBytes } from '@noble/hashes/utils.js'\nimport { base64 } from '@scure/base'\n\nimport { utf8Decoder, utf8Encoder } from './utils.ts'\n\nconst minPlaintextSize = 0x0001 // 1b msg => padded to 32b\nconst maxPlaintextSize = 0xffffffff // 4294967295 (2^32-1)\nconst extendedPrefixThreshold = 0x10000 // 65536: lengths below use 2-byte u16 prefix, at or above use 6-byte prefix\n\nexport function getConversationKey(privkeyA: Uint8Array, pubkeyB: string): Uint8Array {\n const sharedX = secp256k1.getSharedSecret(privkeyA, hexToBytes('02' + pubkeyB)).subarray(1, 33)\n return hkdf_extract(sha256, sharedX, utf8Encoder.encode('nip44-v2'))\n}\n\nfunction getMessageKeys(\n conversationKey: Uint8Array,\n nonce: Uint8Array,\n): { chacha_key: Uint8Array; chacha_nonce: Uint8Array; hmac_key: Uint8Array } {\n const keys = hkdf_expand(sha256, conversationKey, nonce, 76)\n return {\n chacha_key: keys.subarray(0, 32),\n chacha_nonce: keys.subarray(32, 44),\n hmac_key: keys.subarray(44, 76),\n }\n}\n\nfunction calcPaddedLen(len: number): number {\n if (!Number.isSafeInteger(len) || len < 1) throw new Error('expected positive integer')\n if (len <= 32) return 32\n const nextPower = 2 ** (Math.floor(Math.log2(len - 1)) + 1)\n const chunk = nextPower <= 256 ? 32 : nextPower / 8\n return chunk * (Math.floor((len - 1) / chunk) + 1)\n}\n\nfunction writeU16BE(num: number): Uint8Array {\n if (!Number.isSafeInteger(num) || num < minPlaintextSize || num > 0xffff)\n throw new Error('invalid plaintext size: must be between 1 and 65535 bytes')\n const arr = new Uint8Array(2)\n new DataView(arr.buffer).setUint16(0, num, false)\n return arr\n}\n\nfunction writeU32BE(num: number): Uint8Array {\n if (!Number.isSafeInteger(num) || num < extendedPrefixThreshold || num > maxPlaintextSize)\n throw new Error('invalid plaintext size: must be between 65536 and 4294967295 bytes')\n const arr = new Uint8Array(4)\n new DataView(arr.buffer).setUint32(0, num, false)\n return arr\n}\n\nfunction pad(plaintext: string): Uint8Array {\n const unpadded = utf8Encoder.encode(plaintext)\n const unpaddedLen = unpadded.length\n if (unpaddedLen < minPlaintextSize || unpaddedLen > maxPlaintextSize)\n throw new Error('invalid plaintext size: must be between 1 and 4294967295 bytes')\n const prefix =\n unpaddedLen >= extendedPrefixThreshold\n ? concatBytes(new Uint8Array([0, 0]), writeU32BE(unpaddedLen)) // 6 bytes\n : writeU16BE(unpaddedLen) // 2 bytes\n const suffix = new Uint8Array(calcPaddedLen(unpaddedLen) - unpaddedLen)\n return concatBytes(prefix, unpadded, suffix)\n}\n\nfunction unpad(padded: Uint8Array): string {\n const dv = new DataView(padded.buffer, padded.byteOffset, padded.byteLength)\n const firstTwo = dv.getUint16(0)\n let unpaddedLen: number\n let prefixLen: number\n if (firstTwo === 0) {\n // Extended format: 2 zero bytes + 4-byte u32 length\n unpaddedLen = dv.getUint32(2)\n if (unpaddedLen < extendedPrefixThreshold) throw new Error('invalid padding')\n prefixLen = 6\n } else {\n unpaddedLen = firstTwo\n prefixLen = 2\n }\n const unpadded = padded.subarray(prefixLen, prefixLen + unpaddedLen)\n if (\n unpaddedLen < minPlaintextSize ||\n unpaddedLen > maxPlaintextSize ||\n unpadded.length !== unpaddedLen ||\n padded.length !== prefixLen + calcPaddedLen(unpaddedLen)\n )\n throw new Error('invalid padding')\n return utf8Decoder.decode(unpadded)\n}\n\nfunction hmacAad(key: Uint8Array, message: Uint8Array, aad: Uint8Array): Uint8Array {\n if (aad.length !== 32) throw new Error('AAD associated data must be 32 bytes')\n const combined = concatBytes(aad, message)\n return hmac(sha256, key, combined)\n}\n\n// metadata: always 65b (version: 1b, nonce: 32b, mac: 32b)\n// plaintext: 1b to 0xffffffff\n// padded plaintext (small, <65536): 32b to 0x10000, with 2b prefix -> 34b to 0x10000+2\n// padded plaintext (large, >=65536): 0x10000 to 0x100000000, with 6b prefix -> 0x10006 to 0x100000000+6\n// ciphertext: same as padded plaintext (chacha20 doesn't change length)\n// raw payload (small): 99 (65+34) to 65603 (65+0x10000+2)\n// raw payload (large): 65607 (65+0x10006) to 4294967367 (65+0x100000000+6)\nfunction decodePayload(payload: string): { nonce: Uint8Array; ciphertext: Uint8Array; mac: Uint8Array } {\n if (typeof payload !== 'string') throw new Error('payload must be a valid string')\n const plen = payload.length\n if (plen < 132) throw new Error('invalid payload length: ' + plen)\n if (payload[0] === '#') throw new Error('unknown encryption version')\n let data: Uint8Array\n try {\n data = base64.decode(payload)\n } catch (error) {\n throw new Error('invalid base64: ' + (error as any).message)\n }\n const dlen = data.length\n if (dlen < 99) throw new Error('invalid data length: ' + dlen)\n const vers = data[0]\n if (vers !== 2) throw new Error('unknown encryption version ' + vers)\n return {\n nonce: data.subarray(1, 33),\n ciphertext: data.subarray(33, -32),\n mac: data.subarray(-32),\n }\n}\n\nexport function encrypt(plaintext: string, conversationKey: Uint8Array, nonce: Uint8Array = randomBytes(32)): string {\n const { chacha_key, chacha_nonce, hmac_key } = getMessageKeys(conversationKey, nonce)\n const padded = pad(plaintext)\n const ciphertext = chacha20(chacha_key, chacha_nonce, padded)\n const mac = hmacAad(hmac_key, ciphertext, nonce)\n return base64.encode(concatBytes(new Uint8Array([2]), nonce, ciphertext, mac))\n}\n\n/** Callers should validate payload size before calling to prevent DoS from oversized inputs. */\nexport function decrypt(payload: string, conversationKey: Uint8Array): string {\n const { nonce, ciphertext, mac } = decodePayload(payload)\n const { chacha_key, chacha_nonce, hmac_key } = getMessageKeys(conversationKey, nonce)\n const calculatedMac = hmacAad(hmac_key, ciphertext, nonce)\n if (!equalBytes(calculatedMac, mac)) throw new Error('invalid MAC')\n const padded = chacha20(chacha_key, chacha_nonce, ciphertext)\n return unpad(padded)\n}\n\nexport const v2 = {\n utils: {\n getConversationKey,\n calcPaddedLen,\n pad,\n unpad,\n },\n encrypt,\n decrypt,\n}\n", "import type { NostrEvent } from './core.ts'\n\nexport const utf8Decoder: TextDecoder = new TextDecoder('utf-8')\nexport const utf8Encoder: TextEncoder = new TextEncoder()\n\nexport { bytesToHex, hexToBytes } from '@noble/hashes/utils.js'\n\nexport function normalizeURL(url: string): string {\n try {\n if (url.indexOf('://') === -1) url = 'wss://' + url\n let p = new URL(url)\n if (p.protocol === 'http:') p.protocol = 'ws:'\n else if (p.protocol === 'https:') p.protocol = 'wss:'\n p.pathname = p.pathname.replace(/\\/+/g, '/')\n if (p.pathname.endsWith('/')) p.pathname = p.pathname.slice(0, -1)\n if ((p.port === '80' && p.protocol === 'ws:') || (p.port === '443' && p.protocol === 'wss:')) p.port = ''\n p.searchParams.sort()\n p.hash = ''\n return p.toString()\n } catch (e) {\n throw new Error(`Invalid URL: ${url}`)\n }\n}\n\nexport function insertEventIntoDescendingList(sortedArray: NostrEvent[], event: NostrEvent): NostrEvent[] {\n const [idx, found] = binarySearch(sortedArray, b => {\n if (event.id === b.id) return 0\n if (event.created_at === b.created_at) return -1\n return b.created_at - event.created_at\n })\n if (!found) {\n sortedArray.splice(idx, 0, event)\n }\n return sortedArray\n}\n\nexport function insertEventIntoAscendingList(sortedArray: NostrEvent[], event: NostrEvent): NostrEvent[] {\n const [idx, found] = binarySearch(sortedArray, b => {\n if (event.id === b.id) return 0\n if (event.created_at === b.created_at) return -1\n return event.created_at - b.created_at\n })\n if (!found) {\n sortedArray.splice(idx, 0, event)\n }\n return sortedArray\n}\n\nexport function binarySearch<T>(arr: T[], compare: (b: T) => number): [number, boolean] {\n let start = 0\n let end = arr.length - 1\n\n while (start <= end) {\n const mid = Math.floor((start + end) / 2)\n const cmp = compare(arr[mid])\n\n if (cmp === 0) {\n return [mid, true]\n }\n\n if (cmp < 0) {\n end = mid - 1\n } else {\n start = mid + 1\n }\n }\n\n return [start, false]\n}\n\nexport function mergeReverseSortedLists(list1: NostrEvent[], list2: NostrEvent[]): NostrEvent[] {\n const result: NostrEvent[] = new Array(list1.length + list2.length)\n result.length = 0\n let i1 = 0\n let i2 = 0\n let sameTimestampIds: string[] = []\n\n while (i1 < list1.length && i2 < list2.length) {\n let next: NostrEvent\n if (list1[i1]?.created_at > list2[i2]?.created_at) {\n next = list1[i1]\n i1++\n } else {\n next = list2[i2]\n i2++\n }\n\n if (result.length > 0 && result[result.length - 1].created_at === next.created_at) {\n if (sameTimestampIds.includes(next.id)) continue\n } else {\n sameTimestampIds.length = 0\n }\n\n result.push(next)\n sameTimestampIds.push(next.id)\n }\n\n while (i1 < list1.length) {\n const next = list1[i1]\n i1++\n\n if (result.length > 0 && result[result.length - 1].created_at === next.created_at) {\n if (sameTimestampIds.includes(next.id)) continue\n } else {\n sameTimestampIds.length = 0\n }\n result.push(next)\n sameTimestampIds.push(next.id)\n }\n\n while (i2 < list2.length) {\n const next = list2[i2]\n i2++\n\n if (result.length > 0 && result[result.length - 1].created_at === next.created_at) {\n if (sameTimestampIds.includes(next.id)) continue\n } else {\n sameTimestampIds.length = 0\n }\n result.push(next)\n sameTimestampIds.push(next.id)\n }\n\n return result\n}\n", "import { schnorr } from '@noble/curves/secp256k1.js'\nimport { bytesToHex, hexToBytes } from '@noble/hashes/utils.js'\nimport { Nostr, Event, EventTemplate, UnsignedEvent, VerifiedEvent, verifiedSymbol, validateEvent } from './core.ts'\nimport { sha256 } from '@noble/hashes/sha2.js'\n\nimport { utf8Encoder } from './utils.ts'\n\nclass JS implements Nostr {\n generateSecretKey(): Uint8Array {\n return schnorr.utils.randomSecretKey()\n }\n getPublicKey(secretKey: Uint8Array): string {\n return bytesToHex(schnorr.getPublicKey(secretKey))\n }\n finalizeEvent(t: EventTemplate, secretKey: Uint8Array): VerifiedEvent {\n const event = t as VerifiedEvent\n event.pubkey = bytesToHex(schnorr.getPublicKey(secretKey))\n event.id = getEventHash(event)\n event.sig = bytesToHex(schnorr.sign(hexToBytes(getEventHash(event)), secretKey))\n event[verifiedSymbol] = true\n return event\n }\n verifyEvent(event: Event): event is VerifiedEvent {\n if (typeof event[verifiedSymbol] === 'boolean') return event[verifiedSymbol]\n\n try {\n const hash = getEventHash(event)\n if (hash !== event.id) {\n event[verifiedSymbol] = false\n return false\n }\n\n const valid = schnorr.verify(hexToBytes(event.sig), hexToBytes(hash), hexToBytes(event.pubkey))\n event[verifiedSymbol] = valid\n return valid\n } catch (err) {\n event[verifiedSymbol] = false\n return false\n }\n }\n}\n\nexport function serializeEvent(evt: UnsignedEvent): string {\n if (!validateEvent(evt)) throw new Error(\"can't serialize event with wrong or missing properties\")\n return JSON.stringify([0, evt.pubkey, evt.created_at, evt.kind, evt.tags, evt.content])\n}\n\nexport function getEventHash(event: UnsignedEvent): string {\n let eventHash = sha256(utf8Encoder.encode(serializeEvent(event)))\n return bytesToHex(eventHash)\n}\n\nconst i: JS = new JS()\n\nexport const generateSecretKey = i.generateSecretKey\nexport const getPublicKey = i.getPublicKey\nexport const finalizeEvent = i.finalizeEvent\nexport const verifyEvent = i.verifyEvent\nexport * from './core.ts'\n", "export interface Nostr {\n generateSecretKey(): Uint8Array\n getPublicKey(secretKey: Uint8Array): string\n finalizeEvent(event: EventTemplate, secretKey: Uint8Array): VerifiedEvent\n verifyEvent(event: Event): event is VerifiedEvent\n}\n\n/** Designates a verified event signature. */\nexport const verifiedSymbol = Symbol('verified')\n\nexport type NostrEvent = {\n kind: number\n tags: string[][]\n content: string\n created_at: number\n pubkey: string\n id: string\n sig: string\n [verifiedSymbol]?: boolean\n}\n\nexport type Event = NostrEvent\nexport type EventTemplate = Pick<Event, 'kind' | 'tags' | 'content' | 'created_at'>\nexport type UnsignedEvent = Pick<Event, 'kind' | 'tags' | 'content' | 'created_at' | 'pubkey'>\n\n/** An event whose signature has been verified. */\nexport interface VerifiedEvent extends Event {\n [verifiedSymbol]: true\n}\n\nconst isRecord = (obj: unknown): obj is Record<string, unknown> => obj instanceof Object\n\nexport function validateEvent<T>(event: T): event is T & UnsignedEvent {\n if (!isRecord(event)) return false\n if (typeof event.kind !== 'number') return false\n if (typeof event.content !== 'string') return false\n if (typeof event.created_at !== 'number') return false\n if (typeof event.pubkey !== 'string') return false\n if (!event.pubkey.match(/^[a-f0-9]{64}$/)) return false\n\n if (!Array.isArray(event.tags)) return false\n for (let i = 0; i < event.tags.length; i++) {\n let tag = event.tags[i]\n if (!Array.isArray(tag)) return false\n for (let j = 0; j < tag.length; j++) {\n if (typeof tag[j] !== 'string') return false\n }\n }\n\n return true\n}\n\n/**\n * Sort events in reverse-chronological order by the `created_at` timestamp,\n * and then by the event `id` (lexicographically) in case of ties.\n * This mutates the array.\n */\nexport function sortEvents(events: Event[]): Event[] {\n return events.sort((a: NostrEvent, b: NostrEvent): number => {\n if (a.created_at !== b.created_at) {\n return b.created_at - a.created_at\n }\n return a.id.localeCompare(b.id)\n })\n}\n", "import { NostrEvent, validateEvent } from './pure.ts'\n\n/** Events are **regular**, which means they're all expected to be stored by relays. */\nexport function isRegularKind(kind: number): boolean {\n return kind < 10000 && kind !== 0 && kind !== 3\n}\n\n/** Events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event is expected to (SHOULD) be stored by relays, older versions are expected to be discarded. */\nexport function isReplaceableKind(kind: number): boolean {\n return kind === 0 || kind === 3 || (10000 <= kind && kind < 20000)\n}\n\n/** Events are **ephemeral**, which means they are not expected to be stored by relays. */\nexport function isEphemeralKind(kind: number): boolean {\n return 20000 <= kind && kind < 30000\n}\n\n/** Events are **addressable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag, only the latest event is expected to be stored by relays, older versions are expected to be discarded. */\nexport function isAddressableKind(kind: number): boolean {\n return 30000 <= kind && kind < 40000\n}\n\n/** Classification of the event kind. */\nexport type KindClassification = 'regular' | 'replaceable' | 'ephemeral' | 'parameterized' | 'unknown'\n\n/** Determine the classification of this kind of event if known, or `unknown`. */\nexport function classifyKind(kind: number): KindClassification {\n if (isRegularKind(kind)) return 'regular'\n if (isReplaceableKind(kind)) return 'replaceable'\n if (isEphemeralKind(kind)) return 'ephemeral'\n if (isAddressableKind(kind)) return 'parameterized'\n return 'unknown'\n}\n\nexport function isKind<T extends number>(event: unknown, kind: T | Array<T>): event is NostrEvent & { kind: T } {\n const kindAsArray: number[] = kind instanceof Array ? kind : [kind]\n return (validateEvent(event) && kindAsArray.includes(event.kind)) || false\n}\n\nexport const Metadata = 0\nexport type Metadata = typeof Metadata\nexport const ShortTextNote = 1\nexport type ShortTextNote = typeof ShortTextNote\nexport const RecommendRelay = 2\nexport type RecommendRelay = typeof RecommendRelay\nexport const Contacts = 3\nexport type Contacts = typeof Contacts\nexport const EncryptedDirectMessage = 4\nexport type EncryptedDirectMessage = typeof EncryptedDirectMessage\nexport const EventDeletion = 5\nexport type EventDeletion = typeof EventDeletion\nexport const Repost = 6\nexport type Repost = typeof Repost\nexport const Reaction = 7\nexport type Reaction = typeof Reaction\nexport const BadgeAward = 8\nexport type BadgeAward = typeof BadgeAward\nexport const ChatMessage = 9\nexport type ChatMessage = typeof ChatMessage\nexport const ForumThread = 11\nexport type ForumThread = typeof ForumThread\nexport const Seal = 13\nexport type Seal = typeof Seal\nexport const PrivateDirectMessage = 14\nexport type PrivateDirectMessage = typeof PrivateDirectMessage\nexport const FileMessage = 15\nexport type FileMessage = typeof FileMessage\nexport const GenericRepost = 16\nexport type GenericRepost = typeof GenericRepost\nexport const Photo = 20\nexport type Photo = typeof Photo\nexport const NormalVideo = 21\nexport type NormalVideo = typeof NormalVideo\nexport const ShortVideo = 22\nexport type ShortVideo = typeof ShortVideo\nexport const ChannelCreation = 40\nexport type ChannelCreation = typeof ChannelCreation\nexport const ChannelMetadata = 41\nexport type ChannelMetadata = typeof ChannelMetadata\nexport const ChannelMessage = 42\nexport type ChannelMessage = typeof ChannelMessage\nexport const ChannelHideMessage = 43\nexport type ChannelHideMessage = typeof ChannelHideMessage\nexport const ChannelMuteUser = 44\nexport type ChannelMuteUser = typeof ChannelMuteUser\nexport const OpenTimestamps = 1040\nexport type OpenTimestamps = typeof OpenTimestamps\nexport const GiftWrap = 1059\nexport type GiftWrap = typeof GiftWrap\nexport const Poll = 1068\nexport type Poll = typeof Poll\nexport const FileMetadata = 1063\nexport type FileMetadata = typeof FileMetadata\nexport const Comment = 1111\nexport type Comment = typeof Comment\nexport const LiveChatMessage = 1311\nexport type LiveChatMessage = typeof LiveChatMessage\nexport const Voice = 1222\nexport type Voice = typeof Voice\nexport const VoiceComment = 1244\nexport type VoiceComment = typeof VoiceComment\nexport const ProblemTracker = 1971\nexport type ProblemTracker = typeof ProblemTracker\nexport const Report = 1984\nexport type Report = typeof Report\nexport const Reporting = 1984\nexport type Reporting = typeof Reporting\nexport const Label = 1985\nexport type Label = typeof Label\nexport const CommunityPostApproval = 4550\nexport type CommunityPostApproval = typeof CommunityPostApproval\nexport const JobRequest = 5999\nexport type JobRequest = typeof JobRequest\nexport const JobResult = 6999\nexport type JobResult = typeof JobResult\nexport const JobFeedback = 7000\nexport type JobFeedback = typeof JobFeedback\nexport const ZapGoal = 9041\nexport type ZapGoal = typeof ZapGoal\nexport const ZapRequest = 9734\nexport type ZapRequest = typeof ZapRequest\nexport const Zap = 9735\nexport type Zap = typeof Zap\nexport const Highlights = 9802\nexport type Highlights = typeof Highlights\nexport const PollResponse = 1018\nexport type PollResponse = typeof PollResponse\nexport const Mutelist = 10000\nexport type Mutelist = typeof Mutelist\nexport const Pinlist = 10001\nexport type Pinlist = typeof Pinlist\nexport const RelayList = 10002\nexport type RelayList = typeof RelayList\nexport const BookmarkList = 10003\nexport type BookmarkList = typeof BookmarkList\nexport const CommunitiesList = 10004\nexport type CommunitiesList = typeof CommunitiesList\nexport const PublicChatsList = 10005\nexport type PublicChatsList = typeof PublicChatsList\nexport const BlockedRelaysList = 10006\nexport type BlockedRelaysList = typeof BlockedRelaysList\nexport const SearchRelaysList = 10007\nexport type SearchRelaysList = typeof SearchRelaysList\nexport const FavoriteRelays = 10012\nexport type FavoriteRelays = typeof FavoriteRelays\nexport const InterestsList = 10015\nexport type InterestsList = typeof InterestsList\nexport const UserEmojiList = 10030\nexport type UserEmojiList = typeof UserEmojiList\nexport const DirectMessageRelaysList = 10050\nexport type DirectMessageRelaysList = typeof DirectMessageRelaysList\nexport const FileServerPreference = 10096\nexport type FileServerPreference = typeof FileServerPreference\nexport const BlossomServerList = 10063\nexport type BlossomServerList = typeof BlossomServerList\nexport const NWCWalletInfo = 13194\nexport type NWCWalletInfo = typeof NWCWalletInfo\nexport const LightningPubRPC = 21000\nexport type LightningPubRPC = typeof LightningPubRPC\nexport const ClientAuth = 22242\nexport type ClientAuth = typeof ClientAuth\nexport const NWCWalletRequest = 23194\nexport type NWCWalletRequest = typeof NWCWalletRequest\nexport const NWCWalletResponse = 23195\nexport type NWCWalletResponse = typeof NWCWalletResponse\nexport const NostrConnect = 24133\nexport type NostrConnect = typeof NostrConnect\nexport const HTTPAuth = 27235\nexport type HTTPAuth = typeof HTTPAuth\nexport const Followsets = 30000\nexport type Followsets = typeof Followsets\nexport const Genericlists = 30001\nexport type Genericlists = typeof Genericlists\nexport const Relaysets = 30002\nexport type Relaysets = typeof Relaysets\nexport const Bookmarksets = 30003\nexport type Bookmarksets = typeof Bookmarksets\nexport const Curationsets = 30004\nexport type Curationsets = typeof Curationsets\nexport const ProfileBadges = 30008\nexport type ProfileBadges = typeof ProfileBadges\nexport const BadgeDefinition = 30009\nexport type BadgeDefinition = typeof BadgeDefinition\nexport const Interestsets = 30015\nexport type Interestsets = typeof Interestsets\nexport const CreateOrUpdateStall = 30017\nexport type CreateOrUpdateStall = typeof CreateOrUpdateStall\nexport const CreateOrUpdateProduct = 30018\nexport type CreateOrUpdateProduct = typeof CreateOrUpdateProduct\nexport const LongFormArticle = 30023\nexport type LongFormArticle = typeof LongFormArticle\nexport const DraftLong = 30024\nexport type DraftLong = typeof DraftLong\nexport const Emojisets = 30030\nexport type Emojisets = typeof Emojisets\nexport const Application = 30078\nexport type Application = typeof Application\nexport const LiveEvent = 30311\nexport type LiveEvent = typeof LiveEvent\nexport const UserStatuses = 30315\nexport type UserStatuses = typeof UserStatuses\nexport const ClassifiedListing = 30402\nexport type ClassifiedListing = typeof ClassifiedListing\nexport const DraftClassifiedListing = 30403\nexport type DraftClassifiedListing = typeof DraftClassifiedListing\nexport const Date = 31922\nexport type Date = typeof Date\nexport const Time = 31923\nexport type Time = typeof Time\nexport const Calendar = 31924\nexport type Calendar = typeof Calendar\nexport const CalendarEventRSVP = 31925\nexport type CalendarEventRSVP = typeof CalendarEventRSVP\nexport const RelayReview = 31987\nexport type RelayReview = typeof RelayReview\nexport const Handlerrecommendation = 31989\nexport type Handlerrecommendation = typeof Handlerrecommendation\nexport const Handlerinformation = 31990\nexport type Handlerinformation = typeof Handlerinformation\nexport const CommunityDefinition = 34550\nexport type CommunityDefinition = typeof CommunityDefinition\nexport const GroupMetadata = 39000\nexport type GroupMetadata = typeof GroupMetadata\n", "import { EventTemplate, UnsignedEvent, NostrEvent } from './core.ts'\nimport { getConversationKey, decrypt, encrypt } from './nip44.ts'\nimport { getEventHash, generateSecretKey, finalizeEvent, getPublicKey } from './pure.ts'\nimport { Seal, GiftWrap } from './kinds.ts'\n\ntype Rumor = UnsignedEvent & { id: string }\n\nconst TWO_DAYS = 2 * 24 * 60 * 60\n\nconst now = () => Math.round(Date.now() / 1000)\nconst randomNow = () => Math.round(now() - Math.random() * TWO_DAYS)\n\nconst nip44ConversationKey = (privateKey: Uint8Array, publicKey: string) => getConversationKey(privateKey, publicKey)\n\nconst nip44Encrypt = (data: EventTemplate, privateKey: Uint8Array, publicKey: string) =>\n encrypt(JSON.stringify(data), nip44ConversationKey(privateKey, publicKey))\n\nconst nip44Decrypt = (data: NostrEvent, privateKey: Uint8Array) =>\n JSON.parse(decrypt(data.content, nip44ConversationKey(privateKey, data.pubkey)))\n\nexport function createRumor(event: Partial<UnsignedEvent>, privateKey: Uint8Array): Rumor {\n const rumor = {\n created_at: now(),\n content: '',\n tags: [],\n ...event,\n pubkey: getPublicKey(privateKey),\n } as any\n\n rumor.id = getEventHash(rumor)\n\n return rumor as Rumor\n}\n\nexport function createSeal(rumor: Rumor, privateKey: Uint8Array, recipientPublicKey: string): NostrEvent {\n return finalizeEvent(\n {\n kind: Seal,\n content: nip44Encrypt(rumor, privateKey, recipientPublicKey),\n created_at: randomNow(),\n tags: [],\n },\n privateKey,\n )\n}\n\nexport function createWrap(seal: NostrEvent, recipientPublicKey: string): NostrEvent {\n const randomKey = generateSecretKey()\n\n return finalizeEvent(\n {\n kind: GiftWrap,\n content: nip44Encrypt(seal, randomKey, recipientPublicKey),\n created_at: randomNow(),\n tags: [['p', recipientPublicKey]],\n },\n randomKey,\n ) as NostrEvent\n}\n\nexport function wrapEvent(\n event: Partial<UnsignedEvent>,\n senderPrivateKey: Uint8Array,\n recipientPublicKey: string,\n): NostrEvent {\n const rumor = createRumor(event, senderPrivateKey)\n\n const seal = createSeal(rumor, senderPrivateKey, recipientPublicKey)\n return createWrap(seal, recipientPublicKey)\n}\n\nexport function wrapManyEvents(\n event: Partial<UnsignedEvent>,\n senderPrivateKey: Uint8Array,\n recipientsPublicKeys: string[],\n): NostrEvent[] {\n if (!recipientsPublicKeys || recipientsPublicKeys.length === 0) {\n throw new Error('At least one recipient is required.')\n }\n\n const senderPublicKey = getPublicKey(senderPrivateKey)\n\n const wrappeds = [wrapEvent(event, senderPrivateKey, senderPublicKey)]\n\n recipientsPublicKeys.forEach(recipientPublicKey => {\n wrappeds.push(wrapEvent(event, senderPrivateKey, recipientPublicKey))\n })\n\n return wrappeds\n}\n\nexport function unwrapEvent(wrap: NostrEvent, recipientPrivateKey: Uint8Array): Rumor {\n const unwrappedSeal = nip44Decrypt(wrap, recipientPrivateKey)\n return nip44Decrypt(unwrappedSeal, recipientPrivateKey)\n}\n\nexport function unwrapManyEvents(wrappedEvents: NostrEvent[], recipientPrivateKey: Uint8Array): Rumor[] {\n let unwrappedEvents: Rumor[] = []\n\n wrappedEvents.forEach(e => {\n unwrappedEvents.push(unwrapEvent(e, recipientPrivateKey))\n })\n\n unwrappedEvents.sort((a, b) => a.created_at - b.created_at)\n\n return unwrappedEvents\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["hexToBytes", "hexToBytes", "bytesToHex", "hexToBytes", "i", "sha256", "bytesToHex", "hexToBytes", "sha256"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// kinds.ts
|
|
2
|
+
var ZapGoal = 9041;
|
|
3
|
+
|
|
4
|
+
// nip75.ts
|
|
5
|
+
function generateGoalEventTemplate({
|
|
6
|
+
amount,
|
|
7
|
+
content,
|
|
8
|
+
relays,
|
|
9
|
+
a,
|
|
10
|
+
closedAt,
|
|
11
|
+
image,
|
|
12
|
+
r,
|
|
13
|
+
summary,
|
|
14
|
+
zapTags
|
|
15
|
+
}) {
|
|
16
|
+
const tags = [
|
|
17
|
+
["amount", amount],
|
|
18
|
+
["relays", ...relays]
|
|
19
|
+
];
|
|
20
|
+
closedAt && tags.push(["closed_at", closedAt.toString()]);
|
|
21
|
+
image && tags.push(["image", image]);
|
|
22
|
+
summary && tags.push(["summary", summary]);
|
|
23
|
+
r && tags.push(["r", r]);
|
|
24
|
+
a && tags.push(["a", a]);
|
|
25
|
+
zapTags && tags.push(...zapTags);
|
|
26
|
+
const eventTemplate = {
|
|
27
|
+
created_at: Math.floor(Date.now() / 1e3),
|
|
28
|
+
kind: ZapGoal,
|
|
29
|
+
content,
|
|
30
|
+
tags
|
|
31
|
+
};
|
|
32
|
+
return eventTemplate;
|
|
33
|
+
}
|
|
34
|
+
function validateZapGoalEvent(event) {
|
|
35
|
+
if (event.kind !== ZapGoal)
|
|
36
|
+
return false;
|
|
37
|
+
const requiredTags = ["amount", "relays"];
|
|
38
|
+
for (const tag of requiredTags) {
|
|
39
|
+
if (!event.tags.find(([t]) => t == tag))
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
generateGoalEventTemplate,
|
|
46
|
+
validateZapGoalEvent
|
|
47
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../kinds.ts", "../../nip75.ts"],
|
|
4
|
+
"sourcesContent": ["import { NostrEvent, validateEvent } from './pure.ts'\n\n/** Events are **regular**, which means they're all expected to be stored by relays. */\nexport function isRegularKind(kind: number): boolean {\n return kind < 10000 && kind !== 0 && kind !== 3\n}\n\n/** Events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event is expected to (SHOULD) be stored by relays, older versions are expected to be discarded. */\nexport function isReplaceableKind(kind: number): boolean {\n return kind === 0 || kind === 3 || (10000 <= kind && kind < 20000)\n}\n\n/** Events are **ephemeral**, which means they are not expected to be stored by relays. */\nexport function isEphemeralKind(kind: number): boolean {\n return 20000 <= kind && kind < 30000\n}\n\n/** Events are **addressable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag, only the latest event is expected to be stored by relays, older versions are expected to be discarded. */\nexport function isAddressableKind(kind: number): boolean {\n return 30000 <= kind && kind < 40000\n}\n\n/** Classification of the event kind. */\nexport type KindClassification = 'regular' | 'replaceable' | 'ephemeral' | 'parameterized' | 'unknown'\n\n/** Determine the classification of this kind of event if known, or `unknown`. */\nexport function classifyKind(kind: number): KindClassification {\n if (isRegularKind(kind)) return 'regular'\n if (isReplaceableKind(kind)) return 'replaceable'\n if (isEphemeralKind(kind)) return 'ephemeral'\n if (isAddressableKind(kind)) return 'parameterized'\n return 'unknown'\n}\n\nexport function isKind<T extends number>(event: unknown, kind: T | Array<T>): event is NostrEvent & { kind: T } {\n const kindAsArray: number[] = kind instanceof Array ? kind : [kind]\n return (validateEvent(event) && kindAsArray.includes(event.kind)) || false\n}\n\nexport const Metadata = 0\nexport type Metadata = typeof Metadata\nexport const ShortTextNote = 1\nexport type ShortTextNote = typeof ShortTextNote\nexport const RecommendRelay = 2\nexport type RecommendRelay = typeof RecommendRelay\nexport const Contacts = 3\nexport type Contacts = typeof Contacts\nexport const EncryptedDirectMessage = 4\nexport type EncryptedDirectMessage = typeof EncryptedDirectMessage\nexport const EventDeletion = 5\nexport type EventDeletion = typeof EventDeletion\nexport const Repost = 6\nexport type Repost = typeof Repost\nexport const Reaction = 7\nexport type Reaction = typeof Reaction\nexport const BadgeAward = 8\nexport type BadgeAward = typeof BadgeAward\nexport const ChatMessage = 9\nexport type ChatMessage = typeof ChatMessage\nexport const ForumThread = 11\nexport type ForumThread = typeof ForumThread\nexport const Seal = 13\nexport type Seal = typeof Seal\nexport const PrivateDirectMessage = 14\nexport type PrivateDirectMessage = typeof PrivateDirectMessage\nexport const FileMessage = 15\nexport type FileMessage = typeof FileMessage\nexport const GenericRepost = 16\nexport type GenericRepost = typeof GenericRepost\nexport const Photo = 20\nexport type Photo = typeof Photo\nexport const NormalVideo = 21\nexport type NormalVideo = typeof NormalVideo\nexport const ShortVideo = 22\nexport type ShortVideo = typeof ShortVideo\nexport const ChannelCreation = 40\nexport type ChannelCreation = typeof ChannelCreation\nexport const ChannelMetadata = 41\nexport type ChannelMetadata = typeof ChannelMetadata\nexport const ChannelMessage = 42\nexport type ChannelMessage = typeof ChannelMessage\nexport const ChannelHideMessage = 43\nexport type ChannelHideMessage = typeof ChannelHideMessage\nexport const ChannelMuteUser = 44\nexport type ChannelMuteUser = typeof ChannelMuteUser\nexport const OpenTimestamps = 1040\nexport type OpenTimestamps = typeof OpenTimestamps\nexport const GiftWrap = 1059\nexport type GiftWrap = typeof GiftWrap\nexport const Poll = 1068\nexport type Poll = typeof Poll\nexport const FileMetadata = 1063\nexport type FileMetadata = typeof FileMetadata\nexport const Comment = 1111\nexport type Comment = typeof Comment\nexport const LiveChatMessage = 1311\nexport type LiveChatMessage = typeof LiveChatMessage\nexport const Voice = 1222\nexport type Voice = typeof Voice\nexport const VoiceComment = 1244\nexport type VoiceComment = typeof VoiceComment\nexport const ProblemTracker = 1971\nexport type ProblemTracker = typeof ProblemTracker\nexport const Report = 1984\nexport type Report = typeof Report\nexport const Reporting = 1984\nexport type Reporting = typeof Reporting\nexport const Label = 1985\nexport type Label = typeof Label\nexport const CommunityPostApproval = 4550\nexport type CommunityPostApproval = typeof CommunityPostApproval\nexport const JobRequest = 5999\nexport type JobRequest = typeof JobRequest\nexport const JobResult = 6999\nexport type JobResult = typeof JobResult\nexport const JobFeedback = 7000\nexport type JobFeedback = typeof JobFeedback\nexport const ZapGoal = 9041\nexport type ZapGoal = typeof ZapGoal\nexport const ZapRequest = 9734\nexport type ZapRequest = typeof ZapRequest\nexport const Zap = 9735\nexport type Zap = typeof Zap\nexport const Highlights = 9802\nexport type Highlights = typeof Highlights\nexport const PollResponse = 1018\nexport type PollResponse = typeof PollResponse\nexport const Mutelist = 10000\nexport type Mutelist = typeof Mutelist\nexport const Pinlist = 10001\nexport type Pinlist = typeof Pinlist\nexport const RelayList = 10002\nexport type RelayList = typeof RelayList\nexport const BookmarkList = 10003\nexport type BookmarkList = typeof BookmarkList\nexport const CommunitiesList = 10004\nexport type CommunitiesList = typeof CommunitiesList\nexport const PublicChatsList = 10005\nexport type PublicChatsList = typeof PublicChatsList\nexport const BlockedRelaysList = 10006\nexport type BlockedRelaysList = typeof BlockedRelaysList\nexport const SearchRelaysList = 10007\nexport type SearchRelaysList = typeof SearchRelaysList\nexport const FavoriteRelays = 10012\nexport type FavoriteRelays = typeof FavoriteRelays\nexport const InterestsList = 10015\nexport type InterestsList = typeof InterestsList\nexport const UserEmojiList = 10030\nexport type UserEmojiList = typeof UserEmojiList\nexport const DirectMessageRelaysList = 10050\nexport type DirectMessageRelaysList = typeof DirectMessageRelaysList\nexport const FileServerPreference = 10096\nexport type FileServerPreference = typeof FileServerPreference\nexport const BlossomServerList = 10063\nexport type BlossomServerList = typeof BlossomServerList\nexport const NWCWalletInfo = 13194\nexport type NWCWalletInfo = typeof NWCWalletInfo\nexport const LightningPubRPC = 21000\nexport type LightningPubRPC = typeof LightningPubRPC\nexport const ClientAuth = 22242\nexport type ClientAuth = typeof ClientAuth\nexport const NWCWalletRequest = 23194\nexport type NWCWalletRequest = typeof NWCWalletRequest\nexport const NWCWalletResponse = 23195\nexport type NWCWalletResponse = typeof NWCWalletResponse\nexport const NostrConnect = 24133\nexport type NostrConnect = typeof NostrConnect\nexport const HTTPAuth = 27235\nexport type HTTPAuth = typeof HTTPAuth\nexport const Followsets = 30000\nexport type Followsets = typeof Followsets\nexport const Genericlists = 30001\nexport type Genericlists = typeof Genericlists\nexport const Relaysets = 30002\nexport type Relaysets = typeof Relaysets\nexport const Bookmarksets = 30003\nexport type Bookmarksets = typeof Bookmarksets\nexport const Curationsets = 30004\nexport type Curationsets = typeof Curationsets\nexport const ProfileBadges = 30008\nexport type ProfileBadges = typeof ProfileBadges\nexport const BadgeDefinition = 30009\nexport type BadgeDefinition = typeof BadgeDefinition\nexport const Interestsets = 30015\nexport type Interestsets = typeof Interestsets\nexport const CreateOrUpdateStall = 30017\nexport type CreateOrUpdateStall = typeof CreateOrUpdateStall\nexport const CreateOrUpdateProduct = 30018\nexport type CreateOrUpdateProduct = typeof CreateOrUpdateProduct\nexport const LongFormArticle = 30023\nexport type LongFormArticle = typeof LongFormArticle\nexport const DraftLong = 30024\nexport type DraftLong = typeof DraftLong\nexport const Emojisets = 30030\nexport type Emojisets = typeof Emojisets\nexport const Application = 30078\nexport type Application = typeof Application\nexport const LiveEvent = 30311\nexport type LiveEvent = typeof LiveEvent\nexport const UserStatuses = 30315\nexport type UserStatuses = typeof UserStatuses\nexport const ClassifiedListing = 30402\nexport type ClassifiedListing = typeof ClassifiedListing\nexport const DraftClassifiedListing = 30403\nexport type DraftClassifiedListing = typeof DraftClassifiedListing\nexport const Date = 31922\nexport type Date = typeof Date\nexport const Time = 31923\nexport type Time = typeof Time\nexport const Calendar = 31924\nexport type Calendar = typeof Calendar\nexport const CalendarEventRSVP = 31925\nexport type CalendarEventRSVP = typeof CalendarEventRSVP\nexport const RelayReview = 31987\nexport type RelayReview = typeof RelayReview\nexport const Handlerrecommendation = 31989\nexport type Handlerrecommendation = typeof Handlerrecommendation\nexport const Handlerinformation = 31990\nexport type Handlerinformation = typeof Handlerinformation\nexport const CommunityDefinition = 34550\nexport type CommunityDefinition = typeof CommunityDefinition\nexport const GroupMetadata = 39000\nexport type GroupMetadata = typeof GroupMetadata\n", "import { Event, EventTemplate } from './core.ts'\nimport { ZapGoal } from './kinds.ts'\n\n/**\n * Represents a fundraising goal in the Nostr network as defined by NIP-75.\n * This type is used to structure the information needed to create a goal event (`kind:9041`).\n */\nexport type Goal = {\n /**\n * A human-readable description of the fundraising goal.\n * This content should provide clear information about the purpose of the fundraising.\n */\n content: string\n\n /**\n * The target amount for the fundraising goal in milisats.\n * This defines the financial target that the fundraiser aims to reach.\n */\n amount: string\n\n /**\n * A list of relays where the zaps towards this goal will be sent to and tallied from.\n * Each relay is represented by its WebSocket URL.\n */\n relays: string[]\n\n /**\n * An optional timestamp (in seconds, UNIX epoch) indicating when the fundraising goal is considered closed.\n * Zaps published after this timestamp should not count towards the goal progress.\n * If not provided, the goal remains open indefinitely or until manually closed.\n */\n closedAt?: number\n\n /**\n * An optional URL to an image related to the goal.\n * This can be used to visually represent the goal on client interfaces.\n */\n image?: string\n\n /**\n * An optional brief description or summary of the goal.\n * This can provide a quick overview of the goal, separate from the detailed `content`.\n */\n summary?: string\n\n /**\n * An optional URL related to the goal, providing additional information or actions through an 'r' tag.\n * This is a single URL, as per NIP-75 specifications for linking additional resources.\n */\n r?: string\n\n /**\n * An optional parameterized replaceable event linked to the goal, specified through an 'a' tag.\n * This is a single event id, aligning with NIP-75's allowance for linking to specific events.\n */\n a?: string\n\n /**\n * Optional tags specifying multiple beneficiary pubkeys or additional criteria for zapping,\n * allowing contributions to be directed towards multiple recipients or according to specific conditions.\n */\n zapTags?: string[][]\n}\n\n/**\n * Generates an EventTemplate for a fundraising goal based on the provided ZapGoal object.\n * This function is tailored to fit the structure of EventTemplate as defined in the library.\n * @param zapGoal The ZapGoal object containing the details of the fundraising goal.\n * @returns An EventTemplate object structured for creating a Nostr event.\n */\nexport function generateGoalEventTemplate({\n amount,\n content,\n relays,\n a,\n closedAt,\n image,\n r,\n summary,\n zapTags,\n}: Goal): EventTemplate {\n const tags: string[][] = [\n ['amount', amount],\n ['relays', ...relays],\n ]\n\n // Append optional tags based on the presence of optional properties in zapGoal\n closedAt && tags.push(['closed_at', closedAt.toString()])\n image && tags.push(['image', image])\n summary && tags.push(['summary', summary])\n r && tags.push(['r', r])\n a && tags.push(['a', a])\n zapTags && tags.push(...zapTags)\n\n // Construct the EventTemplate object\n const eventTemplate: EventTemplate = {\n created_at: Math.floor(Date.now() / 1000),\n kind: ZapGoal,\n content,\n tags,\n }\n\n return eventTemplate\n}\n\nexport function validateZapGoalEvent(event: Event): boolean {\n if (event.kind !== ZapGoal) return false\n\n const requiredTags = ['amount', 'relays'] as const\n for (const tag of requiredTags) {\n if (!event.tags.find(([t]) => t == tag)) return false\n }\n\n return true\n}\n"],
|
|
5
|
+
"mappings": ";AAqHO,IAAM,UAAU;;;AC/ChB,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,OAAmB;AAAA,IACvB,CAAC,UAAU,MAAM;AAAA,IACjB,CAAC,UAAU,GAAG,MAAM;AAAA,EACtB;AAGA,cAAY,KAAK,KAAK,CAAC,aAAa,SAAS,SAAS,CAAC,CAAC;AACxD,WAAS,KAAK,KAAK,CAAC,SAAS,KAAK,CAAC;AACnC,aAAW,KAAK,KAAK,CAAC,WAAW,OAAO,CAAC;AACzC,OAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC;AACvB,OAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC;AACvB,aAAW,KAAK,KAAK,GAAG,OAAO;AAG/B,QAAM,gBAA+B;AAAA,IACnC,YAAY,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI;AAAA,IACxC,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,qBAAqB,OAAuB;AAC1D,MAAI,MAAM,SAAS;AAAS,WAAO;AAEnC,QAAM,eAAe,CAAC,UAAU,QAAQ;AACxC,aAAW,OAAO,cAAc;AAC9B,QAAI,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG;AAAG,aAAO;AAAA,EAClD;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|