Prepare BTC staking PSBTs and POP message (Exchange 1)

Prepare unsigned PSBTs and a Proof of Possession message for BTC staking on Babylon.

This is Exchange 1 of the BTC staking flow:

  1. POST transactions/prepare/pre-delegate — Server creates staking TX, slashing PSBTs, unbonding PSBTs, and a POP message
  2. Client signs the PSBTs and POP message with their BTC key
  3. POST transactions/prepare/delegate — Server assembles the MsgCreateBTCDelegation
  4. POST transactions/broadcast/babylon — Client signs and broadcasts the Babylon transaction
  5. GET stakes/:txId/status — Client polls until delegation reaches VERIFIED or ACTIVE state
  6. POST transactions/broadcast/bitcoin — Client broadcasts the signed Bitcoin staking transaction

Inputs Required:

  • Staker's BTC address and x-only public key
  • Staking amount (satoshis), timelock (blocks), and fee rate (sat/vB)
  • Staker's Babylon address (bbn prefix)

Returns:

  • Slashing and unbonding slashing PSBTs to sign
  • POP message and its expected signature type
  • Staking PSBT to sign
  • Session state to pass back in step 3
  • bitcoinStakingTxId to poll delegation status in step 5
Body Params
string
required

BTC address of the staker (native segwit or taproot)

string
required

32-byte x-only public key of the staker in hex

number
required

Staking amount in satoshis, validated against network params (currently min 0.005 BTC = 500000 sat)

number
required

Staking timelock in blocks

number
required

BTC fee rate in sat/vB

string
required

Babylon bech32 address (bbn prefix)

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json