{ "contract": "username_registry", "version": "1.0.0", "description": "Maps human-readable usernames to wallet addresses. Shorter names cost more to register. Fees go to the contract treasury.", "methods": [ { "name": "register", "description": "Register a username for the caller. Fee = 10^(7 - min(len,6)) µT (1-char=10M, 2=1M, 3=100K, 4=10K, 5=1K, 6+=100). Caller must have sufficient balance.", "args": [ {"name": "name", "type": "string", "description": "Username to register (max 64 chars, lowercase)"} ] }, { "name": "resolve", "description": "Look up the wallet address that owns a username. Logs 'owner:
' or 'not found: '.", "args": [ {"name": "name", "type": "string", "description": "Username to look up"} ] }, { "name": "lookup", "description": "Reverse lookup: find the username registered to a given address. Logs 'name: ' or 'no name:
'.", "args": [ {"name": "address", "type": "string", "description": "Wallet address (hex pubkey)"} ] }, { "name": "transfer", "description": "Transfer ownership of a username to another address. Only the current owner may call this.", "args": [ {"name": "name", "type": "string", "description": "Username to transfer"}, {"name": "new_owner", "type": "string", "description": "New owner address (hex pubkey)"} ] }, { "name": "release", "description": "Release a username registration. Only the current owner may call this.", "args": [ {"name": "name", "type": "string", "description": "Username to release"} ] }, { "name": "fee", "description": "Query the registration fee for a given name length. Logs 'fee: ' in µT.", "args": [ {"name": "name", "type": "string", "description": "Name whose fee you want to check"} ] } ] }