export type DeleteApiApiV3LabelsAddressArgs = {address: string, label: string}; export type DeleteApiApiV3LabelsAddressOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove a label from a jetton * * DELETE /api/v3/labels/{address} */ export const deleteApiApiV3LabelsAddress = async (args: DeleteApiApiV3LabelsAddressArgs, options?: DeleteApiApiV3LabelsAddressOptions) => { const {baseUrl = "https://tokens.swap.coffee", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set("X-Api-Key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/v3/labels/${encodeURIComponent(String(args.address))}${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 };