Introduction
Learn more about Ironforge SDK
The Ironforge SDK, available as a JavaScript/TypeScript npm package, is your gateway to seamless integration with the Accounts API within your development environment. This SDK equips developers with a robust toolkit to effortlessly tackle essential tasks such as sorting, pagination, and filtering. It offers versatile query methods, including memcmp (Memory Comparison) and MQL (MongoDB Query Language).
At present, our SDK is purpose-built to cater specifically to the needs of the Accounts API. However, we are working on expanding its functionality to support other APIs as well.
Here’s a example of using SDK on Candy Machine to filter the records with size
greater than or equal to 1000
.
const { IronforgeSdk } = require("@ironforge/sdk")
const apiKey = "API_KEY"
const sdk = new IronforgeSdk(apiKey)
async function sdkAccountsFilter() {
return await sdk.accounts.filter({
cluster: "devnet",
program: "cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ",
body: {
filter: {
size: {
$gte: 1000,
},
},
},
limit: 10,
offset: 3,
})
}
try {
const response = await sdkAccountsFilter()
console.log(response.status)
console.log(response.result)
} catch (e) {
process.exit(1)
}