Skip to content

feat: submit agent-wallet transactions#161

Merged
MicBun merged 1 commit into
mainfrom
feat/maa-exec-submission
Jun 17, 2026
Merged

feat: submit agent-wallet transactions#161
MicBun merged 1 commit into
mainfrom
feat/maa-exec-submission

Conversation

@MicBun

@MicBun MicBun commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

resolves: https://github.com/truflation/website/issues/4085

Adds executeAgentAction to 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 @caller rewritten to the wallet. This is a maa_exec transaction (a distinct payload), not an action call.

What this adds

  • MAAAction.executeAgentAction(input) — a thin wrapper over kwil-js kwil.maaExec. It normalizes the address (0x-hex or raw bytes), validates the 20-byte length, rejects an empty action, defaults the namespace to main, forwards a MAAExecBody, and returns the submission tx-hash string (parity with createAgentRule / joinAgentAddress and the Go/Python SDKs).
  • MAAExecuteInput type (src/types/maa.ts, exported via internal.ts): maaAddress (hex or bytes), action, positional args, optional per-arg types override, optional namespace.
  • Pins @trufnetwork/kwil-js to 0.9.12 — the first published release shipping maaExec.

Testing

  • New src/contracts-api/maaActions.test.ts: 8 pure-unit tests mocking maaExec — forwards the body (hex→bytes), accepts a raw Uint8Array, 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 published 0.9.12.

The on-chain behaviour (activation gate, role, allow-list, @caller rewrite) is covered by the node integration tests, not reachable over the black-box SDK harness. The network must have activated maa_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:

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@MicBun, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e2ebc953-1761-4c4c-b211-3175f51ae3dd

📥 Commits

Reviewing files that changed from the base of the PR and between 11dedbe and 2deeccc.

📒 Files selected for processing (5)
  • package.json
  • src/contracts-api/maaActions.test.ts
  • src/contracts-api/maaActions.ts
  • src/internal.ts
  • src/types/maa.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/maa-exec-submission

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@holdex

holdex Bot commented Jun 17, 2026

Copy link
Copy Markdown

Time Submission Status

Member # Time Running Total Status Last Update
MicBun 3h ✅ Submitted Jun 17, 2026, 10:16 AM

Submit or update total time with:

@holdex pr submit-time 2h

Add time on top of previous submission with:

@holdex pr add-time 1h30m

See available commands to help comply with our Guidelines.

@MicBun MicBun changed the title feat: submit agent-wallet transactions from JavaScript feat: submit agent-wallet transactions Jun 17, 2026
@MicBun MicBun self-assigned this Jun 17, 2026
@MicBun MicBun added the enhancement New feature or request label Jun 17, 2026
@MicBun

MicBun commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@holdex pr submit-time 3h

@MicBun MicBun merged commit 8c75d8b into main Jun 17, 2026
6 of 7 checks passed
@MicBun MicBun deleted the feat/maa-exec-submission branch June 17, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant