import type { TransactionSigner } from '@chainlink/ccip-sdk/src/canton/provider.ts'; import { type Logger, type SinglePartySignatures } from '@chainlink/ccip-sdk/src/index.ts'; /** * Wallet object returned by {@link loadCantonWallet}. * * `signer` is the external signer (e.g. Ledger) handed to the SDK's * {@link CantonJsonRpcProvider}, which then runs the interactive submission * flow (prepare → sign → execute). Without it, submissions are * JWT-authenticated direct submits. */ export interface CantonWalletWithSigner { party: string; signer?: TransactionSigner; } export declare class CantonLedgerSigner implements TransactionSigner { private readonly party; private readonly derivationPath; private readonly cantonSigner; private readonly fingerprint; private constructor(); static create(derivationPath: string, party: string): Promise; signTxHash(hash: Uint8Array): Promise; /** * Check transport response for errors and throw appropriate exceptions * @private */ private checkTransportResponse; /** * Extract response data from transport response * APDU responses have format: [data][status_code(2_bytes)] * @private */ private extractResponseData; /** * Parse signature response - handles both TLV format (onboarding) and single signatures * @private */ private parseSignatureResponse; /** * Serialize a BIP-32 path string to a data buffer for Canton BOLOS * @private */ private serializeBipPath; } /** * An Ed25519 {@link TransactionSigner} for Canton external signing. * * Accepts a 32-byte Ed25519 seed (private key) and a Daml party ID, producing * the {@link PartySignatures} structure expected by the Canton interactive * submission API. * * The key fingerprint is computed using Canton's algorithm: * `hex( 0x12 0x20 || sha256( [0,0,0,12] || publicKeyBytes ) )` * * @example * ```ts * const signer = new Ed25519TransactionSigner(seedHex, partyId) * const wallet: CantonWallet = { party: partyId, signer } * await cantonChain.sendMessage({ wallet, ... }) * ``` */ export declare class Ed25519TransactionSigner implements TransactionSigner { private readonly privateKeyObject; private readonly fingerprint; private readonly party; /** * Creates a new Ed25519 transaction signer. * @param privateKeyHex - 64-character hex string representing the 32-byte Ed25519 seed. * @param party - The Daml party ID this signer acts on behalf of. */ constructor(privateKeyHex: string, party: string); /** * Sign a prepared transaction hash. * * @param hash - Raw hash bytes from the prepare response. * @returns SinglePartySignatures ready for the execute submission request. */ signTxHash(hash: Uint8Array): Promise; /** Returns the Canton key fingerprint for this signer. */ getFingerprint(): string; } /** * Resolve a Canton wallet from CLI argv. * * The `party` is sourced from the Canton config file. Canton sends use * JWT-authenticated direct submit (no external signer); the `--wallet` flag * is accepted but ignored on Canton lanes. */ export declare function loadCantonWallet({ cantonConfig, wallet: walletOpt, interactive, }: { cantonConfig?: string; wallet?: unknown; interactive?: boolean; }, logger?: Logger): Promise; //# sourceMappingURL=wallet.d.ts.map