Sui Unstake
Burns LBTC on Sui and releases BTC to a Bitcoin address.
Basic Usage
import { createLombardSDK, Chain, AssetId } from '@lombard.finance/sdk';
const config = createConfig({
env: Env.testnet,
providers: {
sui: () => window.suiWallet,
},
});
const sdk = createLombardSDK(config);
const unstake = sdk.chain.sui.unstake({
destChain: Chain.BITCOIN_MAINNET,
assetIn: AssetId.LBTC,
assetOut: AssetId.BTC,
});
await unstake.prepare({
amount: '0.1',
recipient: 'bc1q...', // Bitcoin address
});
const result = await unstake.execute();
// result.txHash: Sui transaction hashParameters
Unstake Options
| Parameter | Type | Required | Description |
|---|---|---|---|
destChain | Chain | Yes | Bitcoin network |
assetIn | AssetId | Yes | AssetId.LBTC |
assetOut | AssetId | Yes | AssetId.BTC |
Prepare Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount in LBTC |
recipient | string | Yes | Bitcoin address |
Status Flow
IDLE → READY → CONFIRMING → COMPLETEDLast updated on