import type { HttpClient } from "../http.js"; import type { NetworkId } from "../chains/index.js"; import type { ActiveSessionMetadata, KeyCreateResponse, KeyPurpose, KeyRecord } from "../types/index.js"; import { type EventsOptions } from "./updates.js"; import type { Event } from "../types/index.js"; export interface KeyCreateParams { purpose: KeyPurpose; /** Decimal USD amount, serialized exactly to 6-decimal USDC atomic units. */ budgetUsd?: string; /** 6-decimal USDC atomic amount. Must be a base-10 integer string. */ budgetWei?: string; durationHours?: number; expiresAt?: number; network?: NetworkId; name?: string; } export interface KeyListParams { userAddress: string; } export declare class KeysResource { private readonly client; private readonly ctx; private readonly events; constructor(client: HttpClient, ctx: { getWallet(): { address: string; network: NetworkId; }; getWalletMaybe(): { address: string | null; network: NetworkId | null; }; setToken(token: string): void; getToken(): string | null; clearToken(): void; }); create(input: KeyCreateParams): Promise; getActive(input?: { network?: NetworkId; }): Promise; list(input: KeyListParams): Promise; subscribe(options: EventsOptions): AsyncIterable; /** * Inspect a specific key. Requires the SDK to hold a valid Compose Key * token (via `keys.use(token)`, `keys.create(...)`, or the constructor). * The server authorises based on JWT-owner matching the key's owner, so * any live token for the same wallet is sufficient. */ get(keyId: string): Promise; /** * Revoke a key. Requires the SDK to hold a valid Compose Key token for * the same wallet. The server accepts either the target key's own JWT or * any other live JWT belonging to the same owner (so users can revoke * their API keys using their active session token, and vice versa). */ revoke(keyId: string): Promise<{ success: boolean; keyId: string; }>; use(token: string): void; currentToken(): string | null; clearToken(): void; } //# sourceMappingURL=keys.d.ts.map