Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including metaco-client with all npm packages installed. Try it out:

var metacoClient = require("metaco-client")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

metaco-client v1.1.3

The official javascript client for the Metaco API

Metaco API Javascript client Build Status

Metaco REST API provides a set of services to integrate Metaco into third-party applications. It offers trading and payment facilities as well as wallet management features.

Our Javascript Client implements every single functionality of the API. You can find a detailed documentation here : API Documentation.

This library works in NodeJS and in the Browser. We developed it using the commonjs spec, and we're using browserify to bundle the library into a single file usable in the browser.

Installation

Using npm (Nodejs)

npm install metaco-client

Using bower (Browser)

bower install metaco-client

Manually

For nodejs, you can clone our repository, you will get the latest version available.

For the browser :

  • You can download our latest releases on github or in our dist folder.
  • You can clone our repository and run gulp buildBrowser to get the latest bundled version.

Usage

You can use our Unit tests to learn the basics or the links in the summary of this document.

Testing

The tests requires a testnet environnement to work.

Clone our repository and run :

npm install

Define the following environment variables :

  • METACO_ENV_API_ID : Your testnet API ID
  • METACO_ENV_API_KEY : Your testnet API Key
  • METACO_ENV_API_URL : http://api.testnet.metaco.com/v1/ (Or the endpoint you want to run your tests with)
  • METACO_ENV_WALLET_PRIVATE_KEY_HEX : The private key of your testnet wallet (hex-encoded)

Run npm test

Contributing

  1. Fork this repository and make your changes in your fork
  2. Add or Update the tests and run npm test to make sure they pass
  3. Commit and push your changes to your fork git push origin master
  4. Submit a pull request and we will handle the rest :)

Known Issues / Gotcha

  • The api is still unstable.
  • The tests are only on the browser side at the moment.

License

MIT (See LICENSE).

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free