export type CustodyDestinationID = string; export type DeleteApiV1WalletsWithdrawalInstructionsDestinationIdArgs = {destinationId: CustodyDestinationID}; export type DeleteApiV1WalletsWithdrawalInstructionsDestinationIdOptions = {baseUrl?: string | undefined, jwtTokenAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Existing Wallet Address * * DELETE /v1/wallets/withdrawal-instructions/{destinationId} */ export const deleteApiV1WalletsWithdrawalInstructionsDestinationId = async (args: DeleteApiV1WalletsWithdrawalInstructionsDestinationIdArgs, options?: DeleteApiV1WalletsWithdrawalInstructionsDestinationIdOptions) => { const {baseUrl = "https://api.exchange.bullish.com/trading-api", fetch: fetchFn = fetch, jwtTokenAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (jwtTokenAuth !== undefined) headers.set('authorization', `Bearer ${jwtTokenAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/wallets/withdrawal-instructions/${encodeURIComponent(String(args.destinationId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };