Giter VIP home page Giter VIP logo

boardwalk-sdk's People

Contributors

filoozom avatar vojtechsimetka avatar

Watchers

 avatar  avatar  avatar  avatar

boardwalk-sdk's Issues

Add depcheck

It is super easy to miss unused dependency. This is where depcheck can help.

Fix type building

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

test: invalid messages

Messages that:

  • do not have the right format / encoding
  • do not have correct signatures
  • have correct signatures but from the wrong keys

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.