what's in this wallet and what am I allowed to spend with this key
▸ get_identity {}
→ {
"identity": "a4c1f94d2b8e6f03a17c55e9dd2a4b8c0f3e1d9a2b4c6d8e0f1a2b3c4d567d9",
"network": "niles",
"mode": "writes"
}
▸ get_spend_policy {}
→ {
"identity": "a4c1f94d2b8e6f03a17c55e9dd2a4b8c0f3e1d9a2b4c6d8e0f1a2b3c4d567d9",
"keyFound": true,
"role": "agent",
"policy": {
"version": 1,
"rules": { "TRX-NILE:#native": { "perTxMax": "150000000" } }
},
"note": "Per-tx ceiling 150 TRX on niles native."
}
This is an agent key on niles with a 150 TRX per-transaction cap. The contract enforces that cap, not me, so there is no talking my way past it.
▸ get_balances {}
→ {
"TRX-NILE": [
" { "symbol": "TRX", "token": null, "decimals": 6, "raw": "12480770000", "reserved": "0", "available": "12480770000" },
" { "symbol": "USDT", "token": "9b28202c…bb06c", "decimals": 6, "raw": "0", "reserved": "0", "available": "0" }
]
}
You have 12,480.77 TRX and no USDT. None of it is tied up in open orders.
swap 600 TRX to USDT at market, keep slippage under 0.5%
▸ list_tokens {}
→ {
"TRX-NILE": [
" { "symbol": "TRX", "token": null, "decimals": 6, "chargeable": false },
" { "symbol": "USDT", "token": "9b28202c90af764ffa36279857a6d7cd928bb06c", "decimals": 6, "chargeable": true }
]
}
USDT on niles is contract 9b2820…b06c. Checking the book before I trade.
▸ get_order_book {}
→ [
" { "hash": "d9a12c…5b3c", "give": { "chain": "niles", "amount": "5000000000" }, "want": { "chain": "niles", "token": "9b28…bb06c", "amount": "208500000" } },
" { "hash": "3f7a9c…e6d1", "give": { "chain": "niles", "amount": "3000000000" }, "want": { "chain": "niles", "token": "9b28…bb06c", "amount": "125880000" } },
" { "hash": "b84e0a…9c02", "give": { "chain": "niles", "amount": "3500000000" }, "want": { "chain": "niles", "token": "9b28…bb06c", "amount": "147350000" } }
]
Best ask is 5,000 TRX for 208.50 USDT, about 0.0417 USDT per TRX. Placing a market order with slippage capped at 50 bps.
▸ market_order { "give": { "chain": "niles", "amount": "600" }, "wantAsset": { "network": "niles", "token": "0x9b28202c…bb06c" }, "maxSlippageBps": 50 }
→ {
"status": "error",
"error": {
"code": "POLICY_PER_TX_EXCEEDED",
"message": "600 TRX exceeds this key's per-transaction ceiling of 150 TRX. The contract refused the trade; nothing was attempted.",
"retryable": false,
"policy": true
}
}
600 TRX is too much for this key: its limit is 150 TRX per transaction, and the contract refused the trade before anything moved. I can't change that limit from here. You can, under Ledger Keys in your wallet: scanner.varnir.site/wallet/keys
done, bumped the per-transaction limit to 1,000 TRX. try the swap again
▸ get_spend_policy {}
→ {
"identity": "a4c1f94d2b8e6f03a17c55e9dd2a4b8c0f3e1d9a2b4c6d8e0f1a2b3c4d567d9",
"keyFound": true,
"role": "agent",
"policy": {
"version": 2,
"rules": { "TRX-NILE:#native": { "perTxMax": "1000000000" } }
},
"note": "Per-tx ceiling 1000 TRX on niles native."
}
The ledger shows it: 1,000 TRX per transaction now. Retrying the same order.
▸ market_order { "give": { "chain": "niles", "amount": "600" }, "wantAsset": { "network": "niles", "token": "0x9b28202c…bb06c" }, "maxSlippageBps": 50 }
→ {
"status": "partial",
"give": { "raw": "548200000", "decimals": 6, "amount": "548.20" },
"want": { "raw": "22859940", "decimals": 6, "amount": "22.86" },
"unfilledGive": { "raw": "51800000", "decimals": 6, "amount": "51.80" }
}
Partly filled: 548.20 TRX sold for 22.86 USDT at about 0.0417. The rest could not fill inside your 0.5%, so 51.80 TRX stays in your balance, free to spend.
Meanwhile the verifier agent checks my work from its own key. That key can confirm a transfer, but the contracts will not let it start one.
Re-reads the book and balances after the trade.
Matches: 548.20 TRX out, 22.86 USDT in, 51.80 TRX unfilled and still available. Nothing reserved.
put 800 TRX up as a limit sell for USDT at that rate or a touch above and leave it resting until it fills or I pull it
▸ create_order { "give": { "chain": "niles", "amount": "800" }, "want": { "chain": "niles", "token": "0x9b28202c…bb06c", "amount": "33.76" } }
→ {
"status": "ok",
"orderHash": "7a41f90e…c3d8",
"order": { "give": { "amount": "800" }, "want": { "amount": "33.76" } }
}
Listed: 800 TRX for 33.76 USDT, or 0.0422 per TRX, just above what we got. Those 800 TRX show as reserved until someone takes the order or you cancel it.
did that sell fill yet
▸ get_order_book {}
→ [
" { "hash": "3f7a9c…e6d1", "give": { "chain": "niles", "amount": "3000000000" }, "want": { "chain": "niles", "token": "9b28…bb06c", "amount": "125880000" } },
" { "hash": "b84e0a…9c02", "give": { "chain": "niles", "amount": "3500000000" }, "want": { "chain": "niles", "token": "9b28…bb06c", "amount": "147350000" } }
]
Yes. Order 7a41f90e…c3d8 is off the book and you did not cancel it, so a taker filled it at your price: 800 TRX out, 33.76 USDT in.
send 250 TRX to the ops identity for this week's payroll
▸ transfer_on_ledger { "to": "eb10c71f…399", "chain": "niles", "amount": "250" }
→ {
"status": "awaiting_cosign",
"umid": "c8417a5b…aa11",
"message": "The transfer was recorded but NO MONEY HAS MOVED. 250 TRX crosses the identity's co-sign threshold of 100 TRX, so it is held until a second key confirms it. Report this as 'not sent, approval pending'."
}
Not sent yet. 250 TRX is under the 1,000 TRX limit but over the 100 TRX co-sign threshold, so the ledger is holding it as proposal c8417a5b…aa11 until a second key confirms. I cannot approve it myself. No tool on this server does that.
Reads proposal c8417a5b…aa11: 250.00 TRX to the ops identity, inside the ceiling.
Confirms it. A verifier key can approve a transfer it did not raise, but it cannot send one.
The verifier has confirmed. Checking the transfer:
▸ get_transfer { "umid": "c8417a5b…aa11" }
→ {
"status": "settled",
"txid": "9f2e6a1c4d8b5f07a3c9e1d2b4e6f180c7a9d3e5b1f2c4a6d8e0b7d9f1a3c5e7",
"confirmed": { "success": true }
}
Settled. 250.00 TRX reached the ops identity. I proposed it, the verifier approved it, and neither key could have done both.
good, that went through. thanks