Notice

MetaStreme is capable of much more than simple data transactions. If you require support for other types of transactions please contact support@metastreme.com and we will accommodate your needs.


API Endpoints

Base URL
https://portal.metastreme.com/api
Headers

All requests require an api key to be present in the authorization header.

# Example Request Headers
Authorization: ApiKey a35c8624-d015-45dc-95e5-3a3593c226b
Content-Type: application/json

POST /request

This endpoint is for submitting a request that will be turned into a transaction by MetaStreme. All requests must include a UUID to prevent a single request from unintentionally resulting in multiple transactions.

v1

Submit a single OP_FALSE OP_RETURN script to be processed into a transaction. This script will become the first output of the transaction.

Request Body

{
  "v": "1",
  "id": "233de7f7-3877-4df3-9a23-0db325491927",
  "script": "006a0d48656c6c6f2c20576f726c6421"
}

v3

Submit an array of outputs to be processed into a transaction. Outputs must have zero value, and scripts must start with OP_FALSE OP_RETURN. Outputs will appear as the very first outputs of the resulting transaction, and be in the provided order.

Request Body

{
  "v": "3",
  "id": "233de7f7-3877-4df3-9a23-0db325491927",
  "outputs": [
    { "value": 0, "script": "006a0d48656c6c6f2c20576f726c6421" },
    { "value": 0, "script": "006a154e6f7720776974682074776f206f75747075747321" }
  ]
}

GET /request/<id>/status

The request status will include a transaction id and merkle proof if available.

Example Response Body

{
  "id": "08ade4e1-a298-4b20-84d9-3c86998ca5bf",
  "created_at": "2020-06-29T08:09:26.136Z",
  "txid": "3e3a7d51419319e587e8e59e328d5df237494fb95585a2d24c7c4fcbff1a55d7",
  "proof": {
    "index": 4756,
    "txOrId": "3e3a7d51419319e587e8e59e328d5df237494fb95585a2d24c7c4fcbff1a55d7",
    "target": "00000000000000000e25492839781917b708fc75a1325d0ae1ade3b9140cb666",
    "nodes": [
      "2d16103700e31f0159cc21860b877736df207bda71fb24d9a63bc666c40a2a43",
      "d52c59d2aeacccbaf9a30afea06c65c371f417f3d25c8b944b24139aaa207d7d",
      "df404248f40245a45081885384cdf5aec8d30f46b4b6108083581f9900074995",
      "5d856942785579fec7bdd34bc37257e5ee241ec320353915b109feacf868506a",
      "7355334b81973a9d26ec31c33d35d65676dfc4410e774bb455cb4fd88a0b29bc",
      "fbfeaf17741b85c6fcdd2b88f7b5329b0e9d00a844089aac5c440ec71e0fc6c1",
      "da292dc3becf683978c51b382285fb0621b39c7fcde9d7057e03b5b615d34973",
      "82be7e5f31ba52dd134122bbc543ee235b7e4977799800218d03c5aaecf26350",
      "6f26ae51fe2b1d30b8bef8f2fcf2a073a944f70aedc04509e2a2cf281f518989",
      "962368fdb2d93be007ea766df4a4a10b441ea8206cbf6275fa064eb4791352e0",
      "37e98fdd06bb06dd904c7e2de4b12f1e993c621f83323d4732b99f343a17debd",
      "70327ea57f69241ef4c1e9de9858e165a3af5851b283edcf0e457ffbbd62c760",
      "3230deb6fc57d48a196b8bd74db6e7a429a9cb36d3198103b4c2f837de230ed3"
    ],
    "targetType": "hash",
    "proofType": "branch",
    "composite": false
  }
}

GET /transaction/<txid>

Responds with the raw binary transaction data.