import { WalletClientWithAccount, SignableRequestType, SignableRequestTypeToParams } from '@vertex-protocol/contracts'; import { AxiosInstance } from 'axios'; import { GetEngineNoncesParams, GetEngineNoncesResponse } from './types/clientQueryTypes.js'; import { EngineServerExecuteRequestType, EngineServerExecuteRequestByType, EngineServerExecuteSuccessResult } from './types/serverExecuteTypes.js'; import { EngineServerQueryRequestType, EngineServerQueryRequestByType, EngineServerQueryResponseByType, EngineServerQueryRequest } from './types/serverQueryTypes.js'; import '@vertex-protocol/utils'; import './types/serverQueryModelTypes.js'; interface EngineClientOpts { url: string; walletClient?: WalletClientWithAccount; linkedSignerWalletClient?: WalletClientWithAccount; } type EngineExecuteRequestBody = Partial; /** * Base client for all engine requests */ declare class EngineBaseClient { readonly opts: EngineClientOpts; readonly axiosInstance: AxiosInstance; constructor(opts: EngineClientOpts); /** * Sets the linked signer for execute requests * * @param linkedSignerWalletClient The linkedSigner to use for all signatures. Set to null to revert to the chain signer */ setLinkedSigner(linkedSignerWalletClient: WalletClientWithAccount | null): void; getTxNonce(address?: string): Promise; getNonces(params: GetEngineNoncesParams): Promise; /** * Queries the engine, all query params are stringified into the query string * * @param requestType * @param params * @public */ query(requestType: TRequestType, params: EngineServerQueryRequestByType[TRequestType]): Promise; /** * A simple, typechecked fn for constructing a query request in the format expected by the server. * * @param requestType * @param params */ getQueryRequest(requestType: TRequestType, params: EngineServerQueryRequestByType[TRequestType]): EngineServerQueryRequest; /** * POSTs an execute message to the engine and returns the successful response. Throws the failure response wrapped * in an EngineServerFailureError on failure. * * @param requestType * @param params * @public */ execute(requestType: TRequestType, params: EngineServerExecuteRequestByType[TRequestType]): Promise>; /** * A simple, typechecked fn for constructing an execute request in the format expected by the server. * * @param requestType * @param params */ getExecuteRequest(requestType: TRequestType, params: EngineServerExecuteRequestByType[TRequestType]): EngineExecuteRequestBody; /** * Signs a given request with the signer provided to the engine * * @param requestType * @param verifyingContract * @param chainId * @param params * @public */ sign(requestType: T, verifyingContract: string, chainId: number, params: SignableRequestTypeToParams[T]): Promise<`0x${string}`>; private checkResponseStatus; private checkServerStatus; } export { EngineBaseClient, type EngineClientOpts };