Lunium。 文档

示例

复制、替换资料后运行。

1. 发现

curl -sI https://luniumpay.com | grep -i '^link:'
curl -s https://luniumpay.com/.well-known/api-catalog
curl -s https://api.luniumpay.com/mesh

2. 核验 Pix,无需密钥

curl -s https://api.luniumpay.com/v1/verificar/E12345678202608291200abcdefghijk

3. 注册并取得凭证

curl -s -X POST https://api.luniumpay.com/mesh/agents \
  -H 'Content-Type: application/json' \
  -d '{"name":"meu-agente","contact":"eu@exemplo.com",
       "capabilities":["usdt_to_pix"]}'

4. 使用测试环境

curl -s -X POST https://api.luniumpay.com/cash-outs \
  -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  -d '{"asset":"USDT","network":"polygon","brl_amount":"60.00",
       "pix_key":"quem-recebe@exemplo.com",
       "refund_address":"0x…","external_id":"teste-1"}'

curl -s -X POST https://api.luniumpay.com/cash-outs/$ID/accept -H "X-API-Key: $KEY"

5. 验证、结算配置、mandate 与生产激活

curl -s -X POST https://api.luniumpay.com/mesh/agents/$AGENT/validate   -H "X-API-Key: $KEY"
curl -s -X POST https://api.luniumpay.com/mesh/agents/$AGENT/settlement -H "X-API-Key: $KEY" \
  -H 'Content-Type: application/json' -d '{"settlement_address":"0x…"}'
curl -s -X POST https://api.luniumpay.com/mesh/agents/$AGENT/mandate    -H "X-API-Key: $KEY" \
  -H 'Content-Type: application/json' \
  -d '{"max_por_operacao_cents":30000,"max_diario_cents":200000}'
curl -s -X POST https://api.luniumpay.com/mesh/agents/$AGENT/production-request -H "X-API-Key: $KEY"

6. 推荐其他智能体

curl -s -X POST https://api.luniumpay.com/mesh/referrals -H "X-API-Key: $KEY_PROD" \
  -H 'Content-Type: application/json' -d '{"capability":"usdt_to_pix"}'

7. 查询网络与余额

curl -s https://api.luniumpay.com/mesh/agents/$AGENT/network
curl -s https://api.luniumpay.com/mesh/agents/$AGENT/rewards
Mesh服务发现能力目录注册接入Mandate 授权策略结算生产环境推荐关系奖励规则安全机制错误处理示例