@zondax/ledger-filecoin
Version:
Node API for the Filecoin App (Ledger Nano S+, X, Stax and Flex)
47 lines (46 loc) • 1.61 kB
TypeScript
import type Transport from '@ledgerhq/hw-transport';
import BaseApp, { BIP32Path, INSGeneric } from '@zondax/ledger-js';
import { ResponseAddress, ResponseSign } from './types';
export declare class FilecoinApp extends BaseApp {
private eth;
static _INS: {
GET_VERSION: number;
GET_ADDR_SECP256K1: number;
SIGN_SECP256K1: number;
SIGN_RAW_BYTES: number;
SIGN_PERSONAL_MESSAGE: number;
};
static _params: {
cla: number;
ins: INSGeneric;
p1Values: {
ONLY_RETRIEVE: 0;
SHOW_ADDRESS_IN_DEVICE: 1;
};
chunkSize: number;
requiredPathLengths: number[];
};
constructor(transport: Transport);
private parseAddressResponse;
getAddressAndPubKey(path: string): Promise<ResponseAddress>;
showAddressAndPubKey(path: string): Promise<ResponseAddress>;
private _sign;
sign(path: BIP32Path, blob: Buffer): Promise<ResponseSign>;
signRawBytes(path: BIP32Path, message: Buffer): Promise<ResponseSign>;
signPersonalMessageFVM(path: BIP32Path, messageHex: Buffer): Promise<ResponseSign>;
signETHTransaction(path: BIP32Path, rawTxHex: string, resolution?: null): Promise<{
s: string;
v: string;
r: string;
}>;
getETHAddress(path: BIP32Path, boolDisplay?: boolean, boolChaincode?: boolean): Promise<{
publicKey: string;
address: string;
chainCode?: string;
}>;
signPersonalMessageEVM(path: BIP32Path, messageHex: string): Promise<{
v: number;
s: string;
r: string;
}>;
}