이더리움 개발자 문서 바로가기 함수 호출에 필요한 매개변수 또는 반환되는 데이터에 대해서는 REST API 개발자 문서를 참고해 주시길 바랍니다.
Ethereum ethereumClient = new Ethereum("YOU_TOKEN");
엔드 포인트를 지정해주지 않는경우 테스트넷으로 기본 설정되어 호출 됩니다 메인넷은 아래 예시와 같이 클라이언트 생성시 두번째 매개변수를 메인넷으로 지정해 주시길 바랍니다.
Ethereum ethereumClient = new Ethereum("YOU_TOKEN","https://mainnet-api.blocksdk.com");
GET /v3/eth/info
Map<String, Object> result = ethereumClient.GetBlockChainInfo().join();
GET /v3/eth/block/<block>
Map<String, Object> data = new HashMap<>();
data.put("block", "blockNumber 또는 blockHash")
Map<String, Object> result = ethereumClient.GetBlock(data).join();
GET /v3/eth/address
Map<String, Object> data = new HashMap<>();
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetAddresses(data).join();
GET /v3/eth/address/<address>/info
Map<String, Object> data = new HashMap<>();
data.put("address", "주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetAddressInfo(data).join();
POST /v3/eth/address
Map<String, Object> data = new HashMap<>();
data.put("name", "test")
Map<String, Object> result = ethereumClient.CreateAddress(data).join();
GET /v3/eth/address/<address>/balance
Map<String, Object> data = new HashMap<>();
data.put("address", "주소")
Map<String, Object> result = ethereumClient.GetAddressBalance(data).join();
POST /v3/eth/address/<from_address>/send
Map<String, Object> data = new HashMap<>();
data.put("from", "주소")
data.put("to", "주소")
data.put("amount", "보낼 양")
data.put("private_key", "보내는 주소 키")
Map<String, Object> result = ethereumClient.Send(data).join();
POST /v3/eth/transaction/send
Map<String, Object> data = new HashMap<>();
data.put("hex", "서명된 트랜잭션 hex")
Map<String, Object> result = ethereumClient.SendTransaction(data).join();
GET /v3/eth/transaction/<tx_hash>
Map<String, Object> data = new HashMap<>();
data.put("hash", "트랜잭션 해쉬")
Map<String, Object> result = ethereumClient.GetTransaction(data).join();
GET /v3/eth/token/<contract_address>/info
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "ERC20 토큰 컨트렉트 주소")
Map<String, Object> result = ethereumClient.GetTokenInfo(data).join();
GET /v3/eth/token/<contract_address>/<from_address>/balance
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "ERC20 토큰 컨트렉트 주소")
data.put("from_address", "잔액을 조회할 주소")
Map<String, Object> result = ethereumClient.GetTokenBalance(data).join();
POST /v3/eth/token/<contract_address>/<from_address>/transfer
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "ERC20 토큰 컨트렉트 주소")
data.put("from_address", "토큰을 전송할 주소")
data.put("to", "주소")
data.put("amount", "보낼 양")
data.put("private_key", "보내는 주소 키")
Map<String, Object> result = ethereumClient.SendToken(data).join();
GET /v3/eth/token/<from_address>/transactions
Map<String, Object> data = new HashMap<>();
data.put("from_address", "거래 내역을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetTokenTxs(data).join();
GET /v3/eth/token/<contract_address>/<from_address>/transactions
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "ERC20 토큰 컨트렉트 주소")
data.put("from_address", "거래 내역을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetTokenContractTxs(data).join();
GET /v3/eth/token/<from_address>/all-balance
Map<String, Object> data = new HashMap<>();
data.put("from_address", "토큰 목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetTokenAllBalance(data).join();
GET /v3/eth/single-nft/<contract_address>/nfts
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleNfts(data).join();
GET /v3/eth/single-nft/<owner_address>/owner-nfts
Map<String, Object> data = new HashMap<>();
data.put("owner_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleOwnerNfts(data).join();
GET /v3/eth/single-nft/<creator_address>/creator-nfts
Map<String, Object> data = new HashMap<>();
data.put("creator_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleCreatorNfts(data).join();
GET /v3/eth/single-nft/<from_address>/transactions
Map<String, Object> data = new HashMap<>();
data.put("from_address", "토큰 목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleTxs(data).join();
GET /v3/eth/single-nft/<contract_address>/<owner_address>/owner-nfts
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("owner_address", "토큰 목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleNftOwnerNfts(data).join();
GET /v3/eth/single-nft/<contract_address>/<creator_address>/creator-nfts
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("creator_address", "토큰 목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleNftCreatorNfts(data).join();
GET /v3/eth/single-nft/<contract_address>/<from_address>/from-transactions
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("from_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleNftTxs(data).join();
GET /v3/eth/single-nft/<contract_address>/<token_id>/nft-transactions
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("token_id", "NFT 토큰 ID")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleNftTokenTxs(data).join();
GET /v3/eth/single-nft/<contract_address>/<token_id>/info
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("token_id", "NFT 토큰 ID")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetSingleNftInfo(data).join();
GET /v3/eth/multi-nft/<contract_address>/nfts
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiNfts(data).join();
GET /v3/eth/multi-nft/<owner_address>/owner-nfts
Map<String, Object> data = new HashMap<>();
data.put("owner_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiOwnerNfts(data).join();
GET /v3/eth/multi-nft/<creator_address>/creator-nfts
Map<String, Object> data = new HashMap<>();
data.put("creator_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiCreatorNfts(data).join();
GET /v3/eth/multi-nft/<from_address>/transactions
Map<String, Object> data = new HashMap<>();
data.put("from_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiTxs(data).join();
GET /v3/eth/multi-nft/<contract_address>/<owner_address>/owner-nfts
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("owner_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiNftOwnerNfts(data).join();
GET /v3/eth/multi-nft/<contract_address>/<creator_address>/creator-nfts
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("creator_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiNftCreatorNfts(data).join();
GET /v3/eth/multi-nft/<contract_address>/<from_address>/from-transactions
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("from_address", "목록을 조회할 주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiNftTxs(data).join();
GET /v3/eth/multi-nft/<contract_address>/<token_id>/info
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("token_id", "NFT 토큰 ID")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiNftInfo(data).join();
GET /v3/eth/multi-nft/<contract_address>/<token_id>/nft-transactions
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "NFT 컨트렉트 주소")
data.put("token_id", "NFT 토큰 ID")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = ethereumClient.GetMultiNftTokenTxs(data).join();
POST /v3/eth/contract/<contract_address>/read
Map<String, Object> request = new HashMap<>();
request.put("contract_address", "컨트렉트 주소");
request.put("method", "실행할 함수 명");
request.put("return_type", "반환 데이터 타입");
request.put("parameter_type", Arrays.asList("인풋 파라미터 타입"));
request.put("parameter_data", Arrays.asList("인풋 파라미터 데이터"));
Map<String, Object> result = ethereumClient.ReadContract(data).join();
POST /v3/eth/contract/<contract_address>/write
Map<String, Object> request = new HashMap<>();
request.put("contract_address", "컨트렉트 주소");
request.put("from", "트랜잭션을 생성할 주소");
request.put("private_key", "from 의 프라이빗키");
request.put("method", "실행할 함수 명");
request.put("parameter_type", Arrays.asList("인풋 파라미터 타입"));
request.put("parameter_data", Arrays.asList("인풋 파라미터 데이터"));
Map<String, Object> result = ethereumClient.WriteContract(data).join();