PQGrind Docs

Transfers and splits

There is no transfer message. A transfer is a Bitcoin transaction whose inputs and outputs are ordered so that marked satoshis land where you want them (Units ride on satoshis).

Template

inputs   [ unit output(s) ………… ][ fee-paying input(s) ]
outputs  [ recipient(s) in order ][ your change ]

Unit inputs first, fee inputs after. Then the marked ranges sit at the start of the line and fill the first outputs in order.

Example: split 1,000 units into 600 + 400

Starting point: output 03b4ed47…834f:0, value 1,000 sat, marked [0, 1,000); a plain coin of 50,000 sat to pay the fee.

inputs   in0  03b4ed47…834f:0   1,000 sat  marked [0, 1,000)
         in1  <plain coin>     50,000 sat
outputs  out0 → A                 600 sat  → gets [0, 600)
         out1 → B                 400 sat  → gets [0, 400)
         out2 → change         49,520 sat  (fee 480 sat ≈ 2 sat/vB × ≈ 240 vB)

Commands:

bitcoin-cli createpsbt \
  '[{"txid":"03b4ed472bd5a7b80120409beab9d2e80976c33355b023cf43e56b632f1d834f","vout":0},
    {"txid":"<plain txid>","vout":<n>}]' \
  '[{"<address A>":0.00000600},{"<address B>":0.00000400},{"<change address>":0.00049520}]' > xfer.psbt
bitcoin-cli walletprocesspsbt "$(cat xfer.psbt)" | jq -r .psbt > xfer.signed.psbt
bitcoin-cli finalizepsbt "$(cat xfer.signed.psbt)" | jq -r .hex > xfer.hex
bitcoin-cli decoderawtransaction "$(cat xfer.hex)" | jq '[.vin[] | .txid + ":" + (.vout|tostring)], [.vout[] | .value]'

Expected output — confirm the order before broadcasting:

[ "03b4ed47…834f:0", "<plain txid>:<n>" ]
[ 0.00000600, 0.00000400, 0.00049520 ]
bitcoin-cli sendrawtransaction "$(cat xfer.hex)"

createpsbt keeps the order you give. walletcreatefundedpsbt may add inputs and move change; if you use it, check the decoded order again.

Rules

Rule Reason
Every output ≥ dust: 294 sat (P2WPKH), 330 sat (P2TR) Bitcoin relay policy
An output gets units only up to its own value the cut is by satoshis
Total output value ≥ total marked satoshis that should survive anything beyond the last output is fee and is burned
Put no PQSB OP_RETURN in transfers not needed; it makes the transaction a mint candidate and a rejection record

Sending all units of an output

Same template with one recipient of value ≥ the units, e.g. [out0 → B 1,000 sat][out1 change].

Burning on purpose

Put the marked satoshis into an OP_RETURN output of matching value, or leave them unassigned so they fall into the fee. Both count as burned.