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
| 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
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_DEPOSITLast updated on