@metamask-previews/wallet 13.0.0-preview-2b92c5a1c → 13.0.0-preview-e8a256c39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - Wire `SubscriptionDelegationService` into the default wallet initialization. ([#10130](https://github.com/MetaMask/core/pull/10130))
13
+ - Stateless orchestrator for Money Account Plus cash-subscription delegation setup via `SubscriptionDelegationService:prepareDelegation`.
14
+ - Delegates `AuthenticatedUserStorageService:listDelegations`, `AuthenticatedUserStorageService:createDelegation`, `ChompApiService:verifyDelegation`, `ChompApiService:createIntents`, `ChompApiService:getIntentsByAddress`, `DelegationController:signDelegation`, `MoneyAccountBalanceService:fetchBalanceWithFallback`, `RemoteFeatureFlagController:getState`, and `SubscriptionController:getPricing` from the wallet root messenger.
15
+ - Hosts must register `AuthenticatedUserStorageService`, `ChompApiService`, `DelegationController`, `MoneyAccountBalanceService`, and `SubscriptionController` on the supplied root messenger before calling `prepareDelegation`; `RemoteFeatureFlagController` is already initialized by default.
16
+
10
17
  ### Changed
11
18
 
12
19
  - Bump `@metamask/claims-controller` from `^1.0.0` to `^1.0.1` ([#10166](https://github.com/MetaMask/core/pull/10166))
@@ -16,6 +16,7 @@ export { shieldApiService } from './shield-api-service/shield-api-service.js';
16
16
  export { shieldController } from './shield-controller/shield-controller.js';
17
17
  export { storageService } from './storage-service/storage-service.js';
18
18
  export { subscriptionController } from './subscription-controller/subscription-controller.js';
19
+ export { subscriptionDelegationService } from './subscription-delegation-service/subscription-delegation-service.js';
19
20
  export { subscriptionService } from './subscription-service/subscription-service.js';
20
21
  export { transactionController } from './transaction-controller/transaction-controller.js';
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/initialization/instances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oEAAoE,CAAC;AACjH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/initialization/instances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oEAAoE,CAAC;AACjH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,MAAM,sEAAsE,CAAC;AACrH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC"}
@@ -16,6 +16,7 @@ export { shieldApiService } from './shield-api-service/shield-api-service.js';
16
16
  export { shieldController } from './shield-controller/shield-controller.js';
17
17
  export { storageService } from './storage-service/storage-service.js';
18
18
  export { subscriptionController } from './subscription-controller/subscription-controller.js';
19
+ export { subscriptionDelegationService } from './subscription-delegation-service/subscription-delegation-service.js';
19
20
  export { subscriptionService } from './subscription-service/subscription-service.js';
20
21
  export { transactionController } from './transaction-controller/transaction-controller.js';
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/initialization/instances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oEAAoE,CAAC;AACjH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC","sourcesContent":["export { accountsController } from './accounts-controller/accounts-controller.js';\nexport { addressBookController } from './address-book-controller/address-book-controller.js';\nexport { approvalController } from './approval-controller/approval-controller.js';\nexport { claimsController } from './claims-controller/claims-controller.js';\nexport { claimsService } from './claims-service/claims-service.js';\nexport { configRegistryApiService } from './config-registry-api-service/config-registry-api-service.js';\nexport { configRegistryController } from './config-registry-controller/config-registry-controller.js';\nexport { connectivityController } from './connectivity-controller/connectivity-controller.js';\nexport { gasFeeController } from './gas-fee-controller/gas-fee-controller.js';\nexport { keyringController } from './keyring-controller/keyring-controller.js';\nexport { networkController } from './network-controller/network-controller.js';\nexport { passkeyController } from './passkey-controller/passkey-controller.js';\nexport { remoteFeatureFlagController } from './remote-feature-flag-controller/remote-feature-flag-controller.js';\nexport { seedlessOnboardingController } from './seedless-onboarding-controller/seedless-onboarding-controller.js';\nexport { shieldApiService } from './shield-api-service/shield-api-service.js';\nexport { shieldController } from './shield-controller/shield-controller.js';\nexport { storageService } from './storage-service/storage-service.js';\nexport { subscriptionController } from './subscription-controller/subscription-controller.js';\nexport { subscriptionService } from './subscription-service/subscription-service.js';\nexport { transactionController } from './transaction-controller/transaction-controller.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/initialization/instances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oEAAoE,CAAC;AACjH,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAClH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,MAAM,sEAAsE,CAAC;AACrH,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC","sourcesContent":["export { accountsController } from './accounts-controller/accounts-controller.js';\nexport { addressBookController } from './address-book-controller/address-book-controller.js';\nexport { approvalController } from './approval-controller/approval-controller.js';\nexport { claimsController } from './claims-controller/claims-controller.js';\nexport { claimsService } from './claims-service/claims-service.js';\nexport { configRegistryApiService } from './config-registry-api-service/config-registry-api-service.js';\nexport { configRegistryController } from './config-registry-controller/config-registry-controller.js';\nexport { connectivityController } from './connectivity-controller/connectivity-controller.js';\nexport { gasFeeController } from './gas-fee-controller/gas-fee-controller.js';\nexport { keyringController } from './keyring-controller/keyring-controller.js';\nexport { networkController } from './network-controller/network-controller.js';\nexport { passkeyController } from './passkey-controller/passkey-controller.js';\nexport { remoteFeatureFlagController } from './remote-feature-flag-controller/remote-feature-flag-controller.js';\nexport { seedlessOnboardingController } from './seedless-onboarding-controller/seedless-onboarding-controller.js';\nexport { shieldApiService } from './shield-api-service/shield-api-service.js';\nexport { shieldController } from './shield-controller/shield-controller.js';\nexport { storageService } from './storage-service/storage-service.js';\nexport { subscriptionController } from './subscription-controller/subscription-controller.js';\nexport { subscriptionDelegationService } from './subscription-delegation-service/subscription-delegation-service.js';\nexport { subscriptionService } from './subscription-service/subscription-service.js';\nexport { transactionController } from './transaction-controller/transaction-controller.js';\n"]}
@@ -0,0 +1,5 @@
1
+ import { SubscriptionDelegationService } from '@metamask/subscription-controller';
2
+ import type { SubscriptionDelegationServiceMessenger } from '@metamask/subscription-controller';
3
+ import type { InitializationConfiguration } from '../../types.js';
4
+ export declare const subscriptionDelegationService: InitializationConfiguration<SubscriptionDelegationService, SubscriptionDelegationServiceMessenger>;
5
+ //# sourceMappingURL=subscription-delegation-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-delegation-service.d.ts","sourceRoot":"","sources":["../../../../src/initialization/instances/subscription-delegation-service/subscription-delegation-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,mCAAmC,CAAC;AAEhG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAElE,eAAO,MAAM,6BAA6B,EAAE,2BAA2B,CACrE,6BAA6B,EAC7B,sCAAsC,CA8BvC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { Messenger } from '@metamask/messenger';
2
+ import { SubscriptionDelegationService } from '@metamask/subscription-controller';
3
+ export const subscriptionDelegationService = {
4
+ name: 'SubscriptionDelegationService',
5
+ init: ({ messenger }) => new SubscriptionDelegationService({
6
+ messenger,
7
+ }),
8
+ getMessenger: (parent) => {
9
+ const messenger = new Messenger({
10
+ namespace: 'SubscriptionDelegationService',
11
+ parent,
12
+ });
13
+ parent.delegate({
14
+ messenger,
15
+ actions: [
16
+ 'AuthenticatedUserStorageService:listDelegations',
17
+ 'AuthenticatedUserStorageService:createDelegation',
18
+ 'ChompApiService:verifyDelegation',
19
+ 'ChompApiService:createIntents',
20
+ 'ChompApiService:getIntentsByAddress',
21
+ 'DelegationController:signDelegation',
22
+ 'MoneyAccountBalanceService:fetchBalanceWithFallback',
23
+ 'RemoteFeatureFlagController:getState',
24
+ 'SubscriptionController:getPricing',
25
+ ],
26
+ });
27
+ return messenger;
28
+ },
29
+ };
30
+ //# sourceMappingURL=subscription-delegation-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-delegation-service.js","sourceRoot":"","sources":["../../../../src/initialization/instances/subscription-delegation-service/subscription-delegation-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAKlF,MAAM,CAAC,MAAM,6BAA6B,GAGtC;IACF,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CACtB,IAAI,6BAA6B,CAAC;QAChC,SAAS;KACV,CAAC;IACJ,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE;QACvB,MAAM,SAAS,GAA2C,IAAI,SAAS,CAAC;YACtE,SAAS,EAAE,+BAA+B;YAC1C,MAAM;SACP,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC;YACd,SAAS;YACT,OAAO,EAAE;gBACP,iDAAiD;gBACjD,kDAAkD;gBAClD,kCAAkC;gBAClC,+BAA+B;gBAC/B,qCAAqC;gBACrC,qCAAqC;gBACrC,qDAAqD;gBACrD,sCAAsC;gBACtC,mCAAmC;aACpC;SACF,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAC","sourcesContent":["import { Messenger } from '@metamask/messenger';\nimport { SubscriptionDelegationService } from '@metamask/subscription-controller';\nimport type { SubscriptionDelegationServiceMessenger } from '@metamask/subscription-controller';\n\nimport type { InitializationConfiguration } from '../../types.js';\n\nexport const subscriptionDelegationService: InitializationConfiguration<\n SubscriptionDelegationService,\n SubscriptionDelegationServiceMessenger\n> = {\n name: 'SubscriptionDelegationService',\n init: ({ messenger }) =>\n new SubscriptionDelegationService({\n messenger,\n }),\n getMessenger: (parent) => {\n const messenger: SubscriptionDelegationServiceMessenger = new Messenger({\n namespace: 'SubscriptionDelegationService',\n parent,\n });\n\n parent.delegate({\n messenger,\n actions: [\n 'AuthenticatedUserStorageService:listDelegations',\n 'AuthenticatedUserStorageService:createDelegation',\n 'ChompApiService:verifyDelegation',\n 'ChompApiService:createIntents',\n 'ChompApiService:getIntentsByAddress',\n 'DelegationController:signDelegation',\n 'MoneyAccountBalanceService:fetchBalanceWithFallback',\n 'RemoteFeatureFlagController:getState',\n 'SubscriptionController:getPricing',\n ],\n });\n\n return messenger;\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/wallet",
3
- "version": "13.0.0-preview-2b92c5a1c",
3
+ "version": "13.0.0-preview-e8a256c39",
4
4
  "description": "Provides a shared framework for building MetaMask wallets",
5
5
  "keywords": [
6
6
  "Ethereum",