@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
68 lines • 2.33 kB
TypeScript
import type { TActivity } from '@turnkey/sdk-server';
import { TurnkeyServerClient } from '@turnkey/sdk-server';
/**
* Log Turnkey operation error safely without exposing sensitive data
* Accepts unknown errors from catch blocks and safely extracts error messages
*/
export declare function logTurnkeyError(operation: string, error: unknown): void;
/**
* Validate that a Turnkey activity completed successfully
* The Turnkey SDK polls internally until the activity completes or max retries are reached.
* If we receive a non-completed status, it indicates an SDK bug or request error.
*/
export declare function validateTurnkeyActivityCompleted(activity: TActivity, operationType: string): void;
/**
* Default Turnkey API base URL
*/
export declare const DEFAULT_TURNKEY_API_BASE_URL = "https://api.turnkey.com";
/**
* Unified Turnkey configuration for both Sealevel and EVM keys
* The publicKey field contains:
* - For Sealevel: base58-encoded Solana public key
* - For EVM: hex-encoded Ethereum address
*/
export type TurnkeyConfig = {
organizationId: string;
apiPublicKey: string;
apiPrivateKey: string;
privateKeyId: string;
publicKey: string;
apiBaseUrl?: string;
};
/**
* Shared Turnkey client manager
* Handles initialization, health checks, and provides access to the Turnkey client
*
* This class is used by all VM-specific signers via composition rather than inheritance,
* allowing each signer to extend/implement their VM-specific base classes while
* still sharing common Turnkey functionality.
*
* @example
* ```typescript
* const manager = new TurnkeyClientManager(config);
* await manager.healthCheck();
* const client = manager.getClient();
* ```
*/
export declare class TurnkeyClientManager {
private readonly client;
private readonly config;
constructor(config: TurnkeyConfig);
/**
* Get a copy of the configuration (for creating new signer instances)
*/
getConfig(): TurnkeyConfig;
/**
* Get the Turnkey client (for signing operations)
*/
getClient(): TurnkeyServerClient;
/**
* Get organization ID
*/
getOrganizationId(): string;
/**
* Check if Turnkey is properly configured and accessible
*/
healthCheck(): Promise<boolean>;
}
//# sourceMappingURL=turnkeyClient.d.ts.map