Flow
The API interactions to stake are outlined below. TLDR is:
- Intent to stake by signing a message a 3 PBST
- Delegate on Babylon Chain. And once confirmed…
- Stake your BTC by locking them up
Staking Intent
You get back 2 PSBT and a message. All 3 unsigned.
- Proof of ownership of Babylon address (message)
- Slashing tx (PSBT)
- Unbonding tx (PSBT)
You also get a UUID for the stake (this will allow you to get back this response later without needing to start over)
The state moves to initialized
Delegate
Pass the 3 signed values from above
Get back a Babylon Chain MsgCreateBTCDelegation
to sign and broadcast (Cosmos style tx)
The state moves to waiting_for_delegation