API Method - abtsdollar/ABTS-LAB GitHub Wiki

RESTful 방식

http heder 설정

Content-Type = application/json

http response 결과 메시지 기본 명세

· 모든 RequestBody/ResponseBody 의 데이터 포맷은 Json 형태로 사용한다

· 일부 요청은 RequestBody 를 사용하지 않고 URL Parameter 를 사용한다

항목 설 명
rcode Application 내에서 정의된 code , 상세 내용은 별도로 정의
message 단순 메세지 (ex. OK, RPC_ERROR ... )
result 요청에 대한 결과값
errors 에러가 발생한 경우 에러내용을 표시

특별한 요청 field

· sct_addr은 sct_addr을 입력해도 되고 sct_name을 입력해도 된다.

예) "sct_addr": "TEST2" 혹은 "sct_addr": " 0xa72ff7afe13a1f7c1832"

· 계정을 입력하는 필드들은 symid, nick, eth_addr 중 하나를 입력 가능하다.

(symid, sender, recipient, possessor, address 등 계정을 의미하는 필드들에 사용가능)

예) " sender": "id1" 혹은 "sender": " 0x0003c812f0e7c6a60002"

Example

$ curl http://localhost:8601/api/v1/wallets/create_safe_welcome \
-X POST \
-H "Content-Type: application/json" \
    -d '{"nick":"[email protected]","sender": "rich_symid","amount": "1"}'