rosetta-client-typescript
TypeScript icon, indicating that this package has built-in type declarations

1.4.10-rc1-alpha-202201311436 • Public • Published

Rosetta

Rosetta Typescript Client

Typescript Rest client to connect apps with Rosetta nodes.

Version Downloads/week License Build Api Doc

Overview

The rosetta-client-typescript provides a generated typescript reset client. The client uses fetch under the hood.

Much of the code in this repository is generated from the rosetta-specifications.

Documentation

Before diving into the SDK, we recommend taking a look at the Rosetta API Docs:

Usage

Install this package:

npm install rosetta-client-typescript

Create and use a Rosetta rest client:

import { RosettaRestClientFactory } from 'rosetta-client-typescript';

const restClientFactory = new RosettaRestClientFactory({
    url: 'http://localhost:8080',
});

const networkClient = restClientFactory.network();
const networkList = await networkClient.networkList({
    metadataRequest: {},
});
console.log(JSON.stringify(networkList, null, 2));

Development

  • npm install to install dependencies
  • npm run gen to generate types and helpers
  • npm test to run tests
  • npm style:fix to pretty, index, and lint the source code (including generated code)

License

This project is available open source under the terms of the Apache 2.0 License.

© 2022 Fernando Boucquez

Package Sidebar

Install

npm i rosetta-client-typescript

Weekly Downloads

0

Version

1.4.10-rc1-alpha-202201311436

License

Apache-2.0

Unpacked Size

537 kB

Total Files

267

Last publish

Collaborators

  • fboucquez