mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-04 11:08:05 +01:00
142 lines
No EOL
8.3 KiB
JSON
142 lines
No EOL
8.3 KiB
JSON
{
|
|
"valid_test_cases": [
|
|
{
|
|
"asset": {
|
|
"version": 1,
|
|
"genesis_first_prev_out": "0101010101010101010101010101010101010101010101010101010101010101:1",
|
|
"genesis_tag": "asset",
|
|
"genesis_meta_hash": "0102030000000000000000000000000000000000000000000000000000000000",
|
|
"genesis_output_index": 1,
|
|
"genesis_type": 1,
|
|
"amount": 1,
|
|
"lock_time": 1337,
|
|
"relative_lock_time": 6,
|
|
"prev_witnesses": [
|
|
{
|
|
"prev_id": {
|
|
"out_point": "0101010101010101010101010101010101010101010101010101010101010101:1",
|
|
"asset_id": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
"script_key": "03a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f"
|
|
},
|
|
"tx_witness": null,
|
|
"split_commitment": {
|
|
"proof": "000197efb64d447880bacc7070f428a1310b2592d155b752da382934d4bd0fbb419a000000000000000affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f",
|
|
"root_asset": {
|
|
"version": 1,
|
|
"genesis_first_prev_out": "0101010101010101010101010101010101010101010101010101010101010101:1",
|
|
"genesis_tag": "asset",
|
|
"genesis_meta_hash": "0102030000000000000000000000000000000000000000000000000000000000",
|
|
"genesis_output_index": 1,
|
|
"genesis_type": 1,
|
|
"amount": 1,
|
|
"lock_time": 1337,
|
|
"relative_lock_time": 6,
|
|
"prev_witnesses": [
|
|
{
|
|
"prev_id": {
|
|
"out_point": "0202020202020202020202020202020202020202020202020202020202020202:2",
|
|
"asset_id": "0202020202020202020202020202020202020202020202020202020202020202",
|
|
"script_key": "03a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f"
|
|
},
|
|
"tx_witness": [
|
|
"02",
|
|
"02"
|
|
],
|
|
"split_commitment": null
|
|
}
|
|
],
|
|
"split_commitment_root": {
|
|
"hash": "0101010101010101010101010101010101010101010101010101010101010101",
|
|
"sum": "1337"
|
|
},
|
|
"script_version": 1,
|
|
"script_key": "02a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"group_key": {
|
|
"group_key": "03a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"group_key_sig": "e907831f80848d1069a5371b402410364bdf1c5f8307b0084c55f1ce2dca821525f66a4a85ea8b71e482a74f382d2ce5ebeee8fdb2172f477df4900d310536c0"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"split_commitment_root": null,
|
|
"script_version": 1,
|
|
"script_key": "02a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"group_key": {
|
|
"group_key": "03a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"group_key_sig": "e907831f80848d1069a5371b402410364bdf1c5f8307b0084c55f1ce2dca821525f66a4a85ea8b71e482a74f382d2ce5ebeee8fdb2172f477df4900d310536c0"
|
|
}
|
|
},
|
|
"expected": "000101014f010101010101010101010101010101010101010101010101010101010101010100000001056173736574010203000000000000000000000000000000000000000000000000000000000000000001010201010301010403fd053905010606fd024501fd02410065010101010101010101010101010101010101010101010101010101010101010100000001010101010101010101010101010101010101010101010101010101010101010103a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f02fd01d64a000197efb64d447880bacc7070f428a1310b2592d155b752da382934d4bd0fbb419a000000000000000affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffd0188000101014f010101010101010101010101010101010101010101010101010101010101010100000001056173736574010203000000000000000000000000000000000000000000000000000000000000000001010201010301010403fd05390501060670016e0065020202020202020202020202020202020202020202020202020202020202020200000002020202020202020202020202020202020202020202020202020202020202020203a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f0105020102010207280101010101010101010101010101010101010101010101010101010101010101000000000000053908020001092102a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f0a6103a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078fe907831f80848d1069a5371b402410364bdf1c5f8307b0084c55f1ce2dca821525f66a4a85ea8b71e482a74f382d2ce5ebeee8fdb2172f477df4900d310536c008020001092102a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f0a6103a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078fe907831f80848d1069a5371b402410364bdf1c5f8307b0084c55f1ce2dca821525f66a4a85ea8b71e482a74f382d2ce5ebeee8fdb2172f477df4900d310536c0",
|
|
"comment": "random split asset with root asset"
|
|
},
|
|
{
|
|
"asset": {
|
|
"version": 2,
|
|
"genesis_first_prev_out": "0202020202020202020202020202020202020202020202020202020202020202:2",
|
|
"genesis_tag": "asset",
|
|
"genesis_meta_hash": "0102030000000000000000000000000000000000000000000000000000000000",
|
|
"genesis_output_index": 2,
|
|
"genesis_type": 2,
|
|
"amount": 2,
|
|
"lock_time": 1337,
|
|
"relative_lock_time": 6,
|
|
"prev_witnesses": [
|
|
{
|
|
"prev_id": null,
|
|
"tx_witness": null,
|
|
"split_commitment": null
|
|
},
|
|
{
|
|
"prev_id": {
|
|
"out_point": "0000000000000000000000000000000000000000000000000000000000000000:0",
|
|
"asset_id": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
"script_key": "000000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
"tx_witness": null,
|
|
"split_commitment": null
|
|
},
|
|
{
|
|
"prev_id": {
|
|
"out_point": "0202020202020202020202020202020202020202020202020202020202020202:2",
|
|
"asset_id": "0202020202020202020202020202020202020202020202020202020202020202",
|
|
"script_key": "03a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f"
|
|
},
|
|
"tx_witness": [
|
|
"02",
|
|
"02"
|
|
],
|
|
"split_commitment": null
|
|
}
|
|
],
|
|
"split_commitment_root": null,
|
|
"script_version": 2,
|
|
"script_key": "02a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"group_key": null
|
|
},
|
|
"expected": "000102014f020202020202020202020202020202020202020202020202020202020202020200000002056173736574010203000000000000000000000000000000000000000000000000000000000000000002020201020301020403fd053905010606d9030067006500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006e0065020202020202020202020202020202020202020202020202020202020202020200000002020202020202020202020202020202020202020202020202020202020202020203a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f0105020102010208020002092102a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"comment": "random asset with multiple previous witnesses"
|
|
},
|
|
{
|
|
"asset": {
|
|
"version": 0,
|
|
"genesis_first_prev_out": "0000000000000000000000000000000000000000000000000000000000000000:0",
|
|
"genesis_tag": "",
|
|
"genesis_meta_hash": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
"genesis_output_index": 0,
|
|
"genesis_type": 0,
|
|
"amount": 0,
|
|
"lock_time": 0,
|
|
"relative_lock_time": 0,
|
|
"prev_witnesses": null,
|
|
"split_commitment_root": null,
|
|
"script_version": 0,
|
|
"script_key": "02a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"group_key": null
|
|
},
|
|
"expected": "000100014a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002010003010008020000092102a0afeb165f0ec36880b68e0baabd9ad9c62fd1a69aa998bc30e9a346202e078f",
|
|
"comment": "minimal asset"
|
|
}
|
|
],
|
|
"error_test_cases": null
|
|
} |