mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Move docs to spec
This commit is contained in:
23
spec/integrations/Bitcoin.md
Normal file
23
spec/integrations/Bitcoin.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# 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`.
|
||||
Reference in New Issue
Block a user