Skip to content

22.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Mar 20:21
abe1266

@metamask/delegation-core 0.4.0

Added

  • Add terms builders for all enforcers implemented in @metamask/smart-accounts-kit (#139)
    • createAllowedMethodsTerms
    • createAllowedTargetsTerms
    • createArgsEqualityCheckTerms
    • createBlockNumberTerms
    • createDeployedTerms
    • createERC1155BalanceChangeTerms
    • createERC20BalanceChangeTerms
    • createERC20TransferAmountTerms
    • createERC721BalanceChangeTerms
    • createERC721TransferTerms
    • createExactCalldataBatchTerms
    • createExactExecutionTerms
    • createExactExecutionBatchTerms
    • createIdTerms
    • createLimitedCallsTerms
    • createMultiTokenPeriodTerms
    • createNativeBalanceChangeTerms
    • createNativeTokenPaymentTerms
    • createNativeTokenTransferAmountTerms
    • createOwnershipTransferTerms
    • createRedeemerTerms
    • createSpecificActionERC20TransferBatchTerms
  • New utils encodeDelegation and decodeDelegation (#153)

Changed

  • Default delegation.salt and caveat.args should be 0x00 (#138)

Fixed

  • Resolve yarn peer dependency warnings (#123)

@metamask/delegation-deployments 0.17.0

Added

  • Tempo mainnet and Tempo Moderato testnet (#177)
  • Celo and Ronin mainnet and testnets (#173)

@metamask/smart-accounts-kit 0.4.0-beta.2

Added

  • Add encodeDelegation and decodeDelegation utilities for encoding and decoding single delegations. (#153)
  • Add DelegationManager validation for EIP-7710 actions (#150) (#150)
  • Support for Tempo Mainnet and Tempo Moderato Testnet (#177)

Changed

  • Introduce PermissionContext to represent a delegation chain (ABI-encoded Hex or decoded Delegation[]). (#140)
    • Breaking: Replace usages of raw Hex or Delegation[] with PermissionContext, and rename permissionsContext to permissionContext (note the singular "permission") where applicable:
      • SendTransactionWithDelegation: permissionsContext: HexpermissionContext: PermissionContext
      • SendUserOperationWithDelegation: within calls: DelegatedCall, permissionsContext: HexpermissionContext: PermissionContext
      • redeemDelegations: parameter Delegation[]PermissionContext
      • encodeDelegations and decodeDelegations now accept PermissionContext (if the input is already the expected type, the input is returned)
      • encode, execute, and simulate functions for DelegationManager.redeemDelegations from @metamask/smart-accounts-kit/contracts: parameter delegations: Delegation[]delegations: PermissionContext
  • Breaking: ERC-7715 actions now return developer-friendly types: chainId as number, token amounts as bigint. (#172)
  • Breaking: Rename getDelegationHashOffchain to hashDelegation for improved clarity. (#162)
  • Breaking: EIP-7715 permission requests nest isAdjustmentAllowed inside each permission object per specification. (#159)
  • Breaking: sendUserOperationWithDelegation now accepts dependencies instead of deprecated accountMetadata. (#157)
  • Breaking: Validate that the provided DelegationManager address matches the known contract address for the chain in EIP-7710 actions. (#156)
  • Breaking: Default delegation.salt and caveat.args to 0x00 instead of invalid 0x. (#138)
  • Allow scope type to be specified either as ScopeType enum, or string literal. (#133)
  • Allow caveat type to be specified either as CaveatType enum, or string literal. (#179)

Removed

  • Breaking: encodePermissionContexts and decodePermissionContexts utilities; use encodeDelegations and decodeDelegations directly. (#148)
  • Breaking: redeemDelegations helper and Redemption type; use redeemDelegations encoding / execution utilities directly. (#160)

Fixed

  • Fix delegation storage to throw a proper Error instance so stack traces are correct across environments. (#171)
  • Fix signDelegation to correctly await the signer and return the signed signature. (#168)