/** * Solana transaction builder for Omni Bridge */ import { type Network, type ValidatedTransfer } from "@omni-bridge/core"; import { Connection, PublicKey, type TransactionInstruction } from "@solana/web3.js"; import type { SolanaMPCSignature, SolanaTokenMetadata, SolanaTransferMessagePayload } from "./types.js"; export interface SolanaBuilderConfig { network: Network; /** Optional - uses chain's public RPC endpoint if not provided */ connection?: Connection; } /** * Solana transaction builder interface */ export interface SolanaBuilder { /** * Build transfer instructions for bridging tokens from Solana * @param validated - Validated transfer parameters * @param user - The account that owns tokens and authorizes the transfer (signs token transfer/burn) * @param payer - Optional account that pays Wormhole fees and rent. Defaults to user if not provided. */ buildTransfer(validated: ValidatedTransfer, user: PublicKey, payer?: PublicKey): Promise; /** * Build finalization instructions for receiving tokens on Solana */ buildFinalization(payload: SolanaTransferMessagePayload, signature: SolanaMPCSignature, payer: PublicKey): Promise; /** * Build log metadata instructions for registering a token */ buildLogMetadata(token: PublicKey, payer: PublicKey): Promise; /** * Build deploy token instructions for deploying a wrapped token */ buildDeployToken(signature: SolanaMPCSignature, metadata: SolanaTokenMetadata, payer: PublicKey): Promise; /** * Derive the config PDA */ deriveConfig(): PublicKey; /** * Derive the authority PDA */ deriveAuthority(): PublicKey; /** * Derive wrapped mint PDA for a token */ deriveWrappedMint(token: string): PublicKey; /** * Derive vault PDA for a mint */ deriveVault(mint: PublicKey): PublicKey; /** * Derive SOL vault PDA */ deriveSolVault(): PublicKey; } export declare function createSolanaBuilder(config: SolanaBuilderConfig): SolanaBuilder; export declare function createFogoBuilder(config: SolanaBuilderConfig): SolanaBuilder; //# sourceMappingURL=builder.d.ts.map