# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0]

### Changed

- **BREAKING:** Removes support for Nodejs 18 - engines changed from `^18.18 || >=20` to `>=20` ([#286](https://github.com/MetaMask/smart-accounts-kit/pull/286))
  - Bump @vitest and @vitest/coverage-v8 from `4.0.18` to `4.1.10` ([#286](https://github.com/MetaMask/smart-accounts-kit/pull/286))
- Bumped @metamask/delegation-core from `^2.2.1` to `^3.0.0` ([#291](https://github.com/MetaMask/smart-accounts-kit/pull/291))
- Bumped @metamask/delegation-deployments from `^1.4.0` to `^2.0.0` ([#291](https://github.com/MetaMask/smart-accounts-kit/pull/291))

## [1.0.0]

### Added

- Export `TranslationKeys` type from `@metamask/7715-permission-types`, a union of all permission schema i18n label keys ([#279](https://github.com/MetaMask/smart-accounts-kit/pull/279))

### Changed

- **BREAKING:** `makePermissionDecoderConfigs` now accepts `EnforcerAddressesByName`, which is keyed with specific contract names ([#278](https://github.com/MetaMask/smart-accounts-kit/pull/278))
  - Removes `ChecksumEnforcersByChainId` and `DeployedContractsByName` types

## [0.9.0]

### Added

- Export `I18nValue` type ([#275](https://github.com/MetaMask/smart-accounts-kit/pull/275))

### Fixed

- Incorrectly named caveats used in caveat factory functions ([#274](https://github.com/MetaMask/smart-accounts-kit/pull/274))
  - erc20PeriodicEnforcer is now erc20PeriodTransferEnforcer
  - nativeTokenPeriodicEnforcer is now nativeTokenPeriodTransferEnforcer

## [0.8.0]

### Added

- Utility functions to create caveats array for each permission type ([#265](https://github.com/MetaMask/smart-accounts-kit/pull/265))
  - `createErc20TokenStreamCaveats()`
  - `createErc20TokenPeriodicCaveats()`
  - `createErc20TokenAllowanceCaveats()`
  - `createNativeTokenStreamCaveats()`
  - `createNativeTokenPeriodicCaveats()`
  - `createNativeTokenAllowanceCaveats()`
  - `createTokenApprovalRevocationCaveats()`
- Add `makePermissionDecoderConfigs` to resolve the `PermissionDecoderConfig`s to be used with @metamask/gator-permissions-controller ([#259](https://github.com/MetaMask/smart-accounts-kit/pull/259))
- Add permission schema metadata and MetaMask facilitator address utilities ([#267](https://github.com/MetaMask/smart-accounts-kit/pull/267))

## [0.7.1]

### Fixed

- Rename `permit2ApproveZero` to `permit2Approve` in `TokenApprovalRevocationPermission` ERC-7715 permission data ([#237](https://github.com/MetaMask/smart-accounts-kit/pull/237))

## [0.7.0]

### Added

- New permission type `token-approval-revocation` ([#226](https://github.com/MetaMask/smart-accounts-kit/pull/226))

### Deprecated

- Deprecated `erc20-token-revocation` in favor of `token-approval-revocation` ([#226](https://github.com/MetaMask/smart-accounts-kit/pull/226))

## [0.6.0]

### Added

- New erc-7715 simple allowance types, `native-token-allowance` and `erc20-token-allowance` ([#214](https://github.com/MetaMask/smart-accounts-kit/pull/214))

## [0.5.0]

### Changed

- **Breaking** Implement erc-7715 type scheme revisions ([#128](https://github.com/MetaMask/smart-accounts-kit/pull/128))

### Fixed

- Resolve yarn peer dependency warnings ([#123](https://github.com/MetaMask/smart-accounts-kit/pull/123))

## [0.4.0]

### Added

- New permission type `erc20-token-revocation` ([#110](https://github.com/MetaMask/smart-accounts-kit/pull/110))

## [0.3.0]

### Added

- Export `MetaMaskBasePermissionData` type ([#65](https://github.com/MetaMask/smart-accounts-kit/pull/65))

## [0.2.0]

### Added

- Type definitions for EIP-7715 Execution Permissions, and definitions for permission types supported by MetaMask

[Unreleased]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@2.0.0...HEAD
[2.0.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@1.0.0...@metamask/7715-permission-types@2.0.0
[1.0.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.9.0...@metamask/7715-permission-types@1.0.0
[0.9.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.8.0...@metamask/7715-permission-types@0.9.0
[0.8.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.7.1...@metamask/7715-permission-types@0.8.0
[0.7.1]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.7.0...@metamask/7715-permission-types@0.7.1
[0.7.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.6.0...@metamask/7715-permission-types@0.7.0
[0.6.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.5.0...@metamask/7715-permission-types@0.6.0
[0.5.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.4.0...@metamask/7715-permission-types@0.5.0
[0.4.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.3.0...@metamask/7715-permission-types@0.4.0
[0.3.0]: https://github.com/MetaMask/smart-accounts-kit/compare/@metamask/7715-permission-types@0.2.0...@metamask/7715-permission-types@0.3.0
[0.2.0]: https://github.com/MetaMask/smart-accounts-kit/releases/tag/@metamask/7715-permission-types@0.2.0
