NAV Navbar
javascript shell

Introduction

MatterPool API Documentation

A Bitcoin Service Provider

MatterPool.io

Bitcoin File System

Bitcoin Files and Block Delivery Service powered by the Bitcoin Files Protocol (b:// files)

Links:

Queue File Upload

You can queue large files to be uploaded after paying the payment_sats_needed to the payment_address.

For files smaller than 99KB see the method createFile

 var queueRequest = {
      file: {
          content: '<h1>Hello</h1>',
          contentType: 'text/html',
          encoding: 'utf8', // 'hex', 'utf8', 'base64'
          name: 'mytestfile.html',
      }
      //, session_tag: 'a-random-uuid-you-can-use-as-a-folder'
  };
  var result = await bitcoinfiles.queueFile(queueRequest);

/*
{
   "success":true,
   "result":[
      {
         "id":2613,
         "session_tag":"5d57b244-91a4-4cb6-ae98-c6e0e4b29e91",
         "payment_address":"1A11zmKhqP29y8GjrzcssFNRoqiBWcWSNa",
         "filename":"mytesth.falsee38ee790-8f3a-11ea-bb89-2bd752d34d1a.false",
         "first_broadcast_time":null,
         "last_broadcast_time":null,
         "payment_sats_needed":2008,
         "txid":null,
         "fileurl":"https://bitcoinfilesmatter.s3.amazonaws.com/mytesth.falsee38ee790-8f3a-11ea-bb89-2bd752d34d1a.false",
         "filesize":14,
         "blockhash":null,
         "created_time":1588729369
      }
   ]
}
*/
  var queueRequest = {
      file: {
          content: '<h1>Hello</h1>',
          contentType: 'text/html',
          encoding: 'utf8', // 'hex', 'utf8', 'base64'
          name: 'mytestfile.html',
      }
      //, session_tag: 'a-random-uuid-you-can-use-as-a-folder'
  };
  var result = await bitcoinfiles.queueFile(queueRequest);

/*
{
   "success":true,
   "result":[
      {
         "id":2613,
         "session_tag":"5d57b244-91a4-4cb6-ae98-c6e0e4b29e91",
         "payment_address":"1A11zmKhqP29y8GjrzcssFNRoqiBWcWSNa",
         "filename":"mytesth.falsee38ee790-8f3a-11ea-bb89-2bd752d34d1a.false",
         "first_broadcast_time":null,
         "last_broadcast_time":null,
         "payment_sats_needed":2008,
         "txid":null,
         "fileurl":"https://bitcoinfilesmatter.s3.amazonaws.com/mytesth.falsee38ee790-8f3a-11ea-bb89-2bd752d34d1a.false",
         "filesize":14,
         "blockhash":null,
         "created_time":1588729369
      }
   ]
}
*/

This endpoint queues a file to be uploaded after the payment_address is paid with payment_sats_needed

Create File

Create andn publish a file transaction directly on BSV blockchain.

Note: This is used to broadcast directly (files smaller than 99KB).

For files large than 99KB see the method queueFile

 var createRequest = {
      file: {
          content: 'Hello world!',
          contentType: 'text/plain',
      },
      pay: {
          key: privateKey
      }
  };
  var result = await bitcoinfiles.createFile(createRequest);
  var createRequest = {
      file: {
          content: 'Hello world!',
          contentType: 'text/plain',
      },
      pay: {
          key: privateKey
      }
  };
  var result = await bitcoinfiles.createFile(createRequest);

This endpoint broadcasts a file transaction to the blockchain directly.

Get File

Get File by txid

curl https://media.bitcoinfiles.org/408d3b99a06afd01e1717d78a7a9d2ee1c08f59003022429ae9b0a66075dfd40
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getFile('408d3b99a06afd01e1717d78a7a9d2ee1c08f59003022429ae9b0a66075dfd40');

The above command returns the raw bytes of the file

This endpoint retrieves bitcoin file at txid

HTTP Request

GET https://media.bitcoinfiles.org/408d3b99a06afd01e1717d78a7a9d2ee1c08f59003022429ae9b0a66075dfd40

URL Parameters

Parameter Description
txid Txid of the file

Get Transaction (Optional Block and Merkle path)

Get file transaction by txid.

Options:

curl https://media.bitcoinfiles.org/tx/408d3b99a06afd01e1717d78a7a9d2ee1c08f59003022429ae9b0a66075dfd40?inputInfo=true&includeBlock=1&raw=0

const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getTx('633fc9e55db4039d5b48df8aab31cd2366d98d64285fdc2aa53c17aa895b476e', null, {
  includeBlock: true,
  raw: false,
  inputInfo: true });

The above command returns the transaction

{
   "hash":"9aaf2ae7015fffee2f31c2ce071bd4cce76e668b65d3db0f30665a814dfda84e",
   "version":1,
   "inputs":[
      {
         "prevTxId":"7a5ea5b0893d44084c8741c919f9555112f6f34f3966eed1c3cd937620a1aa66",
         "outputIndex":1,
         "sequenceNumber":4294967294,
         "script":"47304402207be7bf327a2c1412b0773ca878da5822564d798cb893549a68b020b23b9412380220069283eafe72e2e66d155dbe50a54925355dca10dff772377d7c7272907ed1f4412103aaed350d46c047f2dfc8c1e3b69e88552d35d79c3c589fbf32fe4216a8b59057",
         "scriptString":"71 0x304402207be7bf327a2c1412b0773ca878da5822564d798cb893549a68b020b23b9412380220069283eafe72e2e66d155dbe50a54925355dca10dff772377d7c7272907ed1f441 33 0x03aaed350d46c047f2dfc8c1e3b69e88552d35d79c3c589fbf32fe4216a8b59057",
         "satoshis":9670,
         "address":"15MypiVWwY1dEpkEEviLSqRi7ySW5cfJMV",
         "lockingScript":"76a9142fd8416c04c42df9808bd6525d0cdab1d27ce28088ac"
      }
   ],
   "outputs":[
      {
         "satoshis":208300000,
         "script":"76a914239880104dbe3f5d34364f57b5e9c794135468ea88ac"
      },
      {
         "satoshis":657898800,
         "script":"76a91458e87ba0ea87ed590031a4e7f3ee1b85713aa87688ac"
      }
   ],
   "nLockTime":630519
}

// With block information: https://media.bitcoinfiles.org/tx/9bebc37a1bd107c3ade78793a062312041e91d377b62548e9124d4e1b8df2a1b?includeBlock=1&raw=0&inputInfo=1
{
   "tx":{
      "hash":"9bebc37a1bd107c3ade78793a062312041e91d377b62548e9124d4e1b8df2a1b",
      "version":1,
      "inputs":[
         {
            "prevTxId":"1f6486d1e9f60878d682bd17ae3be44b62b6d8577ac6f4deff7f654748c5327f",
            "outputIndex":1,
            "sequenceNumber":4294967295,
            "script":"483045022100a13deebd441a79d8dfc32010b42a9094aad26cb61966d200730c53acc3d6a54802206ab4b652c723017b0bf405cbbabf1055c4970b5fbb3027e39d7d7039d4aefd92412103023f7579161115a5b2eba387c12dd88b636ab15ffaa6e7c93bcbd1e36b2a367a",
            "scriptString":"72 0x3045022100a13deebd441a79d8dfc32010b42a9094aad26cb61966d200730c53acc3d6a54802206ab4b652c723017b0bf405cbbabf1055c4970b5fbb3027e39d7d7039d4aefd9241 33 0x03023f7579161115a5b2eba387c12dd88b636ab15ffaa6e7c93bcbd1e36b2a367a",
            "satoshis":13600000,
            "address":"13nM162gxnaZx89Wm9kdRGAQS89FVFkF6a",
            "lockingScript":"76a9141e83aa8fb461dd16319ad0548a5b443f56ee881b88ac"
         }
      ],
      "outputs":[
         {
            "satoshis":7840000,
            "script":"76a914463300d931e7d7dffff49cb2b0be3836386d441b88ac",
            "outputIndex":0,
            "address":"17QBQCdZCfn1wMAT1NpfJeLTRYwdyxGV1X"
         },
         {
            "satoshis":5759547,
            "script":"76a9146a972de3b20b99cde820a323735ab0ef8f7b889d88ac",
            "outputIndex":1,
            "address":"1AibjTGQBdWMtxPEDtv75eLsNGzuzoEFTs"
         }
      ],
      "nLockTime":0
   },
   "block":{
      "header":{
         "hash":"000000000000000003a95a5dcc1779b6e08fd24e6c88dc2843bbcb2f7257cc18",
         "version":671080448,
         "prevHash":"0000000000000000036801b2a04c2013b0a1b096eff7449963e8e5e7c544b259",
         "merkleRoot":"299c76dfd47b382319394a167127aaf41ae68c82565499782dd88d162a0f808c",
         "time":1590342076,
         "bits":402913836,
         "nonce":2183222916
      },
      "numTransactions":7288,
      "hashes":[
         "37e8816ba1ad8a5cbf615055d10103f75b594d35830e6a012c61b3725ee00e75",
         "1b2adfb8e1d424918e54627b371de941203162a09387e7adc307d11b7ac3eb9b",
         "bd6d5190117406a668edf88ba720da654de502cafca6c39746445a88f6da33f4",
         "6988d1c48a896efc0c8f98263f7a6b9dcc402769fa979b43fb7150c01d19c770",
         "8b71a1fb94efefed891eed4316d0644d82280e6ad3fbcc06ca93793cff3bf2c9",
         "cbb77fc4a2f8e2d884b9e0682fbafe13dc07eca2f9b84c05ea4104b586f364b5",
         "08a1cb5a5c4cbaeca8b7d4ea6464bd7bad73a82fce1a58c65c3da9db12c6c42a",
         "af1574d69fb46f15ad4147b77d301ef074eb8f17baf2a5614f1b4cc5c6de4418",
         "992146b6d5cb21c3bb6bb93b7cd1ffa5bd9388125aee91c6c472f0c17051ca4e",
         "db94c52778da8a45a01e079a0fe8e47d475bbf2c3270527ccfb67f7b175f0d20",
         "505e01d30a4b7aa66e32916ea69982a813bb59596759167a86b1ec5d7eb211a8",
         "9a06d2005db28fb7339980c902f51e53293af967d910d56eed95883f2c308943",
         "e2acbeab45f83b7b010e90653ff642db5c57e7ea040d56436822c0a89f41821e",
         "197ce9b68a71b63ca728f8df1865ff567a07a57ac16510e4d0038b0e6269df5a"
      ],
      "flags":[
         255,
         119,
         0,
         0
      ]
   }
}

{
   "hash":"9aaf2ae7015fffee2f31c2ce071bd4cce76e668b65d3db0f30665a814dfda84e",
   "version":1,
   "inputs":[
      {
         "prevTxId":"7a5ea5b0893d44084c8741c919f9555112f6f34f3966eed1c3cd937620a1aa66",
         "outputIndex":1,
         "sequenceNumber":4294967294,
         "script":"47304402207be7bf327a2c1412b0773ca878da5822564d798cb893549a68b020b23b9412380220069283eafe72e2e66d155dbe50a54925355dca10dff772377d7c7272907ed1f4412103aaed350d46c047f2dfc8c1e3b69e88552d35d79c3c589fbf32fe4216a8b59057",
         "scriptString":"71 0x304402207be7bf327a2c1412b0773ca878da5822564d798cb893549a68b020b23b9412380220069283eafe72e2e66d155dbe50a54925355dca10dff772377d7c7272907ed1f441 33 0x03aaed350d46c047f2dfc8c1e3b69e88552d35d79c3c589fbf32fe4216a8b59057",
         "satoshis":9670,
         "address":"15MypiVWwY1dEpkEEviLSqRi7ySW5cfJMV",
         "lockingScript":"76a9142fd8416c04c42df9808bd6525d0cdab1d27ce28088ac"
      }
   ],
   "outputs":[
      {
         "satoshis":208300000,
         "script":"76a914239880104dbe3f5d34364f57b5e9c794135468ea88ac"
      },
      {
         "satoshis":657898800,
         "script":"76a91458e87ba0ea87ed590031a4e7f3ee1b85713aa87688ac"
      }
   ],
   "nLockTime":630519
}

// With block information: https://media.bitcoinfiles.org/tx/9bebc37a1bd107c3ade78793a062312041e91d377b62548e9124d4e1b8df2a1b?includeBlock=1&raw=0&inputInfo=1
{
   "tx":{
      "hash":"9bebc37a1bd107c3ade78793a062312041e91d377b62548e9124d4e1b8df2a1b",
      "version":1,
      "inputs":[
         {
            "prevTxId":"1f6486d1e9f60878d682bd17ae3be44b62b6d8577ac6f4deff7f654748c5327f",
            "outputIndex":1,
            "sequenceNumber":4294967295,
            "script":"483045022100a13deebd441a79d8dfc32010b42a9094aad26cb61966d200730c53acc3d6a54802206ab4b652c723017b0bf405cbbabf1055c4970b5fbb3027e39d7d7039d4aefd92412103023f7579161115a5b2eba387c12dd88b636ab15ffaa6e7c93bcbd1e36b2a367a",
            "scriptString":"72 0x3045022100a13deebd441a79d8dfc32010b42a9094aad26cb61966d200730c53acc3d6a54802206ab4b652c723017b0bf405cbbabf1055c4970b5fbb3027e39d7d7039d4aefd9241 33 0x03023f7579161115a5b2eba387c12dd88b636ab15ffaa6e7c93bcbd1e36b2a367a",
            "satoshis":13600000,
            "address":"13nM162gxnaZx89Wm9kdRGAQS89FVFkF6a",
            "lockingScript":"76a9141e83aa8fb461dd16319ad0548a5b443f56ee881b88ac"
         }
      ],
      "outputs":[
         {
            "satoshis":7840000,
            "script":"76a914463300d931e7d7dffff49cb2b0be3836386d441b88ac",
            "outputIndex":0,
            "address":"17QBQCdZCfn1wMAT1NpfJeLTRYwdyxGV1X"
         },
         {
            "satoshis":5759547,
            "script":"76a9146a972de3b20b99cde820a323735ab0ef8f7b889d88ac",
            "outputIndex":1,
            "address":"1AibjTGQBdWMtxPEDtv75eLsNGzuzoEFTs"
         }
      ],
      "nLockTime":0
   },
   "block":{
      "header":{
         "hash":"000000000000000003a95a5dcc1779b6e08fd24e6c88dc2843bbcb2f7257cc18",
         "version":671080448,
         "prevHash":"0000000000000000036801b2a04c2013b0a1b096eff7449963e8e5e7c544b259",
         "merkleRoot":"299c76dfd47b382319394a167127aaf41ae68c82565499782dd88d162a0f808c",
         "time":1590342076,
         "bits":402913836,
         "nonce":2183222916
      },
      "numTransactions":7288,
      "hashes":[
         "37e8816ba1ad8a5cbf615055d10103f75b594d35830e6a012c61b3725ee00e75",
         "1b2adfb8e1d424918e54627b371de941203162a09387e7adc307d11b7ac3eb9b",
         "bd6d5190117406a668edf88ba720da654de502cafca6c39746445a88f6da33f4",
         "6988d1c48a896efc0c8f98263f7a6b9dcc402769fa979b43fb7150c01d19c770",
         "8b71a1fb94efefed891eed4316d0644d82280e6ad3fbcc06ca93793cff3bf2c9",
         "cbb77fc4a2f8e2d884b9e0682fbafe13dc07eca2f9b84c05ea4104b586f364b5",
         "08a1cb5a5c4cbaeca8b7d4ea6464bd7bad73a82fce1a58c65c3da9db12c6c42a",
         "af1574d69fb46f15ad4147b77d301ef074eb8f17baf2a5614f1b4cc5c6de4418",
         "992146b6d5cb21c3bb6bb93b7cd1ffa5bd9388125aee91c6c472f0c17051ca4e",
         "db94c52778da8a45a01e079a0fe8e47d475bbf2c3270527ccfb67f7b175f0d20",
         "505e01d30a4b7aa66e32916ea69982a813bb59596759167a86b1ec5d7eb211a8",
         "9a06d2005db28fb7339980c902f51e53293af967d910d56eed95883f2c308943",
         "e2acbeab45f83b7b010e90653ff642db5c57e7ea040d56436822c0a89f41821e",
         "197ce9b68a71b63ca728f8df1865ff567a07a57ac16510e4d0038b0e6269df5a"
      ],
      "flags":[
         255,
         119,
         0,
         0
      ]
   }
}


This endpoint retrieves transaction at txid

HTTP Request

GET https://media.bitcoinfiles.org/9aaf2ae7015fffee2f31c2ce071bd4cce76e668b65d3db0f30665a814dfda84e

URL Parameters

Parameter Description
txid Txid of the transaction

Get Raw Transaction

Get file transaction by txid

curl https://media.bitcoinfiles.org/rawtx/408d3b99a06afd01e1717d78a7a9d2ee1c08f59003022429ae9b0a66075dfd40
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getTxRaw('9aaf2ae7015fffee2f31c2ce071bd4cce76e668b65d3db0f30665a814dfda84e');

The above command returns the raw transaction

010000000166aaa1207693cdc3d1ee66394ff3f6125155f919c941874c08443d89b0a55e7a010000006a47304402207be7bf327a2c1412b0773ca878da5822564d798cb893549a68b020b23b9412380220069283eafe72e2e66d155dbe50a54925355dca10dff772377d7c7272907ed1f4412103aaed350d46c047f2dfc8c1e3b69e88552d35d79c3c589fbf32fe4216a8b59057feffffff02e0676a0c000000001976a914239880104dbe3f5d34364f57b5e9c794135468ea88ac30bd3627000000001976a91458e87ba0ea87ed590031a4e7f3ee1b85713aa87688acf79e0900
010000000166aaa1207693cdc3d1ee66394ff3f6125155f919c941874c08443d89b0a55e7a010000006a47304402207be7bf327a2c1412b0773ca878da5822564d798cb893549a68b020b23b9412380220069283eafe72e2e66d155dbe50a54925355dca10dff772377d7c7272907ed1f4412103aaed350d46c047f2dfc8c1e3b69e88552d35d79c3c589fbf32fe4216a8b59057feffffff02e0676a0c000000001976a914239880104dbe3f5d34364f57b5e9c794135468ea88ac30bd3627000000001976a91458e87ba0ea87ed590031a4e7f3ee1b85713aa87688acf79e0900

This endpoint retrieves transaction at txid

HTTP Request

GET https://media.bitcoinfiles.org/tx/9aaf2ae7015fffee2f31c2ce071bd4cce76e668b65d3db0f30665a814dfda84e/raw

URL Parameters

Parameter Description
txid Txid of the transaction

Get Transaction Merkle Proof

Get Transaction Merkle Proof

curl https://media.bitcoinfiles.org/txproof/77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getTxOutProof('77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4');

The above command returns the merkle proof of transaction (MerkleBlock)

{
   "header":{
      "hash":"000000000000000000049eb3ff753e223b0a1bce976137f8e9454c82c31f523f",
      "version":536870912,
      "prevHash":"000000000000000003eb1a34752e2aafe0cf9c93926caa54aedd30fe62c14c6e",
      "merkleRoot":"44ff80a9bdc2a15555bfdfcd637accf48aafdb27ebd4cd9d4c7c29aa9a0a019e",
      "time":1587248088,
      "bits":402960587,
      "nonce":2605488380
   },
   "numTransactions":9744,
   "hashes":[
      "d0c4eb3cdc2e35b387c2a2c9fee0dfa504482e033579c66d470dbee0e7894f25",
      "b46f0794f08bc66b9d2bd80ec3ab8e2ed6359308d33b4495b7db806ec19d6177",
      "34a2cd3bc26b815d29049aa333593ae92ad1ea02f75f9863fea69e9547707cc8",
      "366d88cfa8affdee442bad72626ccc7fd5285ea077e8b5b6e5bc9205d0a4ce12",
      "3a65ac66248cd643751d67ae022262d6c811ee45e13cc15757f79e5d119e3cec",
      "4cbf1068d82630cfe1a9612b864a6403d44eda3577550de845bf3f7805173fd5",
      "9560aa9eabdff4db8bd86d5c267d89a96d3953834a23697946855861aba8dce7",
      "b4cf3be1af1134fabe42d48eb89ffd85b7592d7c898a711eb74b53f5dafc4941",
      "094784d94ad265346b18850cf35b758d69a33541d68ddb10dfd846751df47560",
      "7c251822e97714f238ee4544ee5bb2e2923126b30be66b09b927dc8625d03df3",
      "88eb5e7460e9faa4961f077a39aea18a0983afaf99e9cea28ee724a45de0a3e8",
      "58662251d7c9f12dd59dd5f7165221c0531104396bbe717ca56a70edf9878dc9",
      "8599f2358f7fa6855ba41d125745aa646bbc6b81c00af26eeaca6c0c0e0dfbfc",
      "c710a24c4a7fc5b4aeda613ef08da68892816c1d6ff8d783c92290c8ba3bba81",
      "ccd11f375aa4047cc63f4de034fc7490f3f5448e5163df258688f2cef6bd13fb"
   ],
   "flags":[
      255,
      191,
      0,
      0
   ]
}
{
   "header":{
      "hash":"000000000000000000049eb3ff753e223b0a1bce976137f8e9454c82c31f523f",
      "version":536870912,
      "prevHash":"000000000000000003eb1a34752e2aafe0cf9c93926caa54aedd30fe62c14c6e",
      "merkleRoot":"44ff80a9bdc2a15555bfdfcd637accf48aafdb27ebd4cd9d4c7c29aa9a0a019e",
      "time":1587248088,
      "bits":402960587,
      "nonce":2605488380
   },
   "numTransactions":9744,
   "hashes":[
      "d0c4eb3cdc2e35b387c2a2c9fee0dfa504482e033579c66d470dbee0e7894f25",
      "b46f0794f08bc66b9d2bd80ec3ab8e2ed6359308d33b4495b7db806ec19d6177",
      "34a2cd3bc26b815d29049aa333593ae92ad1ea02f75f9863fea69e9547707cc8",
      "366d88cfa8affdee442bad72626ccc7fd5285ea077e8b5b6e5bc9205d0a4ce12",
      "3a65ac66248cd643751d67ae022262d6c811ee45e13cc15757f79e5d119e3cec",
      "4cbf1068d82630cfe1a9612b864a6403d44eda3577550de845bf3f7805173fd5",
      "9560aa9eabdff4db8bd86d5c267d89a96d3953834a23697946855861aba8dce7",
      "b4cf3be1af1134fabe42d48eb89ffd85b7592d7c898a711eb74b53f5dafc4941",
      "094784d94ad265346b18850cf35b758d69a33541d68ddb10dfd846751df47560",
      "7c251822e97714f238ee4544ee5bb2e2923126b30be66b09b927dc8625d03df3",
      "88eb5e7460e9faa4961f077a39aea18a0983afaf99e9cea28ee724a45de0a3e8",
      "58662251d7c9f12dd59dd5f7165221c0531104396bbe717ca56a70edf9878dc9",
      "8599f2358f7fa6855ba41d125745aa646bbc6b81c00af26eeaca6c0c0e0dfbfc",
      "c710a24c4a7fc5b4aeda613ef08da68892816c1d6ff8d783c92290c8ba3bba81",
      "ccd11f375aa4047cc63f4de034fc7490f3f5448e5163df258688f2cef6bd13fb"
   ],
   "flags":[
      255,
      191,
      0,
      0
   ]
}

This endpoint retrieves tx merkle proof at txid

HTTP Request

GET https://media.bitcoinfiles.org/txproof/77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4

URL Parameters

Parameter Description
txid Txid of the transaction

Get Raw Transaction Merkle Proof

Get Raw Transaction Merkle Proof

curl https://media.bitcoinfiles.org/txproof/77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4/raw
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getTxOutProofString('77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4');

The above command returns the merkle proof of transaction (MerkleBlock)

000000206e4cc162fe30ddae54aa6c92939ccfe0af2a2e75341aeb0300000000000000009e010a9aaa297c4c9dcdd4eb27dbaf8af4cc7a63cddfbf5555a1c2bda980ff44d87b9b5ecbb00418fc984c9b102600000fd0c4eb3cdc2e35b387c2a2c9fee0dfa504482e033579c66d470dbee0e7894f25b46f0794f08bc66b9d2bd80ec3ab8e2ed6359308d33b4495b7db806ec19d617734a2cd3bc26b815d29049aa333593ae92ad1ea02f75f9863fea69e9547707cc8366d88cfa8affdee442bad72626ccc7fd5285ea077e8b5b6e5bc9205d0a4ce123a65ac66248cd643751d67ae022262d6c811ee45e13cc15757f79e5d119e3cec4cbf1068d82630cfe1a9612b864a6403d44eda3577550de845bf3f7805173fd59560aa9eabdff4db8bd86d5c267d89a96d3953834a23697946855861aba8dce7b4cf3be1af1134fabe42d48eb89ffd85b7592d7c898a711eb74b53f5dafc4941094784d94ad265346b18850cf35b758d69a33541d68ddb10dfd846751df475607c251822e97714f238ee4544ee5bb2e2923126b30be66b09b927dc8625d03df388eb5e7460e9faa4961f077a39aea18a0983afaf99e9cea28ee724a45de0a3e858662251d7c9f12dd59dd5f7165221c0531104396bbe717ca56a70edf9878dc98599f2358f7fa6855ba41d125745aa646bbc6b81c00af26eeaca6c0c0e0dfbfcc710a24c4a7fc5b4aeda613ef08da68892816c1d6ff8d783c92290c8ba3bba81ccd11f375aa4047cc63f4de034fc7490f3f5448e5163df258688f2cef6bd13fb04ffbf0000
000000206e4cc162fe30ddae54aa6c92939ccfe0af2a2e75341aeb0300000000000000009e010a9aaa297c4c9dcdd4eb27dbaf8af4cc7a63cddfbf5555a1c2bda980ff44d87b9b5ecbb00418fc984c9b102600000fd0c4eb3cdc2e35b387c2a2c9fee0dfa504482e033579c66d470dbee0e7894f25b46f0794f08bc66b9d2bd80ec3ab8e2ed6359308d33b4495b7db806ec19d617734a2cd3bc26b815d29049aa333593ae92ad1ea02f75f9863fea69e9547707cc8366d88cfa8affdee442bad72626ccc7fd5285ea077e8b5b6e5bc9205d0a4ce123a65ac66248cd643751d67ae022262d6c811ee45e13cc15757f79e5d119e3cec4cbf1068d82630cfe1a9612b864a6403d44eda3577550de845bf3f7805173fd59560aa9eabdff4db8bd86d5c267d89a96d3953834a23697946855861aba8dce7b4cf3be1af1134fabe42d48eb89ffd85b7592d7c898a711eb74b53f5dafc4941094784d94ad265346b18850cf35b758d69a33541d68ddb10dfd846751df475607c251822e97714f238ee4544ee5bb2e2923126b30be66b09b927dc8625d03df388eb5e7460e9faa4961f077a39aea18a0983afaf99e9cea28ee724a45de0a3e858662251d7c9f12dd59dd5f7165221c0531104396bbe717ca56a70edf9878dc98599f2358f7fa6855ba41d125745aa646bbc6b81c00af26eeaca6c0c0e0dfbfcc710a24c4a7fc5b4aeda613ef08da68892816c1d6ff8d783c92290c8ba3bba81ccd11f375aa4047cc63f4de034fc7490f3f5448e5163df258688f2cef6bd13fb04ffbf0000

This endpoint retrieves raw tx merkle proof at txid

HTTP Request

GET https://media.bitcoinfiles.org/txproof/77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4/raw

URL Parameters

Parameter Description
txid Txid of the transaction

Verify Transaction Merkle Proof

Verify Raw Transaction Merkle Proof (Merkle Block)

curl https://media.bitcoinfiles.org/txproof/verify/000000206e4cc162fe30ddae54aa6c92939ccfe0af2a2e75341aeb0300000000000000009e010a9aaa297c4c9dcdd4eb27dbaf8af4cc7a63cddfbf5555a1c2bda980ff44d87b9b5ecbb00418fc984c9b102600000fd0c4eb3cdc2e35b387c2a2c9fee0dfa504482e033579c66d470dbee0e7894f25b46f0794f08bc66b9d2bd80ec3ab8e2ed6359308d33b4495b7db806ec19d617734a2cd3bc26b815d29049aa333593ae92ad1ea02f75f9863fea69e9547707cc8366d88cfa8affdee442bad72626ccc7fd5285ea077e8b5b6e5bc9205d0a4ce123a65ac66248cd643751d67ae022262d6c811ee45e13cc15757f79e5d119e3cec4cbf1068d82630cfe1a9612b864a6403d44eda3577550de845bf3f7805173fd59560aa9eabdff4db8bd86d5c267d89a96d3953834a23697946855861aba8dce7b4cf3be1af1134fabe42d48eb89ffd85b7592d7c898a711eb74b53f5dafc4941094784d94ad265346b18850cf35b758d69a33541d68ddb10dfd846751df475607c251822e97714f238ee4544ee5bb2e2923126b30be66b09b927dc8625d03df388eb5e7460e9faa4961f077a39aea18a0983afaf99e9cea28ee724a45de0a3e858662251d7c9f12dd59dd5f7165221c0531104396bbe717ca56a70edf9878dc98599f2358f7fa6855ba41d125745aa646bbc6b81c00af26eeaca6c0c0e0dfbfcc710a24c4a7fc5b4aeda613ef08da68892816c1d6ff8d783c92290c8ba3bba81ccd11f375aa4047cc63f4de034fc7490f3f5448e5163df258688f2cef6bd13fb04ffbf0000
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.verifyTxOutProofString('77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4');

This endpoint verifies the merkle block and returns which txids it commits to (MerkleBlock)

["77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4"]
["77619dc16e80dbb795443bd3089335d62e8eabc30ed82b9d6bc68bf094076fb4"]

This endpoint verifies the merkle block and returns which txids it commits to

HTTP Request

GET https://media.bitcoinfiles.org/txproof/verify/000000206e4cc162fe30ddae54aa6c92939ccfe0af2a2e75341aeb0300000000000000009e010a9aaa297c4c9dcdd4eb27dbaf8af4cc7a63cddfbf5555a1c2bda980ff44d87b9b5ecbb00418fc984c9b102600000fd0c4eb3cdc2e35b387c2a2c9fee0dfa504482e033579c66d470dbee0e7894f25b46f0794f08bc66b9d2bd80ec3ab8e2ed6359308d33b4495b7db806ec19d617734a2cd3bc26b815d29049aa333593ae92ad1ea02f75f9863fea69e9547707cc8366d88cfa8affdee442bad72626ccc7fd5285ea077e8b5b6e5bc9205d0a4ce123a65ac66248cd643751d67ae022262d6c811ee45e13cc15757f79e5d119e3cec4cbf1068d82630cfe1a9612b864a6403d44eda3577550de845bf3f7805173fd59560aa9eabdff4db8bd86d5c267d89a96d3953834a23697946855861aba8dce7b4cf3be1af1134fabe42d48eb89ffd85b7592d7c898a711eb74b53f5dafc4941094784d94ad265346b18850cf35b758d69a33541d68ddb10dfd846751df475607c251822e97714f238ee4544ee5bb2e2923126b30be66b09b927dc8625d03df388eb5e7460e9faa4961f077a39aea18a0983afaf99e9cea28ee724a45de0a3e858662251d7c9f12dd59dd5f7165221c0531104396bbe717ca56a70edf9878dc98599f2358f7fa6855ba41d125745aa646bbc6b81c00af26eeaca6c0c0e0dfbfcc710a24c4a7fc5b4aeda613ef08da68892816c1d6ff8d783c92290c8ba3bba81ccd11f375aa4047cc63f4de034fc7490f3f5448e5163df258688f2cef6bd13fb04ffbf0000

URL Parameters

Parameter Description
txid Txid of the transaction

Get Blockchain Info

Get blockchain information

curl https://media.bitcoinfiles.org/blockchain/status
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getBlockchainInfo();

The above command returns the blockchain info

{
   "chain":"main",
   "blocks":630756,
   "bestblockhash":"0000000000000000038445394e87e5103343f34f91da9f4c9fd1a754e5e16b31",
   "difficulty":197513539700.0701,
   "mediantime":1586980990,
   "verificationprogress":0.9999899941505928,
   "chainwork":"000000000000000000000000000000000000000001060b7473a70fece894e1fa"
}
{
   "chain":"main",
   "blocks":630756,
   "bestblockhash":"0000000000000000038445394e87e5103343f34f91da9f4c9fd1a754e5e16b31",
   "difficulty":197513539700.0701,
   "mediantime":1586980990,
   "verificationprogress":0.9999899941505928,
   "chainwork":"000000000000000000000000000000000000000001060b7473a70fece894e1fa"
}

This endpoint retrieves blockchain info status

HTTP Request

GET https://media.bitcoinfiles.org/blockchain/status

Get Block

Get raw block by blockhash

curl https://media.bitcoinfiles.org/block/00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getBlock('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550');

The above command returns the block

01000000f528fac1bcb685d0cd6c792320af0300a5ce15d687c7149548904e31000000004e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f85de6849ffff001d385ccb7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0116ffffffff0100f2052a0100000043410492ade9a7a1fde25016c02d223e2f1c501d2af11b492e0a3f0cd617a01798c5f5eabd9d5957a7b2d66d1b42f688a6fd5d2bc60ad0d7a00f6006fc4838fb4c248aac00000000

01000000f528fac1bcb685d0cd6c792320af0300a5ce15d687c7149548904e31000000004e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f85de6849ffff001d385ccb7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0116ffffffff0100f2052a0100000043410492ade9a7a1fde25016c02d223e2f1c501d2af11b492e0a3f0cd617a01798c5f5eabd9d5957a7b2d66d1b42f688a6fd5d2bc60ad0d7a00f6006fc4838fb4c248aac00000000

This endpoint retrieves raw block at blockhash

HTTP Request

GET https://media.bitcoinfiles.org/block/00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550

URL Parameters

Parameter Description
blockhash Blockhash of the block

Get Filtered Block

Get raw transactions filtered within a block.

Specify an arbitrary hex string to match anywhere in a transaction.

You can do logical OR by piping multiple hex sequences togther.

Example 1:

'01234|66666' will match all transactions in a block that have 01234 or 66666 appearing somewhere in the raw transaction.

747765746368 is the word 'twetch' and you can find all transactions that have that string anywhere.

Example 2:

'0123.+88|447755' matches all transactions that have 0123 pattern with anything in between followed by an 88 OR 447755 is found anywhere in the transaction.

curl https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter/747765746368

curl https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter/747765746368|0123

curl https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter?outputFilter=1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf,1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf


curl https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter?outputFilterId=6fce8b16ae898ca5d403e3624813f41aee1f0a1bbf1a3c387c49a4af34699ad1
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getBlockFiltered('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550', {
   base: '0123456|747765746368',
   outputFilter: null,
   outputFilterId: null
});

const result2 = await bitcoinfiles.getBlockFiltered('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550', {
   base: '0123.+88|447755',
   outputFilter: null,
   outputFilterId: null
});

const result3 = await bitcoinfiles.getBlockFiltered('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550', {
   base: null,
   outputFilter: ['1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf', 'deca84cc774cdb30152c46c6122daa9ebafafcc7f612b7bc9e5e44a01d03d2c5', 'deca84cc774cdb30152c46c6122daa9ebafafcc7f612b7bc9e5e44a01d03d2c5-0']
   outputFilterId: null
});

// Load up a filter created earlier with `saveOutputFilter`
const result4 = await bitcoinfiles.getBlockFiltered('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550', {
   outputFilterId: '6fce8b16ae898ca5d403e3624813f41aee1f0a1bbf1a3c387c49a4af34699ad1'
});

The above command returns the filtered

{
   header: {
         "bits": 402963644,
         "hash": "0000000000000000010fa8e8773dbdb932e4a1c6ca4a3e67a2ed6313c435da6a",
         "merkleRoot": "2c8286bd5cea7340a4e5c5dce2b801d244af689841907a44482c35aad10c4084",
         "nonce": 3620922370,
         "prevHash": "00000000000000000075705dc13f5b1c5a10312585f28e07fa530ceacac201a6",
         "time": 1587614794,
         "version": 536870912,
   },

   tx: [
      {
         "h":"07eb6b63d4fc4d2e1bc4dcc0f50a365ec865dce7001099cc283a32917e2395b9","raw":"0100000001d95b67b533205196cde0bd42f4cc139fa4eff968347fe57c28b06e8495cc8157040000006b483045022100f8181bfa7c18da1460be22a81e3866740fc60261e0bb3ce1f78736371358f96d0220554e6eb8a3ff68e2c51aee2d096045f5a8fe99e3f69c9cca0673edbe798a1a8b4121030a548df8f30d0bfb0499c4be4a287a2bd5a42599cea14e75ff1a3e822766867effffffff050000000000000000fd0101006a22314c6f6f6b79327976626a576958453631456862395333337745327744534c566a44067477657463682432383134623563392d356439392d343930302d616538612d656163653039623062366462017c22313550636948473232534e4c514a584d6f53556157566937575371633768436676610d424954434f494e5f454344534122314e58544835356d336e566f504c757a47526b6b616b65736d58433341726d5544534c58494d3249346d74356d4e5174652b30594864454c42363662754c39427a776562656457792b486b637345306e59473336366c59426b4b6278464b632f476e58592b6e624c6355354f444c516e584554745265446e334d6b3d79cc0000000000001976a9143816920e94f43f603cae571b545203aec4516a3788ac79cc0000000000001976a914c23979eba63d6b5941145316618acabe83735cfb88acc8630600000000001976a91405186ff0710ed004229e644c0653b2985c648a2388ac4baff239000000001976a914264fb2bb20ec9a627c6dbeb3ba51534847ec4c3e88ac00000000"},
      ...
      }
   ]
}

