River Intelligence

Sign up for our curated weekly newsletter delivering exclusive market insights to your inbox.

Invest in Bitcoin.

green checkmark

Human Support

green checkmark

Track Performance

green checkmark

Recurring Buys

Script Type Heuristic


The Script Type Heuristic is utilized in chain analysis in order to determine which outputs of a transaction are sending to another party and which are returning bitcoin to the sender as change. This heuristic is based on the assumption that all wallets and users will use the same script type to receive payments and change outputs.

For example, if a user receives a payment to a P2PKH address and then spends this output to create two outputs, one to a P2SH address and one to a P2PKH address, it can be assumed that the P2SH output now belongs to another party while the P2PKH output is a change output and still belongs to the sender.

Like all chain analysis heuristics, this is an assumption, and does not carry any certitude. Additionally, the Taproot upgrade and future upgrades to the Bitcoin protocol may render this heuristic useless as transaction types become less discernible.