Documentation

Documentation for the ZIMT Hub API and SDKs.

Hub API
Examples
Health
curl -X GET {Hub API URL}

// response
{
  "response": "Ok",
  "meta": {
    "code": 200
  }
}
Get assets
curl -X GET {Hub API URL}/assets \
-H 'Authorization: ZIMT_TOKEN eaw3123...'

// response
{
  "response": [
    {
      "id": "0x1512258c1a082a1148e655cf4abf13b914e31e7e485191c2b6b5ee466e03c951",
      "meta": {
        "created_by": "0x8752F61635543a870826D9F4CA20a9D1F3934079",
        "timestamp": "2020-02-10T19:16:13Z"
      },
      "signature": "0xe633051fc76ae...",
      "receipt": {
        "received_at": 1579278115
      }
    }
  ],
  "meta": {
    "code": 200,
    "message": "Ok"
  },
  "pagination": {
    "total": 445,
    "limit": 30,
    "skip": 0
  }
}
SDK JavaScript
Install
// yarn
yarn add @zimt/sdk

// npm
npm install @zimt/sdk
Import
import ZIMTHubSDK from '@zimt/sdk';
Use
const sdk = new ZIMTHubSDK({
    api: {
        core: "Hub API URL",
    },
    private_key: "Account's private key",
    api_key: "ZIMT Hub provided API key",
});

const assets = await sdk.assets.getMany();

// assets
{
  "response": [
    {
      "id": "0x1512258c1a082a1148e655cf4abf13b914e31e7e485191c2b6b5ee466e03c951",
      "meta": {
        "created_by": "0x8752F61635543a870826D9F4CA20a9D1F3934079",
        "timestamp": "2020-02-10T19:16:13Z"
      },
      "signature": "0xe633051fc76ae...",
      "receipt": {
        "received_at": 1579278115
      }
    }
  ],
  "meta": {
    "code": 200,
    "message": "Ok"
  },
  "pagination": {
    "total": 445,
    "limit": 30,
    "skip": 0
  }
}