ANAM145 Control Rail DOCS
문서 검색 ⌘K
GitHub ↗ ← 사이트로 대시보드
문서 변경 이력
문서/연동/API
API · CLIENT → GATEWAY

API (Client → Gateway)

클라이언트가 게이트웨이를 직접 호출하는 엔드포인트입니다. 모든 호출 헤더에 bearer 토큰을 싣고, 생성 시 user_id는 토큰에서 읽어 address에 바인딩(라벨)합니다. label?은 표시용 이름(선택)으로 별개입니다.

인증

모든 요청은 Authorization: Bearer <token> 헤더가 필요합니다. 토큰은 기관 백엔드가 발급해 클라이언트에 전달합니다. 게이트웨이가 토큰에서 tenant · user · address를 식별합니다.

Wallets

기능엔드포인트RequestResponse
계정 생성POST /v1/wallets{ userPublicKey, label? }{ address, status }
상태 조회GET /v1/wallets/{address}address (path){ address, chain, preset, status, signers, quorum }
계정 복원POST /v1/wallets/{address}/recover{ newPublicKey }{ recoveryId, status }

Transactions

기능엔드포인트RequestResponse
거래 빌드POST …/transactions/prepare{ to, amount, asset }{ txId, unsignedTx }
거래 제출POST …/transactions/submit{ txId, userSignature }{ txId, status, hash }
거래 상태GET …/transactions/{txId}path{ txId, status, hash }
잔고 조회GET …/balancepath{ balances: [{ asset, amount }] }
거래 이력GET …/transactionspath · cursor?{ transactions: […], nextCursor }
prepare는 게이트웨이가 autofill까지 끝낸 tx를 내려줍니다. 클라이언트(SDK)는 이걸 그대로 서명해 submit으로 보냅니다. 게이트웨이가 기관·안암 서명을 모아 정족수를 채우고 브로드캐스트합니다.