export type TokenScanSupportedChains = 'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'ethereum' | 'optimism' | 'polygon' | 'zora' | 'solana' | 'starknet' | 'starknet-sepolia' | 'stellar' | 'linea' | 'degen' | 'zksync' | 'scroll' | 'blast' | 'soneium-minato' | 'base-sepolia' | 'bitcoin' | 'abstract' | 'soneium' | 'ink' | 'berachain' | 'unichain' | 'ronin' | 'sui' | 'hedera' | 'hyperevm' | 'xlayer' | 'monad' | 'megaeth' | 'tempo' | 'sei' | 'kaia' | 'tron' | 'robinhood' | 'flare' | 'arc'; export type DeleteApiV0TokenHooksChainArgs = {chain: TokenScanSupportedChains}; export type DeleteApiV0TokenHooksChainOptions = {baseUrl?: string | undefined, APIKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a webhook * * DELETE /v0/token/hooks/{chain} * * Also accepts auth: ClientID */ export const deleteApiV0TokenHooksChain = async (args: DeleteApiV0TokenHooksChainArgs, options?: DeleteApiV0TokenHooksChainOptions) => { const {baseUrl = "https://api.blockaid.io", 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(/\/+$/, '')}/v0/token/hooks/${encodeURIComponent(String(args.chain))}${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 };