@dappworks/urpc-ui
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

urpc

To install dependencies:

bun add @dappworks/urpc
import URPC from "@dappworks/urpc";

const urpc = new URPC({
  schemas: {
    sum: URPC.Func({
      input: { a: 0, b: 0 },
      func: ({ input }) => input.a + input.b,
    }),
    foo: URPC.Var({ get: () => data.foo }),
  },
});

urpc.loadFull();
urpc.loadVars();
urpc.schemas.sum.func({ input: { a: 1, b: 2 } });
urpc.schemas.foo.get();

To run:

bun run index.ts

This project was created using bun init in bun v1.1.3. Bun is a fast all-in-one JavaScript runtime.

Readme

Keywords

none

Package Sidebar

Install

npm i @dappworks/urpc-ui

Weekly Downloads

97

Version

0.0.5

License

MIT

Unpacked Size

288 MB

Total Files

100

Last publish

Collaborators

  • jevin_f
  • osdodo
  • dlhtx
  • koishi