1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 02:58:57 +00:00
trezor-firmware/common/tests/fixtures/cardano/get_native_script_hash.json

361 lines
9.6 KiB
JSON

{
"setup": {
"mnemonic": "all all all all all all all all all all all all",
"passphrase": ""
},
"tests": [
{
"description": "PUB_KEY script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
}
},
"result": {
"expected_hash": "29fb5fd4aa8cadd6705acc8263cee0fc62edca5ac38db593fec2f9fd"
}
},
{
"description": "PUB_KEY script containing a path",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
}
},
"result": {
"expected_hash": "29fb5fd4aa8cadd6705acc8263cee0fc62edca5ac38db593fec2f9fd"
}
},
{
"description": "ALL script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
}
},
"result": {
"expected_hash": "af5c2ce476a6ede1c879f7b1909d6a0b96cb2081391712d4a355cef6"
}
},
{
"description": "ALL script containing a path",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
}
},
"result": {
"expected_hash": "af5c2ce476a6ede1c879f7b1909d6a0b96cb2081391712d4a355cef6"
}
},
{
"description": "ALL script containing a 1855 path",
"parameters": {
"display_format": "POLICY_ID",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_path": "m/1855'/1815'/0'"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
}
},
"result": {
"expected_hash": "fbf6672eb655c29b0f148fa1429be57c2174b067a7b3e3942e967fe8"
}
},
{
"description": "ANY script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 2,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
}
},
"result": {
"expected_hash": "d6428ec36719146b7b5fb3a2d5322ce702d32762b8c7eeeb797a20db"
}
},
{
"description": "ANY script with a nested script containing a path",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 2,
"scripts": [
{
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
}
},
"result": {
"expected_hash": "d6428ec36719146b7b5fb3a2d5322ce702d32762b8c7eeeb797a20db"
}
},
{
"description": "N_OF_K script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 3,
"required_signatures_count": 2,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
},
{
"type": 0,
"key_hash": "cecb1d427c4ae436d28cc0f8ae9bb37501a5b77bcc64cd1693e9ae20"
}
]
}
},
"result": {
"expected_hash": "2b2b17fd18e18acae4601d4818a1dee00a917ff72e772fa8482e36c9"
}
},
{
"description": "N_OF_K script containing a path",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 3,
"required_signatures_count": 2,
"scripts": [
{
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
},
{
"type": 0,
"key_hash": "cecb1d427c4ae436d28cc0f8ae9bb37501a5b77bcc64cd1693e9ae20"
}
]
}
},
"result": {
"expected_hash": "2b2b17fd18e18acae4601d4818a1dee00a917ff72e772fa8482e36c9"
}
},
{
"description": "INVALID_BEFORE script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 4,
"invalid_before": 100
}
]
}
},
"result": {
"expected_hash": "c6262ef9bb2b1291c058d93b46dabf458e2d135f803f60713f84b0b7"
}
},
{
"description": "INVALID_HEREAFTER script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 5,
"invalid_hereafter": 200
}
]
}
},
"result": {
"expected_hash": "b12ac304f89f4cd4d23f59a2b90d2b2697f7540b8f470d6aa05851b5"
}
},
{
"description": "Nested script",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
},
{
"type": 2,
"scripts": [
{
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
},
{
"type": 3,
"required_signatures_count": 2,
"scripts": [
{
"type": 0,
"key_path": "m/1854'/1815'/0'/0/0"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
},
{
"type": 0,
"key_hash": "cecb1d427c4ae436d28cc0f8ae9bb37501a5b77bcc64cd1693e9ae20"
}
]
},
{
"type": 4,
"invalid_before": 100
},
{
"type": 5,
"invalid_hereafter": 200
}
]
}
},
"result": {
"expected_hash": "4a6b4288459bf34668c0b281f922691460caf0c7c09caee3a726c27a"
}
},
{
"description": "Nested script without paths and shared with Ledger",
"parameters": {
"display_format": "BECH32",
"native_script": {
"type": 1,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 2,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
}
]
},
{
"type": 3,
"required_signatures_count": 2,
"scripts": [
{
"type": 0,
"key_hash": "c4b9265645fde9536c0795adbcc5291767a0c61fd62448341d7e0386"
},
{
"type": 0,
"key_hash": "0241f2d196f52a92fbd2183d03b370c30b6960cfdeae364ffabac889"
},
{
"type": 0,
"key_hash": "cecb1d427c4ae436d28cc0f8ae9bb37501a5b77bcc64cd1693e9ae20"
}
]
},
{
"type": 4,
"invalid_before": 100
},
{
"type": 5,
"invalid_hereafter": 200
}
]
}
},
"result": {
"expected_hash": "0d63e8d2c5a00cbcffbdf9112487c443466e1ea7d8c834df5ac5c425"
}
}
]
}