From 8df7ca6bb91527e01b85c87f7f26bfdb4bd5d135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Kn=C3=A1b?= Date: Fri, 11 Oct 2024 14:31:48 +0200 Subject: [PATCH] Update fundPsbt type --- lnd_methods/onchain/fund_psbt.d.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lnd_methods/onchain/fund_psbt.d.ts b/lnd_methods/onchain/fund_psbt.d.ts index 1d6fee4..d283184 100644 --- a/lnd_methods/onchain/fund_psbt.d.ts +++ b/lnd_methods/onchain/fund_psbt.d.ts @@ -7,6 +7,8 @@ import {MergeExclusive} from 'type-fest'; export type FundPsbtArgs = AuthenticatedLightningArgs< { + /** Change Address Address Format String */ + change_format?: 'p2tr'; /** Chain Fee Tokens Per Virtual Byte */ fee_tokens_per_vbyte?: number; inputs?: { @@ -15,12 +17,12 @@ export type FundPsbtArgs = AuthenticatedLightningArgs< /** Unspent Transaction Output Index */ transaction_vout: number; }[]; - /** Spend UTXOs With Minimum Confirmations */ min_confirmations?: number; - /** Confirmations To Wait */ target_confirmations?: number; + /** Select UTXOs Using Method String */ + utxo_selection?: 'largest' | 'random'; } & MergeExclusive< { /** Existing PSBT Hex */ @@ -58,8 +60,6 @@ export type FundPsbtResult = { }[]; /** Unsigned PSBT Hex */ psbt: string; - /** Select UTXOs Using Method String */ - utxo_selection?: UtxoSelection; }; /** @@ -69,6 +69,10 @@ export type FundPsbtResult = { * * If there are no inputs passed, internal UTXOs will be selected and locked * + * `utxo_selection` methods: 'largest', 'random' + * + * `change_format` options: `p2tr` (only one change type is supported) + * * Requires `onchain:write` permission * * Requires LND built with `walletrpc` tag