export type GetApiTokensCheckTokenIdTokenNameArgs = {tokenId: string, tokenName: string}; export type GetApiTokensCheckTokenIdTokenNameOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Check a token verification * * GET /tokens/check/{tokenId}/{tokenName} */ export const getApiTokensCheckTokenIdTokenName = async (args: GetApiTokensCheckTokenIdTokenNameArgs, options?: GetApiTokensCheckTokenIdTokenNameOptions) => { const {baseUrl = "https://api.tokenjay.app", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/tokens/check/${encodeURIComponent(String(args.tokenId))}/${encodeURIComponent(String(args.tokenName))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };