Appearance
TradeToken Creation Steps
To create a new trade token with specific initial parameters, you should use the createTradeToken
method from the TradeCms
class. Here is an example of how to do it:
Initialize the TradeCms instance
typescript
import { TradeCms } from "skc-trade-sdk";
const cms = new TradeCms("https://example.com");
Log into the TradeCms
typescript
// Use API-Key for login
await cms.login({ apiKey: "your-api-key" });
// Or use Email and Password for login
await cms.login({ email: "admin@example.com", password: "your-password" });
Create the Trade Token
typescript
const tradeToken = await cms.createTradeToken(
"MyTradeToken", // name
"category-name", // category
"item-123", // itemId
"USD", // denom
"Mintable", // type
"1000000", // initialSupply
"Optional memo" // memo (optional)
);
This method will create a new trade token with the specified parameters: name, category, itemId, denomination, type, initial supply, and an optional memo.