@zondax/ledger-icp
Version:
Node API for the Internet Computer App (Ledger Nano S/X/S+/Stax/Flex)
24 lines (23 loc) • 1.61 kB
TypeScript
import { type ICPIns, type ResponseAddress, type ResponseSign, type ResponseSignUpdateCall, type ResponseTokenRegistry, type ResponseTokenRegistrySize } from "./types";
import GenericApp, { type Transport } from "@zondax/ledger-js";
export * from "./types";
export { SIGN_VALUES_P2 } from "./consts";
export default class InternetComputerApp extends GenericApp {
readonly INS: ICPIns;
constructor(transport: Transport);
getAddressAndPubKey(path: string): Promise<ResponseAddress>;
showAddressAndPubKey(path: string): Promise<ResponseAddress>;
signSendChunk(chunkIdx: number, chunkNum: number, chunk: Buffer, txtype: number, ins: number): Promise<ResponseSign>;
sign(path: string, message: Buffer, txtype: number): Promise<ResponseSign>;
signSendChunkUpdateCall(chunkIdx: number, chunkNum: number, chunk: Buffer, txtype: number): Promise<ResponseSignUpdateCall>;
signUpdateCall(path: string, request: Buffer, checkStatus: Buffer, txtype: number): Promise<ResponseSignUpdateCall>;
sendChunk(chunkIdx: number, chunkNum: number, chunk: Buffer, ins: number): Promise<import("@zondax/ledger-js").ResponseBase | {
returnCode: number;
errorMessage: string;
}>;
sendData(path: string, data: string, instruction: number): Promise<ResponseSign>;
sendCertificateAndSig(path: string, data: string): Promise<ResponseSign>;
signBls(path: string, consent_request: string, canister_call: string, certificate: string): Promise<ResponseSign>;
_getTokenRegistrySize(): Promise<ResponseTokenRegistrySize>;
tokenRegistry(): Promise<ResponseTokenRegistry>;
}