{
   header: {
         "bits": 402963644,
         "hash": "0000000000000000010fa8e8773dbdb932e4a1c6ca4a3e67a2ed6313c435da6a",
         "merkleRoot": "2c8286bd5cea7340a4e5c5dce2b801d244af689841907a44482c35aad10c4084",
         "nonce": 3620922370,
         "prevHash": "00000000000000000075705dc13f5b1c5a10312585f28e07fa530ceacac201a6",
         "time": 1587614794,
         "version": 536870912,
   },

   tx: [
      {
         "h":"07eb6b63d4fc4d2e1bc4dcc0f50a365ec865dce7001099cc283a32917e2395b9","raw":"0100000001d95b67b533205196cde0bd42f4cc139fa4eff968347fe57c28b06e8495cc8157040000006b483045022100f8181bfa7c18da1460be22a81e3866740fc60261e0bb3ce1f78736371358f96d0220554e6eb8a3ff68e2c51aee2d096045f5a8fe99e3f69c9cca0673edbe798a1a8b4121030a548df8f30d0bfb0499c4be4a287a2bd5a42599cea14e75ff1a3e822766867effffffff050000000000000000fd0101006a22314c6f6f6b79327976626a576958453631456862395333337745327744534c566a44067477657463682432383134623563392d356439392d343930302d616538612d656163653039623062366462017c22313550636948473232534e4c514a584d6f53556157566937575371633768436676610d424954434f494e5f454344534122314e58544835356d336e566f504c757a47526b6b616b65736d58433341726d5544534c58494d3249346d74356d4e5174652b30594864454c42363662754c39427a776562656457792b486b637345306e59473336366c59426b4b6278464b632f476e58592b6e624c6355354f444c516e584554745265446e334d6b3d79cc0000000000001976a9143816920e94f43f603cae571b545203aec4516a3788ac79cc0000000000001976a914c23979eba63d6b5941145316618acabe83735cfb88acc8630600000000001976a91405186ff0710ed004229e644c0653b2985c648a2388ac4baff239000000001976a914264fb2bb20ec9a627c6dbeb3ba51534847ec4c3e88ac00000000"},
      ...
      }
   ]
}

