mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 01:02:05 -07:00
4182 lines
119 KiB
JSON
4182 lines
119 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"description": "rest.bitcoin.com is the REST layer for Bitcoin.com's Cloud. More info: [developer.bitcoin.com](https://developer.bitcoin.com). Chatroom [geni.us/CashDev](http://geni.us/CashDev)",
|
|
"version": "1.5.10",
|
|
"title": "REST",
|
|
"license": {
|
|
"name": "MIT",
|
|
"url": "https://opensource.org/licenses/MIT"
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "address",
|
|
"description": "Address details and utxo",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/address"
|
|
}
|
|
},
|
|
{
|
|
"name": "block",
|
|
"description": "Block Details",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/block"
|
|
}
|
|
},
|
|
{
|
|
"name": "blockchain",
|
|
"description": "Interacting w/ the BCH Blockchain",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/blockchain"
|
|
}
|
|
},
|
|
{
|
|
"name": "control",
|
|
"description": "Control your blockchain",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/control"
|
|
}
|
|
},
|
|
{
|
|
"name": "mining",
|
|
"description": "Mining w/ the BCH Blockchain",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/mining"
|
|
}
|
|
},
|
|
{
|
|
"name": "rawtransactions",
|
|
"description": "Create transactions to be transmitted to the network.",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/rawtransactions"
|
|
}
|
|
},
|
|
{
|
|
"name": "transaction",
|
|
"description": "Transaction details.",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/rawtransactions"
|
|
}
|
|
},
|
|
{
|
|
"name": "util",
|
|
"description": "Bitcoin Cash utilities.",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/bitbox/docs/util"
|
|
}
|
|
},
|
|
{
|
|
"name": "dataRetrieval",
|
|
"description": "dataRetrieval",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/wormhole/docs/dataRetrieval"
|
|
}
|
|
},
|
|
{
|
|
"name": "payloadCreation",
|
|
"description": "payloadCreation",
|
|
"externalDocs": {
|
|
"description": "Find out more",
|
|
"url": "https://developer.bitcoin.com/wormhole/docs/payloadCreation"
|
|
}
|
|
}
|
|
],
|
|
"paths": {
|
|
"/address/details/{address}": {
|
|
"get": {
|
|
"tags": ["address"],
|
|
"summary": "Address details",
|
|
"description": "Returns the details of an address including balance",
|
|
"operationId": "details",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address or array of addresses in cashAddr or legacy",
|
|
"required": true,
|
|
"example": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddressDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid Bitcoin Cash address as input.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Received an invalid Bitcoin Cash address as input."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/address/utxo/{address}": {
|
|
"get": {
|
|
"tags": ["address"],
|
|
"summary": "Address utxos",
|
|
"description": "Returns the list of utxo for an address",
|
|
"operationId": "utxo",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address or an array of addresses in cashAddr or legacy",
|
|
"required": true,
|
|
"example": "bitcoincash:qzstp4swtxg40rkn0j769vta3vkwyw4jj5fmdl2vtm",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddressUtxo"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid Bitcoin Cash address as input.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Received an invalid Bitcoin Cash address as input."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/address/unconfirmed/{address}": {
|
|
"get": {
|
|
"tags": ["address"],
|
|
"summary": "Unconfirmed transactions for an address",
|
|
"description": "Returns the list of unconfirmed transactions for an address",
|
|
"operationId": "unconfirmed",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address or an array of addresses in cashAddr or legacy",
|
|
"required": true,
|
|
"example": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddressUnconfirmed"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid Bitcoin Cash address as input.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Received an invalid Bitcoin Cash address as input."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/address/transactions/{address}": {
|
|
"get": {
|
|
"tags": ["address"],
|
|
"summary": "Transactions for an address",
|
|
"description": "Returns the list of transactions for an address",
|
|
"operationId": "transactions",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address in cashAddr or legacy",
|
|
"required": true,
|
|
"example": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
},
|
|
"400": {
|
|
"description": "Invalid value/s - Null"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/block/details/{id}": {
|
|
"get": {
|
|
"tags": ["block"],
|
|
"summary": "Block details",
|
|
"description": "Details about a block",
|
|
"operationId": "blockDetails",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "Block hash/height",
|
|
"required": true,
|
|
"example": "500000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid block height.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Received an invalid block height."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getBestBlockHash": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Hash of the best block in the longest blockchain.",
|
|
"description": "Returns the hash of the best (tip) block in the longest blockchain.",
|
|
"operationId": "getBestBlockHash",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BestBlockHash"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getBlock/{hash}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Information about block hash.",
|
|
"description": "If verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'. If verbose is true, returns an Object with information about block hash. The list of transactions hashes can be omitted from the object by setting txs to false",
|
|
"operationId": "getBlock",
|
|
"parameters": [
|
|
{
|
|
"name": "hash",
|
|
"in": "path",
|
|
"description": "the block hash",
|
|
"required": true,
|
|
"example": "00000000000000000046056a2d6728bc757862e7924a755125a519a2fec43c79",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "true for a json object, false for the hex encoded data",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
},
|
|
{
|
|
"name": "txs",
|
|
"in": "query",
|
|
"description": "true to return list of tx hashes, false to omit list of tx hashes",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Block"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Block not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Block not found"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getBlockchainInfo": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Info regarding blockchain processing",
|
|
"description": "Returns an object containing various state info regarding blockchain processing.",
|
|
"operationId": "getBlockchainInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockchainInfo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getBlockCount": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Number of blocks in the longest blockchain.",
|
|
"description": "Returns the number of blocks in the longest blockchain.",
|
|
"operationId": "getBlockCount",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockCount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getBlockHash/{height}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Hash of block in best-block-chain at height provided.",
|
|
"description": "Returns hash of block in best-block-chain at height provided.",
|
|
"operationId": "getBlockHash",
|
|
"parameters": [
|
|
{
|
|
"name": "height",
|
|
"in": "path",
|
|
"description": "the height index",
|
|
"required": true,
|
|
"example": 500000,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockHash"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Block not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Block not found"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getBlockHeader/{hash}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Information about blockheader hash",
|
|
"description": "If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'. If verbose is true, returns an Object with information about blockheader hash.",
|
|
"operationId": "getBlockHeader",
|
|
"parameters": [
|
|
{
|
|
"name": "hash",
|
|
"in": "path",
|
|
"description": "the block hash",
|
|
"required": true,
|
|
"example": "000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "true for a json object, false for the hex encoded data",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlockHeader"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Block not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Block not found"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getChainTips": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Information about all known tips in the block tree",
|
|
"description": "Return information about all known tips in the block tree, including the main chain as well as orphaned branches.",
|
|
"operationId": "getChainTips",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getDifficulty": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Proof-of-work difficulty",
|
|
"description": "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.",
|
|
"operationId": "getDifficulty",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Difficulty"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getMempoolAncestors/{txid}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Returns all in-mempool ancestors.",
|
|
"description": "If txid is in the mempool, returns all in-mempool ancestors.",
|
|
"operationId": "getMempoolAncestors",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "the transaction id (must be in mempool)",
|
|
"required": true,
|
|
"example": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "True for a json object, false for array of transaction ids",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MempoolAncestors"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Transaction not in mempool"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getMempoolDescendants/{txid}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Returns all in-mempool descendants.",
|
|
"description": "If txid is in the mempool, returns all in-mempool descendants.",
|
|
"operationId": "getMempoolDescendants",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "the transaction id (must be in mempool)",
|
|
"required": true,
|
|
"example": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "True for a json object, false for array of transaction ids",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MempoolDescendants"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Transaction not in mempool"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getMempoolEntry/{txid}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Mempool data for transaction",
|
|
"description": "Returns mempool data for given transaction",
|
|
"operationId": "getMempoolEntry",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "the transaction id (must be in mempool)",
|
|
"required": true,
|
|
"example": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
},
|
|
"400": {
|
|
"description": "Transaction not in mempool"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getMempoolInfo": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "The active state of the TX memory pool.",
|
|
"description": "Returns details on the active state of the TX memory pool.",
|
|
"operationId": "getMempoolInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MempoolInfo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getRawMempool": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "All transaction ids in memory pool.",
|
|
"description": "Returns all transaction ids in memory pool as a json array of string transaction ids.",
|
|
"operationId": "getRawMempool",
|
|
"parameters": [
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "True for a json object, false for array of transaction ids",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RawMempool"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getTxOut/{txid}/{n}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Details about unspent transaction output.",
|
|
"description": "Returns details about an unspent transaction output.",
|
|
"operationId": "getTxOut",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "the transaction id",
|
|
"required": true,
|
|
"example": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "n",
|
|
"in": "path",
|
|
"description": "vout number",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "number",
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "Whether to include the mempool",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
},
|
|
"400": {
|
|
"description": "Invalid value/s - Null"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/getTxOutProof/{txids}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Hex-encoded proof that 'txid' was included.",
|
|
"description": "Returns a hex-encoded proof that 'txid' was included in a block.",
|
|
"operationId": "getTxOutProof",
|
|
"parameters": [
|
|
{
|
|
"name": "txids",
|
|
"in": "path",
|
|
"description": "a json array of txids to filter [ 'txid' string A transaction hash ,... ]",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "blockhash",
|
|
"in": "query",
|
|
"description": "if specified, looks for txid in the block with this hash",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "data",
|
|
"in": "query",
|
|
"description": "a string that is a serialized, hex-encoded data for the proof.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
},
|
|
"400": {
|
|
"description": "Invalid tag value"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blockchain/verifyTxOutProof/{proof}": {
|
|
"get": {
|
|
"tags": ["blockchain"],
|
|
"summary": "Verify that a proof points to a transaction in a block",
|
|
"description": "Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain",
|
|
"operationId": "verifyTxOutProof",
|
|
"parameters": [
|
|
{
|
|
"name": "proof",
|
|
"in": "path",
|
|
"description": "The hex-encoded proof generated by gettxoutproof",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
},
|
|
"400": {
|
|
"description": "Invalid tag value"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/control/getInfo": {
|
|
"get": {
|
|
"tags": ["control"],
|
|
"summary": "Various state info.",
|
|
"description": "Returns an object containing various state info.",
|
|
"operationId": "getInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Info"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/mining/getMiningInfo": {
|
|
"get": {
|
|
"tags": ["mining"],
|
|
"summary": "Returns a json object containing mining-related information.",
|
|
"description": "",
|
|
"operationId": "getMiningInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MiningInfo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/mining/getNetworkHashps": {
|
|
"get": {
|
|
"tags": ["mining"],
|
|
"summary": "Estimated network hashes per second",
|
|
"description": "Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.",
|
|
"operationId": "getNetworkHashps",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "nblocks",
|
|
"description": "the number of blocks, or -1 for blocks since last difficulty change.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "number",
|
|
"default": 120
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "height",
|
|
"description": "to estimate at the time of the given height.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "number",
|
|
"default": 1
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NetworkHashps"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/decodeRawTransaction/{hex}": {
|
|
"get": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "Return the hex encoded transaction.",
|
|
"description": "Return a JSON object representing the serialized, hex-encoded transaction.",
|
|
"operationId": "decodeRawTransaction",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "hex",
|
|
"description": "The transaction hex string",
|
|
"required": true,
|
|
"example": "01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DecodeRawTransaction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "TX decode failed"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/decodeScript/{hex}": {
|
|
"get": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "Decode a hex-encoded script.",
|
|
"description": "Decode a hex-encoded script.",
|
|
"operationId": "decodeScript",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "hex",
|
|
"description": "The hex encoded script",
|
|
"required": true,
|
|
"example": "4830450221009a51e00ec3524a7389592bc27bea4af5104a59510f5f0cfafa64bbd5c164ca2e02206c2a8bbb47eabdeed52f17d7df668d521600286406930426e3a9415fe10ed592012102e6e1423f7abde8b70bca3e78a7d030e5efabd3eb35c19302542b5fe7879c1a16",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DecodeScript"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Argument must be hexadecimal string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/getRawTransaction/{txid}": {
|
|
"get": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "Return the raw transaction data.",
|
|
"description": "return the raw transaction data. If verbose is 'true', returns an Object with information about 'txid'. If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.",
|
|
"operationId": "getRawTransaction",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "txid",
|
|
"description": "The transaction id",
|
|
"required": true,
|
|
"example": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "verbose",
|
|
"description": "If false, return a string, otherwise return a json object",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GetRawTransaction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Transaction not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/sendRawTransaction/{hex}": {
|
|
"post": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "Submits raw transaction to local node and network.",
|
|
"description": "Submits raw transaction (serialized, hex-encoded) to local node and network. Also see createrawtransaction and signrawtransaction calls.",
|
|
"operationId": "sendRawTransaction",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "hex",
|
|
"description": "The hex string of the raw transaction",
|
|
"required": true,
|
|
"example": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation"
|
|
},
|
|
"400": {
|
|
"description": "Transaction not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/transaction/details/{txid}": {
|
|
"get": {
|
|
"tags": ["transaction"],
|
|
"summary": "Transaction details",
|
|
"description": "Details about a transaction",
|
|
"operationId": "transactionDetails",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "txid",
|
|
"description": "single txid or url encoded array of txids",
|
|
"required": true,
|
|
"example": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TransactionDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Transaction not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/util/validateAddress/{address}": {
|
|
"get": {
|
|
"tags": ["util"],
|
|
"summary": "Information about the given bitcoin address.",
|
|
"description": "Return information about the given bitcoin address.",
|
|
"operationId": "validateAddress",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "address",
|
|
"description": "The bitcoin address to validate",
|
|
"required": true,
|
|
"example": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ValidateAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid Address"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/create/{inputs}/{outputs}": {
|
|
"post": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "createRawTxChange",
|
|
"description": "Create a transaction spending the given inputs and creating new outputs. API Reference: https://developer.bitcoin.com/wormhole/docs/rawTransactions",
|
|
"operationId": "rawTransactionsCreate",
|
|
"parameters": [
|
|
{
|
|
"name": "inputs",
|
|
"in": "path",
|
|
"description": "A json array of json objects",
|
|
"required": true,
|
|
"example": "[{\"txid\":\"myid\",\"vout\":0}]",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "outputs",
|
|
"in": "path",
|
|
"description": "A json object with outputs",
|
|
"required": true,
|
|
"example": "{}",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "locktime",
|
|
"in": "query",
|
|
"description": "Raw locktime. Non-0 value also locktime-activates inputs",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid block height.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Received an invalid block height."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/change/{rawTx}/{prevTxs}/{destination}/{fee}": {
|
|
"post": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "createRawTxChange",
|
|
"description": "Adds a change output to the transaction.API Reference: https://developer.bitcoin.com/wormhole/docs/rawTransactions",
|
|
"operationId": "rawTransactionsChange",
|
|
"parameters": [
|
|
{
|
|
"name": "rawTx",
|
|
"in": "path",
|
|
"description": "The raw transaction to extend",
|
|
"required": true,
|
|
"example": "0100000001b15ee60431ef57ec682790dec5a3c0d83a0c360633ea8308fbf6d5fc10a779670400000000ffffffff025c0d00000000000047512102f3e471222bb57a7d416c82bf81c627bfcd2bdc47f36e763ae69935bba4601ece21021580b888ff56feb27f17f08802ebed26258c23697d6a462d43fc13b565fda2dd52aeaa0a0000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac00000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "prevTxs",
|
|
"in": "path",
|
|
"description": "A JSON array of transaction inputs",
|
|
"required": true,
|
|
"example": "[{\"txid\":\"6779a710fcd5f6fb0883ea3306360c3ad8c0a3c5de902768ec57ef3104e65eb1\",\"vout\":4,\"scriptPubKey\":\"76a9147b25205fd98d462880a3e5b0541235831ae959e588ac\",\"value\":0.00068257}]",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "destination",
|
|
"in": "path",
|
|
"description": "The destination for the change",
|
|
"required": true,
|
|
"example": "bchtest:qq2j9gp97gm9a6lwvhxc4zu28qvqm0x4j5e72v7ejg",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "fee",
|
|
"in": "path",
|
|
"description": "The desired transaction fees",
|
|
"required": true,
|
|
"example": 0.000035,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "position",
|
|
"in": "query",
|
|
"description": "The position of the change output (default: first position)",
|
|
"required": false,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid block height.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Received an invalid block height."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/input/{rawTx}/{txid}/{n}": {
|
|
"post": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "createRawTxInput",
|
|
"description": "Adds a transaction input to the transaction.API Reference: https://developer.bitcoin.com/wormhole/docs/rawTransactions",
|
|
"operationId": "rawTransactionsInput",
|
|
"parameters": [
|
|
{
|
|
"name": "rawTx",
|
|
"in": "path",
|
|
"description": "The raw transaction to extend",
|
|
"required": true,
|
|
"example": "01000000000000000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "The hash of the input transaction",
|
|
"required": true,
|
|
"example": "b006729017df05eda586df9ad3f8ccfee5be340aadf88155b784d1fc0e8342ee",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "n",
|
|
"in": "path",
|
|
"description": "The index of the transaction output used as input",
|
|
"required": true,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/opReturn/{rawTx}/{payload}": {
|
|
"post": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "createRawTxOpReturn",
|
|
"description": "Adds a payload with class C (op-return) encoding to the transaction.API Reference: https://developer.bitcoin.com/wormhole/docs/rawTransactions",
|
|
"operationId": "rawTransactionsOpReturn",
|
|
"parameters": [
|
|
{
|
|
"name": "rawTx",
|
|
"in": "path",
|
|
"description": "The raw transaction to extend",
|
|
"required": true,
|
|
"example": "01000000000000000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"in": "path",
|
|
"description": "The hex-encoded payload to add",
|
|
"required": true,
|
|
"example": "00000000000000020000000006dac2c0",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/reference/{rawTx}/{destination}": {
|
|
"post": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "createRawTxReference",
|
|
"description": "Adds a reference output to the transaction. API Reference: https://developer.bitcoin.com/wormhole/docs/rawTransactions",
|
|
"operationId": "rawTransactionsReference",
|
|
"parameters": [
|
|
{
|
|
"name": "rawTx",
|
|
"in": "path",
|
|
"description": "The raw transaction to extend",
|
|
"required": true,
|
|
"example": "0100000001a7a9402ecd77f3c9f745793c9ec805bfa2e14b89877581c734c774864247e6f50400000000ffffffff03aa0a0000000000001976a9146d18edfe073d53f84dd491dae1379f8fb0dfe5d488ac5c0d0000000000004751210252ce4bdd3ce38b4ebbc5a6e1343608230da508ff12d23d85b58c964204c4cef3210294cc195fc096f87d0f813a337ae7e5f961b1c8a18f1f8604a909b3a5121f065b52aeaa0a0000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac00000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "destination",
|
|
"in": "path",
|
|
"description": "The reference address or destination",
|
|
"required": true,
|
|
"example": "bchtest:qq2j9gp97gm9a6lwvhxc4zu28qvqm0x4j5e72v7ejg",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"in": "query",
|
|
"description": "The optional reference amount (minimal by default)",
|
|
"required": false,
|
|
"example": 0.005,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rawtransactions/decodeTransaction/{rawTx}": {
|
|
"get": {
|
|
"tags": ["rawtransactions"],
|
|
"summary": "decodeTransaction",
|
|
"description": "Decodes an Omni transaction. API Reference: https://developer.bitcoin.com/wormhole/docs/rawTransactions",
|
|
"operationId": "rawTransactionsDecodeTransaction",
|
|
"parameters": [
|
|
{
|
|
"name": "rawTx",
|
|
"in": "path",
|
|
"description": "The raw transaction to decode",
|
|
"required": true,
|
|
"example": "010000000163af14ce6d477e1c793507e32a5b7696288fa89705c0d02a3f66beb3c5b8afee0100000000ffffffff02ac020000000000004751210261ea979f6a06f9dafe00fb1263ea0aca959875a7073556a088cdfadcd494b3752102a3fd0a8a067e06941e066f78d930bfc47746f097fcd3f7ab27db8ddf37168b6b52ae22020000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ac00000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "prevTxs",
|
|
"in": "query",
|
|
"description": "A JSON array of transaction inputs (default: none)",
|
|
"required": false,
|
|
"example": "[{\"txid\":\"6779a710fcd5f6fb0883ea3306360c3ad8c0a3c5de902768ec57ef3104e65eb1\",\"vout\":4,\"scriptPubKey\":\"76a9147b25205fd98d462880a3e5b0541235831ae959e588ac\",\"value\":0.00068257}]",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "height",
|
|
"in": "query",
|
|
"description": "The parsing block height (default: 0 for chain height)",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/balance/{address}/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "balance",
|
|
"description": "Returns the token balance for a given address and property.",
|
|
"operationId": "dataRetrievalBalance",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "The address",
|
|
"required": true,
|
|
"example": "bchtest:qq2j9gp97gm9a6lwvhxc4zu28qvqm0x4j5e72v7ejg",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The property identifier",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Invalid address. Note: use cashAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/balancesForAddress/{address}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "balancesForAddress",
|
|
"description": "Returns a list of all token balances for a given address. API reference: https://developer.bitcoin.com/wormhole/docs/dataRetrieval",
|
|
"operationId": "dataRetrievalBalancesForAddress",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "The address",
|
|
"required": true,
|
|
"example": "bchtest:qq2j9gp97gm9a6lwvhxc4zu28qvqm0x4j5e72v7ejg",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Invalid address. Note: use cashAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/balancesForId/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "balanceForId",
|
|
"description": "Returns a list of token balances for a given currency or property identifier. API Reference: https://developer.bitcoin.com/wormhole/docs/dataRetrieval",
|
|
"operationId": "dataRetrievalBalancesForId",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The property identifier",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Invalid address. Note: use cashAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/balancesHash/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "balancesHash",
|
|
"description": "Returns a hash of the balances for the property.",
|
|
"operationId": "dataRetrievalBalancesHash",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The property to hash balances for",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/crowdSale/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "crowdSale",
|
|
"description": "Returns information about a crowdsale.",
|
|
"operationId": "dataRetrievalCrowdSale",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the crowdsale",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "verbose",
|
|
"in": "query",
|
|
"description": "List crowdsale participants (default: false)",
|
|
"required": false,
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/currentConsensusHash": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "currentConsensusHash",
|
|
"description": "Returns the consensus hash for all balances for the current block.",
|
|
"operationId": "dataRetrievalCurrentConsensusHash",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/grants/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "grants",
|
|
"description": "Returns information about granted and revoked units of managed tokens.",
|
|
"operationId": "dataRetrievalGrants",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the managed tokens to lookup",
|
|
"required": true,
|
|
"example": 220,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/info": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "info",
|
|
"description": "Returns various state information of the client and protocol.",
|
|
"operationId": "dataRetrievalInfo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/payload/{txid}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "payload",
|
|
"description": "Get the payload for an Omni transaction.",
|
|
"operationId": "dataRetrievalPayload",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "The hash of the transaction to retrieve payload",
|
|
"required": true,
|
|
"example": "d7dbbd16350ca13a1ce7fc67eb7fb411debca23ce01c3ae0e3e44498f1f6c3d0",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid txid as input."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/property/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "property",
|
|
"description": "Returns details for about the tokens or smart property to lookup.",
|
|
"operationId": "dataRetrievalProperty",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens or property",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/seedBlocks/{startBlock}/{endBlock}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "seedBlocks",
|
|
"description": "Returns a list of blocks containing Omni transactions for use in seed block filtering.",
|
|
"operationId": "dataRetrievalSeedBlocks",
|
|
"parameters": [
|
|
{
|
|
"name": "startBlock",
|
|
"in": "path",
|
|
"description": "The first block to look for Omni transactions (inclusive)",
|
|
"required": true,
|
|
"example": 290000,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "endBlock",
|
|
"in": "path",
|
|
"description": "The last block to look for Omni transactions (inclusive)",
|
|
"required": true,
|
|
"example": 300000,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/STO/{txid}/{recipientFilter}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "STO",
|
|
"description": "Get information and recipients of a send-to-owners transaction.",
|
|
"operationId": "dataRetrievalSto",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "The hash of the transaction to lookup",
|
|
"required": true,
|
|
"example": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "recipientFilter",
|
|
"in": "path",
|
|
"description": "A filter for recipients (wallet by default, '*' for all)",
|
|
"required": true,
|
|
"example": "*",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Invalid address. Note: use cashAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/transaction/{txid}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "transaction",
|
|
"description": "Get detailed information about an Omni transaction.",
|
|
"operationId": "dataRetrievalTransaction",
|
|
"parameters": [
|
|
{
|
|
"name": "txid",
|
|
"in": "path",
|
|
"description": "The hash of the transaction to lookup",
|
|
"required": true,
|
|
"example": "d7dbbd16350ca13a1ce7fc67eb7fb411debca23ce01c3ae0e3e44498f1f6c3d0",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "No information available about transaction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/blockTransactions/{index}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "blockTransactions",
|
|
"description": "Lists all Omni transactions in a block.",
|
|
"operationId": "dataRetrievalBlockTransactions",
|
|
"parameters": [
|
|
{
|
|
"name": "index",
|
|
"in": "path",
|
|
"description": "The block height or block index",
|
|
"required": true,
|
|
"example": 279007,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/pendingTransactions": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "pendingTransactions",
|
|
"description": "Returns a list of unconfirmed Omni transactions, pending in the memory pool.",
|
|
"operationId": "dataRetrievalPendingTransactions",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "query",
|
|
"description": "Address filter (default: '' for no filter)",
|
|
"required": false,
|
|
"example": "bchtest:qq2j9gp97gm9a6lwvhxc4zu28qvqm0x4j5e72v7ejg",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Invalid address. Note: use cashAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/properties": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "properties",
|
|
"description": "Lists all tokens or smart properties.",
|
|
"operationId": "dataRetrievalProperties",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "query",
|
|
"description": "address filter (default: '*')",
|
|
"required": false,
|
|
"example": "*",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "count",
|
|
"in": "query",
|
|
"description": "show at most n transactions (default: 10)",
|
|
"required": false,
|
|
"example": 10,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "skip",
|
|
"in": "query",
|
|
"description": "skip the first n transactions (default: 0)",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "startBlock",
|
|
"in": "query",
|
|
"description": "first block to begin the search (default: 0)",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "endBlock",
|
|
"in": "query",
|
|
"description": "last block to include in the search (default: 9999999)",
|
|
"required": false,
|
|
"example": 9999999,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/frozenBalance/{address}/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "frozenBalance",
|
|
"description": "Returns the frozen token balance for a given address and property.",
|
|
"operationId": "dataRetrievalFrozenBalance",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address",
|
|
"required": true,
|
|
"example": "qqxyplcfuxnm9z4usma2wmnu4kw9mexeug580mc3lx",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the property identifier",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/frozenBalanceForAddress/{address}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "frozenBalanceForAddress",
|
|
"description": "Returns the frozen token balance for a given address and property.",
|
|
"operationId": "dataRetrievalFrozenBalanceForAddress",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address",
|
|
"required": true,
|
|
"example": "qqxyplcfuxnm9z4usma2wmnu4kw9mexeug580mc3lx",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/frozenBalanceForId/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "frozenBalanceForId",
|
|
"description": "Returns the frozen token balance for a given property.",
|
|
"operationId": "dataRetrievalFrozenBalanceForId",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the Property ID",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/ERC721AddressTokens/{address}/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "ERC721AddressTokens",
|
|
"description": "Returns details for about the tokens or smart property to lookup.",
|
|
"operationId": "dataRetrievalERC721AddressTokens",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "the address of the query",
|
|
"required": true,
|
|
"example": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 property",
|
|
"required": true,
|
|
"example": "0x01",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/ERC721PropertyDestroyTokens/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "ERC721PropertyDestroyTokens",
|
|
"description": "Returns details for about the destroy tokens to lookup.",
|
|
"operationId": "dataRetrievalERC721PropertyDestroyTokens",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 property",
|
|
"required": true,
|
|
"example": "0x01",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/ERC721PropertyNews/{propertyId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "ERC721PropertyNews",
|
|
"description": "Returns details for about the tokens or smart property to lookup.",
|
|
"operationId": "dataRetrievalERC721PropertyNews",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 property",
|
|
"required": true,
|
|
"example": "0x01",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/ERC721TokenNews/{propertyId}/{tokenId}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "ERC721TokenNews",
|
|
"description": "Returns details for about the tokens or smart property to lookup.",
|
|
"operationId": "dataRetrievalERC721TokenNews",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 property",
|
|
"required": true,
|
|
"example": "0x03",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 token",
|
|
"required": true,
|
|
"example": "0x01",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/dataRetrieval/ownerOfERC721Token/{propertyId}/{tokenId}/{address}": {
|
|
"get": {
|
|
"tags": ["dataRetrieval"],
|
|
"summary": "ownerOfERC721Token",
|
|
"description": "Query whether the Token's owner is the specified address.",
|
|
"operationId": "dataRetrievalOwnerOfERC721Token",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 property",
|
|
"required": true,
|
|
"example": "0x03",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "the identifier of the ERC721 token",
|
|
"required": true,
|
|
"example": "0x01",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "query address for the specified ERC721 Token",
|
|
"required": true,
|
|
"example": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/burnBCH": {
|
|
"get": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "burnBCH",
|
|
"description": "Creates the payload to burn bch to get whc.",
|
|
"operationId": "payloadCreationBurnBCH",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/changeIssuer/{propertyId}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "changeIssuer",
|
|
"description": "Creates the payload to change the issuer on record of the given tokens.",
|
|
"operationId": "payloadCreationChangeIssuer",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens",
|
|
"required": true,
|
|
"example": 3,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"500": {
|
|
"description": "Not Found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Not Found."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/closeCrowdSale/{propertyId}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "closeCrowdSale",
|
|
"description": "Creates the payload to manually close a crowdsale.",
|
|
"operationId": "payloadCreationCloseCrowdSale",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the crowdsale to close",
|
|
"required": true,
|
|
"example": 70,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "JSON value is not an integer as expected",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "JSON value is not an integer as expected"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/grant/{propertyId}/{amount}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "grant",
|
|
"description": "Creates the payload to issue or grant new units of managed tokens.",
|
|
"operationId": "payloadCreationGrant",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens to grant",
|
|
"required": true,
|
|
"example": 220,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"in": "path",
|
|
"description": "The amount of tokens to create",
|
|
"required": true,
|
|
"example": "7000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "memo",
|
|
"in": "query",
|
|
"description": "A text note attached to this transaction (none by default)",
|
|
"required": false,
|
|
"example": "Hello BITBOX",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Not Found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"status": 500,
|
|
"message": "Not Found"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/crowdsale/{ecosystem}/{propertyPrecision}/{previousId}/{category}/{subcategory}/{name}/{url}/{data}/{propertyIdDesired}/{tokensPerUnit}/{deadline}/{earlyBonus}/{undefine}/{totalNumber}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "crowdsale",
|
|
"description": "Creates the payload for a new tokens issuance with crowdsale.",
|
|
"operationId": "payloadCreationCrowdsale",
|
|
"parameters": [
|
|
{
|
|
"name": "ecosystem",
|
|
"in": "path",
|
|
"description": "The ecosystem to create the tokens in, must be 1",
|
|
"required": true,
|
|
"example": "1",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyPrecision",
|
|
"in": "path",
|
|
"description": "The precision of the tokens to create:[0, 8]",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "previousId",
|
|
"in": "path",
|
|
"description": "An identifier of a predecessor token (0 for new crowdsales)",
|
|
"required": true,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "path",
|
|
"description": "A category for the new tokens",
|
|
"required": true,
|
|
"example": "Companies",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "subcategory",
|
|
"in": "path",
|
|
"description": "A subcategory for the new tokens",
|
|
"required": true,
|
|
"example": "Bitcoin Mining",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "The name of the new tokens to create",
|
|
"required": true,
|
|
"example": "Quantum Miner",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "url",
|
|
"in": "path",
|
|
"description": "An URL for further information about the new tokens",
|
|
"required": true,
|
|
"example": "www.example.com",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "data",
|
|
"in": "path",
|
|
"description": "A description for the new tokens",
|
|
"required": true,
|
|
"example": "Quantum Miner Tokens",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyIdDesired",
|
|
"in": "path",
|
|
"description": "The identifier of a token eligible to participate in the crowdsale",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokensPerUnit",
|
|
"in": "path",
|
|
"description": "The amount of tokens granted per unit invested in the crowdsale",
|
|
"required": true,
|
|
"example": "100",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "deadline",
|
|
"in": "path",
|
|
"description": "The deadline of the crowdsale as Unix timestamp",
|
|
"required": true,
|
|
"example": 1483228800,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "earlyBonus",
|
|
"in": "path",
|
|
"description": "An early bird bonus for participants in percent per week",
|
|
"required": true,
|
|
"example": 30,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "undefine",
|
|
"in": "path",
|
|
"description": "The value must be 0",
|
|
"required": true,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "totalNumber",
|
|
"in": "path",
|
|
"description": "The number of tokens to create",
|
|
"required": true,
|
|
"example": "192978657",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/fixed/{ecosystem}/{propertyPrecision}/{previousId}/{category}/{subcategory}/{name}/{url}/{data}/{amount}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "fixed",
|
|
"description": "Creates the payload for a new tokens issuance with fixed supply.",
|
|
"operationId": "payloadCreationFixed",
|
|
"parameters": [
|
|
{
|
|
"name": "ecosystem",
|
|
"in": "path",
|
|
"description": "The ecosystem to create the tokens in, must be 1",
|
|
"required": true,
|
|
"example": "1",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyPrecision",
|
|
"in": "path",
|
|
"description": "The precision of the tokens to create:[0, 8]",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "previousId",
|
|
"in": "path",
|
|
"description": "An identifier of a predecessor token (use 0 for new tokens)",
|
|
"required": true,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "path",
|
|
"description": "A category for the new tokens",
|
|
"required": true,
|
|
"example": "Companies",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "subcategory",
|
|
"in": "path",
|
|
"description": "A subcategory for the new tokens",
|
|
"required": true,
|
|
"example": "Bitcoin Mining",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "The name of the new tokens to create",
|
|
"required": true,
|
|
"example": "Quantum Miner",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "url",
|
|
"in": "path",
|
|
"description": "An URL for further information about the new tokens",
|
|
"required": true,
|
|
"example": "www.example.com",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "data",
|
|
"in": "path",
|
|
"description": "A description for the new tokens",
|
|
"required": true,
|
|
"example": "Quantum Miner Tokens",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"in": "path",
|
|
"description": "The number of tokens to create",
|
|
"required": true,
|
|
"example": "1000000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/managed/{ecosystem}/{propertyPrecision}/{previousId}/{category}/{subcategory}/{name}/{url}/{data}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "managed",
|
|
"description": "Creates the payload for a new tokens issuance with manageable supply.",
|
|
"operationId": "payloadCreationManaged",
|
|
"parameters": [
|
|
{
|
|
"name": "ecosystem",
|
|
"in": "path",
|
|
"description": "The ecosystem to create the tokens in, must be 1",
|
|
"required": true,
|
|
"example": "1",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyPrecision",
|
|
"in": "path",
|
|
"description": "The precision of the tokens to create:[0, 8]",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "previousId",
|
|
"in": "path",
|
|
"description": "An identifier of a predecessor token (use 0 for new tokens)",
|
|
"required": true,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "path",
|
|
"description": "A category for the new tokens",
|
|
"required": true,
|
|
"example": "Companies",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "subcategory",
|
|
"in": "path",
|
|
"description": "A subcategory for the new tokens",
|
|
"required": true,
|
|
"example": "Bitcoin Mining",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "The name of the new tokens to create",
|
|
"required": true,
|
|
"example": "Quantum Miner",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "url",
|
|
"in": "path",
|
|
"description": "An URL for further information about the new tokens",
|
|
"required": true,
|
|
"example": "www.example.com",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "data",
|
|
"in": "path",
|
|
"description": "A description for the new tokens",
|
|
"required": true,
|
|
"example": "Quantum Miner Tokens",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
},
|
|
"400": {
|
|
"description": "Received an invalid Bitcoin Cash address as input."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/participateCrowdSale/{amount}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "participateCrowdSale",
|
|
"description": "Create the payload for a participate crowdsale transaction",
|
|
"operationId": "payloadCreationParticipateCrowdSale",
|
|
"parameters": [
|
|
{
|
|
"name": "amount",
|
|
"in": "path",
|
|
"description": "The amount of WHC to participateCrowdSale",
|
|
"required": true,
|
|
"example": "100.0",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/revoke/{propertyId}/{amount}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "revoke",
|
|
"description": "Creates the payload to revoke units of managed tokens.",
|
|
"operationId": "payloadCreationRevoke",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens to revoke",
|
|
"required": true,
|
|
"example": 51,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"in": "path",
|
|
"description": "The amount of tokens to revoke",
|
|
"required": true,
|
|
"example": "100",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "memo",
|
|
"in": "query",
|
|
"description": "A text note attached to this transaction (none by default)",
|
|
"required": false,
|
|
"example": "Goodbye BITBOX",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/sendAll/{ecosystem}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "sendAll",
|
|
"description": "Create the payload for a send all transaction.",
|
|
"operationId": "payloadCreationSendAll",
|
|
"parameters": [
|
|
{
|
|
"name": "ecosystem",
|
|
"in": "path",
|
|
"description": "The ecosystem of the tokens to send (1 for main ecosystem, 2 for test ecosystem)",
|
|
"required": true,
|
|
"example": 2,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/simpleSend/{propertyId}/{amount}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "simpleSend",
|
|
"description": "Create the payload for a simple send transaction.",
|
|
"operationId": "payloadCreationSimpleSend",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens to send",
|
|
"required": true,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"in": "path",
|
|
"description": "The amount to send",
|
|
"required": true,
|
|
"example": "100.0",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/STO/{propertyId}/{amount}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "STO",
|
|
"description": "Creates the payload for a send-to-owners transaction",
|
|
"operationId": "payloadCreationSTO",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens to distribute",
|
|
"required": true,
|
|
"example": 3,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"in": "path",
|
|
"description": "The amount to distribute",
|
|
"required": true,
|
|
"example": "5000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "distributionProperty",
|
|
"in": "query",
|
|
"description": "The identifier of the property holders to distribute to",
|
|
"required": false,
|
|
"example": 1,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/freeze/{toAddress}/{propertyId}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "freeze",
|
|
"description": "Creates the payload for a freeze transaction",
|
|
"operationId": "payloadCreationFreeze",
|
|
"parameters": [
|
|
{
|
|
"name": "toAddress",
|
|
"in": "path",
|
|
"description": "The to address",
|
|
"required": true,
|
|
"example": 3,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens to freeze",
|
|
"required": true,
|
|
"example": 3,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/unfreeze/{toAddress}/{propertyId}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "unfreeze",
|
|
"description": "Creates the payload for an unfreeze transaction",
|
|
"operationId": "payloadCreationUnfreeze",
|
|
"parameters": [
|
|
{
|
|
"name": "toAddress",
|
|
"in": "path",
|
|
"description": "The to address",
|
|
"required": true,
|
|
"example": 3,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The identifier of the tokens to unfreeze",
|
|
"required": true,
|
|
"example": 3,
|
|
"schema": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/issueERC721Property/{name}/{symbol}/{data}/{url}/{totalNumber}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "issueERC721Property",
|
|
"description": "Creates the payload to issue ERC721 property",
|
|
"operationId": "payloadIssueERC721Property",
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "The name of created property",
|
|
"required": true,
|
|
"example": "CryptoBadgers",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "symbol",
|
|
"in": "path",
|
|
"description": "The symbol of created property",
|
|
"required": true,
|
|
"example": "CRYPTOBADGER",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "data",
|
|
"in": "path",
|
|
"description": "The Data of created property",
|
|
"required": true,
|
|
"example": "Collect and breed digital Honey Badgers!",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "url",
|
|
"in": "path",
|
|
"description": "The URL of created property",
|
|
"required": true,
|
|
"example": "example.com",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "totalNumber",
|
|
"in": "path",
|
|
"description": "The number of token that created property will issued in the future",
|
|
"required": true,
|
|
"example": "10000",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/issueERC721Token/{propertyId}/{tokenId}/{attributes}/{url}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "issueERC721Token",
|
|
"description": "Creates the payload to issue ERC721 token",
|
|
"operationId": "payloadIssueERC721Token",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The ID of the special property that will be issued token",
|
|
"required": true,
|
|
"example": "CryptoBadgers",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "The tokenID that will be issued, if you don't want to skip this parament, wormhole system will automatic tokenID",
|
|
"required": true,
|
|
"example": "CRYPTOBADGER",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "attributes",
|
|
"in": "path",
|
|
"description": "The Attributes of the new created token",
|
|
"required": true,
|
|
"example": "Collect and breed digital Honey Badgers!",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "url",
|
|
"in": "path",
|
|
"description": "The URL of the new created token",
|
|
"required": true,
|
|
"example": "example.com",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/transferERC721Token/{owner}/{receiver}/{propertyId}/{tokenId}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "transferERC721Token",
|
|
"description": "Creates the payload to transfer ERC721 token",
|
|
"operationId": "payloadTransferERC721Token",
|
|
"parameters": [
|
|
{
|
|
"name": "owner",
|
|
"in": "path",
|
|
"description": "The ID of the special property that will be issued token",
|
|
"required": true,
|
|
"example": "CryptoBadgers",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "receiver",
|
|
"in": "path",
|
|
"description": "The tokenID that will be issued, if you don't want to skip this parament, wormhole system will automatic tokenID",
|
|
"required": true,
|
|
"example": "CRYPTOBADGER",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The Attributes of the new created token",
|
|
"required": true,
|
|
"example": "Collect and breed digital Honey Badgers!",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "The URL of the new created token",
|
|
"required": true,
|
|
"example": "example.com",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/payloadCreation/destroyERC721Token/{propertyId}/{tokenId}": {
|
|
"post": {
|
|
"tags": ["payloadCreation"],
|
|
"summary": "destroyERC721Token",
|
|
"description": "Creates all ERC721 tokens",
|
|
"operationId": "payloadDestroyERC721Token",
|
|
"parameters": [
|
|
{
|
|
"name": "propertyId",
|
|
"in": "path",
|
|
"description": "The propertyId of the token that will be destroy",
|
|
"required": true,
|
|
"example": "0x02",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "The tokenid that will be destroyed",
|
|
"required": true,
|
|
"example": "0x01",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slp/list": {
|
|
"get": {
|
|
"tags": ["slp"],
|
|
"summary": "list",
|
|
"description": "List all SLP tokens",
|
|
"operationId": "slpList",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slp/list/{tokenId}": {
|
|
"get": {
|
|
"tags": ["slp"],
|
|
"summary": "list token",
|
|
"description": "List single SLP token by id",
|
|
"operationId": "slpListToken",
|
|
"parameters": [
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "The token id",
|
|
"required": true,
|
|
"example": "259908ae44f46ef585edef4bcc1e50dc06e4c391ac4be929fae27235b8158cf1",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slp/balancesForAddress/{address}": {
|
|
"get": {
|
|
"tags": ["slp"],
|
|
"summary": "list slp balances for address",
|
|
"description": "List SLP token balances for address",
|
|
"operationId": "slpListBalancesForAddress",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "The slp address",
|
|
"required": true,
|
|
"example": "simpleledger:qz9tzs6d5097ejpg279rg0rnlhz546q4fsnck9wh5m",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slp/balance/{address}/{tokenId}": {
|
|
"get": {
|
|
"tags": ["slp"],
|
|
"summary": "list single slp token balance for address",
|
|
"description": "List single SLP token balance for address",
|
|
"operationId": "slpListSingleBalanceForAddress",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "The slp address",
|
|
"required": true,
|
|
"example": "simpleledger:qz9tzs6d5097ejpg279rg0rnlhz546q4fsnck9wh5m",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "The token id",
|
|
"required": true,
|
|
"example": "1cda254d0a995c713b7955298ed246822bee487458cd9747a91d9e81d9d28125",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slp/address/convert/{address}": {
|
|
"get": {
|
|
"tags": ["slp"],
|
|
"summary": "convert address to slpAddr, cashAddr and legacy",
|
|
"description": "convert address to slpAddr, cashAddr and legacy",
|
|
"operationId": "slpAddressConvert",
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"description": "The slp address",
|
|
"required": true,
|
|
"example": "simpleledger:qz9tzs6d5097ejpg279rg0rnlhz546q4fsnck9wh5m",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/slp/balancesForToken/{tokenId}": {
|
|
"get": {
|
|
"tags": ["slp"],
|
|
"summary": "list slp balances for all holders of a token",
|
|
"description": "List SLP token balances for all holders of a token",
|
|
"operationId": "slpListBalancesForToken",
|
|
"parameters": [
|
|
{
|
|
"name": "tokenId",
|
|
"in": "path",
|
|
"description": "The slp token id",
|
|
"required": true,
|
|
"example": "d7c32d972a21b664f60b5fc422900179d8883dec7bd61418434aa12b09b99c12",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "/v1"
|
|
}
|
|
],
|
|
"components": {
|
|
"schemas": {
|
|
"AddressDetails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"balance": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"balanceSat": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"totalReceived": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"totalReceivedSat": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"totalSent": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"totalSentSat": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"unconfirmedBalance": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"unconfirmedBalanceSat": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"unconfirmedTxAppearances": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"txAppearances": {
|
|
"type": "number"
|
|
},
|
|
"transactions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"legacyAddress": {
|
|
"type": "string"
|
|
},
|
|
"cashAddress": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AddressUtxo": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Utxo"
|
|
}
|
|
},
|
|
"Utxo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"vout": {
|
|
"type": "number"
|
|
},
|
|
"scriptPubKey": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"satoshis": {
|
|
"type": "number"
|
|
},
|
|
"height": {
|
|
"type": "number"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"legacyAddress": {
|
|
"type": "string"
|
|
},
|
|
"cashAddress": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"AddressUnconfirmed": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Unconfirmed"
|
|
}
|
|
},
|
|
"Unconfirmed": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"vout": {
|
|
"type": "number"
|
|
},
|
|
"scriptPubKey": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"satoshis": {
|
|
"type": "number"
|
|
},
|
|
"height": {
|
|
"type": "number"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"legacyAddress": {
|
|
"type": "string"
|
|
},
|
|
"cashAddress": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"BlockDetails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "number"
|
|
},
|
|
"height": {
|
|
"type": "number"
|
|
},
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"merkleroot": {
|
|
"type": "string"
|
|
},
|
|
"tx": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"time": {
|
|
"type": "number"
|
|
},
|
|
"nonce": {
|
|
"type": "number"
|
|
},
|
|
"bits": {
|
|
"type": "string"
|
|
},
|
|
"difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"chainwork": {
|
|
"type": "string"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"previousblockhash": {
|
|
"type": "string"
|
|
},
|
|
"nextblockhash": {
|
|
"type": "string"
|
|
},
|
|
"reward": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"isMainChain": {
|
|
"type": "boolean"
|
|
},
|
|
"poolInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"poolName": "string",
|
|
"url": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"BestBlockHash": {
|
|
"type": "string"
|
|
},
|
|
"Block": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"size": {
|
|
"type": "number"
|
|
},
|
|
"height": {
|
|
"type": "number"
|
|
},
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"versionHex": {
|
|
"type": "string"
|
|
},
|
|
"merkleroot": {
|
|
"type": "string"
|
|
},
|
|
"tx": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"time": {
|
|
"type": "number"
|
|
},
|
|
"mediantime": {
|
|
"type": "number"
|
|
},
|
|
"nonce": {
|
|
"type": "number"
|
|
},
|
|
"bits": {
|
|
"type": "string"
|
|
},
|
|
"difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"chainwork": {
|
|
"type": "string"
|
|
},
|
|
"previousblockhash": {
|
|
"type": "string"
|
|
},
|
|
"nextblockhash": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"BlockchainInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chain": {
|
|
"type": "string"
|
|
},
|
|
"blocks": {
|
|
"type": "number"
|
|
},
|
|
"headers": {
|
|
"type": "number"
|
|
},
|
|
"bestblockhash": {
|
|
"type": "string"
|
|
},
|
|
"difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"mediantime": {
|
|
"type": "number"
|
|
},
|
|
"verificationprogress": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"chainwork": {
|
|
"type": "string"
|
|
},
|
|
"pruned": {
|
|
"type": "boolean"
|
|
},
|
|
"softforks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": "string",
|
|
"version": "number",
|
|
"reject": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"bip9_softforks": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": "string",
|
|
"startTime": "number",
|
|
"timeout": "number",
|
|
"since": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"BlockCount": {
|
|
"type": "number"
|
|
},
|
|
"BlockHash": {
|
|
"type": "string"
|
|
},
|
|
"BlockHeader": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"height": {
|
|
"type": "number"
|
|
},
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"versionHex": {
|
|
"type": "string"
|
|
},
|
|
"merkleroot": {
|
|
"type": "string"
|
|
},
|
|
"time": {
|
|
"type": "number"
|
|
},
|
|
"mediantime": {
|
|
"type": "number"
|
|
},
|
|
"nonce": {
|
|
"type": "number"
|
|
},
|
|
"bits": {
|
|
"type": "string"
|
|
},
|
|
"difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"chainwork": {
|
|
"type": "string"
|
|
},
|
|
"previousblockhash": {
|
|
"type": "string"
|
|
},
|
|
"nextblockhash": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"MempoolInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"size": {
|
|
"type": "number"
|
|
},
|
|
"bytes": {
|
|
"type": "number"
|
|
},
|
|
"usage": {
|
|
"type": "number"
|
|
},
|
|
"maxmempool": {
|
|
"type": "number"
|
|
},
|
|
"mempoolminfee": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"RawMempool": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"DecodeRawTransaction": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "number"
|
|
},
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"vin": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"vout": {
|
|
"type": "number"
|
|
},
|
|
"scriptSig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"hex": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"sequence": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"vout": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"type": "number"
|
|
},
|
|
"n": {
|
|
"type": "number"
|
|
},
|
|
"scriptPubkey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"reqSigs": {
|
|
"type": "number"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"addresses": {
|
|
"type": "array",
|
|
"items": {
|
|
"address": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"DecodeScript": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"p2sh": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"GetRawTransaction": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"hash": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "number"
|
|
},
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"vin": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"vout": {
|
|
"type": "number"
|
|
},
|
|
"scriptSig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"sequence": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"vout": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"type": "number"
|
|
},
|
|
"n": {
|
|
"type": "number"
|
|
},
|
|
"scriptPubkey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"reqSigs": {
|
|
"type": "number"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"addresses": {
|
|
"type": "array",
|
|
"items": {
|
|
"address": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"blockhash": {
|
|
"type": "string"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"time": {
|
|
"type": "number"
|
|
},
|
|
"blocktime": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"TransactionDetails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"locktime": {
|
|
"type": "number"
|
|
},
|
|
"vin": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"vout": {
|
|
"type": "number"
|
|
},
|
|
"sequence": {
|
|
"type": "number"
|
|
},
|
|
"n": {
|
|
"type": "number"
|
|
},
|
|
"scriptSig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "number"
|
|
},
|
|
"legacyAddress": {
|
|
"type": "string"
|
|
},
|
|
"cashAddress": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"vout": {
|
|
"type": "array",
|
|
"items": {
|
|
"objects": {
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"type": "number"
|
|
},
|
|
"n": {
|
|
"type": "number"
|
|
},
|
|
"scriptPubkey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"asm": {
|
|
"type": "string"
|
|
},
|
|
"addresses": {
|
|
"type": "array",
|
|
"items": {
|
|
"address": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"spentTxId": {
|
|
"type": "string"
|
|
},
|
|
"spentIndex": {
|
|
"type": "number"
|
|
},
|
|
"spentHeight": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"type": "number"
|
|
},
|
|
"n": {
|
|
"type": "number"
|
|
},
|
|
"scriptPubkey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hex": {
|
|
"type": "string"
|
|
},
|
|
"asm": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"spentTxId": {
|
|
"type": "string"
|
|
},
|
|
"spentIndex": {
|
|
"type": "number"
|
|
},
|
|
"spentHeight": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"blockhash": {
|
|
"type": "string"
|
|
},
|
|
"blockheight": {
|
|
"type": "number"
|
|
},
|
|
"confirmations": {
|
|
"type": "number"
|
|
},
|
|
"time": {
|
|
"type": "number"
|
|
},
|
|
"valueOut": {
|
|
"type": "number"
|
|
},
|
|
"size": {
|
|
"type": "number"
|
|
},
|
|
"valueIn": {
|
|
"type": "number"
|
|
},
|
|
"fees": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"ValidateAddress": {
|
|
"type": "object",
|
|
"properties": {
|
|
"isvalid": {
|
|
"type": "boolean"
|
|
},
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"scriptPubKey": {
|
|
"type": "string"
|
|
},
|
|
"ismine": {
|
|
"type": "boolean"
|
|
},
|
|
"iswatchonly": {
|
|
"type": "boolean"
|
|
},
|
|
"isscript": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"Info": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": {
|
|
"type": "number"
|
|
},
|
|
"protocolversion": {
|
|
"type": "number"
|
|
},
|
|
"blocks": {
|
|
"type": "number"
|
|
},
|
|
"timeoffset": {
|
|
"type": "number"
|
|
},
|
|
"connections": {
|
|
"type": "number"
|
|
},
|
|
"proxy": {
|
|
"type": "string"
|
|
},
|
|
"difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"paytxfee": {
|
|
"type": "number"
|
|
},
|
|
"relayfee": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"errors": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"MemoryInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"locked": {
|
|
"type": "object",
|
|
"properties": {
|
|
"used": {
|
|
"type": "number"
|
|
},
|
|
"free": {
|
|
"type": "number"
|
|
},
|
|
"total": {
|
|
"type": "number"
|
|
},
|
|
"locked": {
|
|
"type": "number"
|
|
},
|
|
"chunks_used": {
|
|
"type": "number"
|
|
},
|
|
"chunks_free": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"MiningInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"blocks": {
|
|
"type": "number"
|
|
},
|
|
"currentblocksize": {
|
|
"type": "number"
|
|
},
|
|
"currentblocktx": {
|
|
"type": "number"
|
|
},
|
|
"difficulty": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"blockprioritypercentage": {
|
|
"type": "number"
|
|
},
|
|
"errors": {
|
|
"type": "string"
|
|
},
|
|
"networkhashps": {
|
|
"type": "number"
|
|
},
|
|
"pooledtx": {
|
|
"type": "number"
|
|
},
|
|
"chain": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"NetworkHashps": {
|
|
"type": "number"
|
|
},
|
|
"ConnectionCount": {
|
|
"type": "number"
|
|
},
|
|
"MempoolAncestors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"MempoolDescendants": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|