/** * Casper Network Chain Adapter * * Builds Casper deploys for native CSPR transfers, attaches Ed25519 * signatures from the FROST threshold signing network, and broadcasts * via the Casper JSON-RPC API. * * Casper uses Ed25519 for signing. The signing payload is the deploy * hash, which is Blake2b-256 of the serialized deploy header. * * No external dependencies — uses native fetch and crypto. * * Address format: 01 (ed25519 public key prefixed with 01) * * @example * ```typescript * import { CasperAdapter } from '@sequence0/sdk'; * * const casper = new CasperAdapter('mainnet'); * * const unsignedTx = await casper.buildTransaction( * { to: '01abc...def', amount: '2500000000', publicKey: 'abc...def' }, * '01abc...def' * ); * * // ... sign via FROST ed25519 ... * const signedTx = await casper.attachSignature(unsignedTx, signatureHex); * const deployHash = await casper.broadcast(signedTx); * ``` */ import { ChainAdapter, CasperTransaction } from '../core/types'; export declare class CasperAdapter implements ChainAdapter { private rpcUrl; private network; private chainName; constructor(network?: 'mainnet' | 'testnet', rpcUrl?: string); getRpcUrl(): string; /** * Build an unsigned Casper deploy for a native CSPR transfer. * * The deploy is serialized and hashed using Blake2b-256 to produce * the deploy hash, which is the signing payload for Ed25519. */ buildTransaction(tx: CasperTransaction, fromAddress: string): Promise; /** * Extract the deploy hash (Blake2b-256 of the serialized header) * as the signing payload for Ed25519. */ getSigningPayload(unsignedTx: string): string; /** * Attach an Ed25519 signature to the Casper deploy. * * Adds the signature to the deploy's approvals list. */ attachSignature(unsignedTx: string, signature: string): Promise; /** * Broadcast a signed Casper deploy via account_put_deploy RPC. * * Constructs the JSON deploy structure expected by the Casper node * from the serialized payload fields. */ broadcast(signedTx: string): Promise; /** * Get CSPR balance in motes for an account. * * Queries the account's main purse URef, then fetches the balance. */ getBalance(address: string): Promise; } /** Create a mainnet Casper adapter */ export declare function createCasperAdapter(rpcUrl?: string): CasperAdapter; /** Create a testnet Casper adapter */ export declare function createCasperTestnetAdapter(rpcUrl?: string): CasperAdapter; //# sourceMappingURL=casper.d.ts.map