Skip to content

feat: add RentDestination permission for close rent recipients - #150

Open
tracy-codes wants to merge 4 commits into
mainfrom
tracy/close-rent-destination
Open

feat: add RentDestination permission for close rent recipients#150
tracy-codes wants to merge 4 commits into
mainfrom
tracy/close-rent-destination

Conversation

@tracy-codes

Copy link
Copy Markdown
Contributor

Summary

  • add a zero-length RentDestination permission/action and wire it through state, interface, and Rust SDK mappings.
  • enforce close rent-recipient checks for CloseSwigV1 and CloseTokenAccountV1: when any role has RentDestination, destination must match a RentDestination authority; when none exist, keep legacy behavior and allow any destination.
  • keep close authority checks independent from rent-recipient checks so the closer and rent recipient can be different roles.
  • add integration coverage for restricted and unrestricted destination behavior, including separate closer vs recipient roles.
  • document the new permission and close behavior in docs/program_diagrams.md.
  • pin lockfile dependency resolution (blake3 to 1.8.2) to keep cargo build-sbf --arch v1 working with the current toolchain.

Validation

  • cargo fmt --all
  • cargo build-sbf --arch v1
  • cargo nextest run --config-file nextest.toml --profile ci -p swig --test close_swig_authority_test
  • cargo nextest run --config-file nextest.toml --profile ci --all --workspace --no-fail-fast (run earlier on this branch before final test-only additions)

@tracy-codes
tracy-codes requested a review from edo-chan April 2, 2026 17:37
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.

2 participants