1.5.6 • Published 6 days ago

@maestro-org/typescript-sdk v1.5.6

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
6 days ago

Getting Started

Installation

NPM

npm i @maestro-org/typescript-sdk

Usage

import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk";

let maestroClient = new MaestroClient(
  new Configuration({
    apiKey: "<PROJECT_API_KEY>",
    network: "Preprod",
  })
);
  • To generate an API key, create a free account here!
  • Network options: Preview, Preprod, Mainnet, Sanchonet

Example

import { MaestroClient, Configuration } from "@maestro-org/typescript-sdk";

let maestroClient = new MaestroClient(
  new Configuration({
    apiKey: "<PROJECT_API_KEY>",
    network: "Preprod",
  })
);

maestroClient.addresses
  .utxosByAddress(
    "adaddr_test1wpgexmeunzsykesf42d4eqet5yvzeap6trjnflxqtkcf66g0kpnxt"
  )
  .then((x) => console.log(x.data))
  .catch((error) => {
    if (error.response) {
      // The request was made and the server responded with a status code
      // that falls out of the range of 2xx
      console.log(error.response.data);
      console.log(error.response.status);
      console.log(error.response.headers);
    } else if (error.request) {
      // The request was made but no response was received
      // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
      // http.ClientRequest in node.js
      console.log(error.request);
    } else {
      // Something happened in setting up the request that triggered an Error
      console.log("Error", error.message);
    }
  });
maestroClient.addresses
  .utxosByAddresses([
    "addr_test1wpgexmeunzsykesf42d4eqet5yvzeap6trjnflxqtkcf66g0kpnxt",
  ])
  .then((x) => console.log(x.data));

Documentation

Contributing

Meastro welcomes all contributors! Please see our contributing guidelines and code of conduct.

1.5.6

6 days ago

1.5.5

1 month ago

1.5.4

1 month ago

1.5.2

2 months ago

1.5.1

3 months ago

1.5.0

3 months ago

1.4.1

3 months ago

1.3.1

3 months ago

1.3.0

6 months ago

1.2.4

6 months ago

1.2.3

6 months ago

1.2.2

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.0

8 months ago

0.1.0

8 months ago