Withdraw from L2 to Bitcoin
Transfers tokens from the L2's balance to a user by proving the existence of a withdrawal in the L2's withdrawal tree
TODO: Add full documentation of parameters and link reference implementation repo.
Pseudo Schema
{
"p": "brc-21",
"op": "l2withdraw",
"l2id": "7"
"tick": "ordi",
"amt": "100"
"proof": <merkle proof from withdrawal tree root pointing to withdrawal>
}
The operation is a NOOP if the proof is invalid, root of withdrawal tree is invalid or the L2's balance of the token is overdrawn (the latter case is only possible if the L2's circuit was written incorrectly).
Note: this marks the withdrawal leaf as used (i.e one time use)