UNPKG

@ledgerhq/coin-tezos

Version:
43 lines 1.71 kB
import type { AccountLike } from "@ledgerhq/types-live"; import { Baker, Delegation } from "../types"; export type TezosApiBaker = { address: string; name: string; status: string; balance: number; features: TezosBakerFeature[]; delegation: { enabled: boolean; minBalance: number; fee: number; capacity: number; freeSpace: number; estimatedApy: number; features: TezosBakerFeature[]; }; staking: { enabled: boolean; minBalance: number; fee: number; capacity: number; freeSpace: number; estimatedApy: number; features: TezosBakerFeature[]; }; }; export type TezosBakerFeature = { title: string; content: string | unknown; }; export declare const cache: import("@ledgerhq/live-network/cache").CacheRes<[], Baker[]>; export declare const fetchAllBakers: () => Promise<Baker[]>; export declare const listBakersWithDefault: (whitelistAddresses: string[]) => Baker[]; export declare const listBakers: (whitelistAddresses: string[]) => Promise<Baker[]>; export declare function getBakerSync(addr: string): Baker | undefined; export declare function getAccountDelegationSync(account: AccountLike): Delegation | null | undefined; export declare function isAccountDelegating(account: AccountLike): boolean; export declare function loadBaker(addr: string): Promise<Baker | undefined>; export declare function loadAccountDelegation(account: AccountLike): Promise<Delegation | null | undefined>; export declare const asBaker: (data: TezosApiBaker) => Baker | undefined; export declare const hydrateBakers: (bakers: Baker[]) => void; //# sourceMappingURL=bakers.d.ts.map