You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/apps/lisk/get_public_key.py

19 lines
520 B

from trezor.messages.LiskPublicKey import LiskPublicKey
from apps.common import layout, paths
from apps.common.keychain import auto_keychain
@auto_keychain(__name__)
async def get_public_key(ctx, msg, keychain):
await paths.validate_path(ctx, keychain, msg.address_n)
node = keychain.derive(msg.address_n)
pubkey = node.public_key()
pubkey = pubkey[1:] # skip ed25519 pubkey marker
if msg.show_display:
await layout.show_pubkey(ctx, pubkey)
return LiskPublicKey(public_key=pubkey)