MetaMask / MetaMask/smart-accounts-kit

It's possible to specify contradictory caveats

Open
#250 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
63
Forks
45
Avg merge
4d 15h
Merged PRs (30d)
2

Description

Presently when using a `CaveatBuilder` or the declaratory `Caveats` interface in `createDelegation`, it's possible to specify caveats that are contradictory - for instance `timestamp` caveats that specify non-overlapping valid periods.

It could be useful for a caller to receive some sort of feedback about contradictory caveats. This could be:

- `validateCaveats` utility function
- error thrown from `CaveatBuilder.build()` or `createDelegation`

It could be helpful to parse the parent delegations if they exist (although if the parent delegation is a non-leaf, then it's less useful, and might provide a false sense of security).

Contributor guide

Open the contributing guide

Research direction

Start by tracing CaveatBuilder, the declaratory Caveats interface, and createDelegation to understand how caveats are assembled and where validation could occur. Compare the proposed validateCaveats utility and build/createDelegation errors, including the limitations of checking parent delegations. Done means the behavior for contradictory caveats is decided and implemented with coverage for the selected entry points.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.