mirror of
https://github.com/FlipsideCrypto/fsc-utils.git
synced 2026-02-06 10:56:49 +00:00
tezos
This commit is contained in:
parent
e70decf570
commit
f8c0f3bdca
@ -289,7 +289,7 @@ def transform_hex_to_algorand(input):
|
||||
|
||||
import hashlib
|
||||
|
||||
def transform_hex_to_tezos(input, prefix='tz1'):
|
||||
def transform_hex_to_tezos(input, prefix):
|
||||
if input is None or not input.startswith('0x'):
|
||||
return 'Invalid input'
|
||||
|
||||
@ -306,7 +306,10 @@ def transform_hex_to_tezos(input, prefix='tz1'):
|
||||
'tz3': '06a1a4' # P-256
|
||||
}
|
||||
|
||||
prefix_bytes = bytes.fromhex(prefixes.get(prefix, '06a19f'))
|
||||
if prefix not in prefixes:
|
||||
return 'Invalid prefix'
|
||||
|
||||
prefix_bytes = bytes.fromhex(prefixes[prefix])
|
||||
|
||||
prefixed_hash = prefix_bytes + hash_bytes
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user