UNPKG

@ledgerhq/hw-app-vet

Version:
39 lines 1.34 kB
/// <reference types="node" /> /// <reference types="node" /> import type Transport from "@ledgerhq/hw-transport"; import { StatusCodes } from "./constants"; import { Buffer } from "buffer"; /** * VeChain API * * @example * import Vet from "@ledgerhq/hw-app-vet"; * const vet = new Vet(transport) */ export default class Vet { transport: Transport; constructor(transport: Transport, scrambleKey?: string); getAppConfiguration(): Promise<any>; /** * get VeChain address for a given BIP 32 path. * @param path a path in BIP 32 format * @option display * @option chainCode * @return an object with a publicKey and address * @example * vet.getAddress("m/44'/818'/0'/0").then(o => o.address) */ getAddress(path: string, display?: boolean, chainCode?: boolean, statusCodes?: StatusCodes[]): Promise<{ publicKey: string; address: string; chainCode?: string; }>; /** * You can sign a transaction and retrieve v, r, s given the raw transaction and the BIP 32 path of the account to sign. * * @param path: the BIP32 path to sign the transaction on * @param rawTxHex: the raw vechain transaction in hexadecimal to sign */ signTransaction(path: string, rawTxHex: string): Promise<Buffer>; } //# sourceMappingURL=Vet.d.ts.map