@psf/bch-js 5.2.2 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psf/bch-js",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"description": "The FullStack.cash JavaScript library for Bitcoin Cash and SLP Tokens",
|
|
5
5
|
"author": "Chris Troutner <chris.troutner@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test:integration:local:abc": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 test/integration && mocha --timeout 30000 test/integration/chains/abc/",
|
|
19
19
|
"test:integration:local:bchn": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/",
|
|
20
20
|
"test:integration:local:testnet": "RESTURL=http://localhost:4000/v5/ mocha --timeout 30000 test/integration/chains/testnet",
|
|
21
|
-
"test:integration:decatur:bchn": "export RESTURL=http://192.168.2.
|
|
21
|
+
"test:integration:decatur:bchn": "export RESTURL=http://192.168.2.129:3000/v5/ && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/",
|
|
22
22
|
"test:integration:decatur:abc": "export RESTURL=http://192.168.2.141:3000/v5/ && mocha --timeout 30000 test/integration && mocha --timeout 30000 test/integration/chains/abc/",
|
|
23
23
|
"test:integration:temp:bchn": "export RESTURL=http://157.90.174.219:3000/v5/ && mocha --timeout 30000 test/integration/",
|
|
24
24
|
"test:temp": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 -g '#Encryption' test/integration/",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Integration tests for the utxo.js library.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
const assert = require('chai').assert
|
|
5
|
+
// const assert = require('chai').assert
|
|
6
6
|
|
|
7
|
-
const BCHJS = require('../../../../src/bch-js')
|
|
8
|
-
const bchjs = new BCHJS()
|
|
7
|
+
// const BCHJS = require('../../../../src/bch-js')
|
|
8
|
+
// const bchjs = new BCHJS()
|
|
9
9
|
|
|
10
10
|
describe('#UTXO', () => {
|
|
11
11
|
beforeEach(async () => {
|
|
@@ -14,6 +14,7 @@ describe('#UTXO', () => {
|
|
|
14
14
|
if (process.env.IS_USING_FREE_TIER) await sleep(1500)
|
|
15
15
|
})
|
|
16
16
|
|
|
17
|
+
/*
|
|
17
18
|
describe('#get', () => {
|
|
18
19
|
it('should get hydrated and filtered UTXOs for an address', async () => {
|
|
19
20
|
// const addr = 'bitcoincash:qqh793x9au6ehvh7r2zflzguanlme760wuzehgzjh9'
|
|
@@ -31,6 +32,7 @@ describe('#UTXO', () => {
|
|
|
31
32
|
assert.isArray(result[0].nullUtxos)
|
|
32
33
|
})
|
|
33
34
|
})
|
|
35
|
+
*/
|
|
34
36
|
})
|
|
35
37
|
|
|
36
38
|
function sleep (ms) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Integration tests for the transaction.js library.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const assert = require('chai').assert
|
|
6
|
+
const BCHJS = require('../../../../src/bch-js')
|
|
7
|
+
const bchjs = new BCHJS()
|
|
8
|
+
|
|
9
|
+
describe('#Transaction', () => {
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
if (process.env.IS_USING_FREE_TIER) await bchjs.Util.sleep(1000)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
describe('#get', () => {
|
|
15
|
+
it('should get a tx details for a non-SLP TX with an OP_RETURN', async () => {
|
|
16
|
+
const txid =
|
|
17
|
+
'01517ff1587fa5ffe6f5eb91c99cf3f2d22330cd7ee847e928ce90ca95bf781b'
|
|
18
|
+
|
|
19
|
+
const result = await bchjs.Transaction.get(txid)
|
|
20
|
+
// console.log('result: ', result)
|
|
21
|
+
|
|
22
|
+
assert.property(result.txData, 'txid')
|
|
23
|
+
assert.property(result.txData, 'vin')
|
|
24
|
+
assert.property(result.txData, 'vout')
|
|
25
|
+
assert.equal(result.txData.isValidSlp, false)
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
})
|