swarmcity / boardwalk-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
It is super easy to miss unused dependency. This is where depcheck can help.
The limitation is that it requires secure context (localhost or ssl). However, we could likely use ethersjs
to replace the crypto
use
npm run build:types
> [email protected] build:types
> tsc --emitDeclarationOnly --declaration --outDir dist/types
node_modules/libp2p/dist/src/connection-manager/index.d.ts:97:22 - error TS2420: Class 'DefaultConnectionManager' incorrectly implements interface 'ConnectionManager'.
Type 'DefaultConnectionManager' is missing the following properties from type 'ConnectionManager': acceptIncomingConnection, afterUpgradeInbound
97 export declare class DefaultConnectionManager extends EventEmitter<ConnectionManagerEvents> implements ConnectionManager, Startable, Initializable {
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/libp2p/dist/src/transport-manager.d.ts:31:5 - error TS2416: Property 'dial' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
Type '(ma: Multiaddr, options?: AbortOptions | undefined) => Promise<Connection>' is not assignable to type '(ma: Multiaddr, options?: any) => Promise<Connection>'.
Types of parameters 'ma' and 'ma' are incompatible.
Property '[inspect]' is missing in type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' but required in type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.
31 dial(ma: Multiaddr, options?: AbortOptions): Promise<Connection>;
~~~~
node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index.d.ts:331:5
331 [inspect](): string;
~~~~~~~~~
'[inspect]' is declared here.
node_modules/libp2p/dist/src/transport-manager.d.ts:35:5 - error TS2416: Property 'getAddrs' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
Type '() => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]' is not assignable to type '() => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]'.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]'.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.
Types of property 'encapsulate' are incompatible.
Type '(addr: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type '(addr: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src...'.
Types of parameters 'addr' and 'addr' are incompatible.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").MultiaddrInput'.
Type 'Multiaddr' is not assignable to type 'MultiaddrInput'.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.
35 getAddrs(): Multiaddr[];
~~~~~~~~
node_modules/libp2p/dist/src/transport-manager.d.ts:43:5 - error TS2416: Property 'transportForMultiaddr' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
Type '(ma: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/dist/src/index").Transport | undefined' is not assignable to type '(ma: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr) => import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/dist/src/index").Transport | undefined'.
Types of parameters 'ma' and 'ma' are incompatible.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.
43 transportForMultiaddr(ma: Multiaddr): Transport | undefined;
~~~~~~~~~~~~~~~~~~~~~
node_modules/libp2p/dist/src/transport-manager.d.ts:47:5 - error TS2416: Property 'listen' in type 'DefaultTransportManager' is not assignable to the same property in base type 'TransportManager'.
Type '(addrs: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]) => Promise<void>' is not assignable to type '(addrs: import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]) => Promise<...>'.
Types of parameters 'addrs' and 'addrs' are incompatible.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr[]'.
Type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr' is not assignable to type 'import("/Users/user/swarm-city/boardwalk-sdk/node_modules/js-waku/node_modules/@multiformats/multiaddr/dist/src/index").Multiaddr'.
47 listen(addrs: Multiaddr[]): Promise<void>;
~~~~~~
Found 5 errors in 2 files.
Errors Files
1 node_modules/libp2p/dist/src/connection-manager/index.d.ts:97
4 node_modules/libp2p/dist/src/transport-manager.d.ts:31
Messages that:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.