/** * Kadena Chain Adapter * * Builds Kadena Pact commands for coin.transfer, attaches Ed25519 * signatures from the FROST threshold signing network, and broadcasts * via the Kadena Chainweb Pact API. * * Kadena uses Ed25519 for signing. The signing payload is the Blake2b-256 * hash of the command JSON string (the "request key"). * * No external dependencies — uses native fetch and crypto. * * Account format: k: (keyset-governed accounts) * * @example * ```typescript * import { KadenaAdapter } from '@sequence0/sdk'; * * const kadena = new KadenaAdapter('mainnet'); * * const unsignedTx = await kadena.buildTransaction( * { to: 'k:abc...def', amount: '1.0', publicKey: 'abc...def' }, * 'k:abc...def' * ); * * // ... sign via FROST ed25519 ... * const signedTx = await kadena.attachSignature(unsignedTx, signatureHex); * const requestKey = await kadena.broadcast(signedTx); * ``` */ import { ChainAdapter, KadenaTransaction } from '../core/types'; export declare class KadenaAdapter implements ChainAdapter { private apiUrl; private network; private networkId; constructor(network?: 'mainnet' | 'testnet', apiUrl?: string); getRpcUrl(): string; /** * Build an unsigned Kadena Pact command for a coin.transfer. * * Constructs the command JSON with meta, payload, signers, and nonce. * The signing payload is the Blake2b-256 hash of the command JSON string. */ buildTransaction(tx: KadenaTransaction, fromAddress: string): Promise; /** * Extract the Blake2b-256 hash of the command JSON as the * Ed25519 signing payload. */ getSigningPayload(unsignedTx: string): string; /** * Attach an Ed25519 signature to the Kadena command. * * Places the signature in the sigs array matching the signer's pubkey. */ attachSignature(unsignedTx: string, signature: string): Promise; /** * Broadcast a signed Kadena command via the Pact /send endpoint. * * Constructs the signed command object and POSTs it to the Pact API. */ broadcast(signedTx: string): Promise; /** * Get KDA balance for an account on a specific chain. * * Uses the Pact /local endpoint to call coin.get-balance. */ getBalance(address: string, chainId?: string): Promise; /** * Poll for transaction result by request key. */ pollTransaction(requestKey: string, chainId?: string, timeoutMs?: number): Promise | null>; /** * Get the current cut (latest block heights across all chains). */ getCut(): Promise | null>; } /** Create a mainnet Kadena adapter */ export declare function createKadenaAdapter(apiUrl?: string): KadenaAdapter; /** Create a testnet Kadena adapter */ export declare function createKadenaTestnetAdapter(apiUrl?: string): KadenaAdapter; //# sourceMappingURL=kadena.d.ts.map