Skip to content

Conversation

@0xLeo-sqds
Copy link
Collaborator

Summary

General cleanup of the policies branch: removed temporary documentation files, rewrote README with comprehensive policy framework documentation, and fixed SDK serialization bugs.

Changes

Deleted Files (Temporary/AI Context Files)

• .mcp.json - MCP configuration (not needed in repo)
• CLAUDE.md - AI assistant context file
• EVENT_LOGGING_OVERVIEW.md - Temporary documentation
• POLICIES_OVERVIEW.md - Temporary documentation
• context.md - AI assistant context file
• summary.md - AI assistant summary file

README.md - Complete Rewrite

Comprehensive developer-focused documentation including:
• Grid Integration - Positioned as the easiest path for most developers
• Core Concepts - Settings struct, sub-accounts, permissions, time lock, stale transaction protection
• Execution Modes - Consensus-based and synchronous execution flows
• Policy Framework - All 4 policy types documented:
• Program Interaction Policy (with Smart Transactions explanation)
• Internal Fund Transfer Policy
• Spending Limit Policy
• Settings Change Policy
• Hooks - Pre/post execution hooks documentation
• Legacy Spending Limits - Backwards compatibility section
• Building, Testing, Verifying - Developer instructions
• Audits & Security - Links to audit reports

SDK Bug Fixes

fix-smallvec.js
• Removed SmartAccountTransactionMessage.ts from SmallVec list - This type uses Vec in Rust (4-byte length prefix), NOT SmallVec (1-byte prefix). The incorrect entry was causing transaction deserialization failures (RangeError: offset out of range).

CompiledHook.ts
• Fixed instructionData field - Changed from smallArray(beet.u8, beet.u8) to smallArray(beet.u16, beet.u8) to match Rust's SmallVec<u16, u8> which uses a 2-byte length prefix.

Test Fixes

tests/index.ts
• Enabled all test imports (previously some were commented out)

policyCreation.ts
• Changed ProgramInteraction to LegacyProgramInteraction - The test uses the old format without pubkeyTable, so it needs the legacy variant.

Other

• .yarnrc.yml - Removed yarnPath pointing to gitignored .yarn/releases/ directory

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