Keep the Bitcoin deposit address paired with its Liquid claim script

A peg-in workflow emits a Bitcoin destination and an Elements claim script in one response. Saving only the address can leave a later claim processor without the matching script.

Capture the pair before presenting the deposit address

Run the request on the intended sidechain wallet. Store the entire pair with the wallet and network identifiers. Present the mainchain_address to the parent-chain payment flow and retain claim_script for the sidechain claim.

elements-cli getpeginaddress | jq '{mainchain_address,claim_script}'

Distinguish address allocation from a completed peg-in

Receiving this response only prepares deposit instructions. It neither transfers BTC nor credits sidechain funds. Once a deposit is observed, track its actual transaction and proof against the stored pair. Replacing a lost script with one from a new address request will not reproduce the original commitment.

elementsproject.org getpeginaddress