Trying to fetch the UTXOs for a given tackle and can not seem to discover the right command syntax.
Right here is an implementation in bitcoin-core by way of javascript, however I additionally expertise the identical on bitcoin-cli
const descriptorAttempts = [
'{ desc: addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo) }',
'{ "desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" }',
'"desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"',
"addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)",
"addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)",
"addr=34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
"34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
"{ addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo) }",
"{ addr: 34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo }",
"{"desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"}",
'"{"desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"}"',
'"{"desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"}"',
'"{"desc": "addr("34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo")"}"',
'"{"desc": "addr("34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo")"}"',
'"desc" => "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"',
'[ "desc" => "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" ]',
{ "desc" : "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" },
{ desc : "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" }
]
descriptorAttempts.forEach(try => {
consumer.command('scantxoutset', 'begin', [ attempt ])
.then((res) => {
console.log("Success! 🙌")
console.log(res)
})
.catch((error) => {
console.log("Failed try of -> " + try)
// console.log(error)
})
})
All lead to RpcError: Invalid descriptor