import { PublicKeyInformationAlgorithmEnum } from '@fireblocks/ts-sdk'; import { SigningStatus, KeyIdentifier } from '@canton-network/core-signing-lib'; interface FireblocksKey { name: string; publicKey: string; derivationPath: number[]; algorithm: PublicKeyInformationAlgorithmEnum; } export interface FireblocksTransaction { txId: string; status: SigningStatus; createdAt?: number; signature?: string | undefined; publicKey?: string | undefined; derivationPath: number[]; } export interface FireblocksApiKeyInfo { apiKey: string; apiSecret: string; } export declare class FireblocksHandler { private defaultClient; private clients; private keyInfoByPublicKey; private publicKeyByDerivationPath; private getClient; constructor(defaultKey: FireblocksApiKeyInfo | undefined, userKeys: Map, apiPath?: string); /** * Get all public keys which correspond to Fireblocks vault accounts. This will * also refresh the key cache. * @returns List of Fireblocks public key information */ getPublicKeys(userId: string | undefined): Promise; /** * Takes a Fireblocks response from a transactions call and extracts the transaction information * relevant to the Wallet Gateway. This will potentially fetch the public key since unsigned transactions * do not include it * @returns FireblocksTransaction */ private formatTransaction; /** * Looks up or fetches the public key (only) for a given derivation path * @returns The public key as a string */ private lookupPublicKey; /** * Fetch a single RAW transaction from Fireblocks by its transaction ID * @returns FireblocksTransaction or undefined if not found */ getTransaction(userId: string | undefined, txId: string): Promise; /** * Get all RAW transactions from Fireblocks. Returns an async generator as * this may return a large number of transactions and will occasionally need to * refresh the key cache. * @returns AsyncGenerator of FireblocksTransactions */ getTransactions(userId: string | undefined, { limit, before, }?: { limit?: number; before?: number; }): AsyncGenerator; /** * Sign a transaction using a public key * @param userId - id of a user to get respective client and keys * @param txHash - Hash of the transaction to sign * @param keyIdentifier - The key identifier (must include publicKey) * @param externalTxId - The transaction ID assigned by the Wallet Gateway * @return The transaction object from Fireblocks */ signTransaction(userId: string | undefined, txHash: string, keyIdentifier: KeyIdentifier, externalTxId?: string): Promise; } export {}; //# sourceMappingURL=fireblocks.d.ts.map