/** * Framework-agnostic CIP-30 primitives — wallet discovery + enable. Zero dependencies and NO * cardano-address/decoding: returns raw CIP-30 values (hex addresses, CBOR balance); apps (or an * optional @cardano-sdk adapter) decode. Mirrors the established handle.me `walletConnector.ts`. */ /** CIP-30 `signData` result — a CIP-8 COSE_Sign1 signature + the COSE_Key, both hex. */ export interface Cip30DataSignature { signature: string; key: string; } /** CIP-30 pagination argument (`{ page, limit }`). */ export interface Cip30Paginate { page: number; limit: number; } /** * A connected CIP-30 wallet API. We `enable()` and return the wallet's object VERBATIM — no wrapper, * no proxy — so this type describes the full standard CIP-30 surface (not a subset). In particular * `signData` (CIP-8 / data signing), `getCollateral`, and `getExtensions` are all available; the * store only *calls* the few it needs internally, but consumers get the whole API typed. */ export interface Cip30Api { getNetworkId: () => Promise; getExtensions?: () => Promise<{ cip: number; }[]>; getChangeAddress: () => Promise; getRewardAddresses: () => Promise; getUsedAddresses: (paginate?: Cip30Paginate) => Promise; getUnusedAddresses: () => Promise; getUtxos: (amount?: string, paginate?: Cip30Paginate) => Promise; getCollateral?: (params?: { amount?: string; }) => Promise; getBalance: () => Promise; /** CIP-8 data signing — sign an arbitrary payload with the key for `address`. */ signData: (address: string, payload: string) => Promise; signTx: (tx: string, partialSign?: boolean) => Promise; submitTx: (tx: string) => Promise; cip95?: { getPubDRepKey: () => Promise; }; experimental?: Record; } /** `enable` options. `extensions` requests optional wallet extensions (e.g. CIP-95 governance). */ export interface Cip30EnableOptions { extensions?: { cip: number; }[]; } /** The injected, not-yet-enabled wallet object at `window.cardano[key]`. */ export interface Cip30WalletStub { name?: string; icon?: string; apiVersion?: string; enable?: (options?: Cip30EnableOptions) => Promise; } /** Discovered wallet, before connection. */ export interface Cip30WalletInfo { key: string; name: string; icon: string; apiVersion?: string; } /** List the CIP-30 wallets injected into `window.cardano`. */ export declare function listAvailableWallets(): Cip30WalletInfo[]; export declare class WalletNotFoundError extends Error { readonly walletKey: string; constructor(walletKey: string); } /** Enable (connect to) a wallet by its `window.cardano` key, returning its CIP-30 API. */ export declare function enableWallet(walletKey: string, options?: Cip30EnableOptions): Promise; //# sourceMappingURL=cip30.d.ts.map