import { APIResource } from "../core/resource.js"; import * as EvmAPI from "./evm/evm.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class TokenWebhooks extends APIResource { /** * Creates a webhook subscription for a chain to receive real-time token scan * updates. * * @example * ```ts * const tokenWebhook = await client.tokenWebhooks.create( * 'arbitrum', * { * url: 'https://example.com/', * filter: { * filter_type: 'token_address', * token_addresses: [ * '0x1234567890abcdef1234567890abcdef12345678', * ], * }, * shared_secret_key: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', * }, * ); * ``` */ create(chain: EvmAPI.TokenScanSupportedChain, body: TokenWebhookCreateParams, options?: RequestOptions): APIPromise; /** * Deletes the webhook subscription for a chain and stops further token scan * updates. * * @example * ```ts * await client.tokenWebhooks.delete('arbitrum'); * ``` */ delete(chain: EvmAPI.TokenScanSupportedChain, options?: RequestOptions): APIPromise; /** * Get information about an existing webhook for a given chain * * @example * ```ts * const tokenWebhook = await client.tokenWebhooks.get( * 'arbitrum', * ); * ``` */ get(chain: EvmAPI.TokenScanSupportedChain, options?: RequestOptions): APIPromise; /** * List all active webhook subscriptions across all chains * * @example * ```ts * const response = await client.tokenWebhooks.getAll(); * ``` */ getAll(options?: RequestOptions): APIPromise; } export interface TokenWebhookCreateResponse { active: boolean; /** * The chain name */ chain: EvmAPI.TokenScanSupportedChain; created_at: string; updated_at: string; url: string; /** * Optional shared secret key (32 characters), used to calculate the HMAC signature */ shared_secret_key?: string | null; } export interface TokenWebhookGetResponse { active: boolean; /** * The chain name */ chain: EvmAPI.TokenScanSupportedChain; created_at: string; updated_at: string; url: string; /** * Optional shared secret key (32 characters), used to calculate the HMAC signature */ shared_secret_key?: string | null; } export type TokenWebhookGetAllResponse = Array; export declare namespace TokenWebhookGetAllResponse { interface TokenWebhookGetAllResponseItem { active: boolean; /** * The chain name */ chain: EvmAPI.TokenScanSupportedChain; created_at: string; updated_at: string; url: string; /** * Optional shared secret key (32 characters), used to calculate the HMAC signature */ shared_secret_key?: string | null; } } export interface TokenWebhookCreateParams { url: string; /** * Filter for webhook updates */ filter?: TokenWebhookCreateParams.TokenAddressFilter | TokenWebhookCreateParams.TokenTypeFilter | null; /** * Optional shared secret key (32 characters), used to calculate the HMAC signature */ shared_secret_key?: string | null; } export declare namespace TokenWebhookCreateParams { interface TokenAddressFilter { /** * List of up to 100000 token addresses to filter webhook updates */ token_addresses: Array; /** * Type of filter applied to the webhook updates */ filter_type?: 'token_address'; } interface TokenTypeFilter { /** * Type of token to filter */ token_type: 'Fungible' | 'NonFungible'; /** * Type of filter applied to the webhook updates */ filter_type?: 'token_type'; } } export declare namespace TokenWebhooks { export { type TokenWebhookCreateResponse as TokenWebhookCreateResponse, type TokenWebhookGetResponse as TokenWebhookGetResponse, type TokenWebhookGetAllResponse as TokenWebhookGetAllResponse, type TokenWebhookCreateParams as TokenWebhookCreateParams, }; } //# sourceMappingURL=token-webhooks.d.ts.map