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

> ## Agent Instructions
> Treat Solana and Robinhood Chain as separate protocol paths.
> Write for people using the KEK.PRO app.
> Treat displayed fees, limits, and availability as environment-specific unless labeled as protocol constants.

# TypeScript SDK

> Use the KEK.PRO EVM namespace for versioned ABIs, chain profiles, exact math, and wallet transaction builders.

The maintained Node SDK exports EVM support under the additive `evm`
namespace. Existing Solana exports remain separate.

<figure className="kek-figure kek-figure--robinhood" data-mark="SDK" aria-labelledby="sdk-namespace-title">
  <div className="kek-figure__header">
    <span id="sdk-namespace-title">TypeScript SDK / EVM namespace</span>
    <small>One chain per client · wallet-free core</small>
  </div>

  <div className="kek-figure__body">
    <div className="kek-figure__grid kek-figure__grid--four">
      <div className="kek-figure__cell kek-figure__cell--accent"><span>ABIs</span><strong>Versioned interfaces</strong><small>Factory, token, locker, fee-right, pool, and router definitions.</small></div>
      <div className="kek-figure__cell"><span>Builders</span><strong>Wallet transactions</strong><small>Launch, swap, fee-right, and limit-order payloads.</small></div>
      <div className="kek-figure__cell"><span>Precision</span><strong>bigint boundaries</strong><small>Atomic contract values stay exact across reads and writes.</small></div>
      <div className="kek-figure__cell"><span>Chains</span><strong>Typed identity</strong><small>Robinhood Chain profiles stay explicit at every boundary.</small></div>
    </div>
  </div>

  <figcaption className="kek-figure__caption">Builders return transaction requests. Your wallet remains responsible for signing and submission.</figcaption>
</figure>

## Install

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
npm install @kekpro/integration-sdk viem
```

The checked-in package version is `1.0.0` and pins `viem` `2.55.8`.

<Info>
  `@kekpro/integration-sdk` is the checked-in package identity. Confirm the
  approved distribution channel and release version for your environment
  before installing it in a separate project.
</Info>

## Use the EVM namespace

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { evm } from "@kekpro/integration-sdk";

const chain = evm.chainById(46630);
const oneToken = 10n ** 18n;
const displayAmount = evm.formatAtomic(oneToken, 18);
```

The public EVM surface includes:

* versioned contract ABIs;
* Robinhood Chain descriptors;
* exact fixed-point and atomic-amount helpers;
* pure wallet transaction builders;
* transaction and contract-state types.

Use direct RPC reads for canonical contract state. Bind each client to the
expected chain ID before reading or building a transaction.

## Read canonical state

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { createPublicClient, http } from "viem";

const publicClient = createPublicClient({
  chain: evm.robinhoodTestnet,
  transport: http(process.env.ROBINHOOD_RPC_URL),
});

const symbol = await publicClient.readContract({
  address: token,
  abi: evm.launcherTokenAbi,
  functionName: "symbol",
});
```

Cross-check token, factory, pool, and locker relationships before treating a
contract as a KEK.PRO launch.

## Keep amounts exact

Keep contract-sized integers as `bigint`.

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const supplyAtomic = 1_000_000_000_000_000_000n;
const display = evm.formatAtomic(supplyAtomic, 18);
```

Never pass a balance, Q64.96 price, token supply, timestamp, or nonce through
JavaScript `Number`.

## Build wallet transactions

Transaction helpers are pure. They return:

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
type EvmTransactionRequest = {
  to: Address;
  data: Hex;
  value?: bigint;
};
```

Available builders cover:

* launch and TGE checkpoint;
* position-fee collection;
* fee-right auctions, bids, claims, listings, purchases, and closure;
* ERC-20 approval;
* exact-input V3 swaps;
* WETH wrapping and unwrapping;
* limit-order nonce cancellation.

The caller chooses slippage, deadline, account, nonce, and broadcast policy.

## Launch example

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const launch = evm.buildLaunchTransaction(
  launchFactory,
  params,
  salt,
  launchFee,
  {
    nativeAmount: initialBuy,
    recipient: account,
    amountOutMinimum,
    deadline,
  },
  launchConfigId,
  dexId,
);

const hash = await walletClient.sendTransaction({
  account,
  chain: walletClient.chain,
  ...launch,
});
```

Simulate the returned request from the sending account before broadcasting.

## Fee-right example

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const bidApproval = evm.buildApproveTransaction(
  launchedToken,
  feeRightsContract,
  bidAmount,
);

const bid = evm.buildPlaceFeeRightsBidTransaction(
  feeRightsContract,
  launchedToken,
  bidAmount,
);
```

Re-read the active round and allowance between approval and bid submission.

## Safety rules

* Pin the SDK, ABI, manifest, and protocol versions together.
* Reject unsupported chain IDs.
* Re-read mutable policy immediately before writes.
* Show exact addresses and values in wallet confirmation.
* Preserve transaction receipt and canonical event identity.
* Never add implicit slippage or silently change a user's deadline.
