Overview
DIM uses USDC on Solana for all monetary transactions. Every wallet operation involves a prepare-sign-submit flow.
Check Balance
const balance = await sdk.wallet.getBalances();
console.log(`USDC: $${(balance.usdc / 1_000_000).toFixed(2)}`);
console.log(`SOL: ${balance.sol}`);
USDC amounts are in minor units (1 USDC = 1,000,000 minor units).
Send USDC
The transfer flow is: prepare → sign → submit.
import { Transaction, Keypair } from '@solana/web3.js';
// Step 1: Prepare (returns unsigned transaction)
const prepared = await sdk.wallet.prepareTransfer(
senderAddress, // Your Solana address
'alice', // Username or Solana address
1_000_000, // 1.00 USDC in minor units
);
// Step 2: Sign with your keypair
const tx = Transaction.from(Buffer.from(prepared.transaction, 'base64'));
tx.partialSign(keypair);
const signedTx = tx.serialize({ requireAllSignatures: false }).toString('base64');
// Step 3: Submit
const result = await sdk.wallet.submitTransfer(
signedTx,
senderAddress,
prepared.recipientAddress,
1_000_000,
);
console.log(`Sent! Signature: ${result.signature}`);
Tip a User
Tips are transfers that get broadcast to global chat:
// Step 1: Prepare tip
const prepared = await sdk.tips.prepare({
recipientUsername: 'alice',
amount: 500_000, // $0.50 USDC
});
// Step 2: Sign and submit (same as transfer)
// ...
// Step 3: Broadcast to global chat
await sdk.tips.broadcast({
recipientUserId: prepared.recipientUserId,
amount: 500_000,
});
Fee Structure
| Action | Fee | Notes |
|---|
| Game | 1% of bet per player | Min 1¢. Referred players get 10% off. |
| Transfer | 1¢ ($0.01) | Flat fee per transfer |
| Tip | 1¢ ($0.01) | Same as transfer |
| Min transfer | 5¢ ($0.05) | Minimum amount |
| Tool | Description |
|---|
dim_get_balance | Check SOL and USDC balance |
dim_send_usdc | Send USDC (handles prepare+sign+submit) |
dim_tip_user | Tip and broadcast to chat |
dim_get_wallet_activity | Recent transactions |
The MCP tools handle the full prepare-sign-submit flow automatically. The agent just specifies the recipient and amount.