이더리움 클래식 개발자 문서 바로가기 함수 호출에 필요한 매개변수 또는 반환되는 데이터에 대해서는 REST API 개발자 문서를 참고해 주시길 바랍니다.
<?php
use BlockSDK;
$blockSDK = new BlockSDK("YOU_TOKEN");
$etcClient = $blockSDK->createEthereumClassic();
//or
$etcClient = BlockSDK::createEthereumClassic("YOU_TOKEN");
엔드 포인트를 지정해주지 않는경우 테스트넷으로 기본 설정되어 호출 됩니다 메인넷은 아래 예시와 같이 클라이언트 생성시 두번째 매개변수를 메인넷으로 지정해 주시길 바랍니다.
<?php
use BlockSDK;
$blockSDK = new BlockSDK("YOU_TOKEN","https://mainnet-api.blocksdk.com");
$etcClient = $blockSDK->createEthereumClassic();
//or
$etcClient = BlockSDK::createEthereumClassic("YOU_TOKEN","https://mainnet-api.blocksdk.com");
모든 URL,Query,Body 매개변수는 모든 함수는 첫번쨰 인수를 Array 형 으로
key = 매개변수명
value = 매개변수값
형태로 호출하실수 있습니다.
<?php
$nfts = $etcClient->GetSingleNfts([
"contract_address" => "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b",
"includeMetadata" => true,
"offset" => 0,
"limit" => 10
]);
GET /v3/etc/info
$result = $etcClient->GetBlockChainInfo();
GET /v3/etc/block/<block>
$result = $etcClient->GetBlock([
'block' => "blockNumber 또는 blockHash"
]);
GET /v3/etc/address
$result = $etcClient->GetAddresses([
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/address/<address>/info
$result = $etcClient->GetAddressInfo([
'address' => "주소",
'offset' => 0,
'limit' => 10
]);
POST /v3/etc/address
$result = $etcClient->CreateAddress([
'name' => "test"
]);
GET /v3/etc/address/<address>/balance
$result = $etcClient->GetAddressBalance([
'address' => "주소"
]);
POST /v3/etc/address/<from_address>/send
$result = $etcClient->Send([
'from_address' => "주소",
'to' => "주소",
'amount' => "보낼 양",
'private_key' => "보내는 주소 키"
]);
POST /v3/etc/transaction/send
$result = $etcClient->SendTransaction([
'hex' => "서명된 트랜잭션 hex"
]);
GET /v3/etc/transaction/<tx_hash>
$result = $etcClient->GetTransaction([
'tx_hash' => "트랜잭션 해쉬"
]);
GET /v3/etc/token/<contract_address>/info
$result = $etcClient->GetTokenInfo([
'contract_address' => "ERC20 토큰 컨트렉트 주소"
]);
GET /v3/etc/token/<contract_address>/<from_address>/balance
$result = $etcClient->GetTokenBalance([
'contract_address' => "ERC20 토큰 컨트렉트 주소",
'from_address' => "잔액을 조회할 주소"
]);
POST /v3/etc/token/<contract_address>/<from_address>/transfer
$result = $etcClient->SendToken([
'contract_address' => "ERC20 토큰 컨트렉트 주소",
'from_address' => "토큰을 전송할 주소",
'to' => "주소",
'amount' => "보낼 양",
'private_key' => "보내는 주소 키"
]);
GET /v3/etc/token/<from_address>/transactions
$result = $etcClient->GetTokenTxs([
'from_address' => "거래 내역을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/token/<contract_address>/<from_address>/transactions
$result = $etcClient->GetTokenContractTxs([
'contract_address' => "ERC20 토큰 컨트렉트 주소",
'from_address' => "거래 내역을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/token/<from_address>/all-balance
$result = $etcClient->GetTokenAllBalance([
'from_address' => "토큰 목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/nfts
$result = $etcClient->GetSingleNfts([
'contract_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<owner_address>/owner-nfts
$result = $etcClient->GetSingleOwnerNfts([
'owner_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<creator_address>/creator-nfts
$result = $etcClient->GetSingleCreatorNfts([
'creator_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<from_address>/transactions
$result = $etcClient->GetSingleTxs([
'from_address' => "토큰 목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<owner_address>/owner-nfts
$result = $etcClient->GetSingleNftOwnerNfts([
'contract_address' => "목록을 조회할 주소",
'owner_address' => "월렛 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<creator_address>/creator-nfts
$result = $etcClient->GetSingleNftCreatorNfts([
'contract_address' => "NFT 컨트렉트 주소",
'creator_address' => "토큰 목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<from_address>/from-transactions
$result = $etcClient->GetSingleNftTxs([
'contract_address' => "NFT 컨트렉트 주소",
'from_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<token_id>/nft-transactions
$result = $etcClient->GetSingleNftTokenTxs([
'contract_address' => "NFT 컨트렉트 주소",
'token_id' => "NFT 토큰 ID",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<token_id>/info
$result = $etcClient->GetSingleNftInfo([
'contract_address' => "NFT 컨트렉트 주소",
'token_id' => "NFT 토큰 ID",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/nfts
$result = $etcClient->GetMultiNfts([
'contract_address' =>"NFT 컨트렉트 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<owner_address>/owner-nfts
$result = $etcClient->GetMultiOwnerNfts([
'owner_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<creator_address>/creator-nfts
$result = $etcClient->GetMultiCreatorNfts([
'creator_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<from_address>/transactions
$result = $etcClient->GetMultiTxs([
'from_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/<owner_address>/owner-nfts
$result = $etcClient->GetMultiNftOwnerNfts([
'contract_address' => "NFT 컨트렉트 주소",
'owner_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/<creator_address>/creator-nfts
$result = $etcClient->GetMultiNftCreatorNfts([
'contract_address' => "NFT 컨트렉트 주소",
'creator_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/<from_address>/from-transactions
$result = $etcClient->GetMultiNftTxs([
'contract_address' => "NFT 컨트렉트 주소",
'from_address' => "목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/<token_id>/info
$result = $etcClient->GetMultiNftInfo([
'contract_address' => "NFT 컨트렉트 주소",
'token_id' => "NFT 토큰 ID",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/<token_id>/nft-transactions
$result = $etcClient->GetMultiNftTokenTxs([
'contract_address' => "NFT 컨트렉트 주소",
'token_id' => "NFT 토큰 ID",
'offset' => 0,
'limit' => 10
]);
POST /v3/etc/contract/<contract_address>/read
$result = $etcClient->ReadContract([
'contract_address' => "컨트렉트 주소",
'method' => "ownerOf",
'parameter_type' => ["uint256"],
'parameter_data' => [1]
]);
POST /v3/etc/contract/<contract_address>/write
$result = $etcClient->WriteContract([
'contract_address' => "컨트렉트 주소",
'from' => "트랜잭션을 생성할 주소",
'private_key' => "from 의 프라이빗키",
'method' => "transfer",
'parameter_type' => ["uint256"],
'parameter_data' => [1]
]);
GET /v3/etc/single-nft/<contract_address>/auction-nfts
$result = $etcClient->GetSingleNftAuctionNfts([
'contract_address' => "NFT 컨트렉트 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<seller_address>/sale-nfts
$result = $etcClient->GetSingleNftSellerNfts([
'contract_address' => "NFT 컨트렉트 주소",
'seller_address' => "토큰 목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/single-nft/<contract_address>/<token_id>/nft-bids
$result = $etcClient->GetSingleNftTokenBids([
'contract_address' => "NFT 컨트렉트 주소",
'token_id' => "NFT 토큰 ID",
'offset' => 0,
'limit' => 10
]);
GET /v3/etc/multi-nft/<contract_address>/<seller_address>/seller-nfts
$result = $etcClient->GetMultiNftSellerNfts([
'contract_address' => "NFT 컨트렉트 주소",
'seller_address' => "토큰 목록을 조회할 주소",
'offset' => 0,
'limit' => 10
]);