BTC deposit addresses

This section explains how to generate and reuse BTC deposit addresses.


Overview

When staking BTC, the SDK generates a unique deposit address. These addresses are:

  • Chain-specific — Bound to a destination chain, partnerId and recipient

  • Reusable — Can receive multiple deposits

  • Signature-bound — Tied to the authorization signature (for Ethereum Mainnet)


Generating a Deposit Address

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...'

Checking for Existing Address

Use the API to check if a deposit address already exists.


Reusing Addresses

Deposit addresses can receive multiple deposits. Each deposit is processed independently.


Address Expiration

BTC deposit addresses do not expire. However, fee authorization signatures for Ethereum Mainnet may expire after a defined period. When a signature expires, re-authorization is required before generating a new address.


Multiple Chains

Each destination chain requires its own deposit address.

Last updated