Giter Club home page Giter Club logo

maestro-typescript-sdk's Introduction

Maestro Logo

TypeScript SDK for the Maestro Dapp Platform

Getting Started

Installation

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.

maestro-typescript-sdk's People

Contributors

hinsonsidan avatar vardominator avatar alexdochioiu avatar sourabhxyz avatar chrissiwaffler avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.