BTC Stake and Deploy

Stake BTC directly into a DeFi vault in a single operation.


Overview

The BTC Stake and Deploy action combines staking and vault deployment. When the BTC is received, LBTC is minted and automatically deployed to the specified vault.


Basic Usage

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

const sdk = createLombardSDK(config);

const stakeAndDeploy = sdk.chain.btc.stakeAndDeploy({
  destChain: Chain.ETHEREUM,
  assetOut: AssetId.LBTC,
  protocol: DeployProtocol.Veda,
});

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

await stakeAndDeploy.authorizeDeposit();

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

Parameters

Stake and Deploy Options

Parameter
Type
Required
Description

destChain

Chain

Yes

Destination chain

assetOut

AssetId

Yes

Output asset (AssetId.LBTC)

protocol

DeployProtocol

Yes

Target vault protocol

Prepare Parameters

Parameter
Type
Required
Description

amount

string

Yes

Amount in BTC

recipient

string

Yes

Destination address

referralCode

string

No

Referral code for attribution


Supported Protocols


With Referral Code


Status Flow


Last updated