This endpoint retrieves filtered block at blockhash

HTTP Request

GET https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter/747765746368|0123

GET https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter?outputFilter=1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf,1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf

GET https://media.bitcoinfiles.org/block/00000000000000000013fd298b5567aa19f71de983f04f6d3eea1660c2d2b177/tx/filter?outputFilterId=6fce8b16ae898ca5d403e3624813f41aee1f0a1bbf1a3c387c49a4af34699ad1

URL Parameters

Parameter Description
blockhash Blockhash of the block
filterStr Filter string to match in hex in the block. You can use a pipe
outputFilter Address, scripthash, txid or txout (${txid}-${number}) format to filter blocck
outputFilterId outputFilterId returned by the outputFilter create API call

Save Output Filter

Output Filters are a way to restrict your block and stream filters to select only those transactions that match the criteria.

You may specify addresses, p2pkh hex, scripthash, txid, and txoutpoints (txid-outputIndex).


curl -X POST https://api.bitcoinfiles.org/outputfilter -H 'Content-Type: application/json' \
-d '{ "add": ["12UhHtxuMMftNodp5nwoDYfBd4QaLm6Sz9"]}'

{
   "result": {
      // outputFilterId created
      "id": "8d2267f19a9e8524e3d253631e19bf163bcefb5de74e1ad86c36365afe2a3f87"
   },
   "success": true,
}

