2021-06-19 22:40:16 -04:00
|
|
|
/*
|
|
|
|
|
Integration tests for bchjs dsproof library.
|
|
|
|
|
*/
|
|
|
|
|
|
2025-11-17 10:20:55 -08:00
|
|
|
// Global npm libraries
|
2025-11-16 13:37:04 -08:00
|
|
|
import chai from 'chai'
|
2021-06-22 15:47:22 -07:00
|
|
|
|
2025-11-17 10:20:55 -08:00
|
|
|
// Local libraries
|
2025-11-23 10:30:23 -08:00
|
|
|
import BCHJS from '../../src/bch-js.js'
|
2025-11-16 13:37:04 -08:00
|
|
|
const { assert } = chai
|
2025-11-17 10:20:55 -08:00
|
|
|
|
2021-06-19 22:40:16 -04:00
|
|
|
const bchjs = new BCHJS()
|
|
|
|
|
|
|
|
|
|
describe('#DSProof', () => {
|
|
|
|
|
beforeEach(async () => {
|
2021-06-22 12:24:29 -07:00
|
|
|
if (process.env.IS_USING_FREE_TIER) await bchjs.Util.sleep(1000)
|
2021-06-19 22:40:16 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
describe('#getDSProof', () => {
|
2021-06-22 12:24:29 -07:00
|
|
|
it('should get TX info from the full node', async () => {
|
2021-06-19 22:40:16 -04:00
|
|
|
const txid =
|
|
|
|
|
'ee0df780b58f6f24467605b2589c44c3a50fc849fb8f91b89669a4ae0d86bc7e'
|
|
|
|
|
const result = await bchjs.DSProof.getDSProof(txid)
|
2021-06-22 15:47:22 -07:00
|
|
|
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
|
|
|
|
|
|
|
|
|
|
assert.equal(result, null)
|
2021-06-19 22:40:16 -04:00
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|