[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78SH1F1RRGM04052R6CV5GE":3,"skill-same:01M78SH1F1RRGM04052R6CV5GE":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":13,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":47},"01M78SH1F1RRGM04052R6CV5GE","tokendraft",null,"Full suite for TokenDraft fantasy crypto tournaments — authenticate with a Solana wallet, query\u002Fjoin\u002Fauto-join tournaments, and manage auto-draft asset priority rankings.","meghal86\u002Fstacksignal","meghal86","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37388715?v=4","01M6CS2EW8SK89GH52R2ZEN8QQ","01M728J5CGY456EETEFG6HJBTM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokendraft\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokendraft\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tokendraft\ndescription: Full suite for TokenDraft fantasy crypto tournaments — authenticate with a Solana wallet, query\u002Fjoin\u002Fauto-join tournaments, and manage auto-draft asset priority rankings.\nenv:\n  - name: SOLANA_PRIVATE_KEY\n    description: Base58-encoded Solana Ed25519 private key used to derive the wallet public key, sign authentication challenges, and sign on-chain buy-in transactions.\n    required: true\n    sensitive: true\n---\n\n# TokenDraft Authentication\n\nTwo-step challenge-response flow. Private key never leaves the local environment.\n\nAfter successful login, store `TOKENDRAFT_USER_ID` (from `user.id`) and `TOKENDRAFT_JWT` (from `token`) as env vars. These are required by all other TokenDraft endpoints.\n\n**If any TokenDraft endpoint returns 401, re-run this auth flow automatically and retry the failed request.**\n\n## Step 1: Request a Nonce\n\n```bash\ncurl -X POST https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Fnonce \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"walletPublicKey\": \"\u003CWALLET_PUBLIC_KEY>\"}'\n```\n\nReturns `{ nonce, message }`. The `message` is the exact string to sign. Nonce expires after 5 minutes, single-use.\n\n## Step 2: Sign and Log In\n\nSign `message` locally with Ed25519, base58-encode the signature:\n\n```bash\ncurl -X POST https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Flogin \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"walletPublicKey\": \"\u003CWALLET_PUBLIC_KEY>\",\n    \"nonce\": \"\u003CNONCE>\",\n    \"signature\": \"\u003CBASE58_SIGNATURE>\"\n  }'\n```\n\nReturns `{ token, user }`. First login auto-creates an account.\n\n**On first login** (the user's `displayName` is a short hash like `\"a3F9x\"`), ask the user if they'd like to set a display name. If yes, call the Update Display Name endpoint below.\n\n## Update Display Name\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fusers\u002FdisplayName\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"displayName\": \"\u003CNEW_NAME>\"}'\n```\n\nConstraints: display name must be unique across all users. Can only be changed once every 24 hours. HTTP 429 is returned with `retryAfterMs` if rate-limited.\n\n## Signing Reference\n\n```javascript\nimport nacl from 'tweetnacl';\nimport bs58 from 'bs58';\n\nconst secretKey = bs58.decode(process.env.SOLANA_PRIVATE_KEY);\nconst keyPair = nacl.sign.keyPair.fromSecretKey(secretKey);\nconst walletPublicKey = bs58.encode(keyPair.publicKey);\n\n\u002F\u002F Step 1\nconst { nonce, message } = await fetch('https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Fnonce', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({ walletPublicKey }),\n}).then(r => r.json());\n\n\u002F\u002F Step 2\nconst messageBytes = new TextEncoder().encode(message);\nconst signature = nacl.sign.detached(messageBytes, keyPair.secretKey);\nconst signatureBase58 = bs58.encode(signature);\n\nconst { token, user } = await fetch('https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Flogin', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({ walletPublicKey, nonce, signature: signatureBase58 }),\n}).then(r => r.json());\n```\n\n## Token Usage\n\nInclude in all authenticated requests:\n\n```\nAuthorization: Bearer $TOKENDRAFT_JWT\n```\n\nToken does not expire but may be invalidated on server secret rotation.\n\n---\n\n# TokenDraft Tournaments\n\nAll endpoints use base URL `https:\u002F\u002Ftokendraft-production.up.railway.app` and require `Authorization: Bearer $TOKENDRAFT_JWT`. Re-authenticate via the auth flow above on 401.\n\n## Query Tournaments\n\n```bash\ncurl \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Ftournaments?\u003CPARAMS>\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\"\n```\n\n| Param | Type | Description |\n|-------|------|-------------|\n| `isOpen` | boolean | Accepting registrations |\n| `isInProgress` | boolean | Currently being played |\n| `isFinished` | boolean | Completed |\n| `isRegistered` | boolean | Filter by user's registration status |\n| `finishedLookbackHours` | number | Hours to look back for finished (default: 24, 0 = all) |\n\nFilters combine with AND. No state filter defaults to open tournaments only.\n\nReturns array of `TournamentSummary`:\n\n```typescript\n{ id: string, name: string, buyInAmountSol: number, registrationStartTime: string,\n  registrationEndTime: string, state: string, numPlayersRegistered: number,\n  maxPlayers: number, amIRegistered: boolean,\n  draftType: \"snake\" | \"boosterPack\" | \"instantRoster\",\n  rosterSlots: { Chain?: number, Meme?: number, Utility?: number, NFT?: number, Flex?: number } }\n```\n\n## Join Free Tournament\n\nIf `buyInAmountSol` is 0:\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Ftournaments\u002Fjoin\u002F\u003CTOURNAMENT_ID>\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\"\n```\n\nHTTP 200 = registered. Relay any error to the user.\n\nUpdate asset priority rankings if this is an instant roster tournament.\n\n## Join Paid Tournament (Buy-In)\n\nFor `buyInAmountSol > 0`, verify SOL balance covers the buy-in + fees first.\n\n**1. Initiate transaction:**\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002FbuyIn\u002FinitiateTransaction\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"tournamentId\": \"\u003CID>\", \"walletPublicKey\": \"\u003CPUBKEY>\"}'\n```\n\nReturns `{ transaction (base64), expectedSignature, tournamentInfo }`.\n\n**2. Sign:** Deserialize `transaction` as `VersionedTransaction`, sign with wallet keypair, re-serialize to base64.\n\n**3. Send signed transaction:**\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002FbuyIn\u002FsendSignedTransaction\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"signedTransactionBase64\": \"\u003CBASE64>\",\n    \"tournamentId\": \"\u003CID>\",\n    \"expectedSignature\": \"\u003CSIG>\",\n    \"walletPublicKey\": \"\u003CPUBKEY>\"\n  }'\n```\n\nHTTP 200 = registered. Relay errors (tournament full, already registered, on-chain failure).\n\nUpdate asset priority rankings if this is an instant roster tournament.\n\n## Instant Roster Tournaments\n\nWhen `draftType` is `\"instantRoster\"`, the system auto-drafts the entire roster instantly from the player's asset priority rankings. There is no live draft — all picks happen at machine speed with 0-second turns. Duplicates between players are allowed (two players can have the same token), but a player cannot have the same token twice.\n\n**After joining an instantRoster tournament, you MUST set asset priority rankings** so the auto-drafter knows what to pick.\n\n### How to build rankings that fulfil roster slots\n\nThe tournament's `rosterSlots` tells you how many assets of each type are needed. Each asset from `GET \u002Fapi\u002Fv2\u002Fassets` has an `assetType` field (e.g. `\"Chain\"`, `\"Meme\"`, `\"Utility\"`, `\"NFT\"`). The `\"Flex\"` slot accepts any type.\n\n**Steps:**\n\n1. Fetch assets: `GET \u002Fapi\u002Fv2\u002Fassets` — returns `[{ id, name, ticker, assetType, priceUSD, marketcapUSD, dayChangePercent, dayVolumeUSD, ... }]`\n2. Read `rosterSlots` from the tournament (e.g. `{ \"Chain\": 2, \"Meme\": 2, \"Utility\": 1, \"NFT\": 1, \"Flex\": 1 }`)\n3. For each slot type (except Flex), pick the best assets of that `assetType` based on user strategy\n4. For the Flex slot(s), pick the best remaining asset of any type\n5. If a slot is not present, or has value \u003C= 0, ignore all assets of that type when ranking.\n6. Submit as ranked list via `PUT \u002Fapi\u002Fv2\u002FassetPriorityRankings`\n\n**Example** — given `rosterSlots: { \"Chain\": 2, \"Meme\": 2, \"Utility\": 1, \"NFT\": 1, \"Flex\": 1 }` and a \"highest market cap\" strategy:\n\n```\nassets = GET \u002Fapi\u002Fv2\u002Fassets\nSort assets by marketcapUSD descending within each assetType:\n  chains  = assets.filter(a => a.assetType === \"Chain\").sort(by marketcapUSD desc)\n  memes   = assets.filter(a => a.assetType === \"Meme\").sort(by marketcapUSD desc)\n  utils   = assets.filter(a => a.assetType === \"Utility\").sort(by marketcapUSD desc)\n  nfts    = assets.filter(a => a.assetType === \"NFT\").sort(by marketcapUSD desc)\n\nPick top N for each slot:\n  rank 1: chains[0]    (Chain slot 1)\n  rank 2: chains[1]    (Chain slot 2)\n  rank 3: memes[0]     (Meme slot 1)\n  rank 4: memes[1]     (Meme slot 2)\n  rank 5: utils[0]     (Utility slot)\n  rank 6: nfts[0]      (NFT slot)\n  rank 7: best remaining asset of any type (Flex slot)\n\nAnything set to rank 1 will be selected as \"captain\", and be worth double points, so set rank 1 as best overall pick within roster.\n\nPUT \u002Fapi\u002Fv2\u002FassetPriorityRankings with:\n  { \"assets\": [{\"assetId\":\"\u003Cchains[0].id>\",\"rank\":1}, ...], \"autoDraftStrategy\": \"MKT_CAP_DESC\" }\n```\n\n### Full flow for instantRoster tournaments\n\n1. Query open tournaments and find one with `draftType === \"instantRoster\"`\n2. Join the tournament (free or paid flow as above)\n3. Fetch assets from `GET \u002Fapi\u002Fv2\u002Fassets`\n4. Build a ranked list of 7 assets that fulfil the tournament's `rosterSlots`, using the user's preferred strategy (ask if not known)\n5. Submit rankings via `PUT \u002Fapi\u002Fv2\u002FassetPriorityRankings`\n6. **Report to the user** which assets were picked for each slot and ask if they want to make any changes before the draft starts\n7. If the user requests changes, update rankings accordingly and re-submit\n\n## Auto-Join (Cron)\n\nSet up a cron job to join all open tournaments every 30 minutes:\n\n```bash\nopenclaw cron add \\\n  --name \"tokendraft-auto-join\" \\\n  --cron \"*\u002F30 * * * *\" \\\n  --session isolated \\\n  --message \"Auto-join open TokenDraft tournaments. Steps:\n1. Authenticate with TokenDraft (see auth section above).\n2. GET \u002Fagents\u002Ftournaments?isOpen=true&isRegistered=false to find open tournaments.\n3. For each: if buyInAmountSol is 0, POST \u002Ftournaments\u002Fjoin\u002F\u003Cid>. If > 0, check SOL balance and follow buy-in flow.\n4. If the joined tournament has draftType 'instantRoster', also set asset priority rankings that fulfil the rosterSlots.\n5. Report results for each tournament (joined or error reason).\"\n```\n\nManage with `openclaw cron list`, `openclaw cron remove \u003Cid>`, `openclaw cron edit \u003Cid> --enabled false\u002Ftrue`.\n\n---\n\n# TokenDraft Asset Rankings\n\nAll endpoints use base URL `https:\u002F\u002Ftokendraft-production.up.railway.app` and require `Authorization: Bearer $TOKENDRAFT_JWT`. Re-authenticate via the auth flow above on 401.\n\n## Step 1: Ask the User for Ranking Advice\n\nAsk how they want assets ranked before fetching data (e.g. by market cap, volume, buy the dip, memecoins first).\n\n## Step 2: Fetch Assets\n\n```bash\ncurl \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fassets\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\"\n```\n\nReturns array of assets with fields: `id`, `name`, `ticker`, `priceUSD`, `marketcapUSD`, `dayChangePercent`, `dayVolumeUSD`, `adpRanking`, `assetType`, `tags`.\n\n## Step 3: Rank\n\nAssign each asset a rank from 1 (drafted first) to N (last). Use the user's advice combined with financial data.\n\nBuilt-in strategies (set as `autoDraftStrategy` to use instead of manual ranks):\n\n`VOL_24H_DESC`, `VOL_24H_ASC`, `MKT_CAP_ASC`, `MKT_CAP_DESC`, `ADP`, `PERCENT_24H_ASC`, `PERCENT_24H_DESC`\n\n\n\n## Step 4: Submit Rankings\n\n```bash\ncurl -X PUT \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002FassetPriorityRankings\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"assets\": [{\"assetId\": \"\u003CID>\", \"rank\": 1}, ...],\n    \"autoDraftStrategy\": \"PERCENT_24H_DESC\"\n  }'\n```\n\nInclude only the top 7 assets. Set `rank` to unique integers. `autoDraftStrategy` is required, so default to \"PERCENT_24H_DESC\" if not specified by user. This is the fallback if any assets are unavailable from rankings.\n\n## Auto-Update Rankings (Cron)\n\nAsk the user for ranking advice and update frequency, then create a cron job:\n\n```bash\nopenclaw cron add \\\n  --name \"tokendraft-auto-rank\" \\\n  --cron \"\u003CCRON_EXPRESSION>\" \\\n  --session isolated \\\n  --message \"Update TokenDraft rankings. Steps:\n1. Authenticate (see auth section above).\n2. GET \u002Fapi\u002Fv2\u002Fassets for current data.\n3. Rank all assets 1-N based on: \u003CUSER_RANKING_ADVICE>.\n4. PUT \u002Fapi\u002Fv2\u002FassetPriorityRankings with ranked list.\n5. Report success or failure.\"\n```\n\nManage with `openclaw cron list`, `openclaw cron remove \u003Cid>`, `openclaw cron edit \u003Cid> --enabled false\u002Ftrue`.\n","# TokenDraft Authentication\n\nTwo-step challenge-response flow. Private key never leaves the local environment.\n\nAfter successful login, store `TOKENDRAFT_USER_ID` (from `user.id`) and `TOKENDRAFT_JWT` (from `token`) as env vars. These are required by all other TokenDraft endpoints.\n\n**If any TokenDraft endpoint returns 401, re-run this auth flow automatically and retry the failed request.**\n\n## Step 1: Request a Nonce\n\n```bash\ncurl -X POST https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Fnonce \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"walletPublicKey\": \"\u003CWALLET_PUBLIC_KEY>\"}'\n```\n\nReturns `{ nonce, message }`. The `message` is the exact string to sign. Nonce expires after 5 minutes, single-use.\n\n## Step 2: Sign and Log In\n\nSign `message` locally with Ed25519, base58-encode the signature:\n\n```bash\ncurl -X POST https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Flogin \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"walletPublicKey\": \"\u003CWALLET_PUBLIC_KEY>\",\n    \"nonce\": \"\u003CNONCE>\",\n    \"signature\": \"\u003CBASE58_SIGNATURE>\"\n  }'\n```\n\nReturns `{ token, user }`. First login auto-creates an account.\n\n**On first login** (the user's `displayName` is a short hash like `\"a3F9x\"`), ask the user if they'd like to set a display name. If yes, call the Update Display Name endpoint below.\n\n## Update Display Name\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fusers\u002FdisplayName\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"displayName\": \"\u003CNEW_NAME>\"}'\n```\n\nConstraints: display name must be unique across all users. Can only be changed once every 24 hours. HTTP 429 is returned with `retryAfterMs` if rate-limited.\n\n## Signing Reference\n\n```javascript\nimport nacl from 'tweetnacl';\nimport bs58 from 'bs58';\n\nconst secretKey = bs58.decode(process.env.SOLANA_PRIVATE_KEY);\nconst keyPair = nacl.sign.keyPair.fromSecretKey(secretKey);\nconst walletPublicKey = bs58.encode(keyPair.publicKey);\n\n\u002F\u002F Step 1\nconst { nonce, message } = await fetch('https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Fnonce', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({ walletPublicKey }),\n}).then(r => r.json());\n\n\u002F\u002F Step 2\nconst messageBytes = new TextEncoder().encode(message);\nconst signature = nacl.sign.detached(messageBytes, keyPair.secretKey);\nconst signatureBase58 = bs58.encode(signature);\n\nconst { token, user } = await fetch('https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Flogin', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({ walletPublicKey, nonce, signature: signatureBase58 }),\n}).then(r => r.json());\n```\n\n## Token Usage\n\nInclude in all authenticated requests:\n\n```\nAuthorization: Bearer $TOKENDRAFT_JWT\n```\n\nToken does not expire but may be invalidated on server secret rotation.\n\n---\n\n# TokenDraft Tournaments\n\nAll endpoints use base URL `https:\u002F\u002Ftokendraft-production.up.railway.app` and require `Authorization: Bearer $TOKENDRAFT_JWT`. Re-authenticate via the auth flow above on 401.\n\n## Query Tournaments\n\n```bash\ncurl \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fagents\u002Ftournaments?\u003CPARAMS>\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\"\n```\n\n| Param | Type | Description |\n|-------|------|-------------|\n| `isOpen` | boolean | Accepting registrations |\n| `isInProgress` | boolean | Currently being played |\n| `isFinished` | boolean | Completed |\n| `isRegistered` | boolean | Filter by user's registration status |\n| `finishedLookbackHours` | number | Hours to look back for finished (default: 24, 0 = all) |\n\nFilters combine with AND. No state filter defaults to open tournaments only.\n\nReturns array of `TournamentSummary`:\n\n```typescript\n{ id: string, name: string, buyInAmountSol: number, registrationStartTime: string,\n  registrationEndTime: string, state: string, numPlayersRegistered: number,\n  maxPlayers: number, amIRegistered: boolean,\n  draftType: \"snake\" | \"boosterPack\" | \"instantRoster\",\n  rosterSlots: { Chain?: number, Meme?: number, Utility?: number, NFT?: number, Flex?: number } }\n```\n\n## Join Free Tournament\n\nIf `buyInAmountSol` is 0:\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Ftournaments\u002Fjoin\u002F\u003CTOURNAMENT_ID>\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\"\n```\n\nHTTP 200 = registered. Relay any error to the user.\n\nUpdate asset priority rankings if this is an instant roster tournament.\n\n## Join Paid Tournament (Buy-In)\n\nFor `buyInAmountSol > 0`, verify SOL balance covers the buy-in + fees first.\n\n**1. Initiate transaction:**\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002FbuyIn\u002FinitiateTransaction\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"tournamentId\": \"\u003CID>\", \"walletPublicKey\": \"\u003CPUBKEY>\"}'\n```\n\nReturns `{ transaction (base64), expectedSignature, tournamentInfo }`.\n\n**2. Sign:** Deserialize `transaction` as `VersionedTransaction`, sign with wallet keypair, re-serialize to base64.\n\n**3. Send signed transaction:**\n\n```bash\ncurl -X POST \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002FbuyIn\u002FsendSignedTransaction\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"signedTransactionBase64\": \"\u003CBASE64>\",\n    \"tournamentId\": \"\u003CID>\",\n    \"expectedSignature\": \"\u003CSIG>\",\n    \"walletPublicKey\": \"\u003CPUBKEY>\"\n  }'\n```\n\nHTTP 200 = registered. Relay errors (tournament full, already registered, on-chain failure).\n\nUpdate asset priority rankings if this is an instant roster tournament.\n\n## Instant Roster Tournaments\n\nWhen `draftType` is `\"instantRoster\"`, the system auto-drafts the entire roster instantly from the player's asset priority rankings. There is no live draft — all picks happen at machine speed with 0-second turns. Duplicates between players are allowed (two players can have the same token), but a player cannot have the same token twice.\n\n**After joining an instantRoster tournament, you MUST set asset priority rankings** so the auto-drafter knows what to pick.\n\n### How to build rankings that fulfil roster slots\n\nThe tournament's `rosterSlots` tells you how many assets of each type are needed. Each asset from `GET \u002Fapi\u002Fv2\u002Fassets` has an `assetType` field (e.g. `\"Chain\"`, `\"Meme\"`, `\"Utility\"`, `\"NFT\"`). The `\"Flex\"` slot accepts any type.\n\n**Steps:**\n\n1. Fetch assets: `GET \u002Fapi\u002Fv2\u002Fassets` — returns `[{ id, name, ticker, assetType, priceUSD, marketcapUSD, dayChangePercent, dayVolumeUSD, ... }]`\n2. Read `rosterSlots` from the tournament (e.g. `{ \"Chain\": 2, \"Meme\": 2, \"Utility\": 1, \"NFT\": 1, \"Flex\": 1 }`)\n3. For each slot type (except Flex), pick the best assets of that `assetType` based on user strategy\n4. For the Flex slot(s), pick the best remaining asset of any type\n5. If a slot is not present, or has value \u003C= 0, ignore all assets of that type when ranking.\n6. Submit as ranked list via `PUT \u002Fapi\u002Fv2\u002FassetPriorityRankings`\n\n**Example** — given `rosterSlots: { \"Chain\": 2, \"Meme\": 2, \"Utility\": 1, \"NFT\": 1, \"Flex\": 1 }` and a \"highest market cap\" strategy:\n\n```\nassets = GET \u002Fapi\u002Fv2\u002Fassets\nSort assets by marketcapUSD descending within each assetType:\n  chains  = assets.filter(a => a.assetType === \"Chain\").sort(by marketcapUSD desc)\n  memes   = assets.filter(a => a.assetType === \"Meme\").sort(by marketcapUSD desc)\n  utils   = assets.filter(a => a.assetType === \"Utility\").sort(by marketcapUSD desc)\n  nfts    = assets.filter(a => a.assetType === \"NFT\").sort(by marketcapUSD desc)\n\nPick top N for each slot:\n  rank 1: chains[0]    (Chain slot 1)\n  rank 2: chains[1]    (Chain slot 2)\n  rank 3: memes[0]     (Meme slot 1)\n  rank 4: memes[1]     (Meme slot 2)\n  rank 5: utils[0]     (Utility slot)\n  rank 6: nfts[0]      (NFT slot)\n  rank 7: best remaining asset of any type (Flex slot)\n\nAnything set to rank 1 will be selected as \"captain\", and be worth double points, so set rank 1 as best overall pick within roster.\n\nPUT \u002Fapi\u002Fv2\u002FassetPriorityRankings with:\n  { \"assets\": [{\"assetId\":\"\u003Cchains[0].id>\",\"rank\":1}, ...], \"autoDraftStrategy\": \"MKT_CAP_DESC\" }\n```\n\n### Full flow for instantRoster tournaments\n\n1. Query open tournaments and find one with `draftType === \"instantRoster\"`\n2. Join the tournament (free or paid flow as above)\n3. Fetch assets from `GET \u002Fapi\u002Fv2\u002Fassets`\n4. Build a ranked list of 7 assets that fulfil the tournament's `rosterSlots`, using the user's preferred strategy (ask if not known)\n5. Submit rankings via `PUT \u002Fapi\u002Fv2\u002FassetPriorityRankings`\n6. **Report to the user** which assets were picked for each slot and ask if they want to make any changes before the draft starts\n7. If the user requests changes, update rankings accordingly and re-submit\n\n## Auto-Join (Cron)\n\nSet up a cron job to join all open tournaments every 30 minutes:\n\n```bash\nopenclaw cron add \\\n  --name \"tokendraft-auto-join\" \\\n  --cron \"*\u002F30 * * * *\" \\\n  --session isolated \\\n  --message \"Auto-join open TokenDraft tournaments. Steps:\n1. Authenticate with TokenDraft (see auth section above).\n2. GET \u002Fagents\u002Ftournaments?isOpen=true&isRegistered=false to find open tournaments.\n3. For each: if buyInAmountSol is 0, POST \u002Ftournaments\u002Fjoin\u002F\u003Cid>. If > 0, check SOL balance and follow buy-in flow.\n4. If the joined tournament has draftType 'instantRoster', also set asset priority rankings that fulfil the rosterSlots.\n5. Report results for each tournament (joined or error reason).\"\n```\n\nManage with `openclaw cron list`, `openclaw cron remove \u003Cid>`, `openclaw cron edit \u003Cid> --enabled false\u002Ftrue`.\n\n---\n\n# TokenDraft Asset Rankings\n\nAll endpoints use base URL `https:\u002F\u002Ftokendraft-production.up.railway.app` and require `Authorization: Bearer $TOKENDRAFT_JWT`. Re-authenticate via the auth flow above on 401.\n\n## Step 1: Ask the User for Ranking Advice\n\nAsk how they want assets ranked before fetching data (e.g. by market cap, volume, buy the dip, memecoins first).\n\n## Step 2: Fetch Assets\n\n```bash\ncurl \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002Fassets\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\"\n```\n\nReturns array of assets with fields: `id`, `name`, `ticker`, `priceUSD`, `marketcapUSD`, `dayChangePercent`, `dayVolumeUSD`, `adpRanking`, `assetType`, `tags`.\n\n## Step 3: Rank\n\nAssign each asset a rank from 1 (drafted first) to N (last). Use the user's advice combined with financial data.\n\nBuilt-in strategies (set as `autoDraftStrategy` to use instead of manual ranks):\n\n`VOL_24H_DESC`, `VOL_24H_ASC`, `MKT_CAP_ASC`, `MKT_CAP_DESC`, `ADP`, `PERCENT_24H_ASC`, `PERCENT_24H_DESC`\n\n\n\n## Step 4: Submit Rankings\n\n```bash\ncurl -X PUT \"https:\u002F\u002Ftokendraft-production.up.railway.app\u002Fapi\u002Fv2\u002FassetPriorityRankings\" \\\n  -H \"Authorization: Bearer $TOKENDRAFT_JWT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"assets\": [{\"assetId\": \"\u003CID>\", \"rank\": 1}, ...],\n    \"autoDraftStrategy\": \"PERCENT_24H_DESC\"\n  }'\n```\n\nInclude only the top 7 assets. Set `rank` to unique integers. `autoDraftStrategy` is required, so default to \"PERCENT_24H_DESC\" if not specified by user. This is the fallback if any assets are unavailable from rankings.\n\n## Auto-Update Rankings (Cron)\n\nAsk the user for ranking advice and update frequency, then create a cron job:\n\n```bash\nopenclaw cron add \\\n  --name \"tokendraft-auto-rank\" \\\n  --cron \"\u003CCRON_EXPRESSION>\" \\\n  --session isolated \\\n  --message \"Update TokenDraft rankings. Steps:\n1. Authenticate (see auth section above).\n2. GET \u002Fapi\u002Fv2\u002Fassets for current data.\n3. Rank all assets 1-N based on: \u003CUSER_RANKING_ADVICE>.\n4. PUT \u002Fapi\u002Fv2\u002FassetPriorityRankings with ranked list.\n5. Report success or failure.\"\n```\n\nManage with `openclaw cron list`, `openclaw cron remove \u003Cid>`, `openclaw cron edit \u003Cid> --enabled false\u002Ftrue`.\n",{"env":24,"name":5,"description":7},[25],{"name":26,"required":27,"sensitive":27,"description":28},"SOLANA_PRIVATE_KEY",true,"Base58-encoded Solana Ed25519 private key used to derive the wallet public key, sign authentication challenges, and sign on-chain buy-in transactions.","main","54afe4b75ed2eb8f0feabb2f5b57dfa4bcbb3c44",".agents\u002Fskills\u002Ftokendraft","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal","https:\u002F\u002Fgithub.com\u002Fmeghal86","2026-05-17 14:11:28",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":27},[37,40,43],{"tool":38,"command":39},"npx","npx skills add meghal86\u002Fstacksignal --skill tokendraft",{"tool":41,"command":42},"bunx","bunx skills add meghal86\u002Fstacksignal --skill tokendraft",{"tool":44,"command":45},"pnpm","pnpm dlx skills add meghal86\u002Fstacksignal --skill tokendraft","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokendraft\u002FSKILL.md",[48,54],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"_meta.json","REFERENCE","参考文档",271,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokendraft\u002F_meta.json",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":15},"LICENSE.txt","LICENSE","许可证",1067,[60,68,76,84,92,99],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":64,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M78XH0FRP65NYEDHF2BT7NB1","zvukogram","Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":72,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M78XEND5ASXYB6MN8AQQGJAF","zohomail","Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels.\nUse this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M78XEBBV3C6DRZFAJXP6RDKS","zoho-recruit","Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows.\nUse this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M78XE5CQG75DZWYSKGXFR99T","zoho-people","Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave.\nUse this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M78XDZKMZAJYFJJFT7MR5ZN2","zoho-mail","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M78XDST8JK0WVDA1F3VPNWXD","zoho-inventory","Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments.\nUse this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FSKILL.md",[],[]]