- Updated DBIS_ConversionRouter and DBIS_SettlementRouter to utilize IDBIS_EIP712Helper for EIP-712 hashing and signature recovery, improving stack depth management. - Refactored minting logic in DBIS_GRU_MintController to streamline recipient processing. - Enhanced BUILD_NOTES.md with updated build instructions and test coverage details. - Added new functions in DBIS_SignerRegistry for duplicate signer checks and active signer validation. - Introduced a new submodule, DBIS_EIP712Helper, to encapsulate EIP-712 related functionalities. Made-with: Cursor
55 lines
1.1 KiB
TypeScript
55 lines
1.1 KiB
TypeScript
/**
|
|
* Base adapter interface for external API integrations
|
|
*/
|
|
export interface ExternalApiAdapter {
|
|
/**
|
|
* Check if the chain is supported by this API provider
|
|
*/
|
|
checkChainSupport(chainId: number): Promise<boolean>;
|
|
|
|
/**
|
|
* Get token metadata by contract address
|
|
*/
|
|
getTokenByContract(chainId: number, address: string): Promise<TokenMetadata | null>;
|
|
|
|
/**
|
|
* Get market data for a token
|
|
*/
|
|
getMarketData(chainId: number, address: string): Promise<MarketData | null>;
|
|
|
|
/**
|
|
* Get provider name
|
|
*/
|
|
getProviderName(): string;
|
|
}
|
|
|
|
export interface TokenMetadata {
|
|
id?: string; // Provider-specific ID (e.g., CoinGecko coin ID)
|
|
name?: string;
|
|
symbol?: string;
|
|
description?: string;
|
|
logoUrl?: string;
|
|
websiteUrl?: string;
|
|
socialLinks?: {
|
|
twitter?: string;
|
|
telegram?: string;
|
|
discord?: string;
|
|
github?: string;
|
|
};
|
|
}
|
|
|
|
export interface MarketData {
|
|
priceUsd?: number;
|
|
priceChange24h?: number;
|
|
volume24h?: number;
|
|
marketCapUsd?: number;
|
|
liquidityUsd?: number;
|
|
lastUpdated?: Date;
|
|
}
|
|
|
|
export interface ApiCacheEntry {
|
|
key: string;
|
|
data: unknown;
|
|
expiresAt: Date;
|
|
}
|