const bitcoinfiles = require('bitcoinfiles-sdk');
// Monitor a few addresses, and txid and scripthash.
const saveResult = await bitcoinfiles.saveOutputFilter(
  [
         '12UhHtxuMMftNodp5nwoDYfBd4QaLm6Sz9',
         '12UhHtxuMMftNodp5nwoDYfBd4QaLm6Sz9', // automatically removes deduplicates
         '0c629d7b8069f917b7f31942db3ec94bf4c4662e17c05b1d5c059e448d1470af-2',
         '1ALSfdsAHraUzu8HhAE9Cep9ca1ju3fjt2',
         '65503f4f336d4528fec7e645f81f1bfd655e837e8460c33b677f6995955e0b95',
  ]
);
console.log(saveResult);
/*
{
   "result": {
      // outputFilterId created
      "id": "8d2267f19a9e8524e3d253631e19bf163bcefb5de74e1ad86c36365afe2a3f87"
   },
   "success": true,
}
*/

This endpoint creates an output filter that can be referenced in the block and stream filtering by outputFilterId

HTTP Request


curl -X POST https://api.bitcoinfiles.org/outputfilter -H 'Content-Type: application/json' \
-d '{ "add": ["12UhHtxuMMftNodp5nwoDYfBd4QaLm6Sz9"]}'

Body Parameters

Parameter Description
add Array of scripthash, address, txid, or txoutpoint for filtering

Get Output Filter

Retrieve an output filter that was created earlier. An output filter can be used in the outputFilterId parameter to block and stream filtering.


curl https://api.bitcoinfiles.org/outputfilter/8d2267f19a9e8524e3d253631e19bf163bcefb5de74e1ad86c36365afe2a3f87

[ '76a9141034fd8093641ae0741a0565fb7787bca1ac35fc88ac',
      '0c629d7b8069f917b7f31942db3ec94bf4c4662e17c05b1d5c059e448d1470af-2',
      '76a914666675d887a7ae09835af934096d9fcbbb70eed288ac',
      '65503f4f336d4528fec7e645f81f1bfd655e837e8460c33b677f6995955e0b95' ]

const bitcoinfiles = require('bitcoinfiles-sdk');
// Monitor a few addresses, and txid and scripthash.
const result = await bitcoinfiles.getOutputFilter('8d2267f19a9e8524e3d253631e19bf163bcefb5de74e1ad86c36365afe2a3f87');
console.log(result);
/*
[ '76a9141034fd8093641ae0741a0565fb7787bca1ac35fc88ac',
      '0c629d7b8069f917b7f31942db3ec94bf4c4662e17c05b1d5c059e448d1470af-2',
      '76a914666675d887a7ae09835af934096d9fcbbb70eed288ac',
      '65503f4f336d4528fec7e645f81f1bfd655e837e8460c33b677f6995955e0b95' ]
*/

This endpoint gets an output filter that can be referenced in the block and stream filtering by outputFilterId

HTTP Request


curl https://api.bitcoinfiles.org/outputfilter/8d2267f19a9e8524e3d253631e19bf163bcefb5de74e1ad86c36365afe2a3f87

URL Parameters

Parameter Description
outputFilterId output filter identifier used during creation

Get Blockheader

Get blockheader by blockhash

curl https://media.bitcoinfiles.org/blockheader/00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getBlockHeader('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550');

The above command returns the blockheader


{
   "hash":"00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550",
   "height":43,
   "version":1,
   "versionHex":"00000001",
   "merkleroot":"2f5c03ce19e9a855ac93087a1b68fe6592bcf4bd7cbb9c1ef264d886a785894e",
   "time":1231609477,
   "mediantime":1231607488,
   "nonce":2093702200,
   "bits":"1d00ffff",
   "difficulty":1,
   "chainwork":"0000000000000000000000000000000000000000000000000000002c002c002c",
   "previousblockhash":"00000000314e90489514c787d615cea50003af2023796ccdd085b6bcc1fa28f5",
   "nextblockhash":"000000002978eecde8d020f7f057083bc990002fff495121d7dc1c26d00c00f8"
}


{
   "hash":"00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550",
   "height":43,
   "version":1,
   "versionHex":"00000001",
   "merkleroot":"2f5c03ce19e9a855ac93087a1b68fe6592bcf4bd7cbb9c1ef264d886a785894e",
   "time":1231609477,
   "mediantime":1231607488,
   "nonce":2093702200,
   "bits":"1d00ffff",
   "difficulty":1,
   "chainwork":"0000000000000000000000000000000000000000000000000000002c002c002c",
   "previousblockhash":"00000000314e90489514c787d615cea50003af2023796ccdd085b6bcc1fa28f5",
   "nextblockhash":"000000002978eecde8d020f7f057083bc990002fff495121d7dc1c26d00c00f8"
}

This endpoint retrieves blockheader at blockhash

HTTP Request

