BTC Stake

Stake BTC to receive LBTC on an EVM chain.


Overview

The BTC Stake action converts native Bitcoin to LBTC on your chosen destination chain. The flow:

  1. Prepare with amount and recipient

  2. Authorize the fee or address signature

  3. Generate a BTC deposit address

  4. Send BTC to the deposit address

  5. LBTC is minted on the destination chain


Basic Usage

import { createLombardSDK, Chain, AssetId } from '@lombard.finance/sdk';
import { config } from './lib/lombard';

const sdk = createLombardSDK(config);

const stake = sdk.chain.btc.stake({
  destChain: Chain.ETHEREUM,
  assetOut: AssetId.LBTC,
});

await stake.prepare({
  amount: '0.1',
  recipient: '0x1234567890abcdef1234567890abcdef12345678',
});

await stake.authorize();

const depositAddress = await stake.generateDepositAddress();
// depositAddress: 'bc1q...'

// User sends BTC to depositAddress
// LBTC will be minted to recipient after confirmations

Parameters

Stake Options

Parameter
Type
Required
Description

destChain

Chain

Yes

Destination chain for LBTC

assetOut

AssetId

Yes

Output asset (AssetId.LBTC)

sourceChain

Chain

No

Bitcoin network (defaults based on env)

Prepare Parameters

Parameter
Type
Required
Description

amount

string

Yes

Amount in BTC (e.g., "0.1")

recipient

string

Yes

Destination address for LBTC

referralCode

string

No

Referral code for attribution


With Referral Code


Status Flow

To Ethereum

To Other EVM Chains


Checking Status


Events (Optional)


Error Handling

Last updated