@dxos/vendor-hypercore 0.8.4-main.1da679c
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/LICENSE +8 -0
- package/dist/lib/browser/chunk-XAJ5RWMK.mjs +223 -0
- package/dist/lib/browser/chunk-XAJ5RWMK.mjs.map +7 -0
- package/dist/lib/browser/hypercore-crypto.mjs +25 -0
- package/dist/lib/browser/hypercore-crypto.mjs.map +7 -0
- package/dist/lib/browser/hypercore.mjs +10187 -0
- package/dist/lib/browser/hypercore.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/chunk-IEADO42Y.mjs +222 -0
- package/dist/lib/node-esm/chunk-IEADO42Y.mjs.map +7 -0
- package/dist/lib/node-esm/hypercore-crypto.mjs +25 -0
- package/dist/lib/node-esm/hypercore-crypto.mjs.map +7 -0
- package/dist/lib/node-esm/hypercore.mjs +9630 -0
- package/dist/lib/node-esm/hypercore.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/package.json +41 -0
- package/src/empty.js +13 -0
- package/src/hypercore-crypto-stub.js +11 -0
- package/src/hypercore-crypto.d.ts +22 -0
- package/src/hypercore-crypto.js +1 -0
- package/src/hypercore.d.ts +299 -0
- package/src/hypercore.js +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"../../node_modules/.pnpm/last-one-wins@1.0.4/node_modules/last-one-wins/index.js":{"bytes":712,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/unordered-array-remove@1.0.2/node_modules/unordered-array-remove/index.js":{"bytes":212,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js":{"bytes":677,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js":{"bytes":5856,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/merkle-tree-stream@4.0.0/node_modules/merkle-tree-stream/generator.js":{"bytes":1621,"imports":[{"path":"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"}],"format":"cjs"},"../../node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js":{"bytes":1956,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/atomic-batcher@1.0.2/node_modules/atomic-batcher/index.js":{"bytes":1230,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js":{"bytes":753,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js":{"bytes":250,"imports":[{"path":"node:util","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","kind":"require-call","original":"./inherits_browser.js"}],"format":"cjs"},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/encode.js":{"bytes":452,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/decode.js":{"bytes":515,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/length.js":{"bytes":471,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/index.js":{"bytes":134,"imports":[{"path":"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/encode.js","kind":"require-call","original":"./encode.js"},{"path":"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/decode.js","kind":"require-call","original":"./decode.js"},{"path":"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/length.js","kind":"require-call","original":"./length.js"}],"format":"cjs"},"../../node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js":{"bytes":356,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js":{"bytes":4094,"imports":[{"path":"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/index.js","kind":"require-call","original":"varint"},{"path":"../../node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js","kind":"require-call","original":"buffer-alloc-unsafe"}],"format":"cjs"},"../../node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js":{"bytes":3731,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js":{"bytes":2303,"imports":[{"path":"../../node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js","kind":"require-call","original":"memory-pager"}],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/bitfield.js":{"bytes":8371,"imports":[{"path":"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"../../node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js","kind":"require-call","original":"bitfield-rle"},{"path":"../../node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js","kind":"require-call","original":"memory-pager"},{"path":"../../node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js","kind":"require-call","original":"sparse-bitfield"}],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js":{"bytes":4624,"imports":[{"path":"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"../../node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js","kind":"require-call","original":"sparse-bitfield"}],"format":"cjs"},"../../node_modules/.pnpm/buffer-fill@1.0.0/node_modules/buffer-fill/index.js":{"bytes":2433,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/buffer-alloc@1.2.0/node_modules/buffer-alloc/index.js":{"bytes":664,"imports":[{"path":"../../node_modules/.pnpm/buffer-fill@1.0.0/node_modules/buffer-fill/index.js","kind":"require-call","original":"buffer-fill"},{"path":"../../node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js","kind":"require-call","original":"buffer-alloc-unsafe"}],"format":"cjs"},"../../node_modules/.pnpm/uint64be@2.0.2/node_modules/uint64be/index.js":{"bytes":637,"imports":[{"path":"../../node_modules/.pnpm/buffer-alloc@1.2.0/node_modules/buffer-alloc/index.js","kind":"require-call","original":"buffer-alloc"}],"format":"cjs"},"../../node_modules/.pnpm/hypercore-cache@1.0.2/node_modules/hypercore-cache/index.js":{"bytes":2818,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/cache.js":{"bytes":777,"imports":[{"path":"../../node_modules/.pnpm/hypercore-cache@1.0.2/node_modules/hypercore-cache/index.js","kind":"require-call","original":"hypercore-cache"}],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/storage.js":{"bytes":10122,"imports":[{"path":"../../node_modules/.pnpm/uint64be@2.0.2/node_modules/uint64be/index.js","kind":"require-call","original":"uint64be"},{"path":"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/cache.js","kind":"require-call","original":"./cache"}],"format":"cjs"},"../../node_modules/.pnpm/uint64be@3.0.0/node_modules/uint64be/index.js":{"bytes":611,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js":{"bytes":4243,"imports":[{"path":"sodium-universal","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/uint64be@3.0.0/node_modules/uint64be/index.js","kind":"require-call","original":"uint64be"}],"format":"cjs"},"../../node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js":{"bytes":129,"imports":[{"path":"node:util","kind":"require-call","external":true}],"format":"cjs"},"../../node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js":{"bytes":219,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js":{"bytes":1199,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/safe-buffer-equals.js":{"bytes":185,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js":{"bytes":438,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js":{"bytes":7293,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher.js":{"bytes":2722,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_aead","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js":{"bytes":3101,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/helpers","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher.js","kind":"require-call","original":"./cipher"}],"format":"cjs"},"../../node_modules/.pnpm/nanoassert@1.1.0/node_modules/nanoassert/index.js":{"bytes":396,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/hmac-blake2b@2.0.0/node_modules/hmac-blake2b/index.js":{"bytes":1520,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@1.1.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js":{"bytes":1092,"imports":[{"path":"sodium-universal/crypto_kx","kind":"require-call","external":true},{"path":"sodium-universal/crypto_scalarmult","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js":{"bytes":1482,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"../../node_modules/.pnpm/hmac-blake2b@2.0.0/node_modules/hmac-blake2b/index.js","kind":"require-call","original":"hmac-blake2b"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js","kind":"require-call","original":"./dh"}],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js":{"bytes":4758,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js","kind":"require-call","original":"./cipher-state"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js","kind":"require-call","original":"./hash"}],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/handshake-state.js":{"bytes":12735,"imports":[{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"},{"path":"../../node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js","kind":"require-call","original":"clone"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js","kind":"require-call","original":"./symmetric-state"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js","kind":"require-call","original":"./cipher-state"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js","kind":"require-call","original":"./dh"}],"format":"cjs"},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/index.js":{"bytes":46,"imports":[{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/handshake-state.js","kind":"require-call","original":"./handshake-state"}],"format":"cjs"},"../../node_modules/.pnpm/simple-handshake@3.0.0/node_modules/simple-handshake/index.js":{"bytes":4170,"imports":[{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/index.js","kind":"require-call","original":"noise-protocol"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js","kind":"require-call","original":"noise-protocol/symmetric-state"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js","kind":"require-call","original":"noise-protocol/hash"},{"path":"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js","kind":"require-call","original":"nanoassert"}],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/encode.js":{"bytes":452,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/decode.js":{"bytes":508,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/length.js":{"bytes":471,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js":{"bytes":134,"imports":[{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/encode.js","kind":"require-call","original":"./encode.js"},{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/decode.js","kind":"require-call","original":"./decode.js"},{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/length.js","kind":"require-call","original":"./length.js"}],"format":"cjs"},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/handshake.js":{"bytes":3605,"imports":[{"path":"../../node_modules/.pnpm/simple-handshake@3.0.0/node_modules/simple-handshake/index.js","kind":"require-call","original":"simple-handshake"},{"path":"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js","kind":"require-call","original":"noise-protocol/dh"},{"path":"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/encode.js":{"bytes":452,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/decode.js":{"bytes":508,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/length.js":{"bytes":471,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/index.js":{"bytes":134,"imports":[{"path":"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/encode.js","kind":"require-call","original":"./encode.js"},{"path":"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/decode.js","kind":"require-call","original":"./decode.js"},{"path":"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/length.js","kind":"require-call","original":"./length.js"}],"format":"cjs"},"../../node_modules/.pnpm/signed-varint@2.0.1/node_modules/signed-varint/index.js":{"bytes":435,"imports":[{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"../../node_modules/.pnpm/b4a@1.6.4/node_modules/b4a/index.js":{"bytes":3179,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/protocol-buffers-encodings@1.2.0/node_modules/protocol-buffers-encodings/index.js":{"bytes":6489,"imports":[{"path":"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/index.js","kind":"require-call","original":"varint"},{"path":"../../node_modules/.pnpm/signed-varint@2.0.1/node_modules/signed-varint/index.js","kind":"require-call","original":"signed-varint"},{"path":"../../node_modules/.pnpm/b4a@1.6.4/node_modules/b4a/index.js","kind":"require-call","original":"b4a"}],"format":"cjs"},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/messages.js":{"bytes":30739,"imports":[{"path":"../../node_modules/.pnpm/protocol-buffers-encodings@1.2.0/node_modules/protocol-buffers-encodings/index.js","kind":"require-call","original":"protocol-buffers-encodings"}],"format":"cjs"},"../../node_modules/.pnpm/xsalsa20-universal@1.0.0/node_modules/xsalsa20-universal/index.js":{"bytes":450,"imports":[{"path":"sodium-native","kind":"require-call","external":true}],"format":"cjs"},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/xor.js":{"bytes":609,"imports":[{"path":"../../node_modules/.pnpm/xsalsa20-universal@1.0.0/node_modules/xsalsa20-universal/index.js","kind":"require-call","original":"xsalsa20-universal"},{"path":"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"}],"format":"cjs"},"../../node_modules/.pnpm/simple-message-channels@1.2.1/node_modules/simple-message-channels/index.js":{"bytes":5278,"imports":[{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/index.js":{"bytes":7913,"imports":[{"path":"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/handshake.js","kind":"require-call","original":"./lib/handshake"},{"path":"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/messages.js","kind":"require-call","original":"./messages"},{"path":"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/xor.js","kind":"require-call","original":"./lib/xor"},{"path":"../../node_modules/.pnpm/simple-message-channels@1.2.1/node_modules/simple-message-channels/index.js","kind":"require-call","original":"simple-message-channels"},{"path":"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js","kind":"require-call","original":"varint"}],"format":"cjs"},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/refresh.js":{"bytes":578,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/browser.js":{"bytes":620,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/timers.js":{"bytes":739,"imports":[{"path":"node:timers","kind":"require-call","external":true}],"format":"cjs"},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js":{"bytes":190,"imports":[{"path":"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/refresh.js","kind":"require-call","original":"./refresh"},{"path":"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/browser.js","kind":"require-call","original":"./browser"},{"path":"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/timers.js","kind":"require-call","original":"./timers"}],"format":"cjs"},"../../node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js":{"bytes":3630,"imports":[{"path":"../../node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js","kind":"require-call","original":"codecs"}],"format":"cjs"},"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js":{"bytes":3024,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js":{"bytes":6915,"imports":[{"path":"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","kind":"require-call","original":"ms"}],"format":"cjs"},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js":{"bytes":6103,"imports":[{"path":"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js","kind":"require-call","original":"./common"}],"format":"cjs"},"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":{"bytes":330,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js":{"bytes":3065,"imports":[{"path":"node:os","kind":"require-call","external":true},{"path":"node:tty","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js","kind":"require-call","original":"has-flag"}],"format":"cjs"},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js":{"bytes":4728,"imports":[{"path":"node:tty","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js","kind":"require-call","original":"supports-color"},{"path":"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js","kind":"require-call","original":"./common"}],"format":"cjs"},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js":{"bytes":314,"imports":[{"path":"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js","kind":"require-call","original":"./browser.js"},{"path":"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js","kind":"require-call","original":"./node.js"}],"format":"cjs"},"../../node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js":{"bytes":15546,"imports":[{"path":"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/index.js","kind":"require-call","original":"simple-hypercore-protocol"},{"path":"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js","kind":"require-call","original":"timeout-refresh"},{"path":"../../node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js","kind":"require-call","original":"inspect-custom-symbol"},{"path":"../../node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js","kind":"require-call","original":"nanoguard"},{"path":"../../node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js","kind":"require-call","original":"pretty-hash"},{"path":"../../node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js","kind":"require-call","original":"abstract-extension"},{"path":"streamx","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js","kind":"require-call","original":"debug"}],"format":"cjs"},"../../node_modules/.pnpm/count-trailing-zeros@1.0.1/node_modules/count-trailing-zeros/ctz.js":{"bytes":226,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/fast-bitfield@1.2.2/node_modules/fast-bitfield/index.js":{"bytes":10700,"imports":[{"path":"../../node_modules/.pnpm/count-trailing-zeros@1.0.1/node_modules/count-trailing-zeros/ctz.js","kind":"require-call","original":"count-trailing-zeros"}],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/replicate.js":{"bytes":23715,"imports":[{"path":"../../node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js","kind":"require-call","original":"hypercore-protocol"},{"path":"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js","kind":"require-call","original":"timeout-refresh"},{"path":"../../node_modules/.pnpm/fast-bitfield@1.2.2/node_modules/fast-bitfield/index.js","kind":"require-call","original":"fast-bitfield"},{"path":"../../node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js","kind":"require-call","original":"unordered-set"},{"path":"../../node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js","kind":"require-call","original":"bitfield-rle"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js","kind":"require-call","original":"./tree-index"}],"format":"cjs"},"../../node_modules/.pnpm/nanoresource@1.3.0/node_modules/nanoresource/emitter.js":{"bytes":3204,"imports":[{"path":"node:events","kind":"require-call","external":true},{"path":"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js","kind":"require-call","original":"inherits"}],"format":"cjs"},"src/empty.js":{"bytes":282,"imports":[],"format":"cjs"},"../../node_modules/.pnpm/hypercore-streams@1.0.1/node_modules/hypercore-streams/index.js":{"bytes":1970,"imports":[{"path":"streamx","kind":"require-call","external":true}],"format":"cjs"},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js":{"bytes":50005,"imports":[{"path":"../../node_modules/.pnpm/last-one-wins@1.0.4/node_modules/last-one-wins/index.js","kind":"require-call","original":"last-one-wins"},{"path":"../../node_modules/.pnpm/unordered-array-remove@1.0.2/node_modules/unordered-array-remove/index.js","kind":"require-call","original":"unordered-array-remove"},{"path":"../../node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js","kind":"require-call","original":"unordered-set"},{"path":"../../node_modules/.pnpm/merkle-tree-stream@4.0.0/node_modules/merkle-tree-stream/generator.js","kind":"require-call","original":"merkle-tree-stream/generator"},{"path":"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js","kind":"require-call","original":"flat-tree"},{"path":"../../node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js","kind":"require-call","original":"codecs"},{"path":"../../node_modules/.pnpm/atomic-batcher@1.0.2/node_modules/atomic-batcher/index.js","kind":"require-call","original":"atomic-batcher"},{"path":"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js","kind":"require-call","original":"inherits"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/bitfield.js","kind":"require-call","original":"./lib/bitfield"},{"path":"../../node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js","kind":"require-call","original":"sparse-bitfield"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js","kind":"require-call","original":"./lib/tree-index"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/storage.js","kind":"require-call","original":"./lib/storage"},{"path":"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"require-call","original":"hypercore-crypto"},{"path":"../../node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js","kind":"require-call","original":"inspect-custom-symbol"},{"path":"../../node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js","kind":"require-call","original":"pretty-hash"},{"path":"../../node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js","kind":"require-call","original":"nanoguard"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/safe-buffer-equals.js","kind":"require-call","original":"./lib/safe-buffer-equals"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/replicate.js","kind":"require-call","original":"./lib/replicate"},{"path":"../../node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js","kind":"require-call","original":"hypercore-protocol"},{"path":"../../node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js","kind":"require-call","original":"abstract-extension"},{"path":"../../node_modules/.pnpm/nanoresource@1.3.0/node_modules/nanoresource/emitter.js","kind":"require-call","original":"nanoresource/emitter"},{"path":"src/empty.js","kind":"require-call","original":"hypercore-default-storage"},{"path":"../../node_modules/.pnpm/hypercore-streams@1.0.1/node_modules/hypercore-streams/index.js","kind":"require-call","original":"hypercore-streams"}],"format":"cjs"},"src/hypercore.js":{"bytes":64,"imports":[{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js","kind":"import-statement","original":"hypercore"},{"path":"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js","kind":"import-statement","original":"hypercore"}],"format":"esm"},"src/hypercore-crypto.js":{"bytes":111,"imports":[{"path":"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js","kind":"import-statement","original":"hypercore-crypto"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/hypercore.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":541943},"dist/lib/node-esm/hypercore.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-IEADO42Y.mjs","kind":"import-statement"},{"path":"node:util","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_aead","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/helpers","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"sodium-universal/crypto_kx","kind":"require-call","external":true},{"path":"sodium-universal/crypto_scalarmult","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/crypto_generichash","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-universal/memory","kind":"require-call","external":true},{"path":"sodium-native","kind":"require-call","external":true},{"path":"node:timers","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:tty","kind":"require-call","external":true},{"path":"node:tty","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"streamx","kind":"require-call","external":true},{"path":"node:events","kind":"require-call","external":true},{"path":"streamx","kind":"require-call","external":true}],"exports":["default"],"entryPoint":"src/hypercore.js","inputs":{"../../node_modules/.pnpm/last-one-wins@1.0.4/node_modules/last-one-wins/index.js":{"bytesInOutput":1030},"../../node_modules/.pnpm/unordered-array-remove@1.0.2/node_modules/unordered-array-remove/index.js":{"bytesInOutput":441},"../../node_modules/.pnpm/unordered-set@2.0.1/node_modules/unordered-set/index.js":{"bytesInOutput":952},"../../node_modules/.pnpm/flat-tree@1.9.0/node_modules/flat-tree/index.js":{"bytesInOutput":6847},"../../node_modules/.pnpm/merkle-tree-stream@4.0.0/node_modules/merkle-tree-stream/generator.js":{"bytesInOutput":1758},"../../node_modules/.pnpm/codecs@2.2.0/node_modules/codecs/index.js":{"bytesInOutput":2385},"../../node_modules/.pnpm/atomic-batcher@1.0.2/node_modules/atomic-batcher/index.js":{"bytesInOutput":1593},"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js":{"bytesInOutput":934},"../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js":{"bytesInOutput":372},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/encode.js":{"bytesInOutput":669},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/decode.js":{"bytesInOutput":669},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/length.js":{"bytesInOutput":618},"../../node_modules/.pnpm/varint@4.0.1/node_modules/varint/index.js":{"bytesInOutput":265},"../../node_modules/.pnpm/buffer-alloc-unsafe@1.1.0/node_modules/buffer-alloc-unsafe/index.js":{"bytesInOutput":584},"../../node_modules/.pnpm/bitfield-rle@2.2.1/node_modules/bitfield-rle/index.js":{"bytesInOutput":4752},"../../node_modules/.pnpm/memory-pager@1.5.0/node_modules/memory-pager/index.js":{"bytesInOutput":4429},"../../node_modules/.pnpm/sparse-bitfield@3.0.3/node_modules/sparse-bitfield/index.js":{"bytesInOutput":2759},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/bitfield.js":{"bytesInOutput":9535},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/tree-index.js":{"bytesInOutput":4951},"../../node_modules/.pnpm/buffer-fill@1.0.0/node_modules/buffer-fill/index.js":{"bytesInOutput":2795},"../../node_modules/.pnpm/buffer-alloc@1.2.0/node_modules/buffer-alloc/index.js":{"bytesInOutput":904},"../../node_modules/.pnpm/uint64be@2.0.2/node_modules/uint64be/index.js":{"bytesInOutput":861},"../../node_modules/.pnpm/hypercore-cache@1.0.2/node_modules/hypercore-cache/index.js":{"bytesInOutput":3285},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/cache.js":{"bytesInOutput":1000},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/storage.js":{"bytesInOutput":11140},"../../node_modules/.pnpm/inspect-custom-symbol@1.1.1/node_modules/inspect-custom-symbol/index.js":{"bytesInOutput":327},"../../node_modules/.pnpm/pretty-hash@1.0.1/node_modules/pretty-hash/index.js":{"bytesInOutput":397},"../../node_modules/.pnpm/nanoguard@1.3.0/node_modules/nanoguard/index.js":{"bytesInOutput":1565},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/safe-buffer-equals.js":{"bytesInOutput":321},"../../node_modules/.pnpm/nanoassert@2.0.0/node_modules/nanoassert/index.js":{"bytesInOutput":474},"../../node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js":{"bytesInOutput":6752},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher.js":{"bytesInOutput":3090},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/cipher-state.js":{"bytesInOutput":3676},"../../node_modules/.pnpm/nanoassert@1.1.0/node_modules/nanoassert/index.js":{"bytesInOutput":549},"../../node_modules/.pnpm/hmac-blake2b@2.0.0/node_modules/hmac-blake2b/index.js":{"bytesInOutput":1628},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/dh.js":{"bytesInOutput":1357},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/hash.js":{"bytesInOutput":1746},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/symmetric-state.js":{"bytesInOutput":5126},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/handshake-state.js":{"bytesInOutput":14414},"../../node_modules/.pnpm/noise-protocol@3.0.1/node_modules/noise-protocol/index.js":{"bytesInOutput":204},"../../node_modules/.pnpm/simple-handshake@3.0.0/node_modules/simple-handshake/index.js":{"bytesInOutput":4287},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/encode.js":{"bytesInOutput":670},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/decode.js":{"bytesInOutput":674},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/length.js":{"bytesInOutput":619},"../../node_modules/.pnpm/varint@5.0.2/node_modules/varint/index.js":{"bytesInOutput":269},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/handshake.js":{"bytesInOutput":3995},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/encode.js":{"bytesInOutput":670},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/decode.js":{"bytesInOutput":674},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/length.js":{"bytesInOutput":619},"../../node_modules/.pnpm/varint@5.0.0/node_modules/varint/index.js":{"bytesInOutput":269},"../../node_modules/.pnpm/signed-varint@2.0.1/node_modules/signed-varint/index.js":{"bytesInOutput":658},"../../node_modules/.pnpm/b4a@1.6.4/node_modules/b4a/index.js":{"bytesInOutput":3753},"../../node_modules/.pnpm/protocol-buffers-encodings@1.2.0/node_modules/protocol-buffers-encodings/index.js":{"bytesInOutput":7698},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/messages.js":{"bytesInOutput":35828},"../../node_modules/.pnpm/xsalsa20-universal@1.0.0/node_modules/xsalsa20-universal/index.js":{"bytesInOutput":680},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/lib/xor.js":{"bytesInOutput":876},"../../node_modules/.pnpm/simple-message-channels@1.2.1/node_modules/simple-message-channels/index.js":{"bytesInOutput":6048},"../../node_modules/.pnpm/simple-hypercore-protocol@2.1.2/node_modules/simple-hypercore-protocol/index.js":{"bytesInOutput":8906},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/refresh.js":{"bytesInOutput":827},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/browser.js":{"bytesInOutput":869},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/timers.js":{"bytesInOutput":1019},"../../node_modules/.pnpm/timeout-refresh@1.0.3/node_modules/timeout-refresh/index.js":{"bytesInOutput":351},"../../node_modules/.pnpm/abstract-extension@3.1.1/node_modules/abstract-extension/index.js":{"bytesInOutput":4326},"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js":{"bytesInOutput":2915},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js":{"bytesInOutput":5960},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js":{"bytesInOutput":4745},"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":{"bytesInOutput":497},"../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js":{"bytesInOutput":3578},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js":{"bytesInOutput":4367},"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js":{"bytesInOutput":351},"../../node_modules/.pnpm/hypercore-protocol@8.0.7/node_modules/hypercore-protocol/index.js":{"bytesInOutput":17207},"../../node_modules/.pnpm/count-trailing-zeros@1.0.1/node_modules/count-trailing-zeros/ctz.js":{"bytesInOutput":426},"../../node_modules/.pnpm/fast-bitfield@1.2.2/node_modules/fast-bitfield/index.js":{"bytesInOutput":11746},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/lib/replicate.js":{"bytesInOutput":24251},"../../node_modules/.pnpm/nanoresource@1.3.0/node_modules/nanoresource/emitter.js":{"bytesInOutput":3781},"src/empty.js":{"bytesInOutput":241},"../../node_modules/.pnpm/hypercore-streams@1.0.1/node_modules/hypercore-streams/index.js":{"bytesInOutput":2427},"../../node_modules/.pnpm/hypercore@9.12.0/node_modules/hypercore/index.js":{"bytesInOutput":52212},"src/hypercore.js":{"bytesInOutput":224}},"bytes":333596},"dist/lib/node-esm/hypercore-crypto.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":260},"dist/lib/node-esm/hypercore-crypto.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-IEADO42Y.mjs","kind":"import-statement"}],"exports":["default","discoveryKey","keyPair","randomBytes","sign","validateKeyPair","verify"],"entryPoint":"src/hypercore-crypto.js","inputs":{"src/hypercore-crypto.js":{"bytesInOutput":70}},"bytes":958},"dist/lib/node-esm/chunk-IEADO42Y.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9344},"dist/lib/node-esm/chunk-IEADO42Y.mjs":{"imports":[{"path":"sodium-universal","kind":"require-call","external":true}],"exports":["__commonJS","__export","__reExport","__require","__toESM","require_hypercore_crypto"],"inputs":{"../../node_modules/.pnpm/uint64be@3.0.0/node_modules/uint64be/index.js":{"bytesInOutput":830},"../../node_modules/.pnpm/hypercore-crypto@2.3.2/node_modules/hypercore-crypto/index.js":{"bytesInOutput":4815}},"bytes":8011}}}
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dxos/vendor-hypercore",
|
|
3
|
+
"version": "0.8.4-main.1da679c",
|
|
4
|
+
"homepage": "https://dxos.org",
|
|
5
|
+
"bugs": "https://github.com/dxos/dxos/issues",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "info@dxos.org",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./hypercore": {
|
|
11
|
+
"types": "./src/hypercore.d.ts",
|
|
12
|
+
"node": "./dist/lib/node-esm/hypercore.mjs",
|
|
13
|
+
"default": "./dist/lib/browser/hypercore.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./hypercore-crypto": {
|
|
16
|
+
"types": "./src/hypercore-crypto.d.ts",
|
|
17
|
+
"node": "./dist/lib/node-esm/hypercore-crypto.mjs",
|
|
18
|
+
"workerd": "./src/hypercore-crypto-stub.js",
|
|
19
|
+
"default": "./dist/lib/browser/hypercore-crypto.mjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"src"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"sodium-native": "^3.2.0",
|
|
28
|
+
"sodium-universal": "^3.0.2",
|
|
29
|
+
"streamx": "^2.12.5",
|
|
30
|
+
"@dxos/node-std": "0.8.4-main.1da679c"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"hypercore": "^9.12.0",
|
|
34
|
+
"hypercore-crypto": "^2.3.0",
|
|
35
|
+
"hypercore-protocol": "^8.0.7",
|
|
36
|
+
"noise-protocol": "3.0.1"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/empty.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Empty module to stub packages that we know won't be used at runtime and can be replaces with a mock like this.
|
|
6
|
+
module.exports = new Proxy(
|
|
7
|
+
{},
|
|
8
|
+
{
|
|
9
|
+
get: (target, prop) => {
|
|
10
|
+
throw new Error('Package has been stripped');
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* https://github.com/mafintosh/hypercore-crypto
|
|
7
|
+
*
|
|
8
|
+
* https://github.com/mafintosh/hypercore-crypto/blob/v2.3.2/index.js
|
|
9
|
+
* https://github.com/mafintosh/hypercore-crypto/blob/v3.3.0/index.js
|
|
10
|
+
*/
|
|
11
|
+
// TODO(burdon): Hypercore 9 uses v2 of this module while Hypercore 10 uses v3.
|
|
12
|
+
export type KeyPair = {
|
|
13
|
+
publicKey: Buffer;
|
|
14
|
+
secretKey: Buffer;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function keyPair(seed?: Buffer): KeyPair;
|
|
18
|
+
export function validateKeyPair(keyPair: KeyPair): boolean;
|
|
19
|
+
export function sign(message: any, secretKey: Buffer): Buffer;
|
|
20
|
+
export function verify(message: any, signature: Buffer, publicKey: Buffer): boolean;
|
|
21
|
+
export function randomBytes(length: number): Buffer;
|
|
22
|
+
export function discoveryKey(publicKey: Buffer): Buffer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { keyPair, validateKeyPair, sign, verify, randomBytes, discoveryKey, default } from 'hypercore-crypto';
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hypercore Typescript Definitions version 9.12.0
|
|
7
|
+
* NOTE: Must not clash with 'hypercore' package name.
|
|
8
|
+
*
|
|
9
|
+
* https://hypercore-protocol.org
|
|
10
|
+
* https://www.npmjs.com/package/hypercore/v/9.12.0
|
|
11
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0
|
|
12
|
+
* https://github.com/hypercore-protocol/hypercore/blob/v9.12.0/index.js#L53
|
|
13
|
+
*/
|
|
14
|
+
import type { ProtocolStream } from 'hypercore-protocol';
|
|
15
|
+
import type { Nanoresource, NanoresourceProperties } from 'nanoresource';
|
|
16
|
+
import type { RandomAccessStorageConstructor } from 'random-access-storage';
|
|
17
|
+
import { type Readable, type Writable } from 'streamx';
|
|
18
|
+
|
|
19
|
+
export type Callback<T> = (err: Error | null, result: T) => void;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Download range.
|
|
23
|
+
*/
|
|
24
|
+
export type Range = {
|
|
25
|
+
start: number;
|
|
26
|
+
end?: number;
|
|
27
|
+
linear?: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* https://github.com/mafintosh/abstract-encoding
|
|
32
|
+
*/
|
|
33
|
+
export type AbstractValueEncoding<T = any> = {
|
|
34
|
+
encode: (obj: T) => Buffer;
|
|
35
|
+
decode: (buffer: Buffer) => T;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type ValueEncoding<T = any> = 'json' | 'utf-8' | 'binary' | AbstractValueEncoding<T>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Crypto
|
|
42
|
+
*/
|
|
43
|
+
export interface Crypto {
|
|
44
|
+
sign: (data: any, secretKey: Buffer, cb: Callback<any>) => void;
|
|
45
|
+
verify: (signature: any, data: any, key: Buffer, cb: Callback<boolean>) => void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedcreatereadstreamoptions
|
|
50
|
+
*/
|
|
51
|
+
export type ReadStreamOptions = {
|
|
52
|
+
start?: number;
|
|
53
|
+
end?: number;
|
|
54
|
+
snapshot?: boolean;
|
|
55
|
+
tail?: boolean;
|
|
56
|
+
live?: boolean;
|
|
57
|
+
timeout?: number;
|
|
58
|
+
wait?: boolean;
|
|
59
|
+
batch?: number;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#const-id--feedgetindex-options-callback
|
|
64
|
+
*/
|
|
65
|
+
// TODO(burdon): Change all value defs to default.
|
|
66
|
+
export type GetOptions = {
|
|
67
|
+
wait?: true;
|
|
68
|
+
onwait?: () => {};
|
|
69
|
+
timeout?: 0;
|
|
70
|
+
valueEncoding?: ValueEncoding;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedcreatewritestreamopts
|
|
75
|
+
*/
|
|
76
|
+
export type WriteStreamOptions = {
|
|
77
|
+
maxBlockSize?: number;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedreplicateisinitiator-options
|
|
82
|
+
*/
|
|
83
|
+
export type ReplicationOptions = {
|
|
84
|
+
initiator?: ProtocolStream | boolean;
|
|
85
|
+
stream?: ProtocolStream;
|
|
86
|
+
live?: boolean;
|
|
87
|
+
ack?: boolean;
|
|
88
|
+
download?: boolean;
|
|
89
|
+
upload?: boolean;
|
|
90
|
+
encrypted?: boolean;
|
|
91
|
+
noise?: boolean;
|
|
92
|
+
keyPair?: { publicKey: Buffer; secretKey: Buffer };
|
|
93
|
+
onauthenticate?: (remotePublicKey: Buffer, cb: () => void) => void;
|
|
94
|
+
onfeedauthenticate?: (feed: Hypercore, remotePublicKey: Buffer, cb: () => void) => void;
|
|
95
|
+
maxRequests?: number; // Default 16.
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedstats
|
|
100
|
+
*/
|
|
101
|
+
export type Stats = {
|
|
102
|
+
peers: Stats[];
|
|
103
|
+
totals: {
|
|
104
|
+
uploadedBytes: number;
|
|
105
|
+
uploadedBlocks: number;
|
|
106
|
+
downloadedBytes: number;
|
|
107
|
+
downloadedBlocks: number;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Bi-directional custom message path for non-feed data exchange.
|
|
113
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#ext--feedregisterextensionname-handlers
|
|
114
|
+
*/
|
|
115
|
+
export interface StreamExtension {
|
|
116
|
+
// Send message to extension handler on other side.
|
|
117
|
+
send: (message: Buffer, peer: Buffer) => void;
|
|
118
|
+
|
|
119
|
+
// Send message to every peer.
|
|
120
|
+
broadcast: (message: Buffer) => void;
|
|
121
|
+
|
|
122
|
+
// Destroy and unregister from stream.
|
|
123
|
+
destroy: () => void;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface StreamExtensionHandlers<T> {
|
|
127
|
+
encoding?: ValueEncoding<T>;
|
|
128
|
+
onmessage?: (message: Buffer, peer: Buffer) => any;
|
|
129
|
+
onerror?: (error: any) => any;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-feed--hypercorestorage-key-options
|
|
134
|
+
*/
|
|
135
|
+
export type HypercoreOptions = {
|
|
136
|
+
sparse?: boolean; // Do not mark the entire feed to be downloaded.
|
|
137
|
+
eagerUpdate?: boolean;
|
|
138
|
+
maxRequests?: number;
|
|
139
|
+
createIfMissing?: boolean;
|
|
140
|
+
secretKey?: Buffer;
|
|
141
|
+
valueEncoding?: ValueEncoding;
|
|
142
|
+
crypto?: Crypto;
|
|
143
|
+
writable?: boolean;
|
|
144
|
+
stats?: boolean;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export type Proof = {
|
|
148
|
+
nodes: {
|
|
149
|
+
index: number;
|
|
150
|
+
hash: Buffer;
|
|
151
|
+
size: number;
|
|
152
|
+
}[];
|
|
153
|
+
signature: Buffer;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Shared property definitions for raw and wrapped objects.
|
|
158
|
+
*/
|
|
159
|
+
export interface HypercoreProperties extends NanoresourceProperties {
|
|
160
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedwritable
|
|
161
|
+
readonly writable: boolean;
|
|
162
|
+
|
|
163
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedreadable
|
|
164
|
+
readonly readable: boolean;
|
|
165
|
+
|
|
166
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedkey
|
|
167
|
+
readonly key: Buffer;
|
|
168
|
+
|
|
169
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedkey
|
|
170
|
+
readonly secretKey: Buffer;
|
|
171
|
+
|
|
172
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#discoveryKey
|
|
173
|
+
readonly discoveryKey: Buffer;
|
|
174
|
+
|
|
175
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedlength
|
|
176
|
+
readonly length: number;
|
|
177
|
+
|
|
178
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedbytelength
|
|
179
|
+
readonly byteLength: number;
|
|
180
|
+
|
|
181
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedpeers
|
|
182
|
+
readonly peers: {
|
|
183
|
+
publicKey: Buffer;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedstats
|
|
187
|
+
readonly stats: Stats;
|
|
188
|
+
|
|
189
|
+
bitfield?: HypercoreBitfield;
|
|
190
|
+
|
|
191
|
+
readonly sparse: boolean;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface HypercoreBitfield {
|
|
195
|
+
data: any; // sparse-bitfield package
|
|
196
|
+
|
|
197
|
+
total(start: number, end: number): number;
|
|
198
|
+
|
|
199
|
+
// TODO(dmaretskyi): More props.
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Raw hypercore feed.
|
|
204
|
+
* https://github.com/hypercore-protocol/hypercore/blob/v9.12.0/index.js#L53
|
|
205
|
+
*
|
|
206
|
+
* Events: [`ready`, `error`, `download`, `upload`, `append`, `sync`, `close`]
|
|
207
|
+
* https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedonready
|
|
208
|
+
*/
|
|
209
|
+
export interface Hypercore<T = any> extends Nanoresource, HypercoreProperties {
|
|
210
|
+
// Alias for open.
|
|
211
|
+
ready(cb: Callback<void>): void;
|
|
212
|
+
|
|
213
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedappenddata-callback
|
|
214
|
+
append(data: T | T[], cb: Callback<number>): void;
|
|
215
|
+
|
|
216
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedcreatereadstreamoptions
|
|
217
|
+
createReadStream(options?: ReadStreamOptions): Readable;
|
|
218
|
+
|
|
219
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedcreatewritestreamopts
|
|
220
|
+
createWriteStream(options?: WriteStreamOptions): Writable;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Sets up a replication stream.
|
|
224
|
+
* Blocks are downloaded:
|
|
225
|
+
* - explicitly when download or get called;
|
|
226
|
+
* - implicitly if options.sparse and options.eagerUpdate are true.
|
|
227
|
+
* @param initiator
|
|
228
|
+
* @param options
|
|
229
|
+
*/
|
|
230
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-stream--feedreplicateisinitiator-options
|
|
231
|
+
replicate(initiator: boolean, options?: ReplicationOptions): ProtocolStream;
|
|
232
|
+
|
|
233
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feeddestroystoragecallback
|
|
234
|
+
destroyStorage(cb: Callback<{ valid: number; invalid: number }>): void;
|
|
235
|
+
|
|
236
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedauditcallback
|
|
237
|
+
audit(cb: Callback<{ valid: number; invalid: number }>): void;
|
|
238
|
+
|
|
239
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-bool--feedhasindex
|
|
240
|
+
has(index: number): void;
|
|
241
|
+
has(start: number, end?: number): boolean;
|
|
242
|
+
|
|
243
|
+
// https://github.com/holepunchto/hypercore/tree/v9.12.0#feedclearstart-end-callback
|
|
244
|
+
clear(start: number, end?: number, cb?: Callback<void>): void;
|
|
245
|
+
|
|
246
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedheadoptions-callback
|
|
247
|
+
/** @deprecated remove in v10 */
|
|
248
|
+
head(options: any, cb: Callback<T>): void;
|
|
249
|
+
head(cb: Callback<T>): void;
|
|
250
|
+
|
|
251
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#const-id--feedgetindex-options-callback
|
|
252
|
+
get(index: number, options: GetOptions, cb: Callback<T>): void;
|
|
253
|
+
get(index: number, cb: Callback<T>): void;
|
|
254
|
+
|
|
255
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedgetbatchstart-end-options-callback
|
|
256
|
+
/** @deprecated remove in v10 */
|
|
257
|
+
getBatch(start: number, end: number, options?: GetOptions, cb?: Callback<T[]>): void;
|
|
258
|
+
|
|
259
|
+
// TODO(burdon): Documented signature is different from code.
|
|
260
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#const-id--feeddownloadrange-callback
|
|
261
|
+
download(range?: Range, cb?: Callback<number>): number;
|
|
262
|
+
|
|
263
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-number--feeddownloadedstart-end
|
|
264
|
+
downloaded(start?: number, end?: number): boolean;
|
|
265
|
+
|
|
266
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#feedundownloaddownloadid
|
|
267
|
+
undownload(id: number): void;
|
|
268
|
+
|
|
269
|
+
// Define custom messages paths (unrelated to hypercore exchange), which are multiplexed on the stream.
|
|
270
|
+
// https://github.com/hypercore-protocol/hypercore-protocol#stream-message-extensions
|
|
271
|
+
registerExtension(name: string, handlers?: StreamExtensionHandlers<T>): StreamExtension;
|
|
272
|
+
|
|
273
|
+
// https://github.com/holepunchto/hypercore/tree/v9.12.0#feedsetdownloadingbool
|
|
274
|
+
setDownloading(bool): void;
|
|
275
|
+
|
|
276
|
+
proof(index: number, cb?: Callback<Proof>): void;
|
|
277
|
+
|
|
278
|
+
put(index: number, data: T, proof: Proof, cb?: Callback<void>): void;
|
|
279
|
+
|
|
280
|
+
// TODO(dmaretskyi): Add other events.
|
|
281
|
+
on(event: string, cb: (...args: any) => void): void;
|
|
282
|
+
on(event: 'download', cb: (index: number, data: any) => void): void;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export type HypercoreConstructor = (
|
|
286
|
+
storage: string | RandomAccessStorageConstructor,
|
|
287
|
+
key?: Buffer | string,
|
|
288
|
+
options?: HypercoreOptions,
|
|
289
|
+
) => Hypercore;
|
|
290
|
+
|
|
291
|
+
// Default constructor.
|
|
292
|
+
// https://github.com/hypercore-protocol/hypercore/tree/v9.12.0#var-feed--hypercorestorage-key-options
|
|
293
|
+
export function hypercore<T = any>(
|
|
294
|
+
storage: string | RandomAccessStorageConstructor,
|
|
295
|
+
key?: Buffer | string,
|
|
296
|
+
options?: HypercoreOptions,
|
|
297
|
+
): Hypercore<T>;
|
|
298
|
+
|
|
299
|
+
export default hypercore;
|
package/src/hypercore.js
ADDED