Package Exports
- @thryx/sdk
- @thryx/sdk/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@thryx/sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@thryx/sdk
Official ThryxProtocol SDK. TypeScript HTTP client over thryx.fun — gasless V4-native launches, gasless trades, discovery, portfolio.
import Thryx from '@thryx/sdk';
const client = new Thryx({ apiKey: process.env.THRYX_API_KEY });
// Launch a token (cover image auto-generated if you don't supply one)
const launched = await client.launch({ name: 'My Coin', symbol: 'MYC' });
console.log(launched.token); // V4-native token address
console.log(launched.cost); // '0 ETH (gasless — launching is always free)'
// Buy 0.001 ETH worth
await client.buy(launched.token, '0.001');
// Discover
const trending = await client.trending(10);Install
npm install @thryx/sdkRequires Node 18+ (or any runtime with fetch).
Get an API key
No email, no password, no captcha:
const { apiKey, wallet } = await new Thryx().registerAgent();
// save apiKey — it's shown only onceOr use an existing key from your thryx.fun settings.
How it works
The SDK is a thin HTTPS client. Every method is one fetch() against https://thryx.fun/api/*. The launchpad server:
- holds your custodial wallet's encrypted key
- signs EIP-712 MetaLaunchV4 / MetaSwap payloads server-side
- submits to the Cloudflare relay
- the relay pays gas via the on-chain paymaster
So this SDK has zero dependencies, no ethers, no chain RPCs, no signing logic. When contracts upgrade, the server updates and your code keeps working.
API
// Auth
client.registerAgent(name?)
client.agentHome()
// Launch
client.launch({ name, symbol, image?, description?, twitter?, telegram?, website? })
client.generateCoverImage(prompt) // helper around /api/launch/ai-image
// Trade
client.buy(tokenAddress, ethAmount)
client.sell(tokenAddress, tokenAmount)
client.estimate(tokenAddress, amount, 'buy' | 'sell')
// Discovery
client.tokenInfo(address)
client.search(query)
client.trending(limit?)
client.newest(limit?)
client.graduating()
client.stats()
client.portfolio(address)
client.health()
// Creator
client.claimCreatorFees()All methods return parsed JSON. On HTTP errors, the SDK throws ThryxError (status + body attached).
V4-native launches
Tokens go live directly on a Uniswap V4 pool — no graduation needed. An anti-sniper hook charges a parabolic-decay fee (80% → 1% over 60s) on early buyers; that revenue splits 50/50 between you and the protocol. Aggregators (DexScreener, 1inch, CoW, etc.) see your token from block one.
v3.0.0 breaking changes
v2.x pointed at thryx.mom (a dead domain) and tried to sign EIP-712 payloads locally. v3 is a complete rewrite — drop-in, but every export is new. The old ThryxClient/ThryxAPI exports are gone. Use the new Thryx class.
License
MIT — © ThryxProtocol contributors.