/** * IOTA (Stardust) Chain Adapter * * Builds IOTA Stardust transactions (BasicOutput transfers), attaches * Ed25519 signatures from the FROST threshold signing network, and * broadcasts via the IOTA Node REST API. * * IOTA Stardust uses Ed25519 for signing. The signing payload is the * Blake2b-256 hash of the serialized transaction essence. * * No external dependencies — uses native fetch and crypto. * * Address format: iota1... (bech32, Stardust) or raw ed25519 address bytes. * * @example * ```typescript * import { IotaAdapter } from '@sequence0/sdk'; * * const iota = new IotaAdapter('mainnet'); * * const unsignedTx = await iota.buildTransaction( * { to: 'iota1qp...', amount: '1000000', publicKey: 'abc...def' }, * 'iota1qp...' * ); * * // ... sign via FROST ed25519 ... * const signedTx = await iota.attachSignature(unsignedTx, signatureHex); * const blockId = await iota.broadcast(signedTx); * ``` */ import { ChainAdapter, IotaTransaction } from '../core/types'; export declare class IotaAdapter implements ChainAdapter { private nodeUrl; private network; private hrp; constructor(network?: 'mainnet' | 'testnet', nodeUrl?: string); getRpcUrl(): string; /** * Build an unsigned IOTA Stardust transaction for a BasicOutput transfer. * * Queries the indexer for spendable outputs, constructs a transaction * essence with inputs and outputs, and returns the serialized essence * along with its Blake2b-256 hash as the signing payload. */ buildTransaction(tx: IotaTransaction, fromAddress: string): Promise; /** * Extract the transaction essence hash (Blake2b-256) as the * Ed25519 signing payload. */ getSigningPayload(unsignedTx: string): string; /** * Attach an Ed25519 signature to the IOTA transaction. * * The signature is placed into an Ed25519 signature unlock block. */ attachSignature(unsignedTx: string, signature: string): Promise; /** * Broadcast a signed IOTA transaction by submitting a block. * * Constructs a block containing the transaction payload with * Ed25519 signature unlock blocks, then POSTs it to the node. */ broadcast(signedTx: string): Promise; /** * Get balance in base units for an IOTA address. * * Queries the indexer for all basic outputs owned by the address * and sums their amounts. */ getBalance(address: string): Promise; /** * Get node info (protocol parameters, network name, etc.). */ getNodeInfo(): Promise | null>; } /** Create a mainnet IOTA adapter */ export declare function createIotaAdapter(nodeUrl?: string): IotaAdapter; /** Create a testnet IOTA adapter */ export declare function createIotaTestnetAdapter(nodeUrl?: string): IotaAdapter; //# sourceMappingURL=iota.d.ts.map