GET https://media.bitcoinfiles.org/blockheader/00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550

URL Parameters

Parameter Description
blockhash Blockhash of the blockheader

Get Raw Blockheader

Get raw blockheader by blockhash

curl https://media.bitcoinfiles.org/rawblockheader/00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getBlockheaderRaw('00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550');

The above command returns the blockheader

01000000f528fac1bcb685d0cd6c792320af0300a5ce15d687c7149548904e31000000004e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f85de6849ffff001d385ccb7c

01000000f528fac1bcb685d0cd6c792320af0300a5ce15d687c7149548904e31000000004e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f85de6849ffff001d385ccb7c

This endpoint retrieves raw blockheader at blockhash

HTTP Request

GET https://media.bitcoinfiles.org/rawblockheader/00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550

URL Parameters

Parameter Description
blockhash Blockhash of the blockheader

Get Blockhash by Height

Get blockhash by height

curl https://media.bitcoinfiles.org/height/43322
const bitcoinfiles = require('bitcoinfiles-sdk');
const result = await bitcoinfiles.getBlockHash(43322);

The above command returns the blockhash

{ "blockhash": "000000002fef20817c904075a8821c2c5e5e3d602347c8a9d02b708fa9e90109" }

{ "blockhash": "000000002fef20817c904075a8821c2c5e5e3d602347c8a9d02b708fa9e90109" }

This endpoint retrieves blockhash at height

HTTP Request

GET https://media.bitcoinfiles.org/height/43322

URL Parameters

Parameter Description
height Height of the blockhash to get

Socket Streaming (SSE)

BitcoinFiles supports real-time notifications with Server Side Events (SSE)

Endpoint: https://stream.bitcoinfiles.org/mempool?filter=747765746368|012.*777

Note: You must specify a filter parameter to filter the incoming transactions. The example above matches any transaction that contains 747765746368 ('twetch' in hex) OR the pattern 012.*777 is found anywhere in the transaction.

The exact same filter syntax is supported as in the Block Delivery Service

Subscribe to the endpoint using any SSE library to start getting transaction and block notifications in real-time.

Links: - Server Side Events - Node: express-sse

Socket Streaming sessions are limited to 30 minutes. Ensure that you reconnect every 30 minutes to maintain your session.

Transaction Events

Subscribe to receive notifications when new transactions in the mempool match your filter.

For example, to subscribe to all transactions that contains the word 'twetch', use this filter:

https://stream.bitcoinfiles.org/mempool?filter=747765746368

You can event combine filters and use simple regular expressions:

https://stream.bitcoinfiles.org/mempool?filter=747765746368|012.*777

Note: This endpoint for transactions also returns the block notifications. Make sure to check the message type to be 'tx'. See BlockHeader Event for the format of the block header event

var es = new EventSource('https://stream.bitcoinfiles.org/mempool?filter=747765746368');

es.onmessage = function (event) {
    console.log('event', event);
};

// The event type is 'tx' and contains the txid and urls to access the transaction
// Note that if the transaction is less than 1,000 bytes, then it is also returned in the 'raw' field
// Otherwise the 'raw' is omitted and you can obtain the full transaction at one of the links provided.

// Additionally, if the file is a valid B:// file, then the 'file_url' is provided to the content
/*
{
  type: 'message',
  data:
   '{
    "type":"tx",
    "txid":"e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e",
    "rawtx_url":"https://media.bitcoinfiles.org/tx/e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e/raw",
    "tx_url":"https://media.bitcoinfiles.org/tx/e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e",
    "file_url":"https://media.bitcoinfiles.org/e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e",
    "raw": "....set to the raw tx bytes as long as the tx is less than 1,000 bytes total"
    }',
  lastEventId: '2',
  origin: 'https://stream.bitcoinfiles.org'
}
*/
var es = new EventSource('https://stream.bitcoinfiles.org/mempool?filter=747765746368');

es.onmessage = function (event) {
    console.log('event', event);
};

// The event type is 'tx' and contains the txid and urls to access the transaction
// Note that if the transaction is less than 1,000 bytes, then it is also returned in the 'raw' field
// Otherwise the 'raw' is omitted and you can obtain the full transaction at one of the links provided.

// Additionally, if the file is a valid B:// file, then the 'file_url' is provided to the content
/*
{
  type: 'message',
  data:
   '{
    "type":"tx",
    "txid":"e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e",
    "rawtx_url":"https://media.bitcoinfiles.org/tx/e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e/raw",
    "tx_url":"https://media.bitcoinfiles.org/tx/e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e",
    "file_url":"https://media.bitcoinfiles.org/e6e5db1205775f9627208217e8d49dec3337fb1bfecb71918d66d8918ad7a99e",
    "raw": "....set to the raw tx bytes as long as the tx is less than 1,000 bytes total"
    }',
  lastEventId: '2',
  origin: 'https://stream.bitcoinfiles.org'
}
*/

BlockHeader Events

Subscribe to listen for all new found blockheaders. You may obtain the full block using the Block Delivery Service if needed.

var es = new EventSource('https://stream.bitcoinfiles.org/blockheaders');

es.onmessage = function (event) {
    console.log('event', event);
};

// The event type is 'blockheader' and contains the blockheader that just arrived.
/*

{
  type: 'message',
  data:
   '{
     "type":"blockheader",
     "blockheader":{
       "hash":"000000000000000003b61bb7f1d9ada5e2b832ac55440914e7e86066345ca07c",
       "version":549453824,
       "prevHash":"0000000000000000034afd5abb1694ccb5574cd163381a60cc3c22e062710ed4","merkleRoot":"e4a18640ae54bc241aa404c86ee4aa74756242af2bdabf97ec9acee43c25751f",
       "time":1587189274,
       "bits":403014440,
       "nonce":1883442530,
       "height":631116
     }
     }',
  lastEventId: '1',
  origin: 'https://stream.bitcoinfiles.org' }

*/
var es = new EventSource('https://stream.bitcoinfiles.org/blockheaders');

es.onmessage = function (event) {
    console.log('event', event);
};

// The event type is 'blockheader' and contains the blockheader that just arrived.
/*

{
  type: 'message',
  data:
   '{
     "type":"blockheader",
     "blockheader":{
       "hash":"000000000000000003b61bb7f1d9ada5e2b832ac55440914e7e86066345ca07c",
       "version":549453824,
       "prevHash":"0000000000000000034afd5abb1694ccb5574cd163381a60cc3c22e062710ed4","merkleRoot":"e4a18640ae54bc241aa404c86ee4aa74756242af2bdabf97ec9acee43c25751f",
       "time":1587189274,
       "bits":403014440,
       "nonce":1883442530,
       "height":631116
     }
     }',
  lastEventId: '1',
  origin: 'https://stream.bitcoinfiles.org' }

*/

Blockchain Scanner

Synchronize the blockchain data to your application effortlessly.

Monitor the Bitcoin SV blockchain in real-time and crawl blocks matching your filters.

Scan the blockchain blocks and mempool for transactions matching base filter (hex regex), outputFilter array of addresses scripthashes, txids, and txouts.

Note: If you need to monitor more than 20 items in the outputFilter, then use the saveOutputFilter and specify the outputFilterId.

The scanner uses the stream and media endpoints, it should be easy to build this same scanner in any other language.

Examples:

Entire mempool

Twetch outputs in mempool

All outputs matching '123' in mempool

With sample outputFilterId:

All outputs matching saved output filter in mempool

Note: the output filter stores an address like 12UhHtxuMMftNodp5nwoDYfBd4QaLm6Sz9 in output script format for efficiency reasons. Example 112UhHtxuMMftNodp5nwoDYfBd4QaLm6Sz9 = 76a9141034fd8093641ae0741a0565fb7787bca1ac35fc88ac

Find all B:// files Note: the bitcom prefix of 19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut was converted to hex utf8: 31394878696756345179427633744870515663554551797131707a5a56646f417574

bitcoinfiles .scanner({ initHeight: 566492, saveUpdatedHeight: true }) .filter({ baseFilter: '31394878696756345179427633744870515663554551797131707a5a56646f417574', outputFilter: null, outputFilterId: null }) .block(async (block, self) => { for (const e of block.tx) { const tx = new bitcoin.Transaction(e.raw); console.log(tx.hash); fs.appendFileSync('b-files.txt', tx.hash); } }) .error((err, self) => { console.log('error', err, self); }) .start();

bitcoinfiles.scanner({
  initHeight: 632051,      // Start crawling at this height
  saveUpdatedHeight: true, // Save last height to file on disk
  onlyblocks: false,      // include mempool or not
})
.filter({
  baseFilter: null,
  outputFilter: ['1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf'],
  outputFilterId: null,
})
.mempool(function(e, self){
    const tx = new bsv.Transaction(e.raw);
    // Do something with the transaction...
})
.block((block, self) => {
  for (const e of block.tx) {
    const tx = new bsv.Transaction(e.raw);
    // Do something with the transaction...
  }
})
.error((err, self) => {
    console.log(err);
})
.start();


bitcoinfiles.scanner({
   initHeight: 632051,      // Start crawling at this height
   saveUpdatedHeight: true, // Save last height to file on disk
   onlyblocks: false,      // include mempool or not
})
.filter({
  baseFilter: null,
  outputFilter: ['1Twetcht1cTUxpdDoX5HQRpoXeuupAdyf'],
  outputFilterId: null,
})
.mempool(function(e, self){
    const tx = new bsv.Transaction(e.raw);
    // Do something with the transaction...
})
.block((block, self) => {
  for (const e of block.tx) {
    const tx = new bsv.Transaction(e.raw);
    // Do something with the transaction...
  }
})
.error((err, self) => {
    console.log(err);
})
.start();

Treasure Chest

Get Transactions with Filter

This endpoint returns the unmined large transactions available for processing.

For use by miners (transaction processors) to populate their mempools. A transaction processor can selectively choose what size and feerate they will accept for processing. This enables them to experiment witht mining larger (> 100KB) OP_RETURN payloads and transactions.

Note: By default transactions are sorted by fee.

A transaction processor can query this endpoint to retrive the *most profitable large transactions for block inclusion. The rawtx is located at the given url. Transaction processor is responsible for verifying the transaction fee rate from the rawtx bytes.

Example 1: Get transactions sized between 100KB and 1MB, sort ascending on filesize, and limit to 10 results.

https://api.bitcoinfiles.org/treasure-chest?maxfilesize=1000000&minfilesize=100000&desc=0&order=filesize&offset=0&limit=10

curl https://media.bitcoinfiles.org/treasure-chest?maxfilesize=1000000&minfilesize=0&desc=1&order=fee&offset=0&limit=10&mined=0

[
   {
      "txid":"a721b9f1fca2deb55dff487ed52a2f7246f9f4f6e97b6bdaa5d2cc55a5d16400",
      "size":76178,
      "fee":38275,
      "url":"https://media.bitcoinfiles.org/tx/a721b9f1fca2deb55dff487ed52a2f7246f9f4f6e97b6bdaa5d2cc55a5d16400/raw",
      "blockhash":null
   },
   {
      "txid":"04b17f77eb33d110fe00a197f01b42b98524437bf4853d446da1e0a159bc7a14",
      "size":76178,
      "fee":38275,
      "url":"https://media.bitcoinfiles.org/tx/04b17f77eb33d110fe00a197f01b42b98524437bf4853d446da1e0a159bc7a14/raw",
      "blockhash":null
   }
]

