API Reference
Account API
所有调用都以当前连接的钱包地址作为合约地址。
3 个章节account-api
01
应用管理与执行
- enableApp / disableApp 只能由 address(this) 调用;前端通常让钱包发送 self-call。
- executeRuntimeApp 可由外部触发,但必须通过本地与全局门控。
- isAppEnabled 只表示钱包本地状态,不代表最终可执行。
interface IAccountAppRuntime {
event AppEnabled(address indexed account, address indexed app);
event AppDisabled(address indexed account, address indexed app);
function executeRuntimeApp(address app, bytes calldata data)
external payable returns (bytes memory result);
function enableApp(address app) external;
function disableApp(address app) external;
function isAppEnabled(address app) external view returns (bool);
}02
资产与批量调用
- executeBatch((target,value,data)[]) 仅允许钱包自身调用。
- executeWithTokenPull / executeWithNftPull 也仅允许钱包自身调用。
- tokenPullToCaller / nftPullToCaller 只供当前临时上下文指定的 target 使用。
interface IWalletAssetPullExecutor {
function executeWithTokenPull(
address target, bytes calldata data, address asset, uint256 maxAmount
) external;
function executeWithNftPull(
address target, bytes calldata data, address asset, uint256 tokenId
) external;
function tokenPullToCaller(address asset, uint256 amount) external;
function nftPullToCaller(address asset, uint256 tokenId) external;
}03
ExecuteWithSig
function executeWithSigNonce() external view returns (uint256);
function executeWithSig(
SignedCall calldata call, uint256 deadline, bytes calldata signature
) external payable returns (bytes memory result);