Early Stage — Testnet Only. AttestGO is in active development on Sepolia (11155111) + Creditcoin testnet. Breaking changes may occur. Do not use mainnet funds. Rate-limited. No SLA.
API Docs v0.1

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).

01
Verified Identity
Mint GO Pass on Sepolia, attest to Creditcoin via prover 0x0FD2 verifySingle.
02
Compliant Asset
GToken (ERC20) with rule + underlying; mint or wrap/unwrap 1:1.
03
Compliant Transfer
beforeTokenTransfer checks both from/to isEligible, paused/whenNotPaused.

How it works

  1. User creates UserProfile + wallet signature → mintPass mints GO Pass record on Sepolia.
  2. attestPass builds USC proof (ProofBuilder chainKey 1) → verifySingle + syncPassWithTxProof on Creditcoin → setActive.
  3. Issuer calls POST /tokens with issuer (tokenOwner) → factory createGTokenFor / createWrappedGTokenFor 0xEB263edDaED69C1bAc361Db2E50eAe6813145803 TokenRecord indexed by listByIssuer.

Quickstart (testnet)

1. Have issuer address ready (will become GToken.owner()). 2. Call — platform pays gas:
curl — issue example T-Bill token
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"] }
bash
curl — list tokens by issuer (GET, no auth)
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..."}}'
bash

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 1122334455667788
http

Invalid key → 401 {error: "unauthorized: invalid platform api key"}. Reading tokens (GET /tokens) is public — no key needed.

Endpoints

POST /tokens — createx-platform-api-key
https://9aozj1j64j.execute-api.ap-southeast-1.amazonaws.com/prod/tokens
Body issuer (required, address → becomes 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).
Request
{
  "issuer": "0x3D63Ce608deB81f9436198A93BCC2e8f3D79F56E",
  "name": "USD T-Bill",
  "symbol": "TBILL",
  "minTier": 10,
  "countries": ["us"],
  "iconURI": "https://icons.test/tbill.svg",
  "underlying": "0x0000000000000000000000000000000000000000"
}
json
Response 201
{
  "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
}
json
Success even if blockNumber:0 — tx broadcast, async waiter updates record after 1 conf. Retry safe (dedup by tokenAddress).
GET /tokenspublic

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}
bash

Networks & Contracts

NetworkContractAddress
Sepolia (Chain ID: 11155111)GOPass (hub)0x9236590Ffa4FA7B633F1F6ce3a23338b532a5302
Creditcoin Testnet (Chain ID: 102031)GOPassRegistry0xF3475177692D1D88a34c4E9a508D4ee6d17DFB68
Sepolia (Chain ID: 11155111)GTokenFactory0xEB263edDaED69C1bAc361Db2E50eAe6813145803
API (prod)Token APIhttps://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.

Errors

401unauthorized: invalid platform api key
400issuer must be valid address / name and symbol required
403not operator/owner
500could not resolve token address / Owner/ RPC not configured
timeoutEndpoint request timed out (29s Gateway)