/*
curl https://media.bitcoinfiles.org/treasure-chest?maxfilesize=1000000&minfilesize=0&desc=1&order=fee&offset=0&limit=10&mined=0
[
   {
      "txid":"a721b9f1fca2deb55dff487ed52a2f7246f9f4f6e97b6bdaa5d2cc55a5d16400",
      "size":76178,
      "fee":38275,
      "url":"https://media.bitcoinfiles.org/tx/a721b9f1fca2deb55dff487ed52a2f7246f9f4f6e97b6bdaa5d2cc55a5d16400/raw",
      "blockhash":null
   },
   {
      "txid":"04b17f77eb33d110fe00a197f01b42b98524437bf4853d446da1e0a159bc7a14",
      "size":76178,
      "fee":38275,
      "url":"https://media.bitcoinfiles.org/tx/04b17f77eb33d110fe00a197f01b42b98524437bf4853d446da1e0a159bc7a14/raw",
      "blockhash":null
   }
]
*/

This endpoint returns the unmined large transactions available for processing. For use by miners (transaction processors) to populate their mempools. A transaction processor can selectively choose what size and feerate they will accept for processing. This enables them to experiment witht mining larger (> 100KB) OP_RETURN payloads and transactions.

Merchant API

Note: You can use 3rd party API clients such as Minercraft to interact with the Merchant API endpoint at https://merchantapi.matterpool.io/mapi/feeQuote

For example:

brfc-merchantapi specification

This protocol uses the JSON envelopes BRFC as well as the Fee Spec BRFC.

Get fee quote


curl https://merchantapi.matterpool.io/mapi/feeQuote -H 'Content-Type: application/json'


// Using matterclouudjs
const matter = require('mattercloudjs');
const result = await matter.mapi.feeQuote('0100000001270...');

// Using minercraft
const miner = new Minercraft({
  "url": "https://merchantapi.matterpool.io"
});
let rate = await miner.fee.rate()

The above command returns JSON structured like this:

{
  "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-01-28T11:15:03.722Z\",\"expiryTime\":\"2020-01-28T11:25:03.722Z\",\"minerId\":\"03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031\",\"currentHighestBlockHash\":\"000000000000000001cedc3dec00ecd29943a275498e812e72b2afdf5df8814a\",\"currentHighestBlockHeight\":619574,\"minerReputation\":\"N/A\",\"fees\":[{\"feeType\":\"standard\",\"miningFee\":{\"satoshis\":1,\"bytes\":1},\"relayFee\":{\"satoshis\":1,\"bytes\":1}},{\"feeType\":\"data\",\"miningFee\":{\"satoshis\":1,\"bytes\":1},\"relayFee\":{\"satoshis\":1,\"bytes\":1}}]}",
  "signature": "304402202a7f70855739a6948c00c2a85dd733f087c4f1ae4beb256c225eadab767d5e1d02207870c57728166f61b0334bd89640d6d6c26f31ada4aac42b29971ebfa5c414e1",
  "publicKey": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "encoding": "UTF-8",
  "mimetype": "application/json"
}
{
  "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-01-28T11:15:03.722Z\",\"expiryTime\":\"2020-01-28T11:25:03.722Z\",\"minerId\":\"03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031\",\"currentHighestBlockHash\":\"000000000000000001cedc3dec00ecd29943a275498e812e72b2afdf5df8814a\",\"currentHighestBlockHeight\":619574,\"minerReputation\":\"N/A\",\"fees\":[{\"feeType\":\"standard\",\"miningFee\":{\"satoshis\":1,\"bytes\":1},\"relayFee\":{\"satoshis\":1,\"bytes\":1}},{\"feeType\":\"data\",\"miningFee\":{\"satoshis\":1,\"bytes\":1},\"relayFee\":{\"satoshis\":1,\"bytes\":1}}]}",
  "signature": "304402202a7f70855739a6948c00c2a85dd733f087c4f1ae4beb256c225eadab767d5e1d02207870c57728166f61b0334bd89640d6d6c26f31ada4aac42b29971ebfa5c414e1",
  "publicKey": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "encoding": "UTF-8",
  "mimetype": "application/json"
}

Purpose:

This endpoint returns a JSONEnvelope with a payload that contains the fees charged by a specific BSV miner. The purpose of the envelope is to ensure strict consistency in the message content for the purpose of signing responses.

Returns:

{
  "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-01-28T11:15:03.722Z\",\"expiryTime\":\"2020-01-28T11:25:03.722Z\",\"minerId\":\"03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031\",\"currentHighestBlockHash\":\"000000000000000001cedc3dec00ecd29943a275498e812e72b2afdf5df8814a\",\"currentHighestBlockHeight\":619574,\"minerReputation\":\"N/A\",\"fees\":[{\"feeType\":\"standard\",\"miningFee\":{\"satoshis\":1,\"bytes\":1},\"relayFee\":{\"satoshis\":1,\"bytes\":1}},{\"feeType\":\"data\",\"miningFee\":{\"satoshis\":1,\"bytes\":1},\"relayFee\":{\"satoshis\":1,\"bytes\":1}}]}",
  "signature": "304402202a7f70855739a6948c00c2a85dd733f087c4f1ae4beb256c225eadab767d5e1d02207870c57728166f61b0334bd89640d6d6c26f31ada4aac42b29971ebfa5c414e1",
  "publicKey": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "encoding": "UTF-8",
  "mimetype": "application/json"
}
field function
payload main data payload encoded in a specific format type
signature signature on payload string. This may be null.
publicKey public key to verify signature. This may be null.
encoding encoding type
mimetype Multipurpose Internet Mail Extensions type

Payload:

{
  "apiVersion": "0.1.0",
  "timestamp": "2020-01-28T11: 15: 03.722Z",
  "expiryTime": "2020-01-28T11: 25: 03.722Z",
  "minerId": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "currentHighestBlockHash": "000000000000000001cedc3dec00ecd29943a275498e812e72b2afdf5df8814a",
  "currentHighestBlockHeight": 619574,
  "minerReputation": null,
  "fees": [
    {
      "feeType": "standard",
      "miningFee": {
        "satoshis": 1,
        "bytes": 1
      },
      "relayFee": {
        "satoshis": 1,
        "bytes": 1
      }
    },
    {
      "feeType": "data",
      "miningFee": {
        "satoshis": 1,
        "bytes": 1
      },
      "relayFee": {
        "satoshis": 1,
        "bytes": 1
      }
    }
  ]
}
field function
apiVersion version of merchant api spec
timestamp timestamp of payload document
expiryTime expiry time of quote
minerId minerID / public key of miner. This may be null.
currentHighestBlockHash hash of current blockchain tip
currentHighestBlockHeight hash of current blockchain tip
minerReputation reputation of miner
fees fees charged by miner (feeSpec BRFC)

Submit transaction


curl -X POST https://merchantapi.matterpool.io/mapi/tx -H 'Content-Type: application/json' \
-d '{ "rawtx": "0100000001270e55963a167a2fae66307efa3565032402c1387d62e5276464295d2a6834d8010000008a4730440220132f6d484de9d34d314aec945865af5da95f35cf4c7cc271d40bc99f8d7f12e3022051fcb2ce4461d1c6e8a778f5e4dcb27c8461d18e0652f68a7a09a98e95df5cb74141044e2c1e2c055e7aefc291679882382c35894a6aa6dd95644f598e506c239f9d83b1d9671c1d9673e3c2b74f07e8032343f3adc21367bd4cffae92fe31efcd598affffffff020000000000000000456a2231394878696756345179427633744870515663554551797131707a5a56646f41757404617364660d746578742f6d61726b646f776e055554462d3807616e6f7468657240390000000000001976a91410bdcba3041b5e5517a58f2e405293c14a7c70c188ac00000000"}'


// Using matterclouudjs
const matter = require('mattercloudjs');
const result = await matter.mapi.submitTx('0100000001270...');

// Using minercraft
const miner = new Minercraft({
  "url": "https://merchantapi.matterpool.io"
});
let result = await miner.tx.push('0100000001270....')

Purpose:

This endpoint is used to send a raw transaction to a miner for inclusion in the next block that the miner creates.

body when Content-Type is application/json:

{
  "rawtx": "0200000001f56216b33513cf621839d584f0e31566059537ef184070733a56c3b5c41d0d6d0000000049483045022100cddd5c304ff87f1733262d34b56a90061aa4b97fdc0b0e42fc3065c04e231ca402202f0c65cb6d04c2b8fc82bdcfcfd7295b6e0f717362ec395e02f6905c68ac7b7741ffffffff01805b6d29010000001976a9142a5acfb9a647a03a758afaa5c359284d4b95c0be88ac00000000"
}

When Content-Type is application/octet-stream, it is possible to upload the rawtx as a binary stream. For large transactions, this is half the size of the hexadecimal equivalent although this gain is largely minimized through the use of gzip encoding of hex data.

Returns:

{
  "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-01-15T11:40:29.826Z\",\"txid\":\"6bdbcfab0526d30e8d68279f79dff61fb4026ace8b7b32789af016336e54f2f0\",\"returnResult\":\"success\",\"resultDescription\":\"\",\"minerId\":\"03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031\",\"currentHighestBlockHash\":\"71a7374389afaec80fcabbbf08dcd82d392cf68c9a13fe29da1a0c853facef01\",\"currentHighestBlockHeight\":207,\"txSecondMempoolExpiry\":0}",
  "signature": "3045022100f65ae83b20bc60e7a5f0e9c1bd9aceb2b26962ad0ee35472264e83e059f4b9be022010ca2334ff088d6e085eb3c2118306e61ec97781e8e1544e75224533dcc32379",
  "publicKey": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "encoding": "UTF-8",
  "mimetype": "application/json"
}
field function
payload main data payload encoded in a specific format type
signature signature on payload string. This may be null.
publicKey public key to verify signature. This may be null.
encoding encoding type
mimetype Multipurpose Internet Mail Extensions type

Payload:

{
  "apiVersion": "0.1.0",
  "timestamp": "2020-01-15T11:40:29.826Z",
  "txid": "6bdbcfab0526d30e8d68279f79dff61fb4026ace8b7b32789af016336e54f2f0",
  "returnResult": "success",
  "resultDescription": "",
  "minerId": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "currentHighestBlockHash": "71a7374389afaec80fcabbbf08dcd82d392cf68c9a13fe29da1a0c853facef01",
  "currentHighestBlockHeight": 207,
  "txSecondMempoolExpiry": 0
}
field function
apiVersion version of merchant api spec
timestamp timestamp of payload document
txid transaction ID
returnResult will contain either success or failure
resultDescription will contain the error on failure or empty on success
minerId minerId public key of miner
currentHighestBlockHash hash of current blockchain tip
currentHighestBlockHeight hash of current blockchain tip
txSecondMempoolExpiry Duration (minutes) Tx will be kept in secondary mempool

Query transaction status


curl https://merchantapi.matterpool.io/mapi/tx/5e3014372338f079f005eedc85359e4d96b8440e7dbeb8c35c4182e0c19a1a12 -H 'Content-Type: application/json'


// Using matterclouudjs
const matter = require('mattercloudjs');
const result = await matter.mapi.getTx('5e3014372338f079f005eedc85359e4d96b8440e7dbeb8c35c4182e0c19a1a12');

// Using minercraft
const miner = new Minercraft({
  "url": "https://merchantapi.matterpool.io"
});
let result = await miner.tx.status('5e3014372338f079f005eedc85359e4d96b8440e7dbeb8c35c4182e0c19a1a12')

Purpose:

This endpoint is used to check the current status of a previously submitted transaction.

Returns:

