Skip to content

feat: submit agent-wallet transactions#152

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

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

Conversation

@MicBun

@MicBun MicBun commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

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

Adds the maa_exec transaction to kwil-js 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, and 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. maa_exec is a distinct transaction payload, not an action call.

What this adds

  • PayloadType.MAA_EXEC ('maa_exec'), MAAExecPayload, and encodeMAAExec() — serialized byte-for-byte identically to kwil-db's core/types.MAAExec.MarshalBinary (the wire layout is a consensus contract: one divergent byte rewrites which action runs, or under whose identity).
  • Public kwil.maaExec(body, signer) method on both NodeKwil and WebKwil, mirroring execSql/transfer. It normalizes the address (0x-hex or raw bytes), defaults an empty namespace to main, validates the 20-byte length, and formats positional inputs through the same encoder execute uses.
  • Utils.encodeMAAExec and Types.MAAExecBody exports.

Testing

  • New unit tests assert byte-equality against the Go golden vector (kwil-db core/types/payloads_maa_test.go), the single-call argument framing, and empty-namespace handling.
  • tsc --noEmit, the full unit suite, and the CJS + ESM build pass; the built dist reproduces the golden vector exactly.

Context

This completes the kwil-js slice of MAA Problem #9. The sibling slices are already merged:

The sdk-js wrapper follows once a kwil-js version shipping this is published.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

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 11 minutes and 59 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: e38e5181-d49d-4af3-91f1-e158273937e0

📥 Commits

Reviewing files that changed from the base of the PR and between fe2a9ab and 3a3f594.

📒 Files selected for processing (8)
  • src/client/kwil.ts
  • src/core/action.ts
  • src/core/enums.ts
  • src/core/payload.ts
  • src/index.ts
  • src/transaction/payloadTx.ts
  • src/utils/kwilEncoding.ts
  • tests/unitTests/utils/kwilEncoding.test.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 4h ✅ Submitted Jun 17, 2026, 6:26 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 kwil-js feat: submit agent-wallet transactions Jun 17, 2026
@MicBun MicBun self-assigned this Jun 17, 2026
@MicBun

MicBun commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

@holdex pr submit-time 4h

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@MicBun

MicBun commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@MicBun
MicBun merged commit 87f7c38 into main Jun 17, 2026
3 checks passed
@MicBun
MicBun deleted the feat/maa-exec-submission branch June 17, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant