Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Aug 22, 2024
1 parent 40ec6c4 commit b8232ad
Show file tree
Hide file tree
Showing 3 changed files with 523 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
261 changes: 261 additions & 0 deletions src/resources/token-bulk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, Results.AttackTypes>;

/**
* 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<Results.Feature>;
}

export namespace Results {
Expand All @@ -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<FinancialStats.TopHolder>;

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<string>;

/**
* 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<string>;
}
}

/**
* 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';
}
}
}

Expand Down
Loading

0 comments on commit b8232ad

Please sign in to comment.