Bid PSBT
If you would like to manually construct bid transactions, you can use the Spaces Wallet CLI to get the bid contract signature for the auctioned space output, total burned and other details:
$ space-cli getspace myspacename
The bid PSBT spends an auctioned space output and refunds the previous bidder's burned coins. Bid PSBTs must follow the exact structure defined here otherwise it would not be possible to re-construct it from the compressed form:
Field | Value |
---|---|
Version | 2 |
Lock Time | 0 |
Input
Field | Value |
---|---|
Previous Output |
|
Sequence |
|
Sighash type |
|
Output
Field | Value |
---|---|
Script Pubkey |
|
Value |
|
Where:
prev_txid:prev_index
refers to the transaction ID and output index of the previous auctioned space UTXO.total_burned
is the total amount of coins burned during the auction until this point.prev_value
is the value of the previous output (prev_txid:prev_index
)prev_script_pubkey
the exact p2tr script pubkey of (prev_txid:prev_index
)
Compressing Bid PSBT to 65 bytes
To fit the PSBT into a single OP_RETURN (80-byte limit), we:
Omit known details (tx version, input sequence, lock time).
Use transactions with at least two unspent outputs for auctions (these outputs must be tracked by the protocol).
Encode information in this format:
Inputs | Outputs |
Previous Output: | Script Pubkey: |
Where:
prev_txid
: Transaction ID containing the UTXO to be auctionedprev_index
: Any output index fromprev_txid
(references the transaction)prev_index_2
: Index of the output to be auctioned (1 byte)64-byte sig
: Schnorr signaturebid_increment
: The current bid increment which equals the bid amount minus the total burned in prior bids and must be greater than zero
Total size: 65 bytes (1 byte + 64 bytes), fitting within the OP_RETURN limit.
Last updated