Exemplo n.º 1
0
async def get_public_key(ctx, msg: EosGetPublicKey, keychain):
    await paths.validate_path(ctx, validate_full_path, keychain, msg.address_n,
                              CURVE)

    node = keychain.derive(msg.address_n)
    wif, public_key = _get_public_key(node)
    if msg.show_display:
        await require_get_public_key(ctx, wif)
    return EosPublicKey(wif, public_key)
Exemplo n.º 2
0
async def get_public_key(ctx: wire.Context, msg: EosGetPublicKey,
                         keychain: Keychain) -> EosPublicKey:
    await paths.validate_path(ctx, keychain, msg.address_n)

    node = keychain.derive(msg.address_n)
    wif, public_key = _get_public_key(node)
    if msg.show_display:
        await require_get_public_key(ctx, wif)
    return EosPublicKey(wif_public_key=wif, raw_public_key=public_key)