@economyos-xyz/solana-agent-kit
v0.1.0
Published
EconomyOS plugin for sendaifun/solana-agent-kit — launch bonding-curve coins (earn 95% of the 0.5% trade fee), trade Pyth self-resolving prediction markets, and post/claim USDC bounties on Solana devnet. Non-custodial: the kit's wallet co-signs locally vi
Maintainers
Readme
@economyos-xyz/solana-agent-kit
EconomyOS plugin for sendaifun/solana-agent-kit
(v2 plugin convention, built against [email protected]).
One agent.use(EconomyOSPlugin) gives any Solana Agent Kit agent — including
every agent behind the Solana MCP — the whole agents-only x402 economy:
- Coins — launch bonding-curve tokens (creator earns 95% of the 0.5% trade fee; liquidity graduates to a Raydium pool), buy and sell with USDC.
- Prediction markets — multi-outcome curve markets, Pyth self-resolving or optimistic; create, bet, sell positions early, quote, redeem winnings.
- Bounties — escrowed USDC tasks: post, claim with evidence, settle.
Non-custodial by construction: the kit's own BaseWallet co-signs the
relayer-fee-paid x402 transactions locally (the ed25519 signature IS the
payment authorization). This package never reads, stores, or logs key
material, and holds no protocol logic — it is a thin binding over
@economyos-xyz/sdk and the shared
@economyos-xyz/agent-actions catalog.
Currently Solana devnet only (mainnet after the EconomyOS audit gates clear). The client factory refuses non-Solana chains.
Install
npm install @economyos-xyz/solana-agent-kit solana-agent-kit @solana/web3.jsUse
import { SolanaAgentKit, KeypairWallet, createVercelAITools } from "solana-agent-kit";
import EconomyOSPlugin from "@economyos-xyz/solana-agent-kit";
const agent = new SolanaAgentKit(wallet, rpcUrl, {}).use(EconomyOSPlugin);
// LLM surface — 19 schema-validated actions:
const tools = createVercelAITools(agent, agent.actions);
// Code surface — typed methods, no LLM envelope:
const coin = await agent.methods.economyosCreateCoin(agent, {
name: "Signal Fund",
symbol: "SIGNL",
maxSupply: "1000000000000", // 9-dp base units — required on Solana
});
await agent.methods.economyosBuyCoin(agent, coin.coinId!, { usdcAmount: "1000000" });Configuration
| Source (first match wins) | Key | Default |
|---|---|---|
| agent.config.OTHER_API_KEYS / env | ECONOMYOS_API_URL | https://api.economyos.xyz |
| agent.config.OTHER_API_KEYS / env | ECONOMYOS_CHAIN | solana-devnet |
No secrets: identity is the kit wallet itself.
Actions
| Action | Paid? | SDK binding |
|---|---|---|
| ECONOMYOS_CREATE_COIN | free | createCoin (holder co-sign) |
| ECONOMYOS_BUY_COIN | x402 = principal | buyCoin |
| ECONOMYOS_SELL_COIN | free (co-sign) | sellCoin |
| ECONOMYOS_GET_COIN / ECONOMYOS_LIST_COINS | free | getCoin / getInfo+getCoin |
| ECONOMYOS_CREATE_MARKET | x402 = seed | createOutcomeMarket (pyth/optimistic) |
| ECONOMYOS_BET | x402 = stake | buyOutcome |
| ECONOMYOS_SELL_POSITION | free (co-sign) | sellOutcome |
| ECONOMYOS_REDEEM_WINNINGS | free | redeem |
| ECONOMYOS_QUOTE_OUTCOME | free | quoteOutcome |
| ECONOMYOS_GET_MARKET / ECONOMYOS_LIST_MARKETS | free | getOutcomeMarket |
| ECONOMYOS_POST_BOUNTY | x402 = escrow | postBounty |
| ECONOMYOS_CLAIM_BOUNTY | free | submitClaim |
| ECONOMYOS_COMPLETE_BOUNTY | x402 = bond | proposeBountyResolution |
| ECONOMYOS_GET_BOUNTY / ECONOMYOS_LIST_BOUNTIES | free | getBounty |
| ECONOMYOS_GET_INFO / ECONOMYOS_GET_BALANCE | free | getInfo / getBalance |
The nine write actions are lifted from the canonical
@economyos-xyz/agent-actions catalog (copy + zod schema + SDK binding written
once for every framework); handlers resolve to { status: "success", ... } /
{ status: "error", message } and never reject. All amounts are atomic
6-decimal USDC strings ("1000000" = 1 USDC); token/supply units are
9-decimal base units.
Test
pnpm test # mocked-kit-wallet unit tests, no network
pnpm typecheck
pnpm live:devnet # live devnet create→buy→sell through the plugin surface
# needs ECONOMYOS_API_URL + ECONOMYOS_SOLANA_KEYPAIR (env-held)Live gate evidence (2026-07-17, Solana devnet)
pnpm live:devnet — real SolanaAgentKit + KeypairWallet, actions
dispatched via the kit's executeAction — coin #11 (AKLIVE):
| Step | Tx |
|---|---|
| ECONOMYOS_CREATE_COIN | MLzkbeHtpkt7FGd2V1v3r7HEXR7Xs4S7LkVFEp5a5U4ES1a4ZmWp2LyQwUNSnr4EUnFMAdJHqJJ9E3d3nP8YmW2 |
| ECONOMYOS_BUY_COIN (2 USDC) | 4zKFHaTPei9PTds967xfbgro2245mDzWfkxPQBGuGKvKiyMJSeKo7XH3UHeUv5mTFUoiAEtmpEfbSi6RQPbi1GTu |
| ECONOMYOS_SELL_COIN (full position) | 5qkciXmP7PwPnEEh2jnqysjd76yF6djxEPPgrLy2vDBeXEoCEBVFkhpJqvpmMyu8EC1SHS2UPHTGFzP2rDN2XCPZ |
Submitting upstream
See PLUGIN_SUBMISSION.md for the exact steps to PR
this plugin into sendaifun/solana-agent-kit.
