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

0.24.0-next.0 • Public • Published

@yadomi29/rpc

RPC module for lumos. Provide type definitions for CKB RPC interface.

Usage

import { RPC } from "@yadomi29/rpc"
const rpc = new RPC("http://localhost:8114");
await rpc.get_tip_header();

// Or provide an optional indexer param, if provided, will wait for sync after every RPC call.
const rpc = new RPC("http://localhost:8114", indexer)
await rpc.get_tip_header(); // before it return, will sync indexer to tip.

Readme

Keywords

none

Package Sidebar

Install

npm i @yadomi29/rpc

Weekly Downloads

6

Version

0.24.0-next.0

License

MIT

Unpacked Size

39.3 kB

Total Files

7

Last publish

Collaborators

  • yadomi29