{
  "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-01-15T11:41:29.032Z\",\"returnResult\":\"failure\",\"resultDescription\":\"Transaction in mempool but not yet in block\",\"blockHash\":\"\",\"blockHeight\":0,\"minerId\":\"03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031\",\"confirmations\":0,\"txSecondMempoolExpiry\":0}",
  "signature": "3045022100f78a6ac49ef38fbe68db609ff194d22932d865d93a98ee04d2ecef5016872ba50220387bf7e4df323bf4a977dd22a34ea3ad42de1a2ec4e5af59baa13258f64fe0e5",
  "publicKey": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "encoding": "UTF-8",
  "mimetype": "application/json"
}
field function
payload main data payload encoded in a specific format type
signature signature on payload string. This may be null.
publicKey public key to verify signature. This may be null.
encoding encoding type
mimetype Multipurpose Internet Mail Extensions type

Payload:

{
  "apiVersion": "0.1.0",
  "timestamp": "2020-01-15T11:41:29.032Z",
  "returnResult": "failure",
  "resultDescription": "Transaction in mempool but not yet in block",
  "blockHash": "",
  "blockHeight": 0,
  "minerId": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "confirmations": 0,
  "txSecondMempoolExpiry": 0
}
field function
apiVersion version of merchant api spec
timestamp timestamp of payload document
returnResult will contain either success or failure
resultDescription will contain the error on failure or empty on success
blockHash hash of tx block
blockHeight hash of tx block
minerId minerId public key of miner
confirmations number of block confirmations
txSecondMempoolExpiry Duration (minutes) Tx will be kept in secondary mempool

OR

{
  "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-01-15T12:09:37.394Z\",\"returnResult\":\"success\",\"resultDescription\":\"\",\"blockHash\":\"745093bb0c80780092d4ce6926e0caa753fe3accdc09c761aee89bafa85f05f4\",\"blockHeight\":208,\"minerId\":\"03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031\",\"confirmations\":2,\"txSecondMempoolExpiry\":0}",
  "signature": "3045022100c9a712a124ff3100e26f7bbcc87204848cc2ff1effacd8d8e8daac5d81bce74c02201dd661aad00d2cde443a076475cfb7d6523e0ef98a1112e938af002ca5222fbe",
  "publicKey": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "encoding": "UTF-8",
  "mimetype": "application/json"
}
field function
payload main data payload encoded in a specific format type
signature signature on payload string. This may be null.
publicKey public key to verify signature. This may be null.
encoding encoding type
mimetype Multipurpose Internet Mail Extensions type

Payload:

{
  "apiVersion": "0.1.0",
  "timestamp": "2020-01-15T12:09:37.394Z",
  "returnResult": "success",
  "resultDescription": "",
  "blockHash": "745093bb0c80780092d4ce6926e0caa753fe3accdc09c761aee89bafa85f05f4",
  "blockHeight": 208,
  "minerId": "03fcfcfcd0841b0a6ed2057fa8ed404788de47ceb3390c53e79c4ecd1e05819031",
  "confirmations": 2,
  "txSecondMempoolExpiry": 0
}

Miner ID

MatterPool and MatterCloud supports Miner ID specification

https://minerid.matterpool.io/minerid/MATTERPOOL

Boost POW

A Protocol for Buying and Selling Proof-of-Work Embedded in Bitcoin Script

boostpow.com

Boost is a new type of content ranking system that enables users to increase the amount of energy required to mine or process their content. Users will boost their post as a way to signal to the network that they believe their information is valuable. Boosted posts will appear in the boost feed – ordered by the amount of energy requested for their information.

Links:

MoneyButton, Relay, TwetchPay Integration

Easily integrate MoneyButton, Relay, and TwetchPay

Consult the respective documentation for additional details. All services support the 'outputs' format presented below for easy integration.

const boost = require('boostpow-js');
// Create a Boost request with your data
const boostJob = boost.BoostPowJob.fromObject({
  content: Buffer.from('hello world', 'utf8').toString('hex'),
  diff: 1, // Minimum '1'. Specifies how much hashrate. 1 = difficulty of Bitcoin Genesis (7 MH/second)
  category: Buffer.from('B', 'hex').toString('hex'),
  additionalData: Buffer.from(`{ "foo": 1234, "metadata": "hello"}`, 'utf8').toString('hex'),
  userNonce: Buffer.from(Math.random(999999999), 'utf8').toString('hex'),
  tag: Buffer.from('funny-animals', 'utf8').toString('hex'),
});
// Construct a MoneyButton or Relay Output
const boostOutputs = [{
  script: boostJob.toASM(),
  amount: boostJob.getDiff() * 0.0001, // Charge a fee for the Boost. In future this will be a feeQuote system. Higher payout the more likely a miner will mine the boost relativity to the diff.
  currency: "BSV"
}];

// Now you can populate MoneyButton, Relay or TwetchPay with the outputs:
twetchPay.pay({
  label: 'Boost Content',
  outputs: boostOutputs,
  onPayment: async (e) => {
    console.log('payment completed', e);
    // Optionally submit to the graph database for indexing
    // In the future a planaria will pick it up automatically on-chain, for now submit the rawtx
    const boostRequestSubmit = await boost.Graph().submitBoostJob(e.rawtx);
    console.log('boostRequestSubmit', boostRequestSubmit);
  }
});

The above command returns JSON structured like this after successfully submitting.

{
  "success": true,
  "result": {
    "boostPowString": null,
    "boostPowMetadata": null,
    "boostHash": null,
    "boostJobId": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267.0",
    "boostJobProofId": null,
    "boostJob": {
      "boostJobId": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267.0",
      "createdTime": 1586125104,
      "txid": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267",
      "vout": 0,
      "scripthash": "b94f7355830581e0776d91b752bcea9856d4f5b6d0fbccb9d5628fff16180fce",
      "value": 10000,
      "diff": 1,
      "rawtx": "01000000026d78236444e4ffcae65b0b7ac467774ee9bb9bf233022231f918195056990504050000006a47304402204c41bfabb9a6114a1bb9472f9eeffceb4fe809aa2724dc5cb01d02b230a7c79102202bbe6bfae1c7ef183f060377ad1bfd36dc45a8fcc9dd5aad36f0b079b4cc0e374121021de3f773245db6d0aa1fa0a45483226e1dc4245fbf107dafe6614a5619700534ffffffff0e8358d2a0695438ca0086748c5eca4920a21c3412f9215389befc024341a61f030000006a4730440220136058bf2a4968f1aa6c1fb838ddb3addc09c4a0a5e0ab799eafa863c6da370c02204b81d1957c7f091b35c00f3baa4f1cc144208e42753b61457915f39cbdff4fd14121027651f21529831fc06155b71d1e673dccecdec87b9327367c8f3f4d6e6cdd484cffffffff021027000000000000e108626f6f7374706f7775040000000020747365742061207369207369687400000000000000000000000000000000000004ffff001d14000000000000000000000000000000000000000004000000002000000000000000000000000000000000000000000000000000000000000000007e7c557a766b7e52796b557a8254887e557a8258887e7c7eaa7c6b7e7e7c8254887e6c7e7c8254887eaa01007e816c825488537f7681530121a5696b768100a0691d00000000000000000000000000000000000000000000000000000000007e6c539458959901007e819f6976a96c88ac783c0000000000001976a9141c0a355b69698600f78cccd184c2cee02206c99188ac00000000",
      "spentTxid": null,
      "spentVout": 0,
      "spentRawtx": null,
      "spentScripthash": null
    },
    "boostData": {
      "categoryutf8": "",
      "category": "00000000",
      "contentutf8": "this is a test",
      "content": "0000000000000000000000000000000000007468697320697320612074657374",
      "tagutf8": "",
      "tag": "0000000000000000000000000000000000000000",
      "usernonce": "00000000",
      "additionaldatautf8": "",
      "additionaldata": "0000000000000000000000000000000000000000000000000000000000000000"
    }
  }
}

Create Boost Job

Create Boost Job Request.

See unit tests for more examples

curl -X POST https://graph.boostpow.com/api/v1/main/boost/jobs -H 'Content-Type: application/json' \
-d '{ "rawtx": "...raw tx hex containing boost output..."}'

const boost = require('boostpow-js');
const result = await boost.Graph().submitBoostJob('...rawboost tx...');

The above command returns JSON structured like this:

{
  "success": true,
  "result": {
    "boostPowString": null,
    "boostPowMetadata": null,
    "boostHash": null,
    "boostJobId": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267.0",
    "boostJobProofId": null,
    "boostJob": {
      "boostJobId": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267.0",
      "createdTime": 1586125104,
      "txid": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267",
      "vout": 0,
      "scripthash": "b94f7355830581e0776d91b752bcea9856d4f5b6d0fbccb9d5628fff16180fce",
      "value": 10000,
      "diff": 1,
      "rawtx": "01000000026d78236444e4ffcae65b0b7ac467774ee9bb9bf233022231f918195056990504050000006a47304402204c41bfabb9a6114a1bb9472f9eeffceb4fe809aa2724dc5cb01d02b230a7c79102202bbe6bfae1c7ef183f060377ad1bfd36dc45a8fcc9dd5aad36f0b079b4cc0e374121021de3f773245db6d0aa1fa0a45483226e1dc4245fbf107dafe6614a5619700534ffffffff0e8358d2a0695438ca0086748c5eca4920a21c3412f9215389befc024341a61f030000006a4730440220136058bf2a4968f1aa6c1fb838ddb3addc09c4a0a5e0ab799eafa863c6da370c02204b81d1957c7f091b35c00f3baa4f1cc144208e42753b61457915f39cbdff4fd14121027651f21529831fc06155b71d1e673dccecdec87b9327367c8f3f4d6e6cdd484cffffffff021027000000000000e108626f6f7374706f7775040000000020747365742061207369207369687400000000000000000000000000000000000004ffff001d14000000000000000000000000000000000000000004000000002000000000000000000000000000000000000000000000000000000000000000007e7c557a766b7e52796b557a8254887e557a8258887e7c7eaa7c6b7e7e7c8254887e6c7e7c8254887eaa01007e816c825488537f7681530121a5696b768100a0691d00000000000000000000000000000000000000000000000000000000007e6c539458959901007e819f6976a96c88ac783c0000000000001976a9141c0a355b69698600f78cccd184c2cee02206c99188ac00000000",
      "spentTxid": null,
      "spentVout": 0,
      "spentRawtx": null,
      "spentScripthash": null
    },
    "boostData": {
      "categoryutf8": "",
      "category": "00000000",
      "contentutf8": "this is a test",
      "content": "0000000000000000000000000000000000007468697320697320612074657374",
      "tagutf8": "",
      "tag": "0000000000000000000000000000000000000000",
      "usernonce": "00000000",
      "additionaldatautf8": "",
      "additionaldata": "0000000000000000000000000000000000000000000000000000000000000000"
    }
  }
}

This endpoint retrieves found Boosts matching the search querie

HTTP Request

POST https://graph.boostpow.com/api/v1/main/boost/jobs

URL Parameters

Parameter Description
rawtx Raw boost tx

Get Boost Job Status

Get Boost Job Status. Returns the status of a Boost Job. If it's mined you will see the 'boostPowString' and other fields populated.

See unit tests for more examples

curl  https://graph.boostpow.com/api/v1/main/boost/jobs/cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267

const boost = require('boostpow-js');
const result = await boost.Graph().getBoostJobStatus('cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267');

The above command returns JSON structured like this:

