mirror of https://github.com/waku-org/js-waku.git
fix: @waku/interfaces
This commit is contained in:
parent
16eaa911a9
commit
4eddad3166
|
@ -22396,6 +22396,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
"@typescript-eslint/parser": "^5.8.1",
|
||||
"@waku/create": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"app-root-path": "^3.0.0",
|
||||
"chai": "^4.3.4",
|
||||
"cspell": "^5.14.0",
|
||||
|
@ -22479,7 +22480,8 @@
|
|||
"version": "0.0.1",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"dependencies": {
|
||||
"@waku/core": "*"
|
||||
"@waku/core": "*",
|
||||
"@waku/interfaces": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^22.0.0",
|
||||
|
@ -22493,7 +22495,6 @@
|
|||
"@semantic-release/release-notes-generator": "^10.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
"@typescript-eslint/parser": "^5.8.1",
|
||||
"@waku/interfaces": "*",
|
||||
"cspell": "^5.14.0",
|
||||
"eslint": "^8.6.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
|
@ -22517,6 +22518,12 @@
|
|||
"name": "@waku/interfaces",
|
||||
"version": "0.0.1",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-connection": "^3.0.2",
|
||||
"@libp2p/interface-peer-id": "^1.0.5",
|
||||
"@multiformats/multiaddr": "^11.0.6",
|
||||
"libp2p": "^0.40.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^6.0.1",
|
||||
"@semantic-release/commit-analyzer": "^9.0.2",
|
||||
|
@ -22543,6 +22550,376 @@
|
|||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/interface-address-manager": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-address-manager/-/interface-address-manager-2.0.0.tgz",
|
||||
"integrity": "sha512-cEzZMxgy71geUcNMZtbF/gNNZbtc8Gx6MI/bj2sPT7ZVqMR7XhSCrpzm3kBkWpSHdWMYImfXCwU0oLg4UtI9Ow==",
|
||||
"dependencies": {
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"@multiformats/multiaddr": "^11.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/interface-connection": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-connection/-/interface-connection-3.0.2.tgz",
|
||||
"integrity": "sha512-38R2GQ6BCOtwMi5uWU5MLr+xfEpRmVK9gqOp7jNx+6T7TVn8ji4725XLXNfpzprbOrzZkqf2iER84s8+yX4pMA==",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-peer-id": "^1.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"it-stream-types": "^1.0.4",
|
||||
"uint8arraylist": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/interface-connection-encrypter": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-connection-encrypter/-/interface-connection-encrypter-3.0.1.tgz",
|
||||
"integrity": "sha512-KZ/4vuLokv2fNCnEAM5S91t8v5lMWXdYa26v/iGLqLgiH5MXmIGOgLLGdboXNMYM2ZYYCBgEpSHv+ZRbfO524Q==",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-peer-id": "^1.0.0",
|
||||
"it-stream-types": "^1.0.4",
|
||||
"uint8arraylist": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/interface-pubsub": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.0.tgz",
|
||||
"integrity": "sha512-3ziZ/mNdCRlfdzSetu38nNbQU6u/rtpQtgI4S4iaSW7MTyivKscWDEPCo5DkF9Uck25hNCbYHhOyKDBoIMdr6Q==",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-connection": "^3.0.0",
|
||||
"@libp2p/interface-peer-id": "^1.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"it-pushable": "^3.0.0",
|
||||
"uint8arraylist": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/interface-stream-muxer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-stream-muxer/-/interface-stream-muxer-3.0.0.tgz",
|
||||
"integrity": "sha512-qv7Z4KJC2SLu/GhwDzT71VBHhtu2fpSL/DGh0iFmkxicQsMmdpiqmXv9EGKw3+jdQL57uKIUm98OpOi2Hge0kg==",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-connection": "^3.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"it-stream-types": "^1.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/interface-transport": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-transport/-/interface-transport-2.0.0.tgz",
|
||||
"integrity": "sha512-aK33gpkEzfEtoSPlS7z624Tubf49CD2x4DUbXOmQCXDP/rhh3gAQq5XU5dcincM3QXlx6RRSO1PWRqM8EnLE0Q==",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-connection": "^3.0.0",
|
||||
"@libp2p/interface-stream-muxer": "^3.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"it-stream-types": "^1.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@libp2p/peer-store": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-5.0.0.tgz",
|
||||
"integrity": "sha512-Yz/JykQ9xA0cpv4jIOt9dzYXBAugjoJFPVpA8/LEwU6Y+aUcTIAC3AhOe88QxjYxy4pz+H7C711K2HNCj207jg==",
|
||||
"dependencies": {
|
||||
"@libp2p/interface-peer-id": "^1.0.4",
|
||||
"@libp2p/interface-peer-info": "^1.0.3",
|
||||
"@libp2p/interface-peer-store": "^1.2.2",
|
||||
"@libp2p/interface-record": "^2.0.1",
|
||||
"@libp2p/interfaces": "^3.0.3",
|
||||
"@libp2p/logger": "^2.0.0",
|
||||
"@libp2p/peer-id": "^1.1.15",
|
||||
"@libp2p/peer-record": "^4.0.3",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"err-code": "^3.0.1",
|
||||
"interface-datastore": "^7.0.0",
|
||||
"it-all": "^1.0.6",
|
||||
"it-filter": "^1.0.3",
|
||||
"it-foreach": "^0.1.1",
|
||||
"it-map": "^1.0.6",
|
||||
"it-pipe": "^2.0.3",
|
||||
"mortice": "^3.0.0",
|
||||
"multiformats": "^10.0.0",
|
||||
"protons-runtime": "^4.0.1",
|
||||
"uint8arraylist": "^2.1.1",
|
||||
"uint8arrays": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/@multiformats/multiaddr": {
|
||||
"version": "11.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-11.0.6.tgz",
|
||||
"integrity": "sha512-5TvEdCc5uFqcwGA+IwSw49swyHtUbwjhjwF3WQcV9vkzTv1C8oEWhoD2QcsiomDRk8rdqqRyDH6wlZExvLnxjw==",
|
||||
"dependencies": {
|
||||
"@chainsafe/is-ip": "^1.0.0",
|
||||
"dns-over-http-resolver": "^2.1.0",
|
||||
"err-code": "^3.0.1",
|
||||
"multiformats": "^10.0.0",
|
||||
"uint8arrays": "^4.0.2",
|
||||
"varint": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/it-drain": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-drain/-/it-drain-2.0.0.tgz",
|
||||
"integrity": "sha512-oa/5iyBtRs9UW486vPpyDTC0ee3rqx5qlrPI7txIUJcqqtiO5yVozEB6LQrl5ysQYv+P3y/dlKEqwVqlCV0SEA==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/it-first": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-first/-/it-first-2.0.0.tgz",
|
||||
"integrity": "sha512-fzZGzVf01exFyIZXNjkpSMFr1eW2+J1K0v018tYY26Dd4f/O3pWlBTdrOBfSQRZwtI8Pst6c7eKhYczWvFs6tA==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/it-merge": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-merge/-/it-merge-2.0.0.tgz",
|
||||
"integrity": "sha512-mH4bo/ZrMoU+Wlu7ZuYPNNh9oWZ/GvYbeXZ0zll97+Rp6H4jFu98iu6v9qqXDz//RUjdO9zGh8awzMfOElsjpA==",
|
||||
"dependencies": {
|
||||
"it-pushable": "^3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/it-sort": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-sort/-/it-sort-2.0.0.tgz",
|
||||
"integrity": "sha512-yeAE97b5PEjCrWFUiNyR90eJdGslj8FB3cjT84rsc+mzx9lxPyR2zJkYB9ZOJoWE5MMebxqcQCLRT3OSlzo7Zg==",
|
||||
"dependencies": {
|
||||
"it-all": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/it-sort/node_modules/it-all": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-all/-/it-all-2.0.0.tgz",
|
||||
"integrity": "sha512-I/yi9ogTY59lFxtfsDSlI9w9QZtC/5KJt6g7CPPBJJh2xql2ZS7Ghcp9hoqDDbc4QfwQvtx8Loy0zlKQ8H5gFg==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/libp2p": {
|
||||
"version": "0.40.0",
|
||||
"resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.40.0.tgz",
|
||||
"integrity": "sha512-AeLaA+8KIhUhjpXZcs20+Pnf2wIBp+zdSYPD1IgGCF0PlMbTdCvaIqhPzpTSd3+e5k7NZlgpd/BvCOLgQbfm5Q==",
|
||||
"dependencies": {
|
||||
"@achingbrain/nat-port-mapper": "^1.0.3",
|
||||
"@libp2p/connection": "^4.0.2",
|
||||
"@libp2p/crypto": "^1.0.4",
|
||||
"@libp2p/interface-address-manager": "^2.0.0",
|
||||
"@libp2p/interface-connection": "^3.0.2",
|
||||
"@libp2p/interface-connection-encrypter": "^3.0.1",
|
||||
"@libp2p/interface-connection-manager": "^1.1.1",
|
||||
"@libp2p/interface-content-routing": "^1.0.2",
|
||||
"@libp2p/interface-dht": "^1.0.1",
|
||||
"@libp2p/interface-metrics": "^3.0.0",
|
||||
"@libp2p/interface-peer-discovery": "^1.0.1",
|
||||
"@libp2p/interface-peer-id": "^1.0.4",
|
||||
"@libp2p/interface-peer-info": "^1.0.3",
|
||||
"@libp2p/interface-peer-routing": "^1.0.1",
|
||||
"@libp2p/interface-peer-store": "^1.2.2",
|
||||
"@libp2p/interface-pubsub": "^3.0.0",
|
||||
"@libp2p/interface-registrar": "^2.0.3",
|
||||
"@libp2p/interface-stream-muxer": "^3.0.0",
|
||||
"@libp2p/interface-transport": "^2.0.0",
|
||||
"@libp2p/interfaces": "^3.0.3",
|
||||
"@libp2p/logger": "^2.0.1",
|
||||
"@libp2p/multistream-select": "^3.0.0",
|
||||
"@libp2p/peer-collections": "^2.0.0",
|
||||
"@libp2p/peer-id": "^1.1.15",
|
||||
"@libp2p/peer-id-factory": "^1.0.18",
|
||||
"@libp2p/peer-record": "^4.0.3",
|
||||
"@libp2p/peer-store": "^5.0.0",
|
||||
"@libp2p/tracked-map": "^2.0.1",
|
||||
"@libp2p/utils": "^3.0.2",
|
||||
"@multiformats/mafmt": "^11.0.2",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"abortable-iterator": "^4.0.2",
|
||||
"any-signal": "^3.0.0",
|
||||
"datastore-core": "^8.0.1",
|
||||
"err-code": "^3.0.1",
|
||||
"events": "^3.3.0",
|
||||
"hashlru": "^2.3.0",
|
||||
"interface-datastore": "^7.0.0",
|
||||
"it-all": "^2.0.0",
|
||||
"it-drain": "^2.0.0",
|
||||
"it-filter": "^2.0.0",
|
||||
"it-first": "^2.0.0",
|
||||
"it-foreach": "^1.0.0",
|
||||
"it-handshake": "^4.1.2",
|
||||
"it-length-prefixed": "^8.0.2",
|
||||
"it-map": "^2.0.0",
|
||||
"it-merge": "^2.0.0",
|
||||
"it-pair": "^2.0.2",
|
||||
"it-pipe": "^2.0.3",
|
||||
"it-sort": "^2.0.0",
|
||||
"it-stream-types": "^1.0.4",
|
||||
"merge-options": "^3.0.4",
|
||||
"multiformats": "^10.0.0",
|
||||
"mutable-proxy": "^1.0.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"p-fifo": "^1.0.0",
|
||||
"p-retry": "^5.0.0",
|
||||
"p-settle": "^5.0.0",
|
||||
"private-ip": "^2.3.3",
|
||||
"protons-runtime": "^4.0.1",
|
||||
"rate-limiter-flexible": "^2.3.11",
|
||||
"retimer": "^3.0.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"set-delayed-interval": "^1.0.0",
|
||||
"timeout-abort-controller": "^3.0.0",
|
||||
"uint8arraylist": "^2.3.2",
|
||||
"uint8arrays": "^4.0.2",
|
||||
"wherearewe": "^2.0.0",
|
||||
"xsalsa20": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/libp2p/node_modules/it-all": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-all/-/it-all-2.0.0.tgz",
|
||||
"integrity": "sha512-I/yi9ogTY59lFxtfsDSlI9w9QZtC/5KJt6g7CPPBJJh2xql2ZS7Ghcp9hoqDDbc4QfwQvtx8Loy0zlKQ8H5gFg==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/libp2p/node_modules/it-filter": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-filter/-/it-filter-2.0.0.tgz",
|
||||
"integrity": "sha512-E68+zzoNNI7MxdH1T4lUTgwpCyEnymlH349Qg2mcvsqLmYRkaZLM4NfZZ0hUuH7/5DkWXubQSDOYH396va8mpg==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/libp2p/node_modules/it-foreach": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-1.0.0.tgz",
|
||||
"integrity": "sha512-2j5HK1P6aMwEvgL6K5nzUwOk+81B/mjt05PxiSspFEKwJnqy1LfJYlLLS6llBoM+NdoUxf6EsBCHidFGmsXvhw==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/libp2p/node_modules/it-map": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-map/-/it-map-2.0.0.tgz",
|
||||
"integrity": "sha512-mLgtk/NZaN7NZ06iLrMXCA6jjhtZO0vZT5Ocsp31H+nsGI18RSPVmUbFyA1sWx7q+g92J22Sixya7T2QSSAwfA==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/long": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz",
|
||||
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w=="
|
||||
},
|
||||
"packages/interfaces/node_modules/multiformats": {
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.2.tgz",
|
||||
"integrity": "sha512-nJEHLFOYhO4L+aNApHhCnWqa31FyqAHv9Q77AhmwU3KsM2f1j7tuJpCk5ByZ33smzycNCpSG5klNIejIyfFx2A==",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/protobufjs": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.1.2.tgz",
|
||||
"integrity": "sha512-4ZPTPkXCdel3+L81yw3dG6+Kq3umdWKh7Dc7GW/CpNk4SX3hK58iPCWeCyhVTDrbkNeKrYNZ7EojM5WDaEWTLQ==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@protobufjs/aspromise": "^1.1.2",
|
||||
"@protobufjs/base64": "^1.1.2",
|
||||
"@protobufjs/codegen": "^2.0.4",
|
||||
"@protobufjs/eventemitter": "^1.1.0",
|
||||
"@protobufjs/fetch": "^1.1.0",
|
||||
"@protobufjs/float": "^1.0.2",
|
||||
"@protobufjs/inquire": "^1.1.0",
|
||||
"@protobufjs/path": "^1.1.2",
|
||||
"@protobufjs/pool": "^1.1.0",
|
||||
"@protobufjs/utf8": "^1.1.0",
|
||||
"@types/node": ">=13.7.0",
|
||||
"long": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/protons-runtime": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-4.0.1.tgz",
|
||||
"integrity": "sha512-SPeV+8TzJAp5UJYPV7vJkLRi08CP0DksxpKK60rcNaZSPkMBQwc0jQrmkHqwc5P0cYbZzKsdYrUBwRrDLrzTfQ==",
|
||||
"dependencies": {
|
||||
"protobufjs": "^7.0.0",
|
||||
"uint8arraylist": "^2.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"uint8arraylist": "^2.3.2"
|
||||
}
|
||||
},
|
||||
"packages/interfaces/node_modules/uint8arrays": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.2.tgz",
|
||||
"integrity": "sha512-8CWXXZdOvVrIL4SeY/Gnp+idxxiGK4XFkP4FY26Sx/fpTz/b6vv4BVWELMDzQweSyyhdcuAcU14H6izzB6k1Cw==",
|
||||
"dependencies": {
|
||||
"multiformats": "^10.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=7.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -26783,6 +27160,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
"@typescript-eslint/parser": "^5.8.1",
|
||||
"@waku/create": "*",
|
||||
"@waku/interfaces": "*",
|
||||
"app-root-path": "^3.0.0",
|
||||
"chai": "^4.3.4",
|
||||
"cspell": "^5.14.0",
|
||||
|
@ -26898,6 +27276,9 @@
|
|||
"@waku/interfaces": {
|
||||
"version": "file:packages/interfaces",
|
||||
"requires": {
|
||||
"@libp2p/interface-connection": "*",
|
||||
"@libp2p/interface-peer-id": "*",
|
||||
"@multiformats/multiaddr": "*",
|
||||
"@semantic-release/changelog": "^6.0.1",
|
||||
"@semantic-release/commit-analyzer": "^9.0.2",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
|
@ -26913,12 +27294,298 @@
|
|||
"eslint-plugin-functional": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"libp2p": "*",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.1.1",
|
||||
"semantic-release": "^19.0.5",
|
||||
"semantic-release-monorepo": "^7.0.5",
|
||||
"typedoc": "^0.23.10",
|
||||
"typescript": "^4.6.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@libp2p/interface-address-manager": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-address-manager/-/interface-address-manager-2.0.0.tgz",
|
||||
"integrity": "sha512-cEzZMxgy71geUcNMZtbF/gNNZbtc8Gx6MI/bj2sPT7ZVqMR7XhSCrpzm3kBkWpSHdWMYImfXCwU0oLg4UtI9Ow==",
|
||||
"requires": {
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"@multiformats/multiaddr": "^11.0.0"
|
||||
}
|
||||
},
|
||||
"@libp2p/interface-connection": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-connection/-/interface-connection-3.0.2.tgz",
|
||||
"integrity": "sha512-38R2GQ6BCOtwMi5uWU5MLr+xfEpRmVK9gqOp7jNx+6T7TVn8ji4725XLXNfpzprbOrzZkqf2iER84s8+yX4pMA==",
|
||||
"requires": {
|
||||
"@libp2p/interface-peer-id": "^1.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"it-stream-types": "^1.0.4",
|
||||
"uint8arraylist": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"@libp2p/interface-connection-encrypter": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-connection-encrypter/-/interface-connection-encrypter-3.0.1.tgz",
|
||||
"integrity": "sha512-KZ/4vuLokv2fNCnEAM5S91t8v5lMWXdYa26v/iGLqLgiH5MXmIGOgLLGdboXNMYM2ZYYCBgEpSHv+ZRbfO524Q==",
|
||||
"requires": {
|
||||
"@libp2p/interface-peer-id": "^1.0.0",
|
||||
"it-stream-types": "^1.0.4",
|
||||
"uint8arraylist": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"@libp2p/interface-pubsub": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.0.tgz",
|
||||
"integrity": "sha512-3ziZ/mNdCRlfdzSetu38nNbQU6u/rtpQtgI4S4iaSW7MTyivKscWDEPCo5DkF9Uck25hNCbYHhOyKDBoIMdr6Q==",
|
||||
"requires": {
|
||||
"@libp2p/interface-connection": "^3.0.0",
|
||||
"@libp2p/interface-peer-id": "^1.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"it-pushable": "^3.0.0",
|
||||
"uint8arraylist": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@libp2p/interface-stream-muxer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-stream-muxer/-/interface-stream-muxer-3.0.0.tgz",
|
||||
"integrity": "sha512-qv7Z4KJC2SLu/GhwDzT71VBHhtu2fpSL/DGh0iFmkxicQsMmdpiqmXv9EGKw3+jdQL57uKIUm98OpOi2Hge0kg==",
|
||||
"requires": {
|
||||
"@libp2p/interface-connection": "^3.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"it-stream-types": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"@libp2p/interface-transport": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/interface-transport/-/interface-transport-2.0.0.tgz",
|
||||
"integrity": "sha512-aK33gpkEzfEtoSPlS7z624Tubf49CD2x4DUbXOmQCXDP/rhh3gAQq5XU5dcincM3QXlx6RRSO1PWRqM8EnLE0Q==",
|
||||
"requires": {
|
||||
"@libp2p/interface-connection": "^3.0.0",
|
||||
"@libp2p/interface-stream-muxer": "^3.0.0",
|
||||
"@libp2p/interfaces": "^3.0.0",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"it-stream-types": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"@libp2p/peer-store": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-5.0.0.tgz",
|
||||
"integrity": "sha512-Yz/JykQ9xA0cpv4jIOt9dzYXBAugjoJFPVpA8/LEwU6Y+aUcTIAC3AhOe88QxjYxy4pz+H7C711K2HNCj207jg==",
|
||||
"requires": {
|
||||
"@libp2p/interface-peer-id": "^1.0.4",
|
||||
"@libp2p/interface-peer-info": "^1.0.3",
|
||||
"@libp2p/interface-peer-store": "^1.2.2",
|
||||
"@libp2p/interface-record": "^2.0.1",
|
||||
"@libp2p/interfaces": "^3.0.3",
|
||||
"@libp2p/logger": "^2.0.0",
|
||||
"@libp2p/peer-id": "^1.1.15",
|
||||
"@libp2p/peer-record": "^4.0.3",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"err-code": "^3.0.1",
|
||||
"interface-datastore": "^7.0.0",
|
||||
"it-all": "^1.0.6",
|
||||
"it-filter": "^1.0.3",
|
||||
"it-foreach": "^0.1.1",
|
||||
"it-map": "^1.0.6",
|
||||
"it-pipe": "^2.0.3",
|
||||
"mortice": "^3.0.0",
|
||||
"multiformats": "^10.0.0",
|
||||
"protons-runtime": "^4.0.1",
|
||||
"uint8arraylist": "^2.1.1",
|
||||
"uint8arrays": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"@multiformats/multiaddr": {
|
||||
"version": "11.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-11.0.6.tgz",
|
||||
"integrity": "sha512-5TvEdCc5uFqcwGA+IwSw49swyHtUbwjhjwF3WQcV9vkzTv1C8oEWhoD2QcsiomDRk8rdqqRyDH6wlZExvLnxjw==",
|
||||
"requires": {
|
||||
"@chainsafe/is-ip": "^1.0.0",
|
||||
"dns-over-http-resolver": "^2.1.0",
|
||||
"err-code": "^3.0.1",
|
||||
"multiformats": "^10.0.0",
|
||||
"uint8arrays": "^4.0.2",
|
||||
"varint": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"it-drain": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-drain/-/it-drain-2.0.0.tgz",
|
||||
"integrity": "sha512-oa/5iyBtRs9UW486vPpyDTC0ee3rqx5qlrPI7txIUJcqqtiO5yVozEB6LQrl5ysQYv+P3y/dlKEqwVqlCV0SEA=="
|
||||
},
|
||||
"it-first": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-first/-/it-first-2.0.0.tgz",
|
||||
"integrity": "sha512-fzZGzVf01exFyIZXNjkpSMFr1eW2+J1K0v018tYY26Dd4f/O3pWlBTdrOBfSQRZwtI8Pst6c7eKhYczWvFs6tA=="
|
||||
},
|
||||
"it-merge": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-merge/-/it-merge-2.0.0.tgz",
|
||||
"integrity": "sha512-mH4bo/ZrMoU+Wlu7ZuYPNNh9oWZ/GvYbeXZ0zll97+Rp6H4jFu98iu6v9qqXDz//RUjdO9zGh8awzMfOElsjpA==",
|
||||
"requires": {
|
||||
"it-pushable": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"it-sort": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-sort/-/it-sort-2.0.0.tgz",
|
||||
"integrity": "sha512-yeAE97b5PEjCrWFUiNyR90eJdGslj8FB3cjT84rsc+mzx9lxPyR2zJkYB9ZOJoWE5MMebxqcQCLRT3OSlzo7Zg==",
|
||||
"requires": {
|
||||
"it-all": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"it-all": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-all/-/it-all-2.0.0.tgz",
|
||||
"integrity": "sha512-I/yi9ogTY59lFxtfsDSlI9w9QZtC/5KJt6g7CPPBJJh2xql2ZS7Ghcp9hoqDDbc4QfwQvtx8Loy0zlKQ8H5gFg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"libp2p": {
|
||||
"version": "0.40.0",
|
||||
"resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.40.0.tgz",
|
||||
"integrity": "sha512-AeLaA+8KIhUhjpXZcs20+Pnf2wIBp+zdSYPD1IgGCF0PlMbTdCvaIqhPzpTSd3+e5k7NZlgpd/BvCOLgQbfm5Q==",
|
||||
"requires": {
|
||||
"@achingbrain/nat-port-mapper": "^1.0.3",
|
||||
"@libp2p/connection": "^4.0.2",
|
||||
"@libp2p/crypto": "^1.0.4",
|
||||
"@libp2p/interface-address-manager": "^2.0.0",
|
||||
"@libp2p/interface-connection": "^3.0.2",
|
||||
"@libp2p/interface-connection-encrypter": "^3.0.1",
|
||||
"@libp2p/interface-connection-manager": "^1.1.1",
|
||||
"@libp2p/interface-content-routing": "^1.0.2",
|
||||
"@libp2p/interface-dht": "^1.0.1",
|
||||
"@libp2p/interface-metrics": "^3.0.0",
|
||||
"@libp2p/interface-peer-discovery": "^1.0.1",
|
||||
"@libp2p/interface-peer-id": "^1.0.4",
|
||||
"@libp2p/interface-peer-info": "^1.0.3",
|
||||
"@libp2p/interface-peer-routing": "^1.0.1",
|
||||
"@libp2p/interface-peer-store": "^1.2.2",
|
||||
"@libp2p/interface-pubsub": "^3.0.0",
|
||||
"@libp2p/interface-registrar": "^2.0.3",
|
||||
"@libp2p/interface-stream-muxer": "^3.0.0",
|
||||
"@libp2p/interface-transport": "^2.0.0",
|
||||
"@libp2p/interfaces": "^3.0.3",
|
||||
"@libp2p/logger": "^2.0.1",
|
||||
"@libp2p/multistream-select": "^3.0.0",
|
||||
"@libp2p/peer-collections": "^2.0.0",
|
||||
"@libp2p/peer-id": "^1.1.15",
|
||||
"@libp2p/peer-id-factory": "^1.0.18",
|
||||
"@libp2p/peer-record": "^4.0.3",
|
||||
"@libp2p/peer-store": "^5.0.0",
|
||||
"@libp2p/tracked-map": "^2.0.1",
|
||||
"@libp2p/utils": "^3.0.2",
|
||||
"@multiformats/mafmt": "^11.0.2",
|
||||
"@multiformats/multiaddr": "^11.0.0",
|
||||
"abortable-iterator": "^4.0.2",
|
||||
"any-signal": "^3.0.0",
|
||||
"datastore-core": "^8.0.1",
|
||||
"err-code": "^3.0.1",
|
||||
"events": "^3.3.0",
|
||||
"hashlru": "^2.3.0",
|
||||
"interface-datastore": "^7.0.0",
|
||||
"it-all": "^2.0.0",
|
||||
"it-drain": "^2.0.0",
|
||||
"it-filter": "^2.0.0",
|
||||
"it-first": "^2.0.0",
|
||||
"it-foreach": "^1.0.0",
|
||||
"it-handshake": "^4.1.2",
|
||||
"it-length-prefixed": "^8.0.2",
|
||||
"it-map": "^2.0.0",
|
||||
"it-merge": "^2.0.0",
|
||||
"it-pair": "^2.0.2",
|
||||
"it-pipe": "^2.0.3",
|
||||
"it-sort": "^2.0.0",
|
||||
"it-stream-types": "^1.0.4",
|
||||
"merge-options": "^3.0.4",
|
||||
"multiformats": "^10.0.0",
|
||||
"mutable-proxy": "^1.0.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"p-fifo": "^1.0.0",
|
||||
"p-retry": "^5.0.0",
|
||||
"p-settle": "^5.0.0",
|
||||
"private-ip": "^2.3.3",
|
||||
"protons-runtime": "^4.0.1",
|
||||
"rate-limiter-flexible": "^2.3.11",
|
||||
"retimer": "^3.0.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"set-delayed-interval": "^1.0.0",
|
||||
"timeout-abort-controller": "^3.0.0",
|
||||
"uint8arraylist": "^2.3.2",
|
||||
"uint8arrays": "^4.0.2",
|
||||
"wherearewe": "^2.0.0",
|
||||
"xsalsa20": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"it-all": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-all/-/it-all-2.0.0.tgz",
|
||||
"integrity": "sha512-I/yi9ogTY59lFxtfsDSlI9w9QZtC/5KJt6g7CPPBJJh2xql2ZS7Ghcp9hoqDDbc4QfwQvtx8Loy0zlKQ8H5gFg=="
|
||||
},
|
||||
"it-filter": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-filter/-/it-filter-2.0.0.tgz",
|
||||
"integrity": "sha512-E68+zzoNNI7MxdH1T4lUTgwpCyEnymlH349Qg2mcvsqLmYRkaZLM4NfZZ0hUuH7/5DkWXubQSDOYH396va8mpg=="
|
||||
},
|
||||
"it-foreach": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-1.0.0.tgz",
|
||||
"integrity": "sha512-2j5HK1P6aMwEvgL6K5nzUwOk+81B/mjt05PxiSspFEKwJnqy1LfJYlLLS6llBoM+NdoUxf6EsBCHidFGmsXvhw=="
|
||||
},
|
||||
"it-map": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/it-map/-/it-map-2.0.0.tgz",
|
||||
"integrity": "sha512-mLgtk/NZaN7NZ06iLrMXCA6jjhtZO0vZT5Ocsp31H+nsGI18RSPVmUbFyA1sWx7q+g92J22Sixya7T2QSSAwfA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"long": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz",
|
||||
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w=="
|
||||
},
|
||||
"multiformats": {
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.2.tgz",
|
||||
"integrity": "sha512-nJEHLFOYhO4L+aNApHhCnWqa31FyqAHv9Q77AhmwU3KsM2f1j7tuJpCk5ByZ33smzycNCpSG5klNIejIyfFx2A=="
|
||||
},
|
||||
"protobufjs": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.1.2.tgz",
|
||||
"integrity": "sha512-4ZPTPkXCdel3+L81yw3dG6+Kq3umdWKh7Dc7GW/CpNk4SX3hK58iPCWeCyhVTDrbkNeKrYNZ7EojM5WDaEWTLQ==",
|
||||
"requires": {
|
||||
"@protobufjs/aspromise": "^1.1.2",
|
||||
"@protobufjs/base64": "^1.1.2",
|
||||
"@protobufjs/codegen": "^2.0.4",
|
||||
"@protobufjs/eventemitter": "^1.1.0",
|
||||
"@protobufjs/fetch": "^1.1.0",
|
||||
"@protobufjs/float": "^1.0.2",
|
||||
"@protobufjs/inquire": "^1.1.0",
|
||||
"@protobufjs/path": "^1.1.2",
|
||||
"@protobufjs/pool": "^1.1.0",
|
||||
"@protobufjs/utf8": "^1.1.0",
|
||||
"@types/node": ">=13.7.0",
|
||||
"long": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"protons-runtime": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-4.0.1.tgz",
|
||||
"integrity": "sha512-SPeV+8TzJAp5UJYPV7vJkLRi08CP0DksxpKK60rcNaZSPkMBQwc0jQrmkHqwc5P0cYbZzKsdYrUBwRrDLrzTfQ==",
|
||||
"requires": {
|
||||
"protobufjs": "^7.0.0",
|
||||
"uint8arraylist": "^2.3.2"
|
||||
}
|
||||
},
|
||||
"uint8arrays": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.2.tgz",
|
||||
"integrity": "sha512-8CWXXZdOvVrIL4SeY/Gnp+idxxiGK4XFkP4FY26Sx/fpTz/b6vv4BVWELMDzQweSyyhdcuAcU14H6izzB6k1Cw==",
|
||||
"requires": {
|
||||
"multiformats": "^10.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@webassemblyjs/ast": {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"privacy"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "exit 0",
|
||||
"build": "tsc",
|
||||
"fix": "run-s fix:*",
|
||||
"fix:prettier": "prettier . --write",
|
||||
"fix:lint": "eslint src --ext .ts --ext .cjs --fix",
|
||||
|
@ -166,5 +166,11 @@
|
|||
"CHANGELOG.md",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
]
|
||||
],
|
||||
"dependencies": {
|
||||
"@libp2p/interface-connection": "^3.0.2",
|
||||
"@libp2p/interface-peer-id": "^1.0.5",
|
||||
"@multiformats/multiaddr": "^11.0.6",
|
||||
"libp2p": "^0.40.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
import type { Stream } from "@libp2p/interface-connection";
|
||||
import type { PeerId } from "@libp2p/interface-peer-id";
|
||||
import type { Multiaddr } from "@multiformats/multiaddr";
|
||||
import type { Libp2p } from "libp2p";
|
||||
|
||||
import type { Protocols } from "./waku";
|
||||
import type { WakuFilter } from "./waku_filter";
|
||||
import type { WakuLightPush } from "./waku_light_push";
|
||||
import type { WakuRelay } from "./waku_relay";
|
||||
import type { WakuStore } from "./waku_store";
|
||||
|
||||
export interface Waku {
|
||||
libp2p: Libp2p;
|
||||
relay?: WakuRelay;
|
||||
store?: WakuStore;
|
||||
filter?: WakuFilter;
|
||||
lightPush?: WakuLightPush;
|
||||
|
||||
dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
|
||||
|
||||
addPeerToAddressBook(
|
||||
peerId: PeerId | string,
|
||||
multiaddrs: Multiaddr[] | string[]
|
||||
): void;
|
||||
|
||||
start(): Promise<void>;
|
||||
|
||||
stop(): Promise<void>;
|
||||
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
||||
export interface WakuLight extends Waku {
|
||||
relay: undefined;
|
||||
store: WakuStore;
|
||||
filter: WakuFilter;
|
||||
lightPush: WakuLightPush;
|
||||
}
|
||||
|
||||
export interface WakuPrivacy extends Waku {
|
||||
relay: WakuRelay;
|
||||
store: undefined;
|
||||
filter: undefined;
|
||||
lightPush: undefined;
|
||||
}
|
||||
|
||||
export interface WakuFull extends Waku {
|
||||
relay: WakuRelay;
|
||||
store: WakuStore;
|
||||
filter: WakuFilter;
|
||||
lightPush: WakuLightPush;
|
||||
}
|
||||
|
||||
export interface RateLimitProof {
|
||||
proof: Uint8Array;
|
||||
merkleRoot: Uint8Array;
|
||||
epoch: Uint8Array;
|
||||
shareX: Uint8Array;
|
||||
shareY: Uint8Array;
|
||||
nullifier: Uint8Array;
|
||||
rlnIdentifier: Uint8Array;
|
||||
}
|
||||
|
||||
export interface ProtoMessage {
|
||||
payload: Uint8Array | undefined;
|
||||
contentTopic: string | undefined;
|
||||
version: number | undefined;
|
||||
timestamp: bigint | undefined;
|
||||
rateLimitProof: RateLimitProof | undefined;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
payload: Uint8Array | undefined;
|
||||
contentTopic: string | undefined;
|
||||
timestamp: Date | undefined;
|
||||
rateLimitProof: RateLimitProof | undefined;
|
||||
}
|
||||
|
||||
export interface Encoder {
|
||||
contentTopic: string;
|
||||
toWire: (message: Partial<Message>) => Promise<Uint8Array | undefined>;
|
||||
toProtoObj: (message: Partial<Message>) => Promise<ProtoMessage | undefined>;
|
||||
}
|
||||
|
||||
export interface Decoder<T extends Message> {
|
||||
contentTopic: string;
|
||||
fromWireToProtoObj: (bytes: Uint8Array) => Promise<ProtoMessage | undefined>;
|
||||
fromProtoObj: (proto: ProtoMessage) => Promise<T | undefined>;
|
||||
}
|
||||
|
||||
export interface SendResult {
|
||||
recipients: PeerId[];
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
import type { Stream } from "@libp2p/interface-connection";
|
||||
import type { PeerId } from "@libp2p/interface-peer-id";
|
||||
import type { Multiaddr } from "@multiformats/multiaddr";
|
||||
import type { Libp2p } from "libp2p";
|
||||
|
||||
export enum Protocols {
|
||||
Relay = "relay",
|
||||
Store = "store",
|
||||
LightPush = "lightpush",
|
||||
Filter = "filter",
|
||||
}
|
||||
|
||||
export type ProtocolOptions = {
|
||||
pubsubTopic?: string;
|
||||
/**
|
||||
* Optionally specify an PeerId for the protocol request. If not included, will use a random peer.
|
||||
*/
|
||||
peerId?: PeerId;
|
||||
};
|
||||
|
||||
export type Callback<T extends Message> = (msg: T) => void | Promise<void>;
|
||||
|
||||
export interface Filter {
|
||||
subscribe: <T extends Message>(
|
||||
decoders: Decoder<T>[],
|
||||
callback: Callback<T>,
|
||||
opts?: ProtocolOptions
|
||||
) => Promise<() => Promise<void>>;
|
||||
}
|
||||
|
||||
export interface LightPush {
|
||||
push: (
|
||||
encoder: Encoder,
|
||||
message: Partial<Message>,
|
||||
opts?: ProtocolOptions
|
||||
) => Promise<SendResult>;
|
||||
}
|
||||
|
||||
export enum PageDirection {
|
||||
BACKWARD = "backward",
|
||||
FORWARD = "forward",
|
||||
}
|
||||
|
||||
export interface TimeFilter {
|
||||
startTime: Date;
|
||||
endTime: Date;
|
||||
}
|
||||
|
||||
export type StoreQueryOptions = {
|
||||
/**
|
||||
* The direction in which pages are retrieved:
|
||||
* - { @link PageDirection.BACKWARD }: Most recent page first.
|
||||
* - { @link PageDirection.FORWARD }: Oldest page first.
|
||||
*
|
||||
* Note: This does not affect the ordering of messages with the page
|
||||
* (the oldest message is always first).
|
||||
*
|
||||
* @default { @link PageDirection.BACKWARD }
|
||||
*/
|
||||
pageDirection?: PageDirection;
|
||||
/**
|
||||
* The number of message per page.
|
||||
*
|
||||
* @default { @link DefaultPageSize }
|
||||
*/
|
||||
pageSize?: number;
|
||||
/**
|
||||
* Retrieve messages with a timestamp within the provided values.
|
||||
*/
|
||||
timeFilter?: TimeFilter;
|
||||
} & ProtocolOptions;
|
||||
|
||||
export interface Store {
|
||||
queryOrderedCallback: <T extends Message>(
|
||||
decoders: Decoder<T>[],
|
||||
callback: (message: T) => Promise<void | boolean> | boolean | void,
|
||||
options?: StoreQueryOptions
|
||||
) => Promise<void>;
|
||||
queryCallbackOnPromise: <T extends Message>(
|
||||
decoders: Decoder<T>[],
|
||||
callback: (
|
||||
message: Promise<T | undefined>
|
||||
) => Promise<void | boolean> | boolean | void,
|
||||
options?: StoreQueryOptions
|
||||
) => Promise<void>;
|
||||
queryGenerator: <T extends Message>(
|
||||
decoders: Decoder<T>[],
|
||||
options?: StoreQueryOptions
|
||||
) => AsyncGenerator<Promise<T | undefined>[]>;
|
||||
}
|
||||
|
||||
export interface Relay {
|
||||
send: (encoder: Encoder, message: Partial<Message>) => Promise<SendResult>;
|
||||
addObserver: <T extends Message>(
|
||||
decoder: Decoder<T>,
|
||||
callback: Callback<T>
|
||||
) => () => void;
|
||||
}
|
||||
|
||||
export interface Waku {
|
||||
libp2p: Libp2p;
|
||||
relay?: Relay;
|
||||
store?: Store;
|
||||
filter?: Filter;
|
||||
lightPush?: LightPush;
|
||||
|
||||
dial(peer: PeerId | Multiaddr, protocols?: Protocols[]): Promise<Stream>;
|
||||
|
||||
addPeerToAddressBook(
|
||||
peerId: PeerId | string,
|
||||
multiaddrs: Multiaddr[] | string[]
|
||||
): void;
|
||||
|
||||
start(): Promise<void>;
|
||||
|
||||
stop(): Promise<void>;
|
||||
|
||||
isStarted(): boolean;
|
||||
}
|
||||
|
||||
export interface WakuLight extends Waku {
|
||||
relay: undefined;
|
||||
store: Store;
|
||||
filter: Filter;
|
||||
lightPush: LightPush;
|
||||
}
|
||||
|
||||
export interface WakuPrivacy extends Waku {
|
||||
relay: Relay;
|
||||
store: undefined;
|
||||
filter: undefined;
|
||||
lightPush: undefined;
|
||||
}
|
||||
|
||||
export interface WakuFull extends Waku {
|
||||
relay: Relay;
|
||||
store: Store;
|
||||
filter: Filter;
|
||||
lightPush: LightPush;
|
||||
}
|
||||
|
||||
export interface RateLimitProof {
|
||||
proof: Uint8Array;
|
||||
merkleRoot: Uint8Array;
|
||||
epoch: Uint8Array;
|
||||
shareX: Uint8Array;
|
||||
shareY: Uint8Array;
|
||||
nullifier: Uint8Array;
|
||||
rlnIdentifier: Uint8Array;
|
||||
}
|
||||
|
||||
export interface ProtoMessage {
|
||||
payload: Uint8Array | undefined;
|
||||
contentTopic: string | undefined;
|
||||
version: number | undefined;
|
||||
timestamp: bigint | undefined;
|
||||
rateLimitProof: RateLimitProof | undefined;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
payload: Uint8Array | undefined;
|
||||
contentTopic: string | undefined;
|
||||
timestamp: Date | undefined;
|
||||
rateLimitProof: RateLimitProof | undefined;
|
||||
}
|
||||
|
||||
export interface Encoder {
|
||||
contentTopic: string;
|
||||
toWire: (message: Partial<Message>) => Promise<Uint8Array | undefined>;
|
||||
toProtoObj: (message: Partial<Message>) => Promise<ProtoMessage | undefined>;
|
||||
}
|
||||
|
||||
export interface Decoder<T extends Message> {
|
||||
contentTopic: string;
|
||||
fromWireToProtoObj: (bytes: Uint8Array) => Promise<ProtoMessage | undefined>;
|
||||
fromProtoObj: (proto: ProtoMessage) => Promise<T | undefined>;
|
||||
}
|
||||
|
||||
export interface SendResult {
|
||||
recipients: PeerId[];
|
||||
}
|
Loading…
Reference in New Issue