mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-24 20:49:27 +00:00
ae3525ca2c
Tracking issue: https://github.com/serai-dex/serai/issues/57
23 lines
646 B
Markdown
23 lines
646 B
Markdown
# Bitcoin
|
|
|
|
### Addresses
|
|
|
|
Bitcoin addresses are an enum, defined as follows:
|
|
|
|
- `p2pkh`: 20-byte hash.
|
|
- `p2sh`: 20-byte hash.
|
|
- `p2wpkh`: 20-byte hash.
|
|
- `p2wsh`: 32-byte hash.
|
|
- `p2tr`: 32-byte key.
|
|
|
|
### In Instructions
|
|
|
|
Bitcoin In Instructions are present via the transaction's last output in the
|
|
form of `OP_RETURN`, and accordingly limited to 80 bytes. `origin` is
|
|
automatically set to the transaction's first input's address, if recognized.
|
|
If it's not recognized, an address of the multisig's current Bitcoin address is
|
|
used, causing any failure to become a donation.
|
|
|
|
### Out Instructions
|
|
|
|
Out Instructions ignore `data`.
|