How to use the @polkadot/rpc-provider/ws function in @polkadot/rpc-provider

To help you get started, we’ve selected a few @polkadot/rpc-provider examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github polkadot-js / client / packages / client-rpc / src / index.spec.js View on Github external
it.skip('starts and accepts requests, sending responses (WS)', () => {
    config.rpc.types = ['ws'];
    server = new Rpc(config, {}, handlers); // eslint-disable-line

    return new WsProvider('ws://localhost:9901')
      .send('echo', [1, 'ws', true])
      .then((result) => {
        expect(result).toEqual('echo: 1,ws,true');
      });
  });

@polkadot/rpc-provider

Transport providers for the API

Apache-2.0
Latest version published 5 days ago

Package Health Score

90 / 100
Full package analysis

Similar packages