> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webacy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Introduction

> Get started with the Webacy TypeScript SDK for blockchain risk analysis with type-safe clients, multi-chain support, retries, and structured error handling.

Use the Webacy SDK to integrate blockchain security and risk analysis capabilities into your applications. You get type-safe access to all Webacy API endpoints with built-in error handling, retry logic, and multi-chain support.

## Why Use the SDK?

<CardGroup cols={2}>
  <Card title="Type Safety" icon="shield-check">
    Full TypeScript support with complete type definitions for all requests and responses
  </Card>

  <Card title="Multi-Chain" icon="link-horizontal">
    Built-in support for 13 blockchains with type-safe Chain enum
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation">
    Structured error classes with recovery suggestions
  </Card>

  <Card title="Retry Logic" icon="rotate">
    Automatic retries with exponential backoff for transient failures
  </Card>
</CardGroup>

## Packages

The SDK is organized as a monorepo with focused packages:

| Package                                                                            | Description                                                                          |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [`@webacy-xyz/sdk`](https://www.npmjs.com/package/@webacy-xyz/sdk)                 | Unified SDK that re-exports all packages                                             |
| [`@webacy-xyz/sdk-core`](https://www.npmjs.com/package/@webacy-xyz/sdk-core)       | Core utilities: HTTP client, errors, Chain enum                                      |
| [`@webacy-xyz/sdk-threat`](https://www.npmjs.com/package/@webacy-xyz/sdk-threat)   | Threat analysis: addresses, contracts, sanctions, URLs, vault risk, depeg monitoring |
| [`@webacy-xyz/sdk-trading`](https://www.npmjs.com/package/@webacy-xyz/sdk-trading) | Trading analysis: holder analysis, sniper detection                                  |

<Tip>
  For most use cases, install `@webacy-xyz/sdk` which includes everything you need.
</Tip>

## Quick Example

```typescript theme={null}
import { ThreatClient, Chain } from '@webacy-xyz/sdk';

const client = new ThreatClient({
  apiKey: process.env.WEBACY_API_KEY,
  defaultChain: Chain.ETH,
});

// Analyze an address for security risks
const result = await client.addresses.analyze(
  '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
);

console.log(result.overallRisk); // 0-100 risk score
console.log(result.issues);      // Array of risk factors
```

## Supported Chains

The SDK supports all 13 blockchains available in the Webacy API:

```typescript theme={null}
import { Chain } from '@webacy-xyz/sdk';

Chain.ETH      // Ethereum
Chain.SOL      // Solana
Chain.BASE     // Base
Chain.BSC      // BNB Smart Chain
Chain.POL      // Polygon
Chain.ARB      // Arbitrum
Chain.OPT      // Optimism
Chain.TON      // TON
Chain.SUI      // Sui
Chain.STELLAR  // Stellar
Chain.BTC      // Bitcoin
Chain.SEI      // Sei
Chain.HEDERA   // Hedera
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/sdk/installation">
    Install the SDK in your project
  </Card>

  <Card title="ThreatClient" icon="shield" href="/sdk/threat-client">
    Analyze addresses, contracts, and URLs
  </Card>

  <Card title="TradingClient" icon="chart-line" href="/sdk/trading-client">
    Holder analysis and sniper detection
  </Card>

  <Card title="Error Handling" icon="bug" href="/sdk/error-handling">
    Handle errors gracefully
  </Card>
</CardGroup>
