Skip to content

Commit

Permalink
Add types for createFundedPsbt
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiac committed Jun 2, 2024
1 parent 13445b9 commit 81f1b39
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
50 changes: 50 additions & 0 deletions lnd_methods/onchain/create_funded_psbt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import type {
AuthenticatedLightningArgs,
AuthenticatedLightningMethod,
} from '../../typescript';

export type CreateFundedPsbtArgs = AuthenticatedLightningArgs<{
/** Chain Fee Tokens Per Virtual Byte Number */
fee_tokens_per_vbyte?: number;
inputs?: Array<{
/** Sequence Number */
sequence?: number;
/** Unspent Transaction Id Hex String */
transaction_id: string;
/** Unspent Transaction Output Index Number */
transaction_vout: number;
}>;
/** Select Inputs With Minimum Confirmations Number */
min_confirmations?: number;
outputs?: Array<{
/** Use This Output For Change Bool */
is_change?: boolean;
/** Output Script Hex String> */
script: string;
/** Send Tokens Tokens Number */
tokens: number;
}>;
/** Blocks To Wait for Confirmation Number */
target_confirmations?: number;
/** Spendable Lock Time on Transaction Number */
timelock?: number;
/** Select Inputs Using Selection Methodology Type String */
utxo_selection?: string;
/** Transaction Version Number */
version?: number;
}>;

/**
* Create an unsigned funded PSBT given inputs or outputs
*
* When specifying local inputs, they must be locked before using
*
* `utxo_selection` methods: 'largest', 'random'
*
* Requires `onchain:write` permission
*
* Requires LND built with `walletrpc` tag
*
* This method is not supported on LND 0.17.5 or below
*/
export const createFundedPsbt: AuthenticatedLightningMethod<CreateFundedPsbtArgs>;
1 change: 1 addition & 0 deletions lnd_methods/onchain/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from './broadcast_chain_transaction';
export * from './cancel_pending_channel';
export * from './close_channel';
export * from './create_funded_psbt';
export * from './delete_chain_transaction';
export * from './fund_pending_channels';
export * from './fund_psbt';
Expand Down

0 comments on commit 81f1b39

Please sign in to comment.