async def sign_message(ctx, msg, keychain): await paths.validate_path(ctx, validate_full_path, path=msg.address_n) await require_confirm_sign_message(ctx, msg.message) node = keychain.derive(msg.address_n, LISK_CURVE) seckey = node.private_key() pubkey = node.public_key() pubkey = pubkey[1:] # skip ed25519 pubkey marker signature = ed25519.sign(seckey, message_digest(msg.message)) return LiskMessageSignature(public_key=pubkey, signature=signature)
async def sign_message(ctx, msg, keychain): await paths.validate_path(ctx, keychain, msg.address_n) await confirm_signverify(ctx, "Lisk", decode_message(msg.message)) node = keychain.derive(msg.address_n) seckey = node.private_key() pubkey = node.public_key() pubkey = pubkey[1:] # skip ed25519 pubkey marker signature = ed25519.sign(seckey, message_digest(msg.message)) return LiskMessageSignature(public_key=pubkey, signature=signature)
async def sign_message(ctx, msg): message = msg.message address_n = msg.address_n or () await require_confirm_sign_message(ctx, message) node = await seed.derive_node(ctx, address_n, LISK_CURVE) seckey = node.private_key() pubkey = node.public_key() pubkey = pubkey[1:] # skip ed25519 pubkey marker signature = ed25519.sign(seckey, message_digest(message)) return LiskMessageSignature(public_key=pubkey, signature=signature)