Skip to Content

BTC Stake and Deploy

Stake BTC directly into a DeFi vault in a single operation. When 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();

Parameters

Stake and Deploy Options

ParameterTypeRequiredDescription
destChainChainYesDestination chain
assetOutAssetIdYesOutput asset (AssetId.LBTC)
protocolDeployProtocolYesTarget vault protocol

Prepare Parameters

ParameterTypeRequiredDescription
amountstringYesAmount in BTC
recipientstringYesDestination address
referralCodestringNoReferral code for attribution

Supported Protocols

DeployProtocol.Veda; DeployProtocol.Silo;

With Referral Code

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

Status Flow

IDLE → NEEDS_DEPLOY_AUTHORIZATION → READY → AWAITING_DEPOSIT
Last updated on