{
  "success": true,
  "result": {
    "boostPowString": null,
    "boostPowMetadata": null,
    "boostHash": null,
    "boostJobId": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267.0",
    "boostJobProofId": null,
    "boostJob": {
      "boostJobId": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267.0",
      "createdTime": 1586125104,
      "txid": "cdd2822902bcc90bd6e4651475e2476034700353e7a0335a42783c1a1050d267",
      "vout": 0,
      "scripthash": "b94f7355830581e0776d91b752bcea9856d4f5b6d0fbccb9d5628fff16180fce",
      "value": 10000,
      "diff": 1,
      "rawtx": "01000000026d78236444e4ffcae65b0b7ac467774ee9bb9bf233022231f918195056990504050000006a47304402204c41bfabb9a6114a1bb9472f9eeffceb4fe809aa2724dc5cb01d02b230a7c79102202bbe6bfae1c7ef183f060377ad1bfd36dc45a8fcc9dd5aad36f0b079b4cc0e374121021de3f773245db6d0aa1fa0a45483226e1dc4245fbf107dafe6614a5619700534ffffffff0e8358d2a0695438ca0086748c5eca4920a21c3412f9215389befc024341a61f030000006a4730440220136058bf2a4968f1aa6c1fb838ddb3addc09c4a0a5e0ab799eafa863c6da370c02204b81d1957c7f091b35c00f3baa4f1cc144208e42753b61457915f39cbdff4fd14121027651f21529831fc06155b71d1e673dccecdec87b9327367c8f3f4d6e6cdd484cffffffff021027000000000000e108626f6f7374706f7775040000000020747365742061207369207369687400000000000000000000000000000000000004ffff001d14000000000000000000000000000000000000000004000000002000000000000000000000000000000000000000000000000000000000000000007e7c557a766b7e52796b557a8254887e557a8258887e7c7eaa7c6b7e7e7c8254887e6c7e7c8254887eaa01007e816c825488537f7681530121a5696b768100a0691d00000000000000000000000000000000000000000000000000000000007e6c539458959901007e819f6976a96c88ac783c0000000000001976a9141c0a355b69698600f78cccd184c2cee02206c99188ac00000000",
      "spentTxid": null,
      "spentVout": 0,
      "spentRawtx": null,
      "spentScripthash": null
    },
    "boostData": {
      "categoryutf8": "",
      "category": "00000000",
      "contentutf8": "this is a test",
      "content": "0000000000000000000000000000000000007468697320697320612074657374",
      "tagutf8": "",
      "tag": "0000000000000000000000000000000000000000",
      "usernonce": "00000000",
      "additionaldatautf8": "",
      "additionaldata": "0000000000000000000000000000000000000000000000000000000000000000"
    }
  }
}

This endpoint retrieves found Boosts matching the search query

HTTP Request

POST https://graph.boostpow.com/api/v1/main/boost/jobs

URL Parameters

Parameter Description
txid Txid of the boost job to get the status

Search Boosted Content

Search by specific fields in utf8 or raw hex (make sure to use the file byte padding length).

See unit tests for more examples

NOTE: You must validate the boostPowString and boostPowMetadata to confirm POW is correct. Use BoostSignalRanker, BoostSignalSummary, or BoostPowString to do this efficiently to produce a list sorted by difficulty (energy)

Examples

See GraphSearchQuery interface below for all the options

Find all Boost for content=hello

Find all Boost for content=hello in category=mttr

*Find array of content in category=mttr after minedTimeFrom=1585869216 and before minedTimeEnd=1585969216

curl "https://graph.boostpow.com/api/v1/main/boost/search?content=hello&contenthex=00000000000000000000000000000000000000000000000000000068656c6c6f&minedTimeFrom=0&minedTimeEnd=&category=&categoryhex=&tag=&taghex=&additionaldata=&additionaldatahex=&debug=true&expanded=true&"
const boost = require('boostpow-js');

const result = await boost.Graph(options).search({
  // content: 'test1235',           // Optional. String or array of content match in utf8
  // contenthex: '00000000000000000000000000000000000000000000000000000068656c6c6f',
  // category: ['B', 'BAES'],       // Optional. String or array to match in utf8
  // categoryhex: ['....', '...'],  // Optional. String or array to match in hex
  // tag: 'bitcoin-protocol',       // Optional. String or array to match in utf8
  // taghex: '...'                  // Optional. String or array to match in hex
  // additionaldata: '',            // Optional. String or array to match in utf8
  // additionaldatahex: '...'       // Optional. String or array to match in hex
  // unmined: 'true'                // Optional. Whether to included unmined or only mined
  // additionaldatahex: '...'       // Optional. String or array to match in hex
  // See additional options below for querying and filtering
});
const ranker = boost.BoostSignalRanker.fromArray(result.mined);
// By default it ranks category by category and content then sorts by total energy
console.log('ranked list by category+content', ranker.list);
console.log('first signal summary', ranker.first.entity);
console.log('group by tag', ranker.groupByTag());
// See more options for displaying retrieved results

/*
// You can search by many different fields, including arrays for the content*, tag*, category*, additionaldata* fields.
export interface GraphSearchQuery {
    contentutf8?: string,
    content?: string,
    contenthex?: string,
    tagutf8?: string,
    tag?: string,
    taghex?: string,
    categoryutf8?: string,
    category?: string,
    categoryhex?: string,
    usernoncehex?: string,
    additionaldatahex?: string,
    additionaldatautf8?: string,
    additionaldata?: string,
    limit?: number
    createdTimeFrom?: number,
    createdTimeEnd?: number,
    minedTimeFrom?: number,
    minedTimeEnd?: number,
    boostPowString?: string,
    boostHash?: string,
    boostJobId?: string,
    boostJobProofId?: string,
    txid?: string,
    spentTxid?: string,
    unmined?: any,
    debug?: boolean,
    expanded?: boolean;
    be?: boolean, // big endian or not
    paginationToken?: string, // token to use to paginate for everything after
}
*/

The above command returns JSON structured like this:

{
  "q": {
    // Returns the query filter params
    "contentutf8": "hello",
    "tagutf8": "",
    "categoryutf8": "mttr",
    "be": true,
    "limit": 10000,
    "debug": true,
    "expanded": true
  },
  // To be used if search results exceed 10000
  "nextPaginationToken": null,
  // Array of mined boost signals
  "mined": [
    {
      "boostPowString": "7274746d6f6c6c65680000000000000000000000000000000000000000000000000000005a3f5b83f03b8d5b136a91fddb5b3fcd1b4e0b4aae0eeb115a1303d1e04a2a1fa071865effff001d03bd428a",
      "boostPowMetadata": "727274746d00000000000000000000000000000092e4d5ab4bb067f872d28f44d3e5433e56fca190460a3c820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "boostHash": "000000006b5976795d399e6c2b4c06c703c84b10684b758619d2139cbce92051",
      "boostJobId": "4339e1db626e084eb83a1ab69bb0b5a6479b0f4c34c301669afbf57416d6724b.0",
      "boostJobProofId": "be44fb9d1f3fc92e1a6c926001d8e47a3c9129233beb0413f048f157c642bb12.0",
      "boostJob": {
        "boostJobId": "4339e1db626e084eb83a1ab69bb0b5a6479b0f4c34c301669afbf57416d6724b.0",
        "createdTime": 1585868322,
        "txid": "4339e1db626e084eb83a1ab69bb0b5a6479b0f4c34c301669afbf57416d6724b",
        "vout": 0,
        "scripthash": "ed54d655c3541afb323c3cc63d4339575995541cdef73d20dd796b42a750967e",
        "value": 5635,
        "diff": 1,
        "time": 1585869216,
        "rawtx": "010000000112dc8a7db4778dfdb354eb089b05828a6e8e61f82345ab58feb9cbb877a1aeda040000006a47304402205bea90f13ffe5023a1048f991bdd1b79ebc2a15693fde03c941e7b93974fb270022020cdcbbccf98f4f492b0613dd09b1cc22517b98afcc7958bd187857a455cedba412102d1901d90696ff1c8f8ebed51efc2c272a1080d659096917f4b4608af1ae2552dffffffff020316000000000000e108626f6f7374706f7775047274746d206f6c6c656800000000000000000000000000000000000000000000000000000004ffff001d14727274746d00000000000000000000000000000004000000002000000000000000000000000000000000000000000000000000000000000000007e7c557a766b7e52796b557a8254887e557a8258887e7c7eaa7c6b7e7e7c8254887e6c7e7c8254887eaa01007e816c825488537f7681530121a5696b768100a0691d00000000000000000000000000000000000000000000000000000000007e6c539458959901007e819f6976a96c88ac3c2e0000000000001976a91409216dac6d382d1480f2828937171e420d1abc8f88ac00000000",
        "spentTxid": "be44fb9d1f3fc92e1a6c926001d8e47a3c9129233beb0413f048f157c642bb12",
        "spentVout": 0,
        "spentRawtx": "01000000014b72d61674f5fb9a6601c3344c0f9b47a6b5b09bb61a3ab84e086e62dbe13943000000009848304502210098a176e86eed1fb0592eab2ba06bb44236c5e7406b328a4444879b9b460f7cb202201bcb9e93302271f3e7f0e8359021ae0607e5118c8ef7f75587472a354531d042412102f96821f6d9a6150e0ea06b00c8c77597e863330041be70438ff6fb211d7efe660403bd428a04a071865e08000000000000000004460a3c821492e4d5ab4bb067f872d28f44d3e5433e56fca190ffffffff01fe130000000000001976a91492e4d5ab4bb067f872d28f44d3e5433e56fca19088ac00000000",
        "spentScripthash": null
      },
      "boostData": {
        "categoryutf8": "mttr",
        "category": "6d747472",
        "contentutf8": "hello",
        "content": "00000000000000000000000000000000000000000000000000000068656c6c6f",
        "tagutf8": "mttrr",
        "tag": "0000000000000000000000000000006d74747272",
        "usernonce": "00000000",
        "additionaldatautf8": "",
        "additionaldata": "0000000000000000000000000000000000000000000000000000000000000000"
      }
    }
  ]
}

This endpoint retrieves found Boosts matching the search querie

HTTP Request

GET https://graph.boostpow.com/api/v1/main/boost/search?content=hello&contenthex=00000000000000000000000000000000000000000000000000000068656c6c6f&minedTimeFrom=0&minedTimeEnd=&category=&categoryhex=&tag=&taghex=&additionaldata=&additionaldatahex=&debug=true&expanded=true&

URL Parameters

Parameter Description
address The address to retrieve balance for
contentutf8 same as 'contetnt'
content Search by utf8 content match
contenthex Search by hex content match
tagutf8 Same as 'tag'
tag Search by utf8 tag match
taghex Search by tag hex
categoryutf8 Same as 'category'
category Search by utf8
categoryhex Search by hex
additionaldatahex Search by hex
additionaldatautf8 Same as 'additionaldata'
additionaldata Search by utf8
limit limit resultst to this many. (not used for now)
createdTimeFrom Search from when the job was saved in local db
createdTimeEnd Search to when the job was saved in local db
minedTimeFrom Search only mined from or after
minedTimeEnd Search only mined until or before
boostPowString Search by exact POW string match
boostHash Search by exact Boosthash mach
boostJobId Search by txid+vout for the boost job
boostJobProofId Search by spenttxid+vout for the boost job proof
txid Search by the boost job txid
spentTxid Search by the boost job proof txid
unmined 'true', 'false', 'only' -- whether to include unmined boost jobs in search results
debug boolean - default true
expanded boolean - default true
be boolean Big endian or not
paginationToken token to use to paginate for everything after

Publish Widget

Open Docs

Sample Boost Widget

Boost Publisher Widget is a simple way to boost content from your website.

Currently supported wallets are TwetchPay, Money Button and RelayX.

The simplest Boost Publisher usage looks like this:

// in HTML
<script src="https://publish.boostpow.com/publish.js"></script>

// in javascript
boostPublish.open({
  outputs: [],
  onPayment: function(payment, boostJobStatus) {
      console.log(payment, boostJobStatus);
  }
});

Contact

Contact us for feedback and questions, we love to hear your feedback. @mxtterpool

Errors

The MatterPool API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The resource is forbidden.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access a resource with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The resource requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many resources! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.