Skip to content

TrepaOrg/trepa-sdk

Repository files navigation

Trepa

@trepa/sdk

TypeScript SDK for the Trepa precision-prediction protocol

npm bundle size (minified + gzipped) Node.js pnpm TypeScript Solana mainnet MIT License

📚 Read the docs →


Warning

Experimental. The SDK is under active development and has not yet hit a stable release.

Install

npm install @trepa/sdk

Quickstart

Put your credentials in a .env file (and add it to .gitignore):

TREPA_API_KEY=trp_your_api_key
TREPA_PRIVATE_KEY=your_base58_wallet_private_key

Write the bot:

import { credentialsFromEnv, Trepa } from '@trepa/sdk';

const trepa = new Trepa({
  credentials: credentialsFromEnv(),
});

await trepa.bots.run({
  predict: (pool) => ({ value: 65_000, stake: pool.min_stake }),
});

Full guides at docs.trepa.io/developers:

Examples

Sample bots deployable via Docker:

License

MIT

About

Trepa SDK is the official TypeScript SDK for Trepa.

Topics

Resources

License

Stars

Watchers

Forks

Contributors