export type ResumeWalletConnectionRequest = {proxyAddress?: string | undefined, state?: string | undefined, address?: string | undefined}; export type CreateApiWalletManagerWalletConnectionsResumeCircleArgs = {body: ResumeWalletConnectionRequest}; export type CreateApiWalletManagerWalletConnectionsResumeCircleOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, authenticatedEncryption?: string | undefined, ethereum?: string | undefined, collabLandOAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /wallet-manager/wallet-connections/resume-circle */ export const createApiWalletManagerWalletConnectionsResumeCircle = async (args: CreateApiWalletManagerWalletConnectionsResumeCircleArgs, options?: CreateApiWalletManagerWalletConnectionsResumeCircleOptions) => { const {baseUrl = "https://api.collab.land", fetch: fetchFn = fetch, apiKey, authenticatedEncryption, ethereum, collabLandOAuth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (apiKey !== undefined) headers.set("x-api-key", apiKey) if (authenticatedEncryption !== undefined) headers.set("Authorization", authenticatedEncryption) if (ethereum !== undefined) headers.set("Authorization", ethereum) if (collabLandOAuth2 !== undefined) headers.set('authorization', `Bearer ${collabLandOAuth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/wallet-manager/wallet-connections/resume-circle${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };