feat: submit agent-wallet transactions#161
Conversation
|
Warning Review limit reached
More reviews will be available in 46 minutes and 30 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Time Submission Status
Submit or update total time with: Add time on top of previous submission with: See available commands to help comply with our Guidelines. |
|
@holdex pr submit-time 3h |
resolves: https://github.com/truflation/website/issues/4085
Adds
executeAgentActionto the TypeScript SDK so a developer can run one allow-listed action as an agent wallet (Modular Agent Address). The wallet's restricted agent or unrestricted owner signs the transaction; the node looks up the rule, enforces the allow-list for the signer's role, and re-enters the engine with@callerrewritten to the wallet. This is amaa_exectransaction (a distinct payload), not an action call.What this adds
MAAAction.executeAgentAction(input)— a thin wrapper over kwil-jskwil.maaExec. It normalizes the address (0x-hex or raw bytes), validates the 20-byte length, rejects an empty action, defaults the namespace tomain, forwards aMAAExecBody, and returns the submission tx-hash string (parity withcreateAgentRule/joinAgentAddressand the Go/Python SDKs).MAAExecuteInputtype (src/types/maa.ts, exported viainternal.ts):maaAddress(hex or bytes),action, positionalargs, optional per-argtypesoverride, optionalnamespace.@trufnetwork/kwil-jsto0.9.12— the first published release shippingmaaExec.Testing
src/contracts-api/maaActions.test.ts: 8 pure-unit tests mockingmaaExec— forwards the body (hex→bytes), accepts a rawUint8Array, namespace default/override, args default[], args+types passthrough, rejects non-20-byte address and empty action before broadcasting, throws on a missing tx hash.tsc --noEmit, the full unit suite (256 tests), and the ESM/CJS/types build all pass against the published0.9.12.The on-chain behaviour (activation gate, role, allow-list,
@callerrewrite) is covered by the node integration tests, not reachable over the black-box SDK harness. The network must have activatedmaa_exec; before activation the node rejects the payload with an "unknown payload type" error, surfaced verbatim.Context
This completes the SDK layer of MAA. The sibling slices are already merged: