1.4.10-rc1-alpha-202201311436 • Published 1 year ago

rosetta-client-typescript v1.4.10-rc1-alpha-202201311436

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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