import type { WalletAdapterProps } from '@solana/wallet-adapter-base'; import { PublicKey, VersionedTransaction, SendOptions, Transaction } from '@solana/web3.js'; import { z } from 'zod'; import type { Prettify } from '../../utils/prettify'; import type { SolanaRelay } from './SolanaRelay'; export type SolanaWalletAdapter = WalletAdapterProps; export type SolanaConfig = {}; export type SolanaRelayService = SolanaRelay; export declare const PublicKeySchema: z.ZodUnion<[z.ZodEffects, z.ZodType]>; export declare const TokenNameSchema: z.ZodEnum<["wAUDIO", "USDC"]>; export type TokenName = z.input; export declare const MintSchema: z.ZodUnion<[z.ZodEnum<["wAUDIO", "USDC"]>, z.ZodUnion<[z.ZodEffects, z.ZodType]>]>; export type Mint = z.input; export declare const RelaySchema: z.ZodObject<{ transaction: z.ZodType; /** * Confirmation options used when sending the transaction on the server. * @see {@link https://solana-labs.github.io/solana-web3.js/classes/Connection.html#confirmTransaction confirmTransaction} */ confirmationOptions: z.ZodOptional, z.ZodObject<{ minContextSlot: z.ZodNumber; nonceAccountPubkey: z.ZodUnion<[z.ZodEffects, z.ZodType]>; nonceValue: z.ZodString; }, "strip", z.ZodTypeAny, { minContextSlot: number; nonceAccountPubkey: PublicKey; nonceValue: string; }, { minContextSlot: number; nonceAccountPubkey: (string | PublicKey) & (string | PublicKey | undefined); nonceValue: string; }>]>>; /** * The commitment the server should confirm before responding. * Leave unset to have the server respond immediately after sending. * @see {@link https://solana-labs.github.io/solana-web3.js/types/Commitment.html Commitment} */ commitment: z.ZodOptional>; }, "strip", z.ZodTypeAny, { strategy?: { blockhash: string; lastValidBlockHeight: number; } | { minContextSlot: number; nonceAccountPubkey: PublicKey; nonceValue: string; } | undefined; commitment?: "finalized" | "processed" | "confirmed" | "recent" | "single" | "singleGossip" | "root" | "max" | undefined; }, { strategy?: { blockhash: string; lastValidBlockHeight: number; } | { minContextSlot: number; nonceAccountPubkey: (string | PublicKey) & (string | PublicKey | undefined); nonceValue: string; } | undefined; commitment?: "finalized" | "processed" | "confirmed" | "recent" | "single" | "singleGossip" | "root" | "max" | undefined; }>>; /** * Custom send options used when sending the transaction on the relay. * @see {@link https://solana-labs.github.io/solana-web3.js/types/SendOptions.html SendOptions} */ sendOptions: z.ZodOptional>; }, "strict", z.ZodTypeAny, { transaction: (VersionedTransaction | Transaction) & (VersionedTransaction | Transaction | undefined); confirmationOptions?: { strategy?: { blockhash: string; lastValidBlockHeight: number; } | { minContextSlot: number; nonceAccountPubkey: PublicKey; nonceValue: string; } | undefined; commitment?: "finalized" | "processed" | "confirmed" | "recent" | "single" | "singleGossip" | "root" | "max" | undefined; } | undefined; sendOptions?: SendOptions | undefined; }, { transaction: (VersionedTransaction | Transaction) & (VersionedTransaction | Transaction | undefined); confirmationOptions?: { strategy?: { blockhash: string; lastValidBlockHeight: number; } | { minContextSlot: number; nonceAccountPubkey: (string | PublicKey) & (string | PublicKey | undefined); nonceValue: string; } | undefined; commitment?: "finalized" | "processed" | "confirmed" | "recent" | "single" | "singleGossip" | "root" | "max" | undefined; } | undefined; sendOptions?: SendOptions | undefined; }>; export type RelayRequest = z.infer; export type RelayRequestBody = Prettify & { /** * Base64 encoded serialized VersionedTransaction object. */ transaction: string; }>; export declare const LaunchCoinSchema: z.ZodObject<{ name: z.ZodString; symbol: z.ZodString; description: z.ZodString; walletPublicKey: z.ZodUnion<[z.ZodEffects, z.ZodType]>; initialBuyAmountAudio: z.ZodOptional; image: z.ZodType; }, "strict", z.ZodTypeAny, { symbol: string; name: string; description: string; walletPublicKey: PublicKey; image: Blob; initialBuyAmountAudio?: string | undefined; }, { symbol: string; name: string; description: string; walletPublicKey: (string | PublicKey) & (string | PublicKey | undefined); image: Blob; initialBuyAmountAudio?: string | undefined; }>; export type LaunchCoinRequest = z.infer; export type LaunchCoinResponse = { mintPublicKey: string; configPublicKey: string; createPoolTx: string; firstBuyTx: string | undefined; metadataUri: string; imageUri: string; }; export type FirstBuyQuoteResponse = { usdcValue: string; tokenOutputAmount: string; audioInputAmount: string; maxAudioInputAmount: string; maxTokenOutputAmount: string; }; export type FirstBuyQuoteRequest = { audioInputAmount: string; } | { tokenOutputAmount: string; }; export type LaunchpadConfigResponse = { maxAudioInputAmount: string; maxTokenOutputAmount: string; startingPrice: string; }; export type ClaimFeesRequest = { tokenMint: string; ownerWalletAddress: string; receiverWalletAddress: string; }; export type ClaimFeesResponse = { claimFeeTxs: Array; }; export type ClaimVestedCoinsRequest = { tokenMint: string; ownerWalletAddress: string; receiverWalletAddress: string; rewardsPoolPercentage: number; }; export type ClaimVestedCoinsResponse = { claimVestedCoinsTxs: Array; availableAmount: string; totalAmount?: string; claimedAmount?: string; remainingLocked?: string; userClaimedAmount?: string; rewardsPoolClaimedAmount?: string; }; export type SwapCoinQuoteRequest = { inputAmount: string; coinMint: string; swapDirection: 'audioToCoin' | 'coinToAudio'; }; export type SwapCoinQuoteResponse = { outputAmount: string; }; export type SwapCoinRequest = { inputAmount: string; coinMint: string; swapDirection: 'audioToCoin' | 'coinToAudio'; userPublicKey: PublicKey; isExternalWallet?: boolean; feePayer?: PublicKey; }; export type SwapCoinResponse = { transaction: string; outputAmount: string; includedFeeInputAmount?: string; };