import { type Provider } from "@coral-xyz/anchor"; import { Keypair, PublicKey } from "@solana/web3.js"; import { type MPCSignature, type OmniAddress, type OmniTransferMessage, type TokenMetadata, type TransferMessagePayload } from "../types/index.js"; export declare class SolanaBridgeClient { private readonly wormholeProgramId; private readonly shimProgramId; private readonly eventAuthorityId; private readonly program; private static getConstant; private static readonly SEEDS; constructor(provider: Provider, wormholeProgramId?: PublicKey, shimProgramId?: PublicKey, eventAuthorityId?: PublicKey); private config; private authority; private wormholeBridgeId; private wormholeFeeCollectorId; private wormholeSequenceId; private static tokenSeedBytes; private wrappedMintId; private vaultId; private solVaultId; private shimMessageId; /** * Logs metadata for a token * @param token - The token's public key * @param payer - Optional payer keypair * @returns Promise resolving to transaction signature */ logMetadata(token: OmniAddress, payer?: Keypair): Promise; /** * Deploys a new wrapped token using the wormhole shim * @param signature - MPC signature authorizing the deployment * @param tokenMetadata - Token metadata * @param payer - Optional payer public key * @returns Promise resolving to transaction hash and token address */ deployToken(signature: MPCSignature, payload: TokenMetadata, payer?: Keypair): Promise<{ txHash: string; tokenAddress: string; }>; /** * Transfers SPL tokens to the bridge contract using the wormhole shim * @param transfer - Transfer message details * @param payer - Optional payer keypair * @returns Promise resolving to transaction hash */ initTransfer(transfer: OmniTransferMessage, payer?: Keypair): Promise; /** * Finalizes a token transfer on Solana by processing the transfer message and signature. * This function handles both bridged tokens (tokens that originate from another chain) and * native Solana tokens. * * @param transferMessage - The payload containing transfer details including: * - destination_nonce: Unique identifier for the transfer on the destination chain * - transfer_id: Object containing origin chain ID and nonce * - token_address: The token's Omni address * - amount: Amount of tokens to transfer * - recipient: Recipient's Solana address in Omni format * - fee_recipient: Optional fee recipient address * @param signature - MPC signature authorizing the transfer * * @returns Promise resolving to the transaction signature * @throws Error if token address is invalid, signature verification fails, or transaction fails */ finalizeTransfer(transferMessage: TransferMessagePayload, signature: MPCSignature, payer?: Keypair): Promise; private extractSolanaAddress; private isBridgedToken; private getTokenProgramForMint; } //# sourceMappingURL=solana.d.ts.map