diff --git a/.stats.yml b/.stats.yml index b64620b3..2311e4e8 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 19 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-ff530a839742b4556a14c076d0dd0283484f8aff49b09ad0b8a8ae244f2b7025.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-7755010e19ebb8c3d190615e359c6868258d51ed99575d9f9c5c408a4df97424.yml diff --git a/src/resources/token-bulk.ts b/src/resources/token-bulk.ts index f51b536f..e173dbe4 100755 --- a/src/resources/token-bulk.ts +++ b/src/resources/token-bulk.ts @@ -21,20 +21,55 @@ export interface TokenBulkScanResponse { export namespace TokenBulkScanResponse { export interface Results { + /** + * Token address to validate (EVM / Solana) + */ + address: string; + /** * Dictionary of detected attacks found during the scan */ attack_types: Record; + /** + * The chain name + */ + chain: EvmAPI.TokenScanSupportedChain; + + /** + * Fees associated with the token + */ + fees: Results.Fees; + + /** + * financial stats of the token + */ + financial_stats: Results.FinancialStats; + /** * Score between 0 to 1 (double) */ malicious_score: string; + /** + * Metadata of the token + */ + metadata: Results.Metadata; + /** * An enumeration. */ result_type: 'Benign' | 'Warning' | 'Malicious' | 'Spam'; + + /** + * Trading limits of the token + */ + trading_limits: Results.TradingLimits; + + /** + * List of features associated with the token + */ + features?: Array; } export namespace Results { @@ -54,6 +89,232 @@ export namespace TokenBulkScanResponse { */ threshold?: string; } + + /** + * Fees associated with the token + */ + export interface Fees { + /** + * Buy fee of the token + */ + buy?: number; + + /** + * Sell fee of the token + */ + sell?: number; + + /** + * Transfer fee of the token + */ + transfer?: number; + } + + /** + * financial stats of the token + */ + export interface FinancialStats { + burned_liquidity_percentage?: number; + + holders_count?: number; + + locked_liquidity_percentage?: number; + + top_holders?: Array; + + usd_price_per_unit?: number; + } + + export namespace FinancialStats { + export interface TopHolder { + address?: string; + + holding_percentage?: number; + } + } + + /** + * Metadata of the token + */ + export interface Metadata { + freeze_authority: string; + + mint_authority: string; + + /** + * internal metadata + */ + token_metadata: Metadata.TokenMetadata; + + update_authority: string; + + /** + * Address of the deployer of the fungible token + */ + deployer?: string; + + /** + * Description of the token + */ + description?: string; + + /** + * URL of the token image + */ + image_url?: string; + + /** + * Name of the token + */ + name?: string; + + /** + * Price per unit of the token. For NFT, it's the price of the NFT. For ERC20, it's + * the price of a single token. Can be updated daily. + */ + price_per_unit?: number; + + /** + * Symbol of the token + */ + symbol?: string; + + /** + * Type of the token + */ + type?: string; + } + + export namespace Metadata { + /** + * internal metadata + */ + export interface TokenMetadata { + /** + * Address of the deployer of the fungible token + */ + deployer?: string; + + /** + * Description of the token + */ + description?: string; + + /** + * Number of owners of the fungible token, updated daily + */ + holders_count?: number; + + /** + * URL of the token image + */ + image_url?: string; + + /** + * List of malicious_urls + */ + malicious_urls?: Array; + + /** + * Name of the token + */ + name?: string; + + /** + * Symbol of the token + */ + symbol?: string; + + /** + * An enumeration. + */ + type?: 'erc20' | 'erc721' | 'erc1155' | 'FUNGIBLE' | 'NonFungible'; + + /** + * Uri of the token + */ + uri?: string; + + /** + * List of urls + */ + urls?: Array; + } + } + + /** + * Trading limits of the token + */ + export interface TradingLimits { + max_buy?: TradingLimits.MaxBuy; + + max_holding?: TradingLimits.MaxHolding; + + max_sell?: TradingLimits.MaxSell; + + sell_limit_per_block?: TradingLimits.SellLimitPerBlock; + } + + export namespace TradingLimits { + export interface MaxBuy { + amount?: number; + + amount_wei?: string; + } + + export interface MaxHolding { + amount?: number; + + amount_wei?: string; + } + + export interface MaxSell { + amount?: number; + + amount_wei?: string; + } + + export interface SellLimitPerBlock { + amount?: number; + + amount_wei?: string; + } + } + + export interface Feature { + /** + * Description of the feature + */ + description: string; + + /** + * An enumeration. + */ + feature_id: + | 'VERIFIED_CONTRACT' + | 'HIGH_TRADE_VOLUME' + | 'MARKET_PLACE_SALES_HISTORY' + | 'HIGH_REPUTATION_TOKEN' + | 'STATIC_CODE_SIGNATURE' + | 'KNOWN_MALICIOUS' + | 'METADATA' + | 'AIRDROP_PATTERN' + | 'IMPERSONATOR' + | 'INORGANIC_VOLUME' + | 'DYNAMIC_ANALYSIS' + | 'UNSTABLE_TOKEN_PRICE' + | 'RUGPULL' + | 'CONSUMER_OVERRIDE' + | 'INAPPROPRIATE_CONTENT' + | 'HIGH_TRANSFER_FEE' + | 'HIGH_BUY_FEE' + | 'HIGH_SELL_FEE'; + + /** + * An enumeration. + */ + type: 'Benign' | 'Info' | 'Warning' | 'Malicious'; + } } } diff --git a/src/resources/token.ts b/src/resources/token.ts index c49a0f7f..d7f8ea65 100755 --- a/src/resources/token.ts +++ b/src/resources/token.ts @@ -25,20 +25,55 @@ export class Token extends APIResource { export type TokenReportResponse = unknown; export interface TokenScanResponse { + /** + * Token address to validate (EVM / Solana) + */ + address: string; + /** * Dictionary of detected attacks found during the scan */ attack_types: Record; + /** + * The chain name + */ + chain: EvmAPI.TokenScanSupportedChain; + + /** + * Fees associated with the token + */ + fees: TokenScanResponse.Fees; + + /** + * financial stats of the token + */ + financial_stats: TokenScanResponse.FinancialStats; + /** * Score between 0 to 1 (double) */ malicious_score: string; + /** + * Metadata of the token + */ + metadata: TokenScanResponse.Metadata; + /** * An enumeration. */ result_type: 'Benign' | 'Warning' | 'Malicious' | 'Spam'; + + /** + * Trading limits of the token + */ + trading_limits: TokenScanResponse.TradingLimits; + + /** + * List of features associated with the token + */ + features?: Array; } export namespace TokenScanResponse { @@ -58,6 +93,232 @@ export namespace TokenScanResponse { */ threshold?: string; } + + /** + * Fees associated with the token + */ + export interface Fees { + /** + * Buy fee of the token + */ + buy?: number; + + /** + * Sell fee of the token + */ + sell?: number; + + /** + * Transfer fee of the token + */ + transfer?: number; + } + + /** + * financial stats of the token + */ + export interface FinancialStats { + burned_liquidity_percentage?: number; + + holders_count?: number; + + locked_liquidity_percentage?: number; + + top_holders?: Array; + + usd_price_per_unit?: number; + } + + export namespace FinancialStats { + export interface TopHolder { + address?: string; + + holding_percentage?: number; + } + } + + /** + * Metadata of the token + */ + export interface Metadata { + freeze_authority: string; + + mint_authority: string; + + /** + * internal metadata + */ + token_metadata: Metadata.TokenMetadata; + + update_authority: string; + + /** + * Address of the deployer of the fungible token + */ + deployer?: string; + + /** + * Description of the token + */ + description?: string; + + /** + * URL of the token image + */ + image_url?: string; + + /** + * Name of the token + */ + name?: string; + + /** + * Price per unit of the token. For NFT, it's the price of the NFT. For ERC20, it's + * the price of a single token. Can be updated daily. + */ + price_per_unit?: number; + + /** + * Symbol of the token + */ + symbol?: string; + + /** + * Type of the token + */ + type?: string; + } + + export namespace Metadata { + /** + * internal metadata + */ + export interface TokenMetadata { + /** + * Address of the deployer of the fungible token + */ + deployer?: string; + + /** + * Description of the token + */ + description?: string; + + /** + * Number of owners of the fungible token, updated daily + */ + holders_count?: number; + + /** + * URL of the token image + */ + image_url?: string; + + /** + * List of malicious_urls + */ + malicious_urls?: Array; + + /** + * Name of the token + */ + name?: string; + + /** + * Symbol of the token + */ + symbol?: string; + + /** + * An enumeration. + */ + type?: 'erc20' | 'erc721' | 'erc1155' | 'FUNGIBLE' | 'NonFungible'; + + /** + * Uri of the token + */ + uri?: string; + + /** + * List of urls + */ + urls?: Array; + } + } + + /** + * Trading limits of the token + */ + export interface TradingLimits { + max_buy?: TradingLimits.MaxBuy; + + max_holding?: TradingLimits.MaxHolding; + + max_sell?: TradingLimits.MaxSell; + + sell_limit_per_block?: TradingLimits.SellLimitPerBlock; + } + + export namespace TradingLimits { + export interface MaxBuy { + amount?: number; + + amount_wei?: string; + } + + export interface MaxHolding { + amount?: number; + + amount_wei?: string; + } + + export interface MaxSell { + amount?: number; + + amount_wei?: string; + } + + export interface SellLimitPerBlock { + amount?: number; + + amount_wei?: string; + } + } + + export interface Feature { + /** + * Description of the feature + */ + description: string; + + /** + * An enumeration. + */ + feature_id: + | 'VERIFIED_CONTRACT' + | 'HIGH_TRADE_VOLUME' + | 'MARKET_PLACE_SALES_HISTORY' + | 'HIGH_REPUTATION_TOKEN' + | 'STATIC_CODE_SIGNATURE' + | 'KNOWN_MALICIOUS' + | 'METADATA' + | 'AIRDROP_PATTERN' + | 'IMPERSONATOR' + | 'INORGANIC_VOLUME' + | 'DYNAMIC_ANALYSIS' + | 'UNSTABLE_TOKEN_PRICE' + | 'RUGPULL' + | 'CONSUMER_OVERRIDE' + | 'INAPPROPRIATE_CONTENT' + | 'HIGH_TRANSFER_FEE' + | 'HIGH_BUY_FEE' + | 'HIGH_SELL_FEE'; + + /** + * An enumeration. + */ + type: 'Benign' | 'Info' | 'Warning' | 'Malicious'; + } } export interface TokenReportParams {