import { type ResponseAddress, type ResponseBase, type ResponseTokenInfo, type ResponseTokenRegistrySize } from "./types"; /** * Flattens a thrown error into the plain `{ returnCode, errorMessage }` value this SDK * has always resolved to. * * `processErrorResponse` returned a plain object through `@zondax/ledger-js` 0.2.x. At * 2.0.0 it returns a `ResponseError`, which is an `Error` subclass, and the difference is * observable in two ways that reach callers: * * - `structuredClone` keeps only an Error's `name` / `message` / `stack`, so `returnCode` * and `errorMessage` come back `undefined`. That is the algorithm behind `postMessage`, * web workers and Electron IPC -- all of which sit between this SDK and a UI in practice. * - `resp instanceof Error` is a common stand-in for "this threw". An error returned as a * *value* would now answer yes to it. * * Every rejection path in this package routes through here so neither changes. */ export declare function toResponse(e: unknown): ResponseBase; export declare function processGetAddrResponse(response: Buffer): ResponseAddress; export declare function processTokenRegistrySizeResponse(response: Buffer): ResponseTokenRegistrySize; export declare function processTokenInfoResponse(response: Buffer): ResponseTokenInfo | null;