stoa/packages/contracts/abi/SessionKeyManager.json
stoa 606076ab64 feat(web+abi): wallet connect, agents/contracts APIs, real ABI artifacts
- 13 contract ABIs generated via forge inspect -> packages/contracts/abi/*.json
- apps/web: lib/wallet.ts (viem injected wallet), /connect page (connect + add Pharos network + PHRS balance), /agents page, /api/agents (registry events + demo fallback), /api/contracts (contract set + addresses)
- packages/contracts/deployments/{pharos-atlantic,localhost}.json
- web app now: 6 pages + 6 API routes
2026-06-12 01:10:33 +03:00

318 lines
5.7 KiB
JSON

[
{
"type": "function",
"name": "allowanceOf",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "sessionKey",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "cap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "validUntil",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "active",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "authorize",
"inputs": [
{
"name": "sessionKey",
"type": "address",
"internalType": "address"
},
{
"name": "cap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "validUntil",
"type": "uint64",
"internalType": "uint64"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "balanceOf",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "deposit",
"inputs": [],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "revoke",
"inputs": [
{
"name": "sessionKey",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sessions",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
},
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "cap",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "validUntil",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "active",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "spend",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdraw",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Authorized",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sessionKey",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "cap",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "validUntil",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Deposited",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Revoked",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sessionKey",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Spent",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sessionKey",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "to",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Withdrawn",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "error",
"name": "CapExceeded",
"inputs": []
},
{
"type": "error",
"name": "Expired",
"inputs": []
},
{
"type": "error",
"name": "InsufficientBalance",
"inputs": []
},
{
"type": "error",
"name": "NotActive",
"inputs": []
},
{
"type": "error",
"name": "TransferFailed",
"inputs": []
},
{
"type": "error",
"name": "ZeroValue",
"inputs": []
}
]