View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bip21 = require("bip21"); | |
let btcAdd = "bc1q0gf7ygdcwjxtfgmzlaqqtxn3s7sdamyw5v48a5"; | |
let options = { | |
label: "Buy me Coffee", | |
message: "Let's test BIP21", | |
amount: 0.0005, | |
lightning: | |
"lnbc10u1p3pj257pp5yztkwjcz5ftl5laxkav23zmzekaw37zk6kmv80pk4xaev5qhtz7qdpdwd3xger9wd5kwm36yprx7u3qd36kucmgyp282etnv3shjcqzpgxqyz5vqsp5usyc4lk9chsfp53kvcnvq456ganh60d89reykdngsmtj6yw3nhvq9qyyssqjcewm5cjwz4a6rfjx77c490yced6pemk0upkxhy89cmm7sct66k8gneanwykzgdrwrfje69h9u5u0w57rrcsysas7gadwmzxc8c6t0spjazup6", |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "bip21", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js" | |
}, | |
"keywords": [], | |
"author": "", |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
const GetBalance = async () => { | |
const body = { | |
jsonrpc: "1.0", | |
method: "getbalance", | |
id: "curltext", | |
parameter: [], | |
}; | |
const port = 38332; |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "json-rpc", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js" | |
}, | |
"keywords": [], | |
"author": "", |
View send_raw_tx.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Axios } = require("./util/index"); | |
const GetUnspentUtxo = async () => { | |
try { | |
const response = await Axios("listunspent"); | |
// console.log(response.data.result); | |
return response.data.result; | |
} catch (error) { | |
console.log(error); | |
throw error; |
View finalize_psbt.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Axios } = require("./util/index"); | |
const GetUnspentUtxo = async () => { | |
try { | |
const response = await Axios("listunspent"); | |
// console.log(response.data.result); | |
return response.data.result; | |
} catch (error) { | |
console.log(error); | |
throw error; |
View sign_psbt.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Axios } = require("./util/index"); | |
const GetUnspentUtxo = async () => { | |
try { | |
const response = await Axios("listunspent"); | |
// console.log(response.data.result); | |
return response.data.result; | |
} catch (error) { | |
console.log(error); | |
throw error; |
View create_psbt_tx.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Axios } = require("./util/index"); | |
const GetUnspentUtxo = async () => { | |
try { | |
const response = await Axios("listunspent"); | |
// console.log(response.data.result); | |
return response.data.result; | |
} catch (error) { | |
console.log(error); | |
throw error; |
View selecting_utxo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Axios } = require("./util/index"); | |
const GetUnspentUtxo = async () => { | |
try { | |
const response = await Axios("listunspent"); | |
return response.data.result; | |
} catch (error) { | |
throw error; | |
} | |
}; |
View unspentutxo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Axios } = require("./util/index"); | |
const GetUnspentUtxo = async () => { | |
try { | |
const response = await Axios("listunspent"); | |
console.log(response.data.result); | |
return response.data.result; | |
} catch (error) { | |
console.log(error); | |
throw error; |
NewerOlder