https://github.com/EthersocialNetwork/api_esn 에서 최종본을 관리하고 있습니다.
---
노드 운영이 힘든분들을 위해 ESN 네트워크의 API를 오픈합니다.
이더리움의 JSON-RPC 형태로 응답을 합니다.
연구목적으로 사용하신다면 편하게 쓰셔도 됩니다~
초기 활성화를 위해 오픈하고자 합니다.
부하가 심하지 않다면 쭉 오픈해 놓도록 하겠습니다.
아래 지원하는 api를 이용하면 wallet.gonspool.com 서비스에서 사용하는 모든 기능을 구현할 수 있습니다.
현재 블럭을 찾거나, tx를 검색하거나, 특정주소의 잔고를 확인하거나, 오프라인에서 만든 tx를 ESN네트워크에 전파할수도있습니다.
개인 ESN 웹지갑도 만들고 운영할 수 있다는 얘기 입니다 ^^
API 주소 : https://api.esn.gonspool.com
지원하는 명령어들
POST - json-rpc 응답형태
- eth_getBlockByHash : Returns information about a block by hash.
- eth_getTransactionByHash : Returns the information about a transaction requested by transaction hash.
- eth_blockNumber : Returns the number of most recent block.
- eth_getBalance : Returns the balance of the account of given address.
- eth_gasPrice : Returns the current price per gas in wei.
- eth_sendRawTransaction : Creates new message call transaction or a contract creation for signed transactions.
- eth_getTransactionCount : Returns the number of transactions send from a address.
- eth_call : Executes a new message call immediately without creating a transaction on the block chain
- eth_estimateGas : the amount of gas used
- eth_getBlockByNumber : 블럭번호로 검색( 3/8 추가하였음 )
- net_version : 현재 버전 리턴(0x0 3/13 추가, 마이이더월렛v4 지원용)
- eth_getCode : 메타마스크 지원용, 4/11 추가, 가스리밋계산같은곳에서 사용
- net_listening : 클래식마이이더 지원용, 9/26 추가, 핼스체크용 api
- web3_clientVersion : 현재 노드의 버전을 리턴, 에메랄드 지갑등에서 사용
- eth_chainId : 응답 -> {"jsonrpc":"2.0", "id": 83 ,"result":"0x797e"}
샘플
ex) curl -H "Content-Type: application/json" -X POST https://api.esn.gonspool.com -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}'
HTTP GET 응답형태
인터넷익스플로어 주소창에 입력하여 사용할 수 있습니다.
- https://api.esn.gonspool.com/get_node/json/
- https://api.esn.gonspool.com/get_node/rpc/
- https://api.esn.gonspool.com/eth_getBlockByNumber/12345
- https://api.esn.gonspool.com/eth_getBlockByNumber/0x12345 <-- 16진수 입력
- https://api.esn.gonspool.com/eth_blockNumber
- https://api.esn.gonspool.com/token/erc20/balanceOf10/토큰의주소/확인할주소 : [토큰의주소] 토큰에 존재하는 [확인할주소]의 잔고확인 10진수 읽을만한 문자열
- https://api.esn.gonspool.com/token/erc20/balanceOf16/토큰의주소/확인할주소 : [토큰의주소] 토큰에 존재하는 [확인할주소]의 잔고확인 16진수 raw 데이터
명령어에대한 자세한 설명은 https://github.com/ethereum/wiki/wiki/JSON-RPC 을 참조하세요
**
예전에 API 오픈하고자 준비하다가 잘 알지 못하여 세팅을 잘못하고, 설계에 실수가 있었고 보안 허점이 있었습니다.
다시한번 사과드립니다. 많은 질책을 받았습니다. 제대로 몰라 실수를 하여 죄송할 따름입니다.
많이 배웠고, 이번엔 여러가지 조치를 해놓았습니다.
큰 문제가 없으리라 생각합니다.
공익 목적으로 오픈하고자 합니다. 더 많은 분들이 참여하고 개발에 참여하여 ESN이 활성화 되었으면 합니다.
-------------------------------------
꼬리말
* 게시글 내용 삭제시 레벨 강등
* 질문은 각 주제별 게시판에.
비트코인 암호화화폐 커뮤니티 땡글~ 땡글~
-------------------------------------