Why Mythical SDK?
Secure by Design
100% client-side signing. Private keys never leave the user's browser. No backend required.
Full Wallet Access
Read balances, send IGNIS, transfer assets, and interact with the marketplace.
Encrypted Messages
Send end-to-end encrypted messages between accounts on the blockchain.
Marketplace Ready
Place and cancel buy/sell orders for game assets directly from your game.
TypeScript First
Full TypeScript support with strict types, autocomplete, and excellent DX.
Simple Integration
Connect to the wallet and start making transactions in just a few lines of code.
import { MythicalProvider } from "@mythicalb/ardor-provider";
// Create provider (connects to parent wallet)
const provider = new MythicalProvider("https://store.mythicalbeings.io");
// Connect and request permissions
const session = await provider.connect({
appName: "My Game",
appIconUrl: "https://mygame.com/icon.png",
permissions: [
"READ_ACCOUNT",
"READ_BALANCES",
"TX_SEND_IGNIS",
"TX_TRANSFER_ASSET"
]
});
console.log("Connected:", session.accountRS);
// → "ARDOR-XXXX-XXXX-XXXX-XXXXX"
// Get all balances
const balances = await provider.getBalances();
console.log("IGNIS Balance:", balances.ignisNQT);
// → "1050000000" (10.5 IGNIS)
// Convert to human-readable format
import { formatNQTToIgnis } from "@mythicalb/ardor-core";
const ignis = formatNQTToIgnis(balances.ignisNQT);
console.log("IGNIS:", ignis);
// → "10.5"
// Send IGNIS to another account
// User will see a confirmation modal
await provider.sendIgnis({
recipientRS: "ARDOR-XXXX-XXXX-XXXX-XXXXX",
amount: { ignis: "10.5" },
message: "Payment for sword"
});
// Or send with NQT precision
await provider.sendIgnis({
recipientRS: "ARDOR-XXXX-XXXX-XXXX-XXXXX",
amount: { nqt: "1050000000" }
});
// Place a sell order for an asset
await provider.placeAskOrder({
assetId: "123456789",
quantityQNT: "1", // 1 unit
priceNQTPerShare: "100000000" // 1 IGNIS per unit
});
// Place a buy order
await provider.placeBidOrder({
assetId: "123456789",
quantityQNT: "5",
priceNQTPerShare: "50000000" // 0.5 IGNIS per unit
});
// Cancel an order
await provider.cancelAskOrder({ orderId: "987654321" });
How It Works
Your Game
iframe
ProviderMythical Store
Parent window
Host + WalletArdor Node
IGNIS chain
BlockchainAll transactions are signed client-side in the Mythical Store. Your game never has access to private keys.
Packages
@mythicalb/ardor-provider
Game-side SDK for iframe communication. This is what you install in your game.
npm i @mythicalb/ardor-provider
@mythicalb/ardor-host
Wallet-side SDK for the Mythical Store. Only needed if building the host.
npm i @mythicalb/ardor-host
@mythicalb/ardor-core
Shared types, utilities, and Ardor client. Used internally by other packages.
npm i @mythicalb/ardor-core
Ready to Build?
Check out the quick start guide to integrate the SDK into your game in minutes.