Merge pull request #2 from christroutner/unstable

Removing TypeScript and audited dependencies.
This commit is contained in:
Chris Troutner
2019-05-28 18:25:37 -07:00
committed by GitHub
40 changed files with 6332 additions and 28315 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018 EARTH
Copyright (c) 2019 Chris Troutner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+6 -5
View File
@@ -19,14 +19,9 @@ https://www.youtube.com/watch?v=o0FfW5rZPFs
Since this repo is being worked on by one person, as a hobby, updates will be
slow. But the road map I have planned is as follows:
- Remove TypeScript and any other compiled languages, converting the repository
to standard ES8 JavaScript.
- Replace the requirement for Insight API with Blockbook API for address and
utxo based calls.
- Audit all npm dependencies and try to fix/remove any vulnerabilities.
- Remove rate limiting
- Setup automated dependency management through Greenkeeper, and automated
@@ -38,6 +33,12 @@ continuous-release with semantic versioning through Semantic Release.
- Add end-to-end tests.
## Features
The following features have been implemented:
- Typescript removed and ES8 JavaScript used instead.
- npm audit run on all depedencies.
----
## REST
-261
View File
@@ -1,261 +0,0 @@
"use strict"
const gulp = require("gulp")
const fs = require("fs-extra")
const merge = require("gulp-merge-json")
const jsonModify = require("gulp-json-modify")
const ASSET_FILES = [
"src/*.json",
"src/**/*.json",
"src/**/*.jade",
"src/**/*.css",
"src/**/*.png"
]
gulp.task("build", () => {
fs.emptyDirSync("./dist")
fs.removeSync("./dist")
fs.emptyDirSync("./swaggerJSONFilesBuilt")
fs.removeSync("./swaggerJSONFilesBuilt")
gulp.src(ASSET_FILES).pipe(gulp.dest("dist"))
// set example vars for testnet
const testnetInfoJSON = fs.readFileSync(
"./swaggerJSONFiles/fixtures/testnet/info.json"
)
const testnetPathsJSON = fs.readFileSync(
"./swaggerJSONFiles/fixtures/testnet/paths.json"
)
const testnetComponentsJSON = fs.readFileSync(
"./swaggerJSONFiles/fixtures/testnet/components.json"
)
const testnetInfo = JSON.parse(testnetInfoJSON)
const testnetPaths = JSON.parse(testnetPathsJSON)
const testnetComponents = JSON.parse(testnetComponentsJSON)
gulp
.src("./swaggerJSONFiles/info.json")
.pipe(
merge({
fileName: "./testnet/info.json",
edit: (parsedJson, file) => {
testnetInfo.forEach((item, index) => {
parsedJson.info.description = item.value
})
return parsedJson
}
})
)
.pipe(gulp.dest("./swaggerJSONFilesBuilt"))
gulp
.src("./swaggerJSONFiles/paths.json")
.pipe(
merge({
fileName: "./testnet/paths.json",
edit: (parsedJson, file) => {
testnetPaths.forEach((item, index) => {
Object.keys(parsedJson.paths).forEach(key => {
if (key === item.key) {
if (parsedJson.paths[key].get) {
parsedJson.paths[key].get.parameters.forEach(param => {
if (param.name === item.name) param.example = item.value
})
} else if (parsedJson.paths[key].post) {
parsedJson.paths[key].post.parameters.forEach(param => {
if (param.name === item.name) param.example = item.value
})
}
}
})
})
return parsedJson
}
})
)
.pipe(gulp.dest("./swaggerJSONFilesBuilt"))
gulp
.src("./swaggerJSONFiles/components.json")
.pipe(
merge({
fileName: "./testnet/components.json",
edit: (parsedJson, file) => {
testnetComponents.forEach((item, index) => {
if (item.key === "RawTxids") {
parsedJson.components.schemas.RawTxids.properties.txids.example =
item.value
}
if (item.key === "SLPTxids") {
parsedJson.components.schemas.SLPTxids.properties.txids.example =
item.value
}
Object.keys(parsedJson.components.schemas).forEach(key => {
if (
key === item.key &&
parsedJson.components.schemas[key].properties[
key.toLowerCase()
] &&
parsedJson.components.schemas[key].properties[key.toLowerCase()]
.example
) {
parsedJson.components.schemas[key].properties[
key.toLowerCase()
].example = item.value
}
})
})
return parsedJson
}
})
)
.pipe(gulp.dest("./swaggerJSONFilesBuilt"))
gulp
.src(["./swaggerJSONFiles/servers.json"])
.pipe(gulp.dest("./swaggerJSONFilesBuilt/testnet"))
gulp
.src(["./swaggerJSONFiles/tags.json"])
.pipe(gulp.dest("./swaggerJSONFilesBuilt/testnet"))
setTimeout(function() {
gulp
.src("./swaggerJSONFilesBuilt/testnet/**/*.json")
.pipe(
merge({
fileName: "bitcoin-com-testnet-rest-v2.json"
})
)
.pipe(gulp.dest("./dist/public"))
}, 1000)
// set example vars for mainnet
const mainnetInfoJSON = fs.readFileSync(
"./swaggerJSONFiles/fixtures/mainnet/info.json"
)
const mainnetPathsJSON = fs.readFileSync(
"./swaggerJSONFiles/fixtures/mainnet/paths.json"
)
const mainnetComponentsJSON = fs.readFileSync(
"./swaggerJSONFiles/fixtures/mainnet/components.json"
)
const mainnetInfo = JSON.parse(mainnetInfoJSON)
const mainnetPaths = JSON.parse(mainnetPathsJSON)
const mainnetComponents = JSON.parse(mainnetComponentsJSON)
gulp
.src("./swaggerJSONFiles/info.json")
.pipe(
merge({
fileName: "./mainnet/info.json",
edit: (parsedJson, file) => {
mainnetInfo.forEach((item, index) => {
parsedJson.info.description = item.value
})
return parsedJson
}
})
)
.pipe(gulp.dest("./swaggerJSONFilesBuilt"))
gulp
.src("./swaggerJSONFiles/paths.json")
.pipe(
merge({
fileName: "./mainnet/paths.json",
edit: (parsedJson, file) => {
mainnetPaths.forEach((item, index) => {
Object.keys(parsedJson.paths).forEach(key => {
if (key === item.key) {
if (parsedJson.paths[key].get) {
parsedJson.paths[key].get.parameters.forEach(param => {
if (param.name === item.name) param.example = item.value
})
} else if (parsedJson.paths[key].post) {
parsedJson.paths[key].post.parameters.forEach(param => {
if (param.name === item.name) param.example = item.value
})
}
}
})
})
return parsedJson
}
})
)
.pipe(gulp.dest("./swaggerJSONFilesBuilt"))
gulp
.src("./swaggerJSONFiles/components.json")
.pipe(
merge({
fileName: "./mainnet/components.json",
edit: (parsedJson, file) => {
mainnetComponents.forEach((item, index) => {
if (item.key === "RawTxids") {
parsedJson.components.schemas.RawTxids.properties.txids.example =
item.value
}
if (item.key === "SLPTxids") {
parsedJson.components.schemas.SLPTxids.properties.txids.example =
item.value
}
Object.keys(parsedJson.components.schemas).forEach(key => {
// console.log(key, parsedJson.components.schemas[key].properties)
if (
key === item.key &&
parsedJson.components.schemas[key].properties &&
parsedJson.components.schemas[key].properties[
key.toLowerCase()
] &&
parsedJson.components.schemas[key].properties[key.toLowerCase()]
.example
) {
// let tmpKey
// console.log(key, item.key)
// if (key === "BlockHashes") tmpKey = "hashes"
// else tmpKey = key.toLowerCase()
parsedJson.components.schemas[key].properties[
key.toLowerCase()
].example = item.value
}
})
})
return parsedJson
}
})
)
.pipe(gulp.dest("./swaggerJSONFilesBuilt"))
gulp
.src(["./swaggerJSONFiles/servers.json"])
.pipe(gulp.dest("./swaggerJSONFilesBuilt/mainnet"))
gulp
.src(["./swaggerJSONFiles/tags.json"])
.pipe(gulp.dest("./swaggerJSONFilesBuilt/mainnet"))
setTimeout(function() {
gulp
.src("./swaggerJSONFilesBuilt/mainnet/**/*.json")
.pipe(
merge({
fileName: "bitcoin-com-mainnet-rest-v2.json"
})
)
.pipe(gulp.dest("./dist/public"))
}, 1000)
})
+6285 -12339
View File
File diff suppressed because it is too large Load Diff
+4 -13
View File
@@ -22,26 +22,21 @@
"node": ">=10.15.1"
},
"dependencies": {
"@chris.troutner/bitbox-js": "^7.0.2",
"axios": "^0.18.0",
"bitbox-sdk": "^3.0.11",
"bitcoincash-zmq-decoder": "0.1.5",
"body-parser": "^1.18.3",
"cookie-parser": "~1.4.3",
"cors": "^2.8.3",
"debug": "~2.6.3",
"dotenv": "^4.0.0",
"elasticsearch": "^13.0.1",
"express": "^4.15.5",
"express-basic-auth": "^1.1.3",
"express-rate-limit": "^2.11.0",
"gulp-json-modify": "^1.0.2",
"gulp-merge-json": "^1.3.1",
"helmet": "^3.12.1",
"jade": "~1.11.0",
"level": "^4.0.0",
"mkdirp": "^0.5.1",
"mocha": "^5.2.0",
"mongoose": "^4.10.5",
"morgan": "^1.9.1",
"mqtt": "^2.8.0",
"passport": "^0.4.0",
@@ -49,12 +44,10 @@
"passport-http": "^0.3.0",
"pg": "^6.2.3",
"pg-hstore": "^2.3.2",
"sequelize": "^3.30.4",
"slp-sdk": "3.2.1",
"slp-sdk": "^4.4.0",
"slpjs": "0.15.5",
"socket.io": "^2.1.1",
"strftime": "^0.10.0",
"swagger-stats": "^0.95.6",
"winston": "^3.2.1",
"winston-daily-rotate-file": "^3.8.0",
"zeromq": "^4.6.0"
@@ -71,17 +64,15 @@
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-standard": "^4.0.0",
"fs-extra": "^7.0.0",
"gulp": "^3.9.1",
"nock": "^10.0.0",
"node-mocks-http": "^1.7.0",
"nodemon": "^1.18.1",
"nyc": "^11.6.0",
"pandacash-core": "^0.1.0",
"nyc": "^14.1.1",
"prettier": "^1.14.2",
"proxyquire": "^2.1.0",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"semantic-release": "^15.11.0",
"semantic-release": "^15.13.14",
"sinon": "^6.3.4",
"typescript": "^3.1.4"
},
File diff suppressed because it is too large Load Diff
View File
+28
View File
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>
<h1>BCH API</h1>
<p>
This web server is based on <a href="https://rest.bitcoin.com">rest.bitcoin.com</a>.
Go there to view an interactive UI of the REST API endpoints.
</p>
<p>
View the API documentation
on <a href="https://developer.bitcoin.com/rest/docs/getting-started">developer.bitcoin.com</a>.
</p>
<script src="js/scripts.js"></script>
</body>
</html>
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -18,8 +18,8 @@ const router = express.Router()
const util = require("util")
util.inspect.defaultOptions = { depth: 1 }
const BITBOXCli = require("bitbox-sdk/lib/bitbox-sdk").default
const BITBOX = new BITBOXCli()
const BITBOXJS = require("@chris.troutner/bitbox-js")
const BITBOX = new BITBOXJS()
// Use the default (and max) page size of 1000
// https://github.com/bitpay/insight-api#notes-on-upgrading-from-v03
+2 -2
View File
@@ -10,8 +10,8 @@ const wlogger = require("../../util/winston-logging")
const util = require("util")
util.inspect.defaultOptions = { depth: 1 }
const BITBOXCli = require("bitbox-sdk/lib/bitbox-sdk").default
const BITBOX = new BITBOXCli()
const BITBOXJS = require("@chris.troutner/bitbox-js")
const BITBOX = new BITBOXJS()
module.exports = {
validateNetwork, // Prevents a common user error
+2 -2
View File
@@ -8,8 +8,8 @@ const routeUtils = require("./route-utils")
const logger = require("./logging.js")
const wlogger = require("../../util/winston-logging")
const BITBOXCli = require("bitbox-sdk/lib/bitbox-sdk").default
const BITBOX = new BITBOXCli()
const BITBOXJS = require("@chris.troutner/bitbox-js")
const BITBOX = new BITBOXJS()
// Used to convert error messages to strings, to safely pass to users.
const util = require("util")
+2 -2
View File
@@ -8,8 +8,8 @@ const routeUtils = require("./route-utils")
const logger = require("./logging.js")
const wlogger = require("../../util/winston-logging")
const BITBOXCli = require("bitbox-sdk/lib/bitbox-sdk").default
const BITBOX = new BITBOXCli()
const BITBOXJS = require("@chris.troutner/bitbox-js")
const BITBOX = new BITBOXJS()
// Used to convert error messages to strings, to safely pass to users.
const util = require("util")
File diff suppressed because it is too large Load Diff
@@ -1,76 +0,0 @@
[
{
"key": "Addresses",
"value": [
"bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
"bitcoincash:qrehqueqhw629p6e57994436w730t4rzasnly00ht0"
]
},
{
"key": "Hashes",
"value": [
"000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201",
"00000000000000000568f0a96bf4348847bc84e455cbfec389f27311037a20f3"
]
},
{
"key": "BlockHashes",
"value": [
"000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201",
"00000000000000000568f0a96bf4348847bc84e455cbfec389f27311037a20f3"
]
},
{
"key": "BlockHeights",
"value": [500000, 490000]
},
{
"key": "Txids",
"value": [
"a5f972572ee1753e2fd2457dd61ce5f40fa2f8a30173d417e49feef7542c96a1",
"5165dc531aad05d1149bb0f0d9b7bda99c73e2f05e314bcfb5b4bb9ca5e1af5e"
]
},
{
"key": "SLPConvert",
"value": [
"bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c",
"bitcoincash:qrehqueqhw629p6e57994436w730t4rzasnly00ht0"
]
},
{
"key": "SLPListBulk",
"value": [
"650dea14c77f4d749608e36e375450c9ac91deb8b1b53e50cb0de2059a52d19a",
"c35a87afad11c8d086c1449ffd8b0a84324e72b15b1bcfdf166a493551b4eea6"
]
},
{
"key": "SLPTxids",
"value": [
"88b121101d71b73599dfc7d79eead599031912b2c48298bf5c1f37f4dd743ffa",
"fb0eeaa501a6e1acb721669c62a3f70741f48ae0fd7f4b8e1d72088785c51952"
]
},
{
"key": "RawTxids",
"value": [
"a5f972572ee1753e2fd2457dd61ce5f40fa2f8a30173d417e49feef7542c96a1",
"5165dc531aad05d1149bb0f0d9b7bda99c73e2f05e314bcfb5b4bb9ca5e1af5e"
]
},
{
"key": "Hexes",
"value": [
"01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000",
"01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000"
]
},
{
"key": "Proofs",
"value": [
"010000007de867cc8adc5cc8fb6b898ca4462cf9fd667d7830a275277447e60800000000338f121232e169d3100edd82004dc2a1f0e1f030c6c488fa61eafa930b0528fe021f7449ffff001d36b4af9a0100000001338f121232e169d3100edd82004dc2a1f0e1f030c6c488fa61eafa930b0528fe0101",
"000000202cbe31a32f4ad5b42877a9ccf9ff6edb3f5ab29ff73ec9000000000000000000069061a8809fed6557fa87eeb5aa7ac9e6720dcb2e2f401b40b7d83be5b4cb4f20a1e95b8c8d01188ca7c098e20100000a3705adb29177f22766afb07d46eb1d3f16a68fdd01c1ede671fcb954899ffed4c161c0a33aa8f6e562e40b1e0124818663e063004720d8d7e9074808a1f16ca56ba218571cb8069bc45bc8c6496ad9611b35d412e2545211ba85438be487d6dc39cd0ae63a41be9a89c4ed823fa6eceb0ceffe13638defa01109a514e639b89e5eafe1a59cbbb4b5cf4b315ef0e2739ca9bdb7d9f0b09b14d105ad1a53dc655176895cacc3f897d5088b004113f886df266edd1ff797f4550885f32380c8fb575be00072239baa70ccf354882e8c50a1d01e81ab2c85146d9e8c3c75140eca2d9d5640af739a86047493e24b1393745914a75fdfe19f081626a5846353c67b45ccf2dd6a753ba118e89239b7916be2ee06e34dc85257228edeaaca06efa0a565580872eff1787360bdf7ff274bb49437bef6a368ab578e34b739ddcc16088a8603ad3700"
]
}
]
@@ -1,6 +0,0 @@
[
{
"key": "description",
"value": "rest.bitcoin.com is the REST layer for Bitcoin.com's Cloud. More info: [developer.bitcoin.com/rest](https://developer.bitcoin.com/rest). Chatroom [geni.us/CashDev](http://geni.us/CashDev)"
}
]
@@ -1,152 +0,0 @@
[
{
"key": "/address/details/{address}",
"name": "address",
"value": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c"
},
{
"key": "/address/utxo/{address}",
"name": "address",
"value": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c"
},
{
"key": "/address/unconfirmed/{address}",
"name": "address",
"value": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c"
},
{
"key": "/address/transactions/{address}",
"name": "address",
"value": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c"
},
{
"key": "/address/fromXPub/{xpub}",
"name": "xpub",
"value": "xpub661MyMwAqRbcG4CnhNYoK1r1TKLwQQ1UdC3LHoWFK61rsnzh7Hx35qQ9Z53ucYcE5WvA7GEDXhqqKjSY2e6Y8n7WNVLYHpXCuuX945VPuYn"
},
{
"key": "/block/detailsByHash/{hash}",
"name": "hash",
"value": "000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201"
},
{
"key": "/block/detailsByHeight/{height}",
"name": "height",
"value": "500000"
},
{
"key": "/blockchain/getBlockHeader/{hash}",
"name": "hash",
"value": "000000000000000005e14d3f9fdfb70745308706615cfa9edca4f4558332b201"
},
{
"key": "/blockchain/getBlockHeader/{hash}",
"name": "verbose",
"value": true
},
{
"key": "/blockchain/getMempoolEntry/{txid}",
"name": "txid",
"value": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"
},
{
"key": "/blockchain/getRawMempool",
"name": "verbose",
"value": true
},
{
"key": "/blockchain/getTxOut/{txid}/{n}",
"name": "txid",
"value": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"
},
{
"key": "/blockchain/getTxOut/{txid}/{n}",
"name": "n",
"value": 0
},
{
"key": "/blockchain/getTxOut/{txid}/{n}",
"name": "mempool",
"value": "false"
},
{
"key": "/blockchain/getTxOutProof/{txids}",
"name": "txids",
"value": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"
},
{
"key": "/blockchain/verifyTxOutProof/{proof}",
"name": "proof",
"value": "010000007de867cc8adc5cc8fb6b898ca4462cf9fd667d7830a275277447e60800000000338f121232e169d3100edd82004dc2a1f0e1f030c6c488fa61eafa930b0528fe021f7449ffff001d36b4af9a0100000001338f121232e169d3100edd82004dc2a1f0e1f030c6c488fa61eafa930b0528fe0101"
},
{
"key": "/mining/getNetworkHashps",
"name": "nblocks",
"value": 120
},
{
"key": "/mining/getNetworkHashps",
"name": "height",
"value": -1
},
{
"key": "/rawtransactions/decodeRawTransaction/{hex}",
"name": "hex",
"value": "01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000"
},
{
"key": "/rawtransactions/decodeScript/{hex}",
"name": "hex",
"value": "4830450221009a51e00ec3524a7389592bc27bea4af5104a59510f5f0cfafa64bbd5c164ca2e02206c2a8bbb47eabdeed52f17d7df668d521600286406930426e3a9415fe10ed592012102e6e1423f7abde8b70bca3e78a7d030e5efabd3eb35c19302542b5fe7879c1a16"
},
{
"key": "/rawtransactions/getRawTransaction/{txid}",
"name": "txid",
"value": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"
},
{
"key": "/rawtransactions/getRawTransaction/{txid}",
"name": "verbose",
"value": true
},
{
"key": "/transaction/details/{txid}",
"name": "txid",
"value": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"
},
{
"key": "/util/validateAddress/{address}",
"name": "address",
"value": "bitcoincash:qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c"
},
{
"key": "/rawtransactions/decodeTransaction/{rawTx}",
"name": "rawTx",
"value": "0200000001ee6dbb4d43427f5e35ecc3b6eeecfffeee22650e1d0a9846be1a09cee1b7e490020000006a47304402204cbf80c5eb831b4276e3bbf5b85bb64a05251e120f6357ca145651bdf97de5e5022037e448281add7144b65f3943e8654a901daf6f285feb6b63cc928cbe64b8a50e412102df0a79c642da671cd17dcd80b1e506f3b42b7c92a40b3067b5754eb40fc85d02ffffffff0329328d00000000001976a914fd542b2f9e06d814dd6c503dc24707e5620d9a7488ac0000000000000000166a1408776863000000000000000100000000b2d05e0022020000000000001976a91472ef3365835cd4e791ea3511d96f1eba32472a9988ac00000000"
},
{
"key": "/blockchain/getTxOutProof/{txid}",
"name": "txid",
"value": "bbda45af0ba57e28866995c67a53c225336fddd14eb3dc87f2f3500fd61c8585"
},
{
"key": "/slp/list/{tokenId}",
"name": "tokenId",
"value": "259908ae44f46ef585edef4bcc1e50dc06e4c391ac4be929fae27235b8158cf1"
},
{
"key": "/slp/balancesForAddress/{address}",
"name": "address",
"value": "simpleledger:qz9tzs6d5097ejpg279rg0rnlhz546q4fsnck9wh5m"
},
{
"key": "/slp/address/convert/{address}",
"name": "address",
"value": "simpleledger:qz9tzs6d5097ejpg279rg0rnlhz546q4fsnck9wh5m"
},
{
"key": "/slp/txDetails/{txid}",
"name": "txid",
"value": "8ab4ac5dea3f9024e3954ee5b61452955d659a34561f79ef62ac44e133d0980e"
}
]
@@ -1,76 +0,0 @@
[
{
"key": "Addresses",
"value": [
"bchtest:qzjtnzcvzxx7s0na88yrg3zl28wwvfp97538sgrrmr",
"bchtest:qp6hgvevf4gzz6l7pgcte3gaaud9km0l459fa23dul"
]
},
{
"key": "Hashes",
"value": [
"000000000000014c11d5a6fd30e03e56e55d516f193ff0768c9c81177858d12a",
"000000000001a7c0aaa2630fbb2c0e476aafffc60f82177375b2aaa22209f606"
]
},
{
"key": "BlockHashes",
"value": [
"000000000000014c11d5a6fd30e03e56e55d516f193ff0768c9c81177858d12a",
"000000000001a7c0aaa2630fbb2c0e476aafffc60f82177375b2aaa22209f606"
]
},
{
"key": "BlockHeights",
"value": [500000, 490000]
},
{
"key": "Txids",
"value": [
"3ea2767c91d087d14dda8faef736cd39d6c6ebbd5f7d2c7e8de0df3360436bfb",
"cce4e8eb4b3160b93ceecb0956cde405d85b42cbcb3fa1b4e9a9bedaf3476f05"
]
},
{
"key": "SLPConvert",
"value": [
"bchtest:qzjtnzcvzxx7s0na88yrg3zl28wwvfp97538sgrrmr",
"bchtest:qp6hgvevf4gzz6l7pgcte3gaaud9km0l459fa23dul"
]
},
{
"key": "SLPListBulk",
"value": [
"",
""
]
},
{
"key": "SLPTxids",
"value": [
"3ea2767c91d087d14dda8faef736cd39d6c6ebbd5f7d2c7e8de0df3360436bfb",
"cce4e8eb4b3160b93ceecb0956cde405d85b42cbcb3fa1b4e9a9bedaf3476f05"
]
},
{
"key": "RawTxids",
"value": [
"3ea2767c91d087d14dda8faef736cd39d6c6ebbd5f7d2c7e8de0df3360436bfb",
"cce4e8eb4b3160b93ceecb0956cde405d85b42cbcb3fa1b4e9a9bedaf3476f05"
]
},
{
"key": "Hexes",
"value": [
"01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000",
"01000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000006a4730440220540986d1c58d6e76f8f05501c520c38ce55393d0ed7ed3c3a82c69af04221232022058ea43ed6c05fec0eccce749a63332ed4525460105346f11108b9c26df93cd72012103083dfc5a0254613941ddc91af39ff90cd711cdcde03a87b144b883b524660c39ffffffff01807c814a000000001976a914d7e7c4e0b70eaa67ceff9d2823d1bbb9f6df9a5188ac00000000"
]
},
{
"key": "Proofs",
"value": [
"000000207fd83434a2e506e874567d0468e051a1e1a56ae29672db125500ad100000000097833baeefae6471fa1f1040c911d1cf9781b1e0c890ed7a2179eb7361ff4607d237fd5bffff001d11d727fe120000000694897b6e79132eb38bc5eededa7c31876261dc42cb81597b90dbf0c0178c0d2292c8178f0211f94185828b8dee76e0a8169840fd372d38ff3bd835081e308c46fb6b436033dfe08d7e2c7d5fbdebc6d639cd36f7ae8fda4dd187d0917c76a23e8957429343eb39d015012cc6841844ee75b2b1db162ac21c7bcb2113fb9fd04a8d7105af6ff5d10fce215fccf60d28e8c4cc477f9747e11460f1e9db9cf2321ff1358b92e35ccead57f5db006a3a9d07b4a33c8153230bef4935a04f42715a1402d700",
"00000020f5bcc14625b1a1ce0959465e9002f7e0a02f23039d0759440217000000000000db067508838ed35f03f0a5e6e258b4f0886daaf0729361c70f11ad3f3ced3b693a9ba45b9726021a1d5b3b561b000000065e312e41a47a2874e3eac76a42b8bf6749cd0501dced7365bd5afdc27a89ec013e4dc7f75491345447c16b985a18ff3ef6d38eb5b5562dae3e95a03a36ea3818056f47f3dabea9e9b4a13fcbcb425bd805e4cd5609cbee3cb960314bebe8e4ccc85c3fc0283f706f4708ee14d559d5b3184d9974145d6ad4ade702c8eb8579166b4fa9137e19341f5a6bc3f018c49e3325f625307242fc60811b815f56509cdd74b81f7aa0b43545bbf6e512c47ec90d350c0c655ad2abe9ef72df112845504102d700"
]
}
]
@@ -1,6 +0,0 @@
[
{
"key": "description",
"value": "trest.bitcoin.com is the REST layer for Bitcoin.com's Cloud. More info: [developer.bitcoin.com/rest](https://developer.bitcoin.com/rest). Chatroom [geni.us/CashDev](http://geni.us/CashDev)"
}
]
@@ -1,152 +0,0 @@
[
{
"key": "/address/details/{address}",
"name": "address",
"value": "bchtest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2svtllzmlf"
},
{
"key": "/address/utxo/{address}",
"name": "address",
"value": "bchtest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2svtllzmlf"
},
{
"key": "/address/unconfirmed/{address}",
"name": "address",
"value": "bchtest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2svtllzmlf"
},
{
"key": "/address/transactions/{address}",
"name": "address",
"value": "bchtest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2svtllzmlf"
},
{
"key": "/address/fromXPub/{xpub}",
"name": "xpub",
"value": "tpubDHTK2jqg73w3GwoiHfAMbMYML1HN8FhrUxD9rFgbSgHXdwwrY6pAFqKDfUHhqw7vreaZty5hPGjb1S7ZPQeMmu6TFHAKfY9tJpYbvaGjPRM"
},
{
"key": "/block/detailsByHash/{hash}",
"name": "hash",
"value": "0000000000262e9a70fae6c38cc9a91af2819b04521d2e9e99b7ae0328ee429d"
},
{
"key": "/block/detailsByHeight/{height}",
"name": "height",
"value": "500000"
},
{
"key": "/blockchain/getBlockHeader/{hash}",
"name": "hash",
"value": "0000000000262e9a70fae6c38cc9a91af2819b04521d2e9e99b7ae0328ee429d"
},
{
"key": "/blockchain/getBlockHeader/{hash}",
"name": "verbose",
"value": true
},
{
"key": "/blockchain/getMempoolEntry/{txid}",
"name": "txid",
"value": "40112ab9d2b5f98427839272d7a1e23dd2afc6c8355626f373e076c2ab5c2f72"
},
{
"key": "/blockchain/getRawMempool",
"name": "verbose",
"value": true
},
{
"key": "/blockchain/getTxOut/{txid}/{n}",
"name": "txid",
"value": "40112ab9d2b5f98427839272d7a1e23dd2afc6c8355626f373e076c2ab5c2f72"
},
{
"key": "/blockchain/getTxOut/{txid}/{n}",
"name": "n",
"value": 0
},
{
"key": "/blockchain/getTxOut/{txid}/{n}",
"name": "mempool",
"value": "false"
},
{
"key": "/blockchain/getTxOutProof/{txids}",
"name": "txids",
"value": "40112ab9d2b5f98427839272d7a1e23dd2afc6c8355626f373e076c2ab5c2f72"
},
{
"key": "/blockchain/verifyTxOutProof/{proof}",
"name": "proof",
"value": "00000020166b6d1080a6d0a48a6c3556e275e86606ae217d7f9c53723b03000000000000a7b3c46a4c4b46cce03ebfe8b7cc32759e4f0dece66a20fb7d79577aadc8edf69425185cffff001d2261092aff00000009e8bfb50fb37d3f40b53eb8229f031a30e897aa9880d6b4db37cbb7c2b83b1e4f609b5095caa6d37d0a374b92e197fd424540f66999c0b6b50681a9ccf2e05ff2722f5cabc276e073f3265635c8c6afd23de2a1d77292832784f9b5d2b92a11408e66784a2e2183a898b03267c115da1b78cf0cd275d83c3cc22bb96940635c41669843b5c9211b26604659ad5943cf2b33217f69f6d67d728ee34bda219ede0a626804059d2540cd7f50114794c6ff18b6a790c671ba488525819c13fd32101932fd3506c9305134c6839c2945b8239ba52a60ac10577d6dc6b158e3c179bb91a7911dc11f8c5f052f808ef76c25ed638aaca31eb045a35ef00718718a0ad914607937c8c3dcee995ac145476cb4d83a4250f46c46990df568b6ee0796b3995f03bb0700"
},
{
"key": "/mining/getNetworkHashps",
"name": "nblocks",
"value": 120
},
{
"key": "/mining/getNetworkHashps",
"name": "height",
"value": -1
},
{
"key": "/rawtransactions/decodeRawTransaction/{hex}",
"name": "hex",
"value": "02000000010e991f7ccec410f27d333f737f149b5d3be6728687da81072e638aed0063a176010000006b483045022100cd20443b0af090053450bc4ab00d563d4ac5955bb36e0135b00b8a96a19f233302205047f2c70a08c6ef4b76f2d198b33a31d17edfaa7e1e9e865894da0d396009354121024d4e7f522f67105b7bf5f9dbe557e7b2244613fdfcd6fe09304f93877328f6beffffffff02a0860100000000001976a9140ee020c07f39526ac5505c54fa1ab98490979b8388acb5f0f70b000000001976a9143a9b2b0c12fe722fcf653b6ef5dcc38732d6ff5188ac00000000"
},
{
"key": "/rawtransactions/decodeScript/{hex}",
"name": "hex",
"value": "02000000012d2ec73b12ecb96fbf104fa0325e39bc4e49818709594ba2128635aedfb820a1010000006a47304402203c63866eab7ffca27ed6437a028de9b2cc83dd1ed96f0f496742cf70c6ca50b8022007f3c7fc8729f52d8d0e626c6328012691fa6b3a317c66408e2ccc84a6538e9741210360cfc66fdacb650bc4c83b4e351805181ee696b7d5ab4667c57b2786f51c413dffffffff036a929800000000001976a914eb4b180def88e3f5625b2d8ae2c098ff7d85f66488ac00000000000000006a6a4c67087768630000003201000800000000426974636f696e2e636f6d00426974636f696e20466978656420546f6b656e20546573740054535400646576656c6f7065722e626974636f696e2e636f6d004d616465207769746820424954424f5800000000174876e80022020000000000001976a914eb4b180def88e3f5625b2d8ae2c098ff7d85f66488ac00000000"
},
{
"key": "/rawtransactions/getRawTransaction/{txid}",
"name": "txid",
"value": "40112ab9d2b5f98427839272d7a1e23dd2afc6c8355626f373e076c2ab5c2f72"
},
{
"key": "/rawtransactions/getRawTransaction/{txid}",
"name": "verbose",
"value": true
},
{
"key": "/transaction/details/{txid}",
"name": "txid",
"value": "40112ab9d2b5f98427839272d7a1e23dd2afc6c8355626f373e076c2ab5c2f72"
},
{
"key": "/util/validateAddress/{address}",
"name": "address",
"value": "bchtest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2svtllzmlf"
},
{
"key": "/rawtransactions/decodeTransaction/{rawTx}",
"name": "rawTx",
"value": "02000000016ad673a59a43d70ec537ed1a7cc5b867e1bbbddde47a26164c2927530fae5951010000006a47304402206754d05ef05760ef9eb6d5b80deb174864768876067a261617a69cdbb9295179022022e223153eec7c1b511a4de3e618b952d7d2df925f5f1f9e006193c1cf6f507c4121024d4e7f522f67105b7bf5f9dbe557e7b2244613fdfcd6fe09304f93877328f6beffffffff039fecf70b000000001976a9143a9b2b0c12fe722fcf653b6ef5dcc38732d6ff5188ac0000000000000000166a1408776863000000000000022c0000000005f5e10022020000000000001976a9140ee020c07f39526ac5505c54fa1ab98490979b8388ac00000000"
},
{
"key": "/blockchain/getTxOutProof/{txid}",
"name": "txid",
"value": "40112ab9d2b5f98427839272d7a1e23dd2afc6c8355626f373e076c2ab5c2f72"
},
{
"key": "/slp/list/{tokenId}",
"name": "tokenId",
"value": "650dea14c77f4d749608e36e375450c9ac91deb8b1b53e50cb0de2059a52d19a"
},
{
"key": "/slp/balancesForAddress/{address}",
"name": "address",
"value": "slptest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2shlcycvd5"
},
{
"key": "/slp/address/convert/{address}",
"name": "address",
"value": "slptest:qz35h5mfa8w2pqma2jq06lp7dnv5fxkp2shlcycvd5"
},
{
"key": "/slp/txDetails/{txid}",
"name": "txid",
"value": "57b3082a2bf269b3d6f40fee7fb9c664e8256a88ca5ee2697c05b9457822d446"
}
]
-12
View File
@@ -1,12 +0,0 @@
{
"openapi": "3.0.0",
"info": {
"description": "The Bitcoin Cash JSON PRC over HTTP",
"version": "3.3.8",
"title": "REST",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
}
}
}
File diff suppressed because it is too large Load Diff
-7
View File
@@ -1,7 +0,0 @@
{
"servers": [
{
"url": "/v2"
}
]
}
-68
View File
@@ -1,68 +0,0 @@
{
"tags": [
{
"name": "address",
"description": "Address details and utxo",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/address"
}
},
{
"name": "block",
"description": "Block Details",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/block"
}
},
{
"name": "blockchain",
"description": "Interacting w/ the BCH Blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/blockchain"
}
},
{
"name": "control",
"description": "Control your blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/control"
}
},
{
"name": "mining",
"description": "Mining w/ the BCH Blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/mining"
}
},
{
"name": "rawtransactions",
"description": "Create transactions to be transmitted to the network.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/rawtransactions"
}
},
{
"name": "transaction",
"description": "Transaction details.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/rawtransactions"
}
},
{
"name": "util",
"description": "Bitcoin Cash utilities.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/util"
}
}
]
}
File diff suppressed because it is too large Load Diff
-12
View File
@@ -1,12 +0,0 @@
{
"openapi": "3.0.0",
"info": {
"description": "rest.bitcoin.com is the REST layer for Bitcoin.com's Cloud. More info: [developer.bitcoin.com/rest](https://developer.bitcoin.com/rest). Chatroom [geni.us/CashDev](http://geni.us/CashDev)",
"version": "3.3.8",
"title": "REST",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
{
"servers": [
{
"url": "/v2"
}
]
}
-68
View File
@@ -1,68 +0,0 @@
{
"tags": [
{
"name": "address",
"description": "Address details and utxo",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/address"
}
},
{
"name": "block",
"description": "Block Details",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/block"
}
},
{
"name": "blockchain",
"description": "Interacting w/ the BCH Blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/blockchain"
}
},
{
"name": "control",
"description": "Control your blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/control"
}
},
{
"name": "mining",
"description": "Mining w/ the BCH Blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/mining"
}
},
{
"name": "rawtransactions",
"description": "Create transactions to be transmitted to the network.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/rawtransactions"
}
},
{
"name": "transaction",
"description": "Transaction details.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/rawtransactions"
}
},
{
"name": "util",
"description": "Bitcoin Cash utilities.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/util"
}
}
]
}
File diff suppressed because it is too large Load Diff
-12
View File
@@ -1,12 +0,0 @@
{
"openapi": "3.0.0",
"info": {
"description": "trest.bitcoin.com is the REST layer for Bitcoin.com's Cloud. More info: [developer.bitcoin.com/rest](https://developer.bitcoin.com/rest). Chatroom [geni.us/CashDev](http://geni.us/CashDev)",
"version": "3.3.8",
"title": "REST",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
{
"servers": [
{
"url": "/v2"
}
]
}
-68
View File
@@ -1,68 +0,0 @@
{
"tags": [
{
"name": "address",
"description": "Address details and utxo",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/address"
}
},
{
"name": "block",
"description": "Block Details",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/block"
}
},
{
"name": "blockchain",
"description": "Interacting w/ the BCH Blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/blockchain"
}
},
{
"name": "control",
"description": "Control your blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/control"
}
},
{
"name": "mining",
"description": "Mining w/ the BCH Blockchain",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/mining"
}
},
{
"name": "rawtransactions",
"description": "Create transactions to be transmitted to the network.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/rawtransactions"
}
},
{
"name": "transaction",
"description": "Transaction details.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/rawtransactions"
}
},
{
"name": "util",
"description": "Bitcoin Cash utilities.",
"externalDocs": {
"description": "Find out more",
"url": "https://developer.bitcoin.com/rest/docs/util"
}
}
]
}
-15
View File
@@ -1,15 +0,0 @@
{
"compilerOptions": {
"outDir": "./dist/",
//"noImplicitAny": true,
"baseUrl": ".",
"module": "commonjs",
"target": "es5",
"allowJs": true,
"lib": ["es2015", "es2015.symbol", "dom", "es2017"],
"typeRoots": ["node_modules/@types/"],
"downlevelIteration": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "test/**/*"]
}