walletrpc: add ListUnspent RPC

This commit is contained in:
Wilmer Paulino committed 2020-06-03 19:03:04 -07:00
1 parent 7616a3dc7f
commit acfd432602
6 files changed
+362 -109

No files matched your search

+55
View File
@@ -28,6 +28,18 @@
}
}
},
"lnrpcAddressType": {
"type": "string",
"enum": [
"WITNESS_PUBKEY_HASH",
"NESTED_PUBKEY_HASH",
"UNUSED_WITNESS_PUBKEY_HASH",
"UNUSED_NESTED_PUBKEY_HASH"
],
"default": "WITNESS_PUBKEY_HASH",
"description": "- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)\n- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)",
"title": "`AddressType` has to be one of:"
},
"lnrpcOutPoint": {
"type": "object",
"properties": {
@@ -112,6 +124,37 @@
}
}
},
"lnrpcUtxo": {
"type": "object",
"properties": {
"address_type": {
"$ref": "#/definitions/lnrpcAddressType",
"title": "The type of address"
},
"address": {
"type": "string",
"title": "The address"
},
"amount_sat": {
"type": "string",
"format": "int64",
"title": "The value of the unspent coin in satoshis"
},
"pk_script": {
"type": "string",
"title": "The pkscript in hex"
},
"outpoint": {
"$ref": "#/definitions/lnrpcOutPoint",
"title": "The outpoint in format txid:n"
},
"confirmations": {
"type": "string",
"format": "int64",
"title": "The number of confirmations for the Utxo"
}
}
},
"signrpcKeyDescriptor": {
"type": "object",
"properties": {
@@ -202,6 +245,18 @@
}
}
},
"walletrpcListUnspentResponse": {
"type": "object",
"properties": {
"utxos": {
"type": "array",
"items": {
"$ref": "#/definitions/lnrpcUtxo"
},
"description": "A list of utxos satisfying the specified number of confirmations."
}
}
},
"walletrpcPendingSweep": {
"type": "object",
"properties": {