Skip to main content
Gets a quote for a static deposit claim and automatically claims it if the fee is within the specified maximum.

Method Signature

async claimStaticDepositWithMaxFee({
  transactionId,
  maxFee,
  outputIndex,
}: {
  transactionId: string;
  maxFee: number;
  outputIndex?: number;
}): Promise<ClaimStaticDepositOutput | null>

Parameters

transactionId
string
required
The Bitcoin transaction ID of the deposit
maxFee
number
required
Maximum fee in satoshis you’re willing to pay
outputIndex
number
The output index (auto-detected if not provided)

Returns

result
ClaimStaticDepositOutput | null
required
The claim result, or null if the fee exceeds maxFee

Example

const result = await wallet.claimStaticDepositWithMaxFee({
  transactionId: "abc123...",
  maxFee: 500 // Will only claim if fee <= 500 sats
});

if (result) {
  console.log("Deposit claimed:", result);
} else {
  console.log("Fee too high, deposit not claimed");
}