아발란체 개발자 문서 바로가기 함수 호출에 필요한 매개변수 또는 반환되는 데이터에 대해서는 REST API 개발자 문서를 참고해 주시길 바랍니다.
Avalanche avaxClient = new Avalanche("YOU_TOKEN");
엔드 포인트를 지정해주지 않는경우 테스트넷으로 기본 설정되어 호출 됩니다 메인넷은 아래 예시와 같이 클라이언트 생성시 두번째 매개변수를 메인넷으로 지정해 주시길 바랍니다.
Avalanche avaxClient = new Avalanche("YOU_TOKEN","https://mainnet-api.blocksdk.com");
GET /v3/avax/info
Map<String, Object> result = avaxClient.GetBlockChainInfo().join();
GET /v3/avax/block/<block>
Map<String, Object> data = new HashMap<>();
data.put("block", "blockNumber 또는 blockHash")
Map<String, Object> result = avaxClient.GetBlock(data).join();
GET /v3/avax/address
Map<String, Object> data = new HashMap<>();
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = avaxClient.GetAddresses(data).join();
GET /v3/avax/address/<address>/info
Map<String, Object> data = new HashMap<>();
data.put("address", "주소")
data.put("offset", "0")
data.put("limit", "10")
Map<String, Object> result = avaxClient.GetAddressInfo(data).join();
POST /v3/avax/address
Map<String, Object> data = new HashMap<>();
data.put("name", "test")
Map<String, Object> result = avaxClient.CreateAddress(data).join();
GET /v3/avax/address/<address>/balance
Map<String, Object> data = new HashMap<>();
data.put("address", "주소")
Map<String, Object> result = avaxClient.GetAddressBalance(data).join();
POST /v3/avax/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 = avaxClient.Send(data).join();
POST /v3/avax/transaction/send
Map<String, Object> data = new HashMap<>();
data.put("hex", "서명된 트랜잭션 hex")
Map<String, Object> result = avaxClient.SendTransaction(data).join();
GET /v3/avax/transaction/<tx_hash>
Map<String, Object> data = new HashMap<>();
data.put("hash", "트랜잭션 해쉬")
Map<String, Object> result = avaxClient.GetTransaction(data).join();
GET /v3/avax/token/<contract_address>/info
Map<String, Object> data = new HashMap<>();
data.put("contract_address", "ERC20 토큰 컨트렉트 주소")
Map<String, Object> result = avaxClient.GetTokenInfo(data).join();
GET /v3/avax/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 = avaxClient.GetTokenBalance(data).join();
POST /v3/avax/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 = avaxClient.SendToken(data).join();
GET /v3/avax/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 = avaxClient.GetTokenTxs(data).join();
GET /v3/avax/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 = avaxClient.GetTokenContractTxs(data).join();
GET /v3/avax/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 = avaxClient.GetTokenAllBalance(data).join();
GET /v3/avax/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 = avaxClient.GetSingleNfts(data).join();
GET /v3/avax/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 = avaxClient.GetSingleOwnerNfts(data).join();
GET /v3/avax/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 = avaxClient.GetSingleCreatorNfts(data).join();
GET /v3/avax/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 = avaxClient.GetSingleTxs(data).join();
GET /v3/avax/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 = avaxClient.GetSingleNftOwnerNfts(data).join();
GET /v3/avax/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 = avaxClient.GetSingleNftCreatorNfts(data).join();
GET /v3/avax/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 = avaxClient.GetSingleNftTxs(data).join();
GET /v3/avax/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 = avaxClient.GetSingleNftTokenTxs(data).join();
GET /v3/avax/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 = avaxClient.GetSingleNftInfo(data).join();
GET /v3/avax/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 = avaxClient.GetMultiNfts(data).join();
GET /v3/avax/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 = avaxClient.GetMultiOwnerNfts(data).join();
GET /v3/avax/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 = avaxClient.GetMultiCreatorNfts(data).join();
GET /v3/avax/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 = avaxClient.GetMultiTxs(data).join();
GET /v3/avax/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 = avaxClient.GetMultiNftOwnerNfts(data).join();
GET /v3/avax/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 = avaxClient.GetMultiNftCreatorNfts(data).join();
GET /v3/avax/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 = avaxClient.GetMultiNftTxs(data).join();
GET /v3/avax/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 = avaxClient.GetMultiNftInfo(data).join();
GET /v3/avax/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 = avaxClient.GetMultiNftTokenTxs(data).join();
POST /v3/avax/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 = avaxClient.ReadContract(data).join();
POST /v3/avax/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 = avaxClient.WriteContract(data).join();