Skip to content

Commit

Permalink
Add types for getPendingSweeps
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiac committed May 9, 2024
1 parent ebad296 commit 6d84ba9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions lnd_methods/onchain/get_pending_sweeps.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import {
AuthenticatedLightningArgs,
AuthenticatedLightningMethod,
} from '../../typescript';

export type GetPendingSweepsArgs = AuthenticatedLightningArgs;

export interface Sweep {
/** Total Sweep Broadcast Attempts Count Number */
broadcasts_count: number;
/** Current Chain Fee Rate Tokens Per VByte Number */
current_fee_rate?: number;
/** Requested Chain Fee Rate Tokens per VByte Number */
initial_fee_rate?: number;
/** Requested Waiting For Batching Bool */
is_batching: boolean;
/** Maximum Total Fee Tokens Allowed Number */
max_fee?: number;
/** Targeted Maximum Confirmation Height Number */
max_height?: number;
/** Sweep Outpoint Tokens Value Number */
tokens: number;
/** Sweeping Outpoint Transaction Id Hex String */
transaction_id: string;
/** Sweeping Outpoint Transaction Output Index Number */
transaction_vout: number;
/** Outpoint Constraint Script Type String */
type: string;
}

export interface GetPendingSweepsResult {
sweeps: Sweep[];
}

/**
* Get pending self-transfer spends
*
* Requires `onchain:read` permission
*
* Requires LND built with `walletrpc` build tag
*
* This method is not supported in LND 0.17.5 or below
*/
export const getPendingSweeps: AuthenticatedLightningMethod<
GetPendingSweepsArgs,
GetPendingSweepsResult
>;
1 change: 1 addition & 0 deletions lnd_methods/onchain/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export * from './get_chain_transactions';
export * from './get_locked_utxos';
export * from './get_master_public_keys';
export * from './get_pending_chain_balance';
export * from './get_pending_sweeps';
export * from './get_sweep_transactions';
export * from './get_utxos';
export * from './lock_utxo';
Expand Down

0 comments on commit 6d84ba9

Please sign in to comment.