Documentation Index
Fetch the complete documentation index at: https://companyname-a7d5b98e-vanity-edits.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
To retrieve specific Jetton data, use the Jetton master contract’s get_jetton_data() method.
This method returns the following data:
| Name | Type | Description |
|---|
total_supply | VarUInteger 16 | the total number of issued jettons measured in indivisible units |
mintable | Bool | Indicates whether new jettons can be minted (-1 for true, 0 for false) |
admin_address | Address | admin’s address |
jetton_content | Cell | data formatted according to TEP-64 |
jetton_wallet_code | Cell | a code of the corresponding Jetton wallet |
You can call the get_jetton_data() method from your favorite IDE:
import { TonClient, Address } from "@ton/ton"
async function main() {
const client = new TonClient({
endpoint: 'https://toncenter.com/api/v2/jsonRPC',
});
const JettonMasterAddress = Address
.parse('0:b113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe');
const data = await client.runMethod(JettonMasterAddress,
'get_jetton_data');
const Stack = data.stack;
console.log(Stack.readNumber()); // Total supply
console.log(Stack.readNumber()); // mintable
console.log(Stack.readAddress().toString()); // Admin address
console.log(Stack.readCell()); // jetton_content
console.log(Stack.readCell()) // jetton_wallet_code
}
void main();
Or call it through a web service, such as Tonviewer:
Finally, you can get this information using the API.