BTC Deposit and Deploy
The BTC Deposit and Deploy action combines depositing and vault deployment. When BTC is received, BTC.b 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 depositAndDeploy = sdk.chain.btc.depositAndDeploy({
destChain: Chain.AVALANCHE,
assetOut: AssetId.BTCb,
protocol: DeployProtocol.Silo,
});
await depositAndDeploy.prepare({
amount: '0.1',
recipient: '0x1234567890abcdef1234567890abcdef12345678',
});
await depositAndDeploy.authorizeDeposit();
const depositAddress = await depositAndDeploy.generateDepositAddress();
// depositAddress: 'bc1q...'Parameters
Deposit and Deploy Options
| Parameter | Type | Required | Description |
|---|---|---|---|
destChain | Chain | Yes | Destination chain (e.g., Chain.AVALANCHE) |
assetOut | AssetId | Yes | Output asset (AssetId.BTCb) |
protocol | DeployProtocol | Yes | Target vault protocol (e.g., DeployProtocol.Silo) |
Prepare Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount in BTC |
recipient | string | Yes | Destination address |
referralCode | string | No | Referral code for attribution |
With Referral Code
await depositAndDeploy.prepare({
amount: '0.1',
recipient: '0x1234567890abcdef1234567890abcdef12345678',
referralCode: 'PARTNER123',
});Status Flow
IDLE → NEEDS_DEPLOY_AUTHORIZATION → READY → AWAITING_DEPOSITLast updated on