Tokens
Create a token
Creating a token costs a non-refundable BEE fee, so the SDK verifies the balance and the symbol before anything is signed.
Try it: create a tokenUsage
Token name, token symbol, decimal precision and max supply are the only required values. The website is optional and can be added or changed later in the TribalDex Token Manager.
TypeScript
// Browser — Keychain signs with the active authority
await hive.keychainIssuer.token.create({
username: "alice",
symbol: "MYTOKEN",
name: "My Token",
precision: 3,
maxSupply: "1000000",
url: "https://mytoken.gg", // optional
});
// Backend — the configuration alias signs
await hive.issuer.token.create({
from: hive.accounts.treasury,
symbol: "MYTOKEN",
name: "My Token",
precision: 3,
maxSupply: "1000000",
});
// Offline payload preview — no network, no checks
hive.keychainIssuer.token.buildCreate({
symbol: "MYTOKEN", name: "My Token", precision: 3, maxSupply: "1000000",
});Preflight checks
create() compares the signing account's BEE balance against the sidechain creation fee and checks whether the symbol already exists. A failing check throws INSUFFICIENT_BEE or TOKEN_ALREADY_EXISTS before Keychain opens or a private key is resolved.
TypeScript
const check = await hive.keychainIssuer.token.checkCreate({ username: "alice", symbol: "MYTOKEN" });
// { fee: "100", balance: "8.454", hasEnoughBee: false, symbolExists: false, ok: false, issues: [...] }Important
Pass
skipChecks: true only when you have already verified the balance and the symbol yourself — the creation fee is never refunded.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Uppercase letters, max 10. |
| name | string | Yes | Max 50 characters. |
| precision | number | Yes | 0 to 8 decimals. |
| maxSupply | string | Yes | 1 to 9007199254740991. |
| url | string | No | Optional website, editable later. |
| skipChecks | boolean | No | Skip the BEE and symbol preflight. |
