INNER CODE UNIT · TypeScript

maskCredentials

lazy-dinosaur/ccxt-mcp · src/server.ts:52

function maskCredentials(account: Partial<AccountConfig>): string {
  const safe = { ...account };
  if (safe.apiKey) safe.apiKey = '***REDACTED***';
  if (safe.secret) safe.secret = '***REDACTED***';
  if (safe.password) safe.password = '***REDACTED***';
  if (safe.privateKey) safe.privateKey = '***REDACTED***';
  return JSON.stringify(safe);
}

/**
 * CCXT MCP 서버 클래스
 * MCP 프로토콜을 통해 CCXT 기능을 노출합니다.
 */
export class CcxtMcpServer {
  private server: McpServer;
  // Key: account name from config, Value: Authenticated CCXT Exchange instance
  private exchangeInstances: Record<string, Exchange> = {};
  // Key: `${exchangeId}-${marketType}`, Value: Public (unauthenticated) CCXT Exchange instance

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…