Sui Indexer
Sui Indexer is a collection of REST-ful APIs to NFT and coins on Sui Network.
How to Create a BlockEden.xyz Access Key
Step 1: Visit https://blockeden.xyz/dash/. If you're new to our platform, please complete the sign-up process.
Step 2: Specify a unique name for your API key, and click on '+ Create key'.
Step 3: After creation, click on the provided access key to copy it to your clipboard for future referencing.
Step 4: Incorporate the copied access key into your project as demonstrated below. Ensure you replace <access_key>
with your personal access key.
Connection to Sui Indexer using CURL
:
curl --request GET \
--url 'https://api.blockeden.xyz/sui-indexer/<access_key>/account/coins?account=0xe335d84c489084474aac4322fb9ac5173369d27487c404558e99c7c5ec608075'
Connection to Sui using TypeScript SDK:
var axios = require("axios").default;
async function fetchCoins() {
var options = {
method: 'GET',
url: 'https://api.blockeden.xyz/sui-indexer/<access_key>/account/coins',
params: { account: '0xe335d84c489084474aac4322fb9ac5173369d27487c404558e99c7c5ec608075' }
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
fetchCoins();