TypeScript SDK for the Trepa precision-prediction protocol
Warning
Experimental. The SDK is under active development and has not yet hit a stable release.
npm install @trepa/sdkPut 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_keyWrite 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:
Sample bots deployable via Docker:
