Have ideas to improve npm?Join in the discussion! »

    @polkadot/client-rpc
    TypeScript icon, indicating that this package has built-in type declarations

    0.22.1 • Public • Published

    @polkadot/client-rpc

    An RPC server with configurable handlers. It is intended to be used in network clients to spin up a JsonRPC server with minimal configuration and boilerplate.

    Usage

    npm install --save @polkadot/client-rpc
    

    The by using the library -

    const Provider = require('@polkadot/rpc-provider/http');
    const Server = require('@polkadot/client-rpc');
     
    const server = new Server({ port: 9901 }, {
      'client_version': () => 'Polka/0.0.1'
    });
     
    new Provider('http://localhost:9901')
      .send('client_version', [])
      .then((version) => {
        console.log('The server is running', version;)
      });

    Install

    npm i @polkadot/client-rpc

    DownloadsWeekly Downloads

    26

    Version

    0.22.1

    License

    Apache-2.0

    Unpacked Size

    48 kB

    Total Files

    58

    Last publish

    Collaborators

    • avatar
    • avatar