Build MsgCreateBTCDelegation from signed BTC items (Exchange 2)

Assemble a MsgCreateBTCDelegation Babylon transaction from signed BTC items.

This is step 3 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 (you are here)
  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:

  • Session state from step 1
  • Signed slashing PSBT, signed unbonding slashing PSBT
  • POP signature (base64)
  • Signed staking PSBT
  • Original staking parameters (address, public key, amount, timelock)

Returns:

  • Unsigned Babylon (Cosmos) transaction in base64 (to be signed with Babylon key in step 4)
  • Signed Bitcoin staking transaction in hex (to be broadcast in step 6, after delegation is verified in step 5)
Body Params
sessionState
object
required

Session state from Exchange 1 response

string
required

Hex-encoded signed slashing PSBT

string
required

Hex-encoded signed unbonding slashing PSBT

string
required

Base64-encoded Proof of Possession signature

string
required

Hex-encoded signed staking PSBT

string
required

BTC address of the staker (needed to determine POP signature type)

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

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