gdex-token-import
Import user-defined custom tokens so they appear in token details, balances, and portfolio across the platform
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- gdex-token-import
- description
- Import user-defined custom tokens so they appear in token details, balances, and portfolio across the platform
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md346 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
GDEX: Token Import
Register a user-defined custom token so it is recognised by the backend's token-details, balances, and portfolio endpoints. Useful for long-tail tokens that are not yet indexed.
When to Use
- A user wants to see a brand-new (or otherwise un-indexed) token in their portfolio or token-search results
- Pre-registering a token before launch so trading UI can resolve metadata
Prerequisites
@gemachdao/gdex-skillinstalled- Authenticated via shared API key or wallet sign-in — see gdex-authentication
- The token's on-chain address (contract address on EVM, mint address on Solana, object id on Sui)
Backend Endpoints
| Method | Path | Purpose |
|---|---|---|
POST |
/v1/import_token |
Register a user-imported custom token |
SDK Usage
import { GdexSkill, buildImportTokenComputedData } from '@gemachdao/gdex-skill';
const skill = new GdexSkill();
skill.loginWithApiKey(process.env.GDEX_API_KEY!);
// Structured shape — SDK builds computedData internally
await skill.importToken({
tokenAddress: '0xCustomToken',
chainId: 8453,
managed: {
apiKey: process.env.GDEX_API_KEY!,
walletAddress: '0xWallet',
sessionPrivateKey: '0x…',
userId: '0xWallet',
},
});
// Or raw shape — caller pre-built computedData
await skill.importToken({
computedData: buildImportTokenComputedData({
apiKey: process.env.GDEX_API_KEY!,
walletAddress: '0xWallet',
sessionPrivateKey: '0x…',
userId: '0xWallet',
tokenAddress: '0xCustomToken',
chainId: '8453',
}),
chainId: 8453,
});
Notes
import_tokenuses managed-custody encryptedcomputedData: ABI['import_token', [tokenAddress, chainId, nonce]], sig messageimport_token-${userId}-${data}.- The backend deduplicates imports per
(userId, chain, tokenAddress). - After import, queries such as
getTokenDetails,getBalances, andgetPortfoliowill start returning data for the token (subject to indexer latency).
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.