L2-Technology / sensei

A lightning node implementation for everyone
https://l2.technology/sensei
Other
199 stars 39 forks source link

Add listunspent command for seeing on-chain utxos #84

Closed benthecarman closed 2 years ago

benthecarman commented 2 years ago

Creates a command listunspent that returns the wallet's current on-chain utxos.

Example output

{
  "utxos": [
    {
      "amount_sat": 200000,
      "spk": "0014caceda7dbbe834baa275f7eedefe4b3c7c8d3f9d",
      "txid": "f882c1acf8d5bfa5d6da6ed7fbcbc6d5888768e01806dbe55b941dd5417c1308",
      "output_index": 0
    },
    {
      "amount_sat": 72000,
      "spk": "0014caceda7dbbe834baa275f7eedefe4b3c7c8d3f9d",
      "txid": "18ec7ed22bbd4f4fb2f19a240d6b8dcf296cf28c9ce057319248235fe1056545",
      "output_index": 1
    },
    {
      "amount_sat": 50000,
      "spk": "0014caceda7dbbe834baa275f7eedefe4b3c7c8d3f9d",
      "txid": "a600c53d0f81c5643572f98ed2b14204bb716c9b44a0b2abc204a8563b794b70",
      "output_index": 0
    }
  ]
}
johncantrell97 commented 2 years ago

looks good to me, just that one minor nit. thanks for adding this 🙏