@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
12 lines • 943 B
TypeScript
import { Account as WalletAPIAccount } from "@ledgerhq/wallet-api-core";
import { TokenAccount, Account, AccountLike } from "@ledgerhq/types-live";
import { LiveAppManifest } from "../../platform/types";
/**
* Determines if a manifest uses (Ledger Live) account ID format or UUID (Wallet API) format.
* @param manifest - The live app manifest to check
* @returns true if the manifest uses encoded format (v3+ dapp), false otherwise
*/
export declare function usesEncodedAccountIdFormat(manifest: LiveAppManifest): boolean;
/** The dapp connector "v3" uses the ledger live account ID to find the correct account. Live app and dapp browser manifests require wallet API ID. */
export declare function deriveAccountIdForManifest(accountId: Account["id"] | TokenAccount["id"] | AccountLike["id"], walletApiAccountId: WalletAPIAccount["id"] | string, manifest: LiveAppManifest): string;
//# sourceMappingURL=deriveAccountIdForManifest.d.ts.map