AttestGO API Guide
REST API to issue and query GToken (compliant ERC20) via GTokenFactory 0xEB263edD… on Sepolia. Platform pays gas, issuer becomes owner. For product overview see Overview below — this page is the API reference (testnet, breaking changes expected).
Overview
AttestGO provides verified identity (GO Pass) and compliant assets (GToken) — KYC from Sepolia (hub GOPass 0x9236590Ffa4FA7B633F1F6ce3a23338b532a5302) attested to Creditcoin registry 0xF3475177692D1D88a34c4E9a508D4ee6d17DFB68 via Attestcoin Protocol, enforced per-token Rule (isEligible per holder/transfer).
How it works
- User creates UserProfile + wallet signature → mintPass mints GO Pass record on Sepolia.
- attestPass builds USC proof (
ProofBuilder chainKey 1) →verifySingle+syncPassWithTxProofon Creditcoin →setActive. - Issuer calls POST /tokens with
issuer(tokenOwner) → factorycreateGTokenFor / createWrappedGTokenFor0xEB263edDaED69C1bAc361Db2E50eAe6813145803 → TokenRecord indexed bylistByIssuer.
Quickstart (testnet)
GToken.owner()). 2. Call — platform pays gas:curl -X POST https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens \
-H "x-platform-api-key: 1122334455667788" \
-H "Content-Type: application/json" \
-d '{
"issuer": "0x3D63Ce608deB81f9436198A93BCC2e8f3D79F56E",
"name": "USD T-Bill 6M",
"symbol": "TBILL-6M",
"minTier": 10,
"countries": ["us","sg"],
"iconURI": "https://icons.test/tbill-6m.svg"
}'
# wrapped (backed by USDC) — same API, add underlying
# curl -X POST https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens ... -d '{"issuer":"0x...","name":"wUSD T-Bill","symbol":"wTBILL","countries":["us"],"underlying":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}'
# response 201: { tokenAddress, txHash, blockNumber:0, pending:true, chainId:11155111, countries:["us","sg"] }curl "https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens?issuer=0x3D63Ce608deB81f9436198A93BCC2e8f3D79F56E"
# {"items":[{"tokenAddress":"0xbbf9...","symbol":"TBILL-2","countries":["us"],"ruleBitmap":"1","txHash":"0x82da...","blockNumber":0}],"count":1}
curl "https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens?issuer=0x3D63Ce608deB81f9436198A93BCC2e8f3D79F56E&limit=20"
# also via Data: TokenRecord.listByIssuer({issuer: lower})
# via AppSync: POST https://...appsync-api.ap-southeast-1.amazonaws.com/graphql -H "x-api-key: da2-..." -d '{"query":"query Q($i:String!){listByIssuer(issuer:$i){items{tokenAddress symbol countries:countries txHash blockNumber}}}", "variables":{"i":"0x3d63..."}}'GET /tokens?issuer=0x...&limit=50&nextToken=... public, paginated {items, nextToken, count}. POST returns pending:true blockNumber:0 until mined; GET shows updated blockNumber.
Authentication
Token creation requires a platform API key (provided separately). Send one of:
x-platform-api-key: 1122334455667788 # shared test key — may change, contact us for your own
# aliases accepted: x-api-key, Authorization: Bearer 1122334455667788Invalid key → 401 {error: "unauthorized: invalid platform api key"}. Reading tokens (GET /tokens) is public — no key needed.
Endpoints
GToken.owner()), name/symbol, minTier 0..255 (default 10), countries ["us","sg"] (allowed us sg jp hk de cn gb fr ae ch — backend converts to bitmap), iconURI, underlying (0x0 native else wrapped ERC20).{
"issuer": "0x3D63Ce608deB81f9436198A93BCC2e8f3D79F56E",
"name": "USD T-Bill",
"symbol": "TBILL",
"minTier": 10,
"countries": ["us"],
"iconURI": "https://icons.test/tbill.svg",
"underlying": "0x0000000000000000000000000000000000000000"
}{
"tokenAddress": "0xabc...123",
"chainId": 11155111,
"factoryAddress": "0xeb263eddaed69c1bac361db2e50eae6813145803",
"issuer": "0x3d63...56e",
"name": "USD T-Bill",
"symbol": "TBILL",
"decimals": 18,
"underlying": "0x0000000000000000000000000000000000000000",
"isWrapped": false,
"countries": ["us"],
"countriesBitmap": "1",
"txHash": "0x...",
"blockNumber": 0,
"pending": true
}blockNumber:0 — tx broadcast, async waiter updates record after 1 conf. Retry safe (dedup by tokenAddress).REST: GET /tokens?issuer=0x3d63...&limit=50&nextToken=... → {items: [{tokenAddress, symbol, countries:["us"], ruleBitmap:"1", ...}], nextToken, count} (public, no x-platform-api-key). Also GET /tokens lists all (paginated). AppSync alternative: listByIssuer / listByChain.
curl "https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens?issuer=0x3D63Ce608deB81f9436198A93BCC2e8f3D79F56E"
# {"items":[{"tokenAddress":"0xbbf9...","symbol":"TBILL-2","countries":["us"],"ruleBitmap":"1","txHash":"0x82da...","blockNumber":0}],"nextToken":null,"count":1}Networks & Contracts
| Network | Contract | Address |
|---|---|---|
| Sepolia (Chain ID: 11155111) | GOPass (hub) | 0x9236590Ffa4FA7B633F1F6ce3a23338b532a5302 |
| Creditcoin Testnet (Chain ID: 102031) | GOPassRegistry | 0xF3475177692D1D88a34c4E9a508D4ee6d17DFB68 |
| Sepolia (Chain ID: 11155111) | GTokenFactory | 0xEB263edDaED69C1bAc361Db2E50eAe6813145803 |
| API (prod) | Token API | https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens |
Explorer: Sepolia Etherscan • Creditcoin explorer. You own the token — issuer is the owner, platform covers gas.