import { PublicKeyCredentialRequestOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/typescript-types';
import { Address, Hex } from 'viem';
import { DistributeActionInterface, FacilitatorConfig, PrexClientInterface, ProfileActionInterface, PumpumActionInterface, QuoteSwapParams } from './interfaces/prex-client-interface';
import { CreateWalletResult, DistributeRequest, GetLinkTransferResponse, LinkTransferHistoryItem, PagingOptions, PrexUser, PumActionHistory, PumToken, PumTokenPrice, SharedWalletList, SubKeyMessage, SwapHistoryItem, Token, TokenActivity, TokenDistributeRequestEntity, TokenHolder, TransferByLinkResponse, TransferHistoryItem, TransferHistoryQuery } from './types';
import { DutchOrder, SwapOrder, SwapQuoter } from '@prex0/prex-structs';
import { PublicActions } from 'viem';
import { PrexSigner } from './core/sign';
export declare class DryRunClient implements PrexClientInterface {
tokens: Token[];
initialState: 'loggedIn' | 'loggedOut' | 'passkeyNotAvailable';
user?: PrexUser;
balances: Record
;
allowances: Record;
distributeAction: DryRunDistributeAction;
quoter: SwapQuoter;
constructor(tokens: Token[], initialState?: 'loggedIn' | 'loggedOut' | 'passkeyNotAvailable');
getSigner(): PrexSigner | null;
getPublicClient(): PublicActions | null;
startHandler(): Promise;
fetchBalance(token: Address, _owner?: Address): Promise<{
balance: bigint | undefined;
allowance: bigint | undefined;
}>;
fetchBalanceBatch(tokens: Address[], _user?: Address): Promise<{
token: `0x${string}`;
balance: bigint;
isSuccess: boolean;
}[]>;
transfer(_params: {
token: Address;
recipient: Address;
amount: bigint;
metadata?: Record;
sender?: Address;
}): Promise<{
hash: Hex;
}>;
transferByLink(_params: {
token: Address;
amount: bigint;
expiration: number;
metadata?: Record;
sender?: Address;
}): Promise;
receiveLinkTransfer(params: {
secret: Hex;
recipient?: Address;
}): Promise<{
hash: Hex;
}>;
getHistory(_query?: TransferHistoryQuery, _pagingOptions?: PagingOptions): Promise;
getOnetimeLockHistory(_query?: {
token: Address;
} | {
user: Address;
}, _pagingOptions?: PagingOptions): Promise;
getTokenHolder(_query: {
token: Address;
address?: Address;
}): Promise;
getTokenHolders(_query: {
token: Address;
}, _pagingOptions?: PagingOptions): Promise;
getSwapHistory(_query?: {
user: Address;
}, _pagingOptions?: PagingOptions): Promise;
mint(_options: {
token?: Address;
recipient: Address;
amount: bigint;
}): Promise;
quoteSwap(params: {
tokenIn: Address;
tokenOut: Address;
amount: bigint;
tradeType: 'EXACT_INPUT' | 'EXACT_OUTPUT';
swapper?: Address;
recipient?: Address;
slippageTolerance?: bigint;
}): Promise<{
quote: bigint;
route: `0x${string}`;
order: DutchOrder;
}>;
swap(_order: any, _route: Hex): Promise<{
hash: Hex;
}>;
distribute(): DistributeActionInterface;
getProfileAction(): ProfileActionInterface;
approve(_params: {
token: Address;
amount?: bigint;
from?: Address;
}): Promise;
backupByEOA(_backupAddress: Address): Promise;
backupByPasskey(_ownerIndex?: number): Promise;
registerNewPasskey(): Promise;
recoverByEOA(_backupPrivateKey: Hex): Promise;
createWallet(_options?: {
userName?: string;
withDeploy?: boolean;
}): Promise;
restoreWallet(): Promise;
deployWallet(): Promise;
updateNickName(_params: {
nickName: string;
from?: Address;
}): Promise;
uploadAvatar(_params: {
image: File;
from?: Address;
}): Promise<{
path: string;
fullPath: string;
url: string;
}>;
logout(): Promise;
authenticate(_options: PublicKeyCredentialRequestOptionsJSON): Promise;
executeOperation(_contracts: any): Promise;
switchChain(_chainId: number): Promise;
getChainId(): Promise;
setApiKey(_apiKey: string): void;
setProvider(_provider: any): void;
isPasskeyAvailable(): Promise;
load(): Promise;
private generateUser;
getUser(): PrexUser | undefined;
getLinkTransfer(_id: string): Promise;
getLinkTransferBySecret(_secret: string): Promise;
getTokenDetails(_token: Address): Promise<{
name: string;
symbol: string;
decimals: number;
}>;
getTokenActivity(_token: Address): Promise;
getSharedWalletAddress(_owners: Address[], _nonce: number): Promise<`0x${string}`>;
createSharedWallet(_params: {
name: string;
owners: Address[];
nonce: number;
}): Promise<`0x${string}`>;
addOwnerAddress(_params: {
owner: Address;
from?: Address;
}): Promise;
removeOwnerAtIndex(_params: {
index: number;
owner: Address;
from?: Address;
}): Promise;
getSharedWallets(): Promise;
loadConfig(_chainId: number): Promise;
getProfile(_address: Address): Promise<{
name?: string;
}>;
getAddressByName(_params: {
baseName?: string;
name: string;
}): Promise;
getPumAction(): DryRunPumpumAction;
signWithSubKey(_params: {
hash: Hex;
from?: Address;
}): Promise<{
signature: Hex;
message: SubKeyMessage;
keyType: 'main' | 'sub';
}>;
existsSubKey(): Promise;
deleteSubKey(): Promise;
}
declare class DryRunDistributeAction implements DistributeActionInterface {
tokens: Token[];
private coordinate;
constructor(tokens: Token[]);
submit(params: {
token: `0x${string}`;
amount: bigint;
amountPerWithdrawal: bigint;
maxAmountPerAddress?: bigint;
expiry: bigint;
coolTime?: bigint;
name: string;
coordinate?: `0x${string}`;
}): Promise<{
id: `0x${string}`;
secret: `0x${string}`;
shortCode: string;
}>;
generateSubSecret(id: Hex): Promise<{
id: `0x${string}`;
secret: string;
}>;
deposit({}: {
amount: bigint;
requestId: Hex;
}): Promise;
cancel(_params: {
requestId: Hex;
from?: Address;
}): Promise;
getRequest(_requestId: Hex, _params: {
secret?: Hex;
coordinate?: Hex;
}): Promise;
prepareSecret(_params: {
requestId: Hex;
recipient?: Address;
}): Promise<{
secret: string;
}>;
prepareReceive({ requestId, }: {
requestId: `0x${string}`;
secret: `0x${string}`;
}): Promise;
receive({ requestId, }: {
requestId: `0x${string}`;
sig: `0x${string}`;
nonce: bigint;
deadline: bigint;
recipient: `0x${string}`;
}): Promise;
queryRequests(): Promise;
}
export declare class DryRunPumpumAction implements PumpumActionInterface {
tokens: Token[];
constructor(tokens: Token[]);
quoteSwap(params: QuoteSwapParams): Promise;
executeSwap(_order: SwapOrder): Promise<{
hash: Hex;
}>;
issueTokens(_params: {
name: string;
symbol: string;
amount: bigint;
metadata?: string;
}): Promise<{
hash: Hex;
result: Address;
}>;
buy(_params: {
dai: Address;
amount: bigint;
}): Promise;
getPumTimeline(_pageOptions: PagingOptions): Promise;
getPumActionHistory(_user: Address, _pageOptions: PagingOptions): Promise;
getPumTokens(): Promise;
getPumTokenPrice(_token: Address, _interval: 'HOUR' | 'DAY', _pageOptions: PagingOptions): Promise;
getMarketInfo(_communityToken: Address): Promise<{
reserveCT: bigint;
reserveStable: bigint;
sellable: boolean;
feePercent: bigint;
}>;
}
export {};
//# sourceMappingURL=dry-run-client.d.ts.map