Skip to content

Typescript generated client to connect apps with Rosetta nodes

Notifications You must be signed in to change notification settings

fboucquez/rosetta-client-typescript

Repository files navigation

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

About

Typescript generated client to connect apps with Rosetta nodes

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published