On the blockchain of the UTXO model, assets can be compared to coins in wallets in the real world. Each coin is independent. Correspondingly, a person may hold many UTXOs at the same time, and each UTXO can Use a different key.
This poses a challenge to digital currency wallets, and it is no longer possible to transfer all of the user's assets by simply transferring a private key. We desperately need a new format to describe exactly a UTXO.
Taking Bitcoin as an example, we need the following information to spend a UTXO:
- previous_txid transaction that generated this UTXO
- previous_index The position of this UTXO
- lock_script the lock script for this UTXO
- unlock_script the script to unlock this UTXO
So if a UTXO is represented in json format, it can be like this:
{
"txid": "...",
"index": 0,
"lock": "...",
"unlock": "..."
}
Some people say that merkle proof can also be added to this structure, so that combined with the Block Header service, it is possible to verify whether this UTXO is (once) on the chain.
But if it's just for transferring UTXO between different wallets, I think this is enough.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。