mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-08 16:53:10 +00:00
* set peer-exchange with default bootstrap * only initialise protocols with bootstrap peers * update package * update package-lock * refactor `getPeers` while setting up a protocol * move codecs to `@waku/interfaces` * lightpush: send messages to multiple peers * only use multiple peers for LP and Filter * fix: ts warnings * lightpush: tests pass * update breaking changes for new API * move codecs back into protocol files * refactor: `getPeers()` * rm: log as an arg * add tsdoc for getPeers * add import * add prettier rule to eslint * add: peer exchange to sdk as a dep * fix eslint error * add try catch * revert unecessary diff * revert unecessary diff * fix imports * convert relaycodecs to array * remove: peerId as an arg for protocol methods * keep peerId as an arg for peer-exchange * remove: peerId from getPeers() * lightpush: extract hardcoded numPeers as a constant * return all peers if numPeers is 0 and increase readability for random peers * refactor considering more than 1 bootstrap peers can exist * use `getPeers` * change arg for `getPeers` to object * address comments * refactor tests for new API * lightpush: make constant the class variable * use `maxBootstrapPeers` instead of `includeBootstrap` * refactor protocols for new API * add tests for `getPeers` * skip getPeers test * rm: only from test * move tests to `base_protocol.spec.ts` * break down `getPeers` into a `filter` method * return all bootstrap peers if arg is 0 * refactor test without stubbing * address comments * update test title * move `filterPeers` to a separate file * address comments & add more test * make test title more verbose * address comments * remove ProtocolOptions * chore: refactor tests for new API * add defaults for getPeers * address comments * rm unneeded comment * address comment: add diversity of node tags to test * address comments * fix: imports
88 lines
2.2 KiB
JSON
88 lines
2.2 KiB
JSON
{
|
|
"name": "@waku/sdk",
|
|
"version": "0.0.18",
|
|
"description": "A unified SDK for easy creation and management of js-waku nodes.",
|
|
"types": "./dist/index.d.ts",
|
|
"module": "./dist/index.js",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js"
|
|
}
|
|
},
|
|
"type": "module",
|
|
"author": "Waku Team",
|
|
"homepage": "https://github.com/waku-org/js-waku/tree/master/packages/sdk#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/waku-org/js-waku.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/waku-org/js-waku/issues"
|
|
},
|
|
"license": "MIT OR Apache-2.0",
|
|
"keywords": [
|
|
"waku",
|
|
"decentralized",
|
|
"secure",
|
|
"communication",
|
|
"web3",
|
|
"ethereum",
|
|
"dapps",
|
|
"privacy"
|
|
],
|
|
"scripts": {
|
|
"build": "run-s build:**",
|
|
"build:esm": "tsc",
|
|
"build:bundle": "rollup --config rollup.config.js",
|
|
"fix": "run-s fix:*",
|
|
"fix:lint": "eslint src *.js --fix",
|
|
"check": "run-s check:*",
|
|
"check:lint": "eslint src *.js",
|
|
"check:spelling": "cspell \"{README.md,src/**/*.ts}\"",
|
|
"check:tsc": "tsc -p tsconfig.dev.json",
|
|
"prepublish": "npm run build",
|
|
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build"
|
|
},
|
|
"engines": {
|
|
"node": ">=16"
|
|
},
|
|
"dependencies": {
|
|
"@chainsafe/libp2p-noise": "^13.0.0",
|
|
"@libp2p/mplex": "^9.0.2",
|
|
"@libp2p/websockets": "^7.0.5",
|
|
"@waku/utils": "0.0.10",
|
|
"@waku/relay": "0.0.5",
|
|
"@waku/core": "0.0.22",
|
|
"@waku/dns-discovery": "0.0.16",
|
|
"@waku/interfaces": "0.0.17",
|
|
"@waku/peer-exchange": "^0.0.15",
|
|
"libp2p": "^0.46.8"
|
|
},
|
|
"devDependencies": {
|
|
"@chainsafe/libp2p-gossipsub": "^10.1.0",
|
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
"@rollup/plugin-json": "^6.0.0",
|
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
"@waku/build-utils": "*",
|
|
"cspell": "^7.3.2",
|
|
"interface-datastore": "^7.0.4",
|
|
"npm-run-all": "^4.1.5",
|
|
"rollup": "^3.28.0",
|
|
"typescript": "^5.0.4"
|
|
},
|
|
"typedoc": {
|
|
"entryPoint": "./src/index.ts"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"bundle",
|
|
"src/**/*.ts",
|
|
"!**/*.spec.*",
|
|
"!**/*.json",
|
|
"CHANGELOG.md",
|
|
"LICENSE",
|
|
"README.md"
|
|
]
|
|
}
|