You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
603 B
18 lines
603 B
const ElectrumClient = require('..')
|
|
|
|
const main = async () => {
|
|
const ecl = new ElectrumClient(995, 'btc.smsys.me', 'tls')
|
|
await ecl.connect()
|
|
try{
|
|
const ver = await ecl.server_version("2.7.11", "1.0")
|
|
console.log(ver)
|
|
const balance = await ecl.blockchainAddress_getBalance("12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX")
|
|
console.log(balance)
|
|
const unspent = await ecl.blockchainAddress_listunspent("12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX")
|
|
console.log(unspent)
|
|
}catch(e){
|
|
console.log(e)
|
|
}
|
|
await ecl.close()
|
|
}
|
|
main().catch(console.log)
|
|
|