mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 01:02:05 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20cb48caff | ||
|
|
f241aed5b2 | ||
|
|
87c2faa6af | ||
|
|
10a840f48d | ||
|
|
61f9531046 | ||
|
|
1ab408a757 | ||
|
|
84df2be3b8 | ||
|
|
17376d9dba | ||
|
|
4289cf4f7c | ||
|
|
f04449be72 | ||
|
|
a0f9d065f9 | ||
|
|
20f2e20bcb |
+2
-2
@@ -24,8 +24,8 @@
|
||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
"coverage:report": "export NETWORK=mainnet && nyc --reporter=html mocha --timeout 25000 test/v4/",
|
||||
"docs": "./node_modules/.bin/apidoc -i src/routes/v4 -o docs",
|
||||
"test:temp1": "export NETWORK=mainnet && export TEST=integration && mocha -g '#getBalance' --exit --timeout 30000 test/v5/",
|
||||
"test:temp2": "export NETWORK=mainnet && mocha -g '#getBalance' --exit --timeout 30000 test/v5/"
|
||||
"test:temp1": "export NETWORK=mainnet && export TEST=integration && mocha -g '#utxosBulk' --exit --timeout 30000 test/v5/",
|
||||
"test:temp2": "export NETWORK=mainnet && mocha -g '#utxosBulk' --exit --timeout 30000 test/v5/"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.15.1"
|
||||
|
||||
+516
-628
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,43 @@ const utxos = [
|
||||
}
|
||||
]
|
||||
|
||||
const utxosArray = {
|
||||
success: true,
|
||||
utxos: [
|
||||
{
|
||||
utxos: [
|
||||
{
|
||||
height: 601861,
|
||||
tx_hash:
|
||||
'6181c669614fa18039a19b23eb06806bfece1f7514ab457c3bb82a40fe171a6d',
|
||||
tx_pos: 0,
|
||||
value: 1000
|
||||
}
|
||||
],
|
||||
address: 'bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7'
|
||||
},
|
||||
{
|
||||
utxos: [
|
||||
{
|
||||
height: 604392,
|
||||
tx_hash:
|
||||
'7774e449c5a3065144cefbc4c0c21e6b69c987f095856778ef9f45ddd8ae1a41',
|
||||
tx_pos: 0,
|
||||
value: 1000
|
||||
},
|
||||
{
|
||||
height: 630834,
|
||||
tx_hash:
|
||||
'4fe60a51e0d8f5134bfd8e5f872d6e502d7f01b28a6afebb27f4438a4f638d53',
|
||||
tx_pos: 0,
|
||||
value: 6000
|
||||
}
|
||||
],
|
||||
address: 'bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const balance = {
|
||||
success: true,
|
||||
balance: {
|
||||
@@ -26,7 +63,19 @@ const balance = {
|
||||
unconfirmed: 0
|
||||
}
|
||||
}
|
||||
|
||||
const balances = {
|
||||
success: true,
|
||||
balances: [
|
||||
{
|
||||
balance: { confirmed: 7000, unconfirmed: 0 },
|
||||
address: 'bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7'
|
||||
},
|
||||
{
|
||||
balance: { confirmed: 7000, unconfirmed: 0 },
|
||||
address: 'bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf'
|
||||
}
|
||||
]
|
||||
}
|
||||
const txHistory = [
|
||||
{
|
||||
height: 601861,
|
||||
@@ -117,16 +166,56 @@ const txDetails = {
|
||||
]
|
||||
}
|
||||
|
||||
const txDetailsBulk = {
|
||||
success: true,
|
||||
transactions: [{ details: txDetails }]
|
||||
}
|
||||
|
||||
const blockHeaders = [
|
||||
'010000008b52bbd72c2f49569059f559c1b1794de5192e4f7d6d2b03c7482bad0000000083e4f8a9d502ed0c419075c1abb5d56f878a2e9079e5612bfb76a2dc37d9c42741dd6849ffff001d2b909dd6',
|
||||
'01000000f528fac1bcb685d0cd6c792320af0300a5ce15d687c7149548904e31000000004e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f85de6849ffff001d385ccb7c'
|
||||
]
|
||||
|
||||
const blockHeadersBulk = {
|
||||
success: true,
|
||||
headers: [{ headers: blockHeaders }, { headers: blockHeaders }]
|
||||
}
|
||||
|
||||
const transactions = [
|
||||
{
|
||||
height: 603416,
|
||||
tx_hash: 'eef683d236d88e978bd406419f144057af3fe1b62ef59162941c1a9f05ded62c'
|
||||
},
|
||||
{
|
||||
height: 646894,
|
||||
tx_hash: '4c695fae636f3e8e2edc571d11756b880ccaae744390f3950d798ce7b5e25754'
|
||||
}
|
||||
]
|
||||
|
||||
const transactionsBulk = {
|
||||
success: true,
|
||||
transactions: [
|
||||
{
|
||||
transactions,
|
||||
address: 'bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7'
|
||||
},
|
||||
{
|
||||
transactions,
|
||||
address: 'bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7'
|
||||
}
|
||||
]
|
||||
}
|
||||
module.exports = {
|
||||
utxos,
|
||||
utxosArray,
|
||||
balance,
|
||||
txHistory,
|
||||
mempool,
|
||||
txDetails,
|
||||
blockHeaders
|
||||
txDetailsBulk,
|
||||
blockHeaders,
|
||||
blockHeadersBulk,
|
||||
balances,
|
||||
transactions,
|
||||
transactionsBulk
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user