node-bvam-client

0.0.3 • Public • Published

A BVAM API client for node

Usage Example

var BVAMClient = require('node-bvam-client');

var client = BVAMClient.connect({connectionString: 'https://bvam.tokenly.com'});

client.getAssetInfo(['TOKENLY','SOUP']).then(function(assetsInfo) {
    console.log('assetsInfo', assetsInfo);

    // The result looks something like this:
    // [
    //     {
    //         "asset": "TOKENLY",
    //         "assetInfo": {
    //             "description": "Tokenly.co",
    //             "issuer": "12717MBviQxttaBVhFGRP1LxD8X6CaW452",
    //             "divisible": true
    //         },
    //         "metadata": {
    //             "asset": "TOKENLY",
    //             "description": "Tokenly.co"
    //         },
    //         "validated": false
    //     },
    //     {
    //         "asset": "SOUP",
    //         "hash": "T2JAC8ix9g6PhsmKbeiXjtd2yEfCZ",
    //         "uri": "https://bvam.tokenly.com/T2JAC8ix9g6PhsmKbeiXjtd2yEfCZ.json",
    //         "assetInfo": {
    //             "asset": "SOUP",
    //             "description": "T2JAC8ix9g6PhsmKbeiXjtd2yEfCZ",
    //             "divisible": true
    //         },
    //         "metadata": {
    //             "asset": "SOUP",
    //             "name": "Devon's Soup",
    //             "short_name": "Soup",
    //             "description": "All soup, all the time",
    //             "website": "https://devonweller.com",
    //             "meta": {
    //                 "bvam_version": "1.0.0",
    //                 "generated_by": "Devon"
    //             }
    //         },
    //         "bvamString": "{\n    \"asset\": \"SOUP\",\n    \"name\": \"Devon's Soup\",\n    \"short_name\": \"Soup\",\n    \"description\": \"All soup, all the time\",\n    \"website\": \"https://devonweller.com\",\n    \"meta\": {\n        \"bvam_version\": \"1.0.0\",\n        \"generated_by\": \"Devon\"\n    }\n}\n",
    //         "validated": true
    //     }
    // ]

}, function (err) {
    console.error('there was an error: ', err);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i node-bvam-client

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • deweller