/** * Flow Chain Adapter * * Builds Flow transactions using manual RLP encoding (no external deps), * signs with ECDSA_secp256k1 + SHA2-256 via FROST threshold signing, * and broadcasts via Flow Access API (REST). * * Flow signing scheme: SHA2-256 of ("FLOW-V0.0-transaction" domain tag + RLP payload) * Key algorithm: ECDSA_secp256k1 (algorithm ID 2 on Flow) * * No external dependencies required. */ import { ChainAdapter, FlowTransaction } from '../core/types'; export declare class FlowAdapter implements ChainAdapter { private rpcUrl; private network; constructor(network?: 'mainnet' | 'testnet', rpcUrl?: string); getRpcUrl(): string; /** * Build an unsigned Flow transaction. * * Fetches account info and latest block from the Flow Access API, * constructs a Cadence FlowToken.transfer transaction, and returns * the hex-encoded JSON envelope containing the RLP payload and metadata. */ buildTransaction(tx: FlowTransaction, fromAddress: string): Promise; /** * Extract the signing payload (SHA2-256 hash) from the unsigned transaction. * * Flow signing: SHA2-256(domainTag + RLP(payload)) * The hash is computed during buildTransaction and stored in the envelope. */ getSigningPayload(unsignedTx: string): string; /** * Attach a secp256k1 ECDSA signature to the Flow transaction envelope. * * For simple transactions where proposer = payer = authorizer, * the signature goes into the envelope signatures list. */ attachSignature(unsignedTx: string, signature: string): Promise; /** * Broadcast a signed Flow transaction via the Access API. * * POST /v1/transactions with the signed transaction in the expected format. */ broadcast(signedTx: string): Promise; /** * Get FLOW token balance for an address. * * Uses the Flow Access API /v1/accounts/{address} endpoint. * Returns balance in FLOW (UFix64 format). */ getBalance(address: string): Promise; } export declare function createFlowAdapter(rpcUrl?: string): FlowAdapter; export declare function createFlowTestnetAdapter(rpcUrl?: string): FlowAdapter; //# sourceMappingURL=flow.d.ts.map