Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,22 +702,14 @@
},
"packages/delegation-controller/src/DelegationController.ts": {
"@typescript-eslint/explicit-function-return-type": {
"count": 5
},
"id-length": {
"count": 2
"count": 1
}
},
"packages/delegation-controller/src/types.ts": {
"@typescript-eslint/naming-convention": {
"count": 3
}
},
"packages/delegation-controller/src/utils.ts": {
"@typescript-eslint/explicit-function-return-type": {
"count": 1
}
},
"packages/earn-controller/src/EarnController.test.ts": {
"@typescript-eslint/explicit-function-return-type": {
"count": 1
Expand Down
7 changes: 5 additions & 2 deletions packages/delegation-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
### Removed

- Bump `@metamask/accounts-controller` from `^37.1.0` to `^37.1.1` ([#8325](https://github.com/MetaMask/core/pull/8325))
- **BREAKING:** Remove persisted `delegations` state ([#8330](https://github.com/MetaMask/core/pull/8330))
- `store`, `list`, `retrieve`, `chain`, and `delete` methods (and related messenger action types)
- `DelegationEntry` type export
- Remove dependency on `@metamask/accounts-controller`

## [2.1.0]

Expand Down
2 changes: 1 addition & 1 deletion packages/delegation-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `@metamask/delegation-controller`

Centralized place to store and sign delegations.
Signs delegations via the keyring using the Delegation Framework typed-data format.

## Installation

Expand Down
1 change: 0 additions & 1 deletion packages/delegation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
},
"dependencies": {
"@metamask/accounts-controller": "^37.1.1",
"@metamask/base-controller": "^9.0.1",
"@metamask/keyring-controller": "^25.1.1",
"@metamask/messenger": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,69 +18,8 @@ export type DelegationControllerSignDelegationAction = {
handler: DelegationController['signDelegation'];
};

/**
* Stores a delegation in storage.
*
* @param params - The parameters for storing the delegation.
* @param params.entry - The delegation entry to store.
*/
export type DelegationControllerStoreAction = {
type: `DelegationController:store`;
handler: DelegationController['store'];
};

/**
* Lists delegation entries.
*
* @param filter - The filter to use to list the delegation entries.
* @returns A list of delegation entries that match the filter.
*/
export type DelegationControllerListAction = {
type: `DelegationController:list`;
handler: DelegationController['list'];
};

/**
* Retrieves the delegation entry for a given delegation hash.
*
* @param hash - The hash of the delegation to retrieve.
* @returns The delegation entry, or null if not found.
*/
export type DelegationControllerRetrieveAction = {
type: `DelegationController:retrieve`;
handler: DelegationController['retrieve'];
};

/**
* Retrieves a delegation chain from a delegation hash.
*
* @param hash - The hash of the delegation to retrieve.
* @returns The delegation chain, or null if not found.
*/
export type DelegationControllerChainAction = {
type: `DelegationController:chain`;
handler: DelegationController['chain'];
};

/**
* Deletes a delegation entrie from storage, along with any other entries
* that are redelegated from it.
*
* @param hash - The hash of the delegation to delete.
* @returns The number of entries deleted.
*/
export type DelegationControllerDeleteAction = {
type: `DelegationController:delete`;
handler: DelegationController['delete'];
};

/**
* Union of all DelegationController action types.
*/
export type DelegationControllerMethodActions =
| DelegationControllerSignDelegationAction
| DelegationControllerStoreAction
| DelegationControllerListAction
| DelegationControllerRetrieveAction
| DelegationControllerChainAction
| DelegationControllerDeleteAction;
DelegationControllerSignDelegationAction;
Loading
Loading