@ledgerhq/hw-app-tezos
Version:
Ledger Hardware Wallet Tezos Application API
54 lines • 1.75 kB
TypeScript
import type Transport from "@ledgerhq/hw-transport";
export declare const TezosCurves: {
ED25519: number;
SECP256K1: number;
SECP256R1: number;
};
export type Curve = (typeof TezosCurves)[keyof typeof TezosCurves];
export type GetAddressResult = {
address: string;
publicKey: string;
};
export type SignOperationResult = {
signature: string;
};
export type GetVersionResult = {
major: number;
minor: number;
patch: number;
bakingApp: boolean;
};
/**
* Tezos API
*
* @example
* import Tezos from "@ledgerhq/hw-app-tezos";
* const tez = new Tezos(transport)
*/
export default class Tezos {
transport: Transport;
constructor(transport: Transport);
/**
* get Tezos address for a given BIP 32 path.
* @param path a path in BIP 32 format, must begin with 44'/1729'
* @option options.verify optionally enable or not the display
* @option options.curve
* @option options.ins to use a custom apdu. This should currently only be unset (which will choose
an appropriate APDU based on the boolDisplay parameter), or else set to 0x0A
for the special "display" APDU which uses the alternate copy "Your Key"
* @return an object with address, publicKey
* @example
* tez.getAddress("44'/1729'/0'/0'").then(o => o.address)
* tez.getAddress("44'/1729'/0'/0'", { verify: true })
*/
getAddress(path: string, options?: {
verify?: boolean;
curve?: Curve;
ins?: number;
}): Promise<GetAddressResult>;
signOperation(path: string, rawTxHex: string, options?: {
curve?: Curve;
}): Promise<SignOperationResult>;
getVersion(): Promise<GetVersionResult>;
}
//# sourceMappingURL=Tezos.d.ts.map