@metamask-previews/transaction-pay-controller 18.0.0-preview-84c63ff0e → 18.1.0-preview-2d89a26

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,13 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [18.1.0]
11
+
10
12
  ### Added
11
13
 
12
14
  - Add `FiatStrategy` to retrieve quotes via `RampsController` ([#8121](https://github.com/MetaMask/core/pull/8121))
13
15
 
14
16
  ### Changed
15
17
 
16
- - Bump `@metamask/bridge-controller` from `^69.1.1` to `^69.2.0` ([#8265](https://github.com/MetaMask/core/pull/8265))
18
+ - Bump `@metamask/bridge-controller` from `^69.1.1` to `^69.2.1` ([#8265](https://github.com/MetaMask/core/pull/8265), [#8288](https://github.com/MetaMask/core/pull/8288))
19
+ - Bump `@metamask/bridge-status-controller` from `^70.0.0` to `^70.0.1` ([#8288](https://github.com/MetaMask/core/pull/8288))
17
20
  - Bump `@metamask/transaction-controller` from `^63.0.0` to `^63.1.0` ([#8272](https://github.com/MetaMask/core/pull/8272))
18
21
  - Bump `@metamask/assets-controller` from `^3.0.0` to `^3.1.0` ([#8276](https://github.com/MetaMask/core/pull/8276))
19
22
 
@@ -561,7 +564,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
561
564
 
562
565
  - Initial release ([#6820](https://github.com/MetaMask/core/pull/6820))
563
566
 
564
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-pay-controller@18.0.0...HEAD
567
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-pay-controller@18.1.0...HEAD
568
+ [18.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-pay-controller@18.0.0...@metamask/transaction-pay-controller@18.1.0
565
569
  [18.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-pay-controller@17.1.0...@metamask/transaction-pay-controller@18.0.0
566
570
  [17.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-pay-controller@17.0.0...@metamask/transaction-pay-controller@17.1.0
567
571
  [17.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-pay-controller@16.5.0...@metamask/transaction-pay-controller@17.0.0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
+ * This file is auto generated.
4
4
  * Do not edit manually.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionPayController-method-action-types.cjs","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { TransactionPayController } from './TransactionPayController';\n\n/**\n * Sets the transaction configuration.\n *\n * The callback receives the current configuration properties and can mutate\n * them in place. Updated values are written back to the transaction data.\n *\n * @param transactionId - The ID of the transaction to configure.\n * @param callback - A callback that receives a mutable {@link TransactionConfig} object.\n */\nexport type TransactionPayControllerSetTransactionConfigAction = {\n type: `TransactionPayController:setTransactionConfig`;\n handler: TransactionPayController['setTransactionConfig'];\n};\n\n/**\n * Updates the payment token for a transaction.\n *\n * Resolves token metadata and balances, then stores the new payment token\n * in the transaction data. This triggers recalculation of source amounts\n * and quote retrieval.\n *\n * @param request - The payment token update request containing the\n * transaction ID, token address, and chain ID.\n */\nexport type TransactionPayControllerUpdatePaymentTokenAction = {\n type: `TransactionPayController:updatePaymentToken`;\n handler: TransactionPayController['updatePaymentToken'];\n};\n\n/**\n * Updates the fiat payment state for a transaction.\n *\n * The request callback receives the current fiat payment state and can\n * mutate it to update properties such as the selected payment method or\n * fiat amount.\n *\n * @param request - The fiat payment update request containing the\n * transaction ID and a callback to mutate fiat payment state.\n */\nexport type TransactionPayControllerUpdateFiatPaymentAction = {\n type: `TransactionPayController:updateFiatPayment`;\n handler: TransactionPayController['updateFiatPayment'];\n};\n\n/**\n * Gets the delegation transaction for a given transaction.\n *\n * Converts the provided transaction into a redeem delegation by delegating\n * to the configured callback. Returns the delegation transaction data\n * including the encoded call data, target address, value, and an optional\n * authorization list.\n *\n * @param args - The arguments forwarded to the {@link GetDelegationTransactionCallback},\n * containing the transaction metadata.\n * @returns A promise resolving to the delegation transaction data.\n */\nexport type TransactionPayControllerGetDelegationTransactionAction = {\n type: `TransactionPayController:getDelegationTransaction`;\n handler: TransactionPayController['getDelegationTransaction'];\n};\n\n/**\n * Gets the preferred strategy for a transaction.\n *\n * Returns the first strategy from the ordered list of strategies applicable\n * to the given transaction. Falls back to the default strategy order derived\n * from feature flags when no custom strategy callback is configured.\n *\n * @param transaction - The transaction metadata to determine the strategy for.\n * @returns The preferred {@link TransactionPayStrategy} for the transaction.\n */\nexport type TransactionPayControllerGetStrategyAction = {\n type: `TransactionPayController:getStrategy`;\n handler: TransactionPayController['getStrategy'];\n};\n\n/**\n * Union of all TransactionPayController action types.\n */\nexport type TransactionPayControllerMethodActions =\n | TransactionPayControllerSetTransactionConfigAction\n | TransactionPayControllerUpdatePaymentTokenAction\n | TransactionPayControllerUpdateFiatPaymentAction\n | TransactionPayControllerGetDelegationTransactionAction\n | TransactionPayControllerGetStrategyAction;\n"]}
1
+ {"version":3,"file":"TransactionPayController-method-action-types.cjs","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TransactionPayController } from './TransactionPayController';\n\n/**\n * Sets the transaction configuration.\n *\n * The callback receives the current configuration properties and can mutate\n * them in place. Updated values are written back to the transaction data.\n *\n * @param transactionId - The ID of the transaction to configure.\n * @param callback - A callback that receives a mutable {@link TransactionConfig} object.\n */\nexport type TransactionPayControllerSetTransactionConfigAction = {\n type: `TransactionPayController:setTransactionConfig`;\n handler: TransactionPayController['setTransactionConfig'];\n};\n\n/**\n * Updates the payment token for a transaction.\n *\n * Resolves token metadata and balances, then stores the new payment token\n * in the transaction data. This triggers recalculation of source amounts\n * and quote retrieval.\n *\n * @param request - The payment token update request containing the\n * transaction ID, token address, and chain ID.\n */\nexport type TransactionPayControllerUpdatePaymentTokenAction = {\n type: `TransactionPayController:updatePaymentToken`;\n handler: TransactionPayController['updatePaymentToken'];\n};\n\n/**\n * Updates the fiat payment state for a transaction.\n *\n * The request callback receives the current fiat payment state and can\n * mutate it to update properties such as the selected payment method or\n * fiat amount.\n *\n * @param request - The fiat payment update request containing the\n * transaction ID and a callback to mutate fiat payment state.\n */\nexport type TransactionPayControllerUpdateFiatPaymentAction = {\n type: `TransactionPayController:updateFiatPayment`;\n handler: TransactionPayController['updateFiatPayment'];\n};\n\n/**\n * Gets the delegation transaction for a given transaction.\n *\n * Converts the provided transaction into a redeem delegation by delegating\n * to the configured callback. Returns the delegation transaction data\n * including the encoded call data, target address, value, and an optional\n * authorization list.\n *\n * @param args - The arguments forwarded to the {@link GetDelegationTransactionCallback},\n * containing the transaction metadata.\n * @returns A promise resolving to the delegation transaction data.\n */\nexport type TransactionPayControllerGetDelegationTransactionAction = {\n type: `TransactionPayController:getDelegationTransaction`;\n handler: TransactionPayController['getDelegationTransaction'];\n};\n\n/**\n * Gets the preferred strategy for a transaction.\n *\n * Returns the first strategy from the ordered list of strategies applicable\n * to the given transaction. Falls back to the default strategy order derived\n * from feature flags when no custom strategy callback is configured.\n *\n * @param transaction - The transaction metadata to determine the strategy for.\n * @returns The preferred {@link TransactionPayStrategy} for the transaction.\n */\nexport type TransactionPayControllerGetStrategyAction = {\n type: `TransactionPayController:getStrategy`;\n handler: TransactionPayController['getStrategy'];\n};\n\n/**\n * Union of all TransactionPayController action types.\n */\nexport type TransactionPayControllerMethodActions =\n | TransactionPayControllerSetTransactionConfigAction\n | TransactionPayControllerUpdatePaymentTokenAction\n | TransactionPayControllerUpdateFiatPaymentAction\n | TransactionPayControllerGetDelegationTransactionAction\n | TransactionPayControllerGetStrategyAction;\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  import type { TransactionPayController } from "./TransactionPayController.cjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  import type { TransactionPayController } from "./TransactionPayController.mjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionPayController-method-action-types.mjs","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { TransactionPayController } from './TransactionPayController';\n\n/**\n * Sets the transaction configuration.\n *\n * The callback receives the current configuration properties and can mutate\n * them in place. Updated values are written back to the transaction data.\n *\n * @param transactionId - The ID of the transaction to configure.\n * @param callback - A callback that receives a mutable {@link TransactionConfig} object.\n */\nexport type TransactionPayControllerSetTransactionConfigAction = {\n type: `TransactionPayController:setTransactionConfig`;\n handler: TransactionPayController['setTransactionConfig'];\n};\n\n/**\n * Updates the payment token for a transaction.\n *\n * Resolves token metadata and balances, then stores the new payment token\n * in the transaction data. This triggers recalculation of source amounts\n * and quote retrieval.\n *\n * @param request - The payment token update request containing the\n * transaction ID, token address, and chain ID.\n */\nexport type TransactionPayControllerUpdatePaymentTokenAction = {\n type: `TransactionPayController:updatePaymentToken`;\n handler: TransactionPayController['updatePaymentToken'];\n};\n\n/**\n * Updates the fiat payment state for a transaction.\n *\n * The request callback receives the current fiat payment state and can\n * mutate it to update properties such as the selected payment method or\n * fiat amount.\n *\n * @param request - The fiat payment update request containing the\n * transaction ID and a callback to mutate fiat payment state.\n */\nexport type TransactionPayControllerUpdateFiatPaymentAction = {\n type: `TransactionPayController:updateFiatPayment`;\n handler: TransactionPayController['updateFiatPayment'];\n};\n\n/**\n * Gets the delegation transaction for a given transaction.\n *\n * Converts the provided transaction into a redeem delegation by delegating\n * to the configured callback. Returns the delegation transaction data\n * including the encoded call data, target address, value, and an optional\n * authorization list.\n *\n * @param args - The arguments forwarded to the {@link GetDelegationTransactionCallback},\n * containing the transaction metadata.\n * @returns A promise resolving to the delegation transaction data.\n */\nexport type TransactionPayControllerGetDelegationTransactionAction = {\n type: `TransactionPayController:getDelegationTransaction`;\n handler: TransactionPayController['getDelegationTransaction'];\n};\n\n/**\n * Gets the preferred strategy for a transaction.\n *\n * Returns the first strategy from the ordered list of strategies applicable\n * to the given transaction. Falls back to the default strategy order derived\n * from feature flags when no custom strategy callback is configured.\n *\n * @param transaction - The transaction metadata to determine the strategy for.\n * @returns The preferred {@link TransactionPayStrategy} for the transaction.\n */\nexport type TransactionPayControllerGetStrategyAction = {\n type: `TransactionPayController:getStrategy`;\n handler: TransactionPayController['getStrategy'];\n};\n\n/**\n * Union of all TransactionPayController action types.\n */\nexport type TransactionPayControllerMethodActions =\n | TransactionPayControllerSetTransactionConfigAction\n | TransactionPayControllerUpdatePaymentTokenAction\n | TransactionPayControllerUpdateFiatPaymentAction\n | TransactionPayControllerGetDelegationTransactionAction\n | TransactionPayControllerGetStrategyAction;\n"]}
1
+ {"version":3,"file":"TransactionPayController-method-action-types.mjs","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TransactionPayController } from './TransactionPayController';\n\n/**\n * Sets the transaction configuration.\n *\n * The callback receives the current configuration properties and can mutate\n * them in place. Updated values are written back to the transaction data.\n *\n * @param transactionId - The ID of the transaction to configure.\n * @param callback - A callback that receives a mutable {@link TransactionConfig} object.\n */\nexport type TransactionPayControllerSetTransactionConfigAction = {\n type: `TransactionPayController:setTransactionConfig`;\n handler: TransactionPayController['setTransactionConfig'];\n};\n\n/**\n * Updates the payment token for a transaction.\n *\n * Resolves token metadata and balances, then stores the new payment token\n * in the transaction data. This triggers recalculation of source amounts\n * and quote retrieval.\n *\n * @param request - The payment token update request containing the\n * transaction ID, token address, and chain ID.\n */\nexport type TransactionPayControllerUpdatePaymentTokenAction = {\n type: `TransactionPayController:updatePaymentToken`;\n handler: TransactionPayController['updatePaymentToken'];\n};\n\n/**\n * Updates the fiat payment state for a transaction.\n *\n * The request callback receives the current fiat payment state and can\n * mutate it to update properties such as the selected payment method or\n * fiat amount.\n *\n * @param request - The fiat payment update request containing the\n * transaction ID and a callback to mutate fiat payment state.\n */\nexport type TransactionPayControllerUpdateFiatPaymentAction = {\n type: `TransactionPayController:updateFiatPayment`;\n handler: TransactionPayController['updateFiatPayment'];\n};\n\n/**\n * Gets the delegation transaction for a given transaction.\n *\n * Converts the provided transaction into a redeem delegation by delegating\n * to the configured callback. Returns the delegation transaction data\n * including the encoded call data, target address, value, and an optional\n * authorization list.\n *\n * @param args - The arguments forwarded to the {@link GetDelegationTransactionCallback},\n * containing the transaction metadata.\n * @returns A promise resolving to the delegation transaction data.\n */\nexport type TransactionPayControllerGetDelegationTransactionAction = {\n type: `TransactionPayController:getDelegationTransaction`;\n handler: TransactionPayController['getDelegationTransaction'];\n};\n\n/**\n * Gets the preferred strategy for a transaction.\n *\n * Returns the first strategy from the ordered list of strategies applicable\n * to the given transaction. Falls back to the default strategy order derived\n * from feature flags when no custom strategy callback is configured.\n *\n * @param transaction - The transaction metadata to determine the strategy for.\n * @returns The preferred {@link TransactionPayStrategy} for the transaction.\n */\nexport type TransactionPayControllerGetStrategyAction = {\n type: `TransactionPayController:getStrategy`;\n handler: TransactionPayController['getStrategy'];\n};\n\n/**\n * Union of all TransactionPayController action types.\n */\nexport type TransactionPayControllerMethodActions =\n | TransactionPayControllerSetTransactionConfigAction\n | TransactionPayControllerUpdatePaymentTokenAction\n | TransactionPayControllerUpdateFiatPaymentAction\n | TransactionPayControllerGetDelegationTransactionAction\n | TransactionPayControllerGetStrategyAction;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/transaction-pay-controller",
3
- "version": "18.0.0-preview-84c63ff0e",
3
+ "version": "18.1.0-preview-2d89a26",
4
4
  "description": "Manages alternate payment strategies to provide required funds for transactions in MetaMask",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -55,8 +55,8 @@
55
55
  "@metamask/assets-controller": "^3.1.0",
56
56
  "@metamask/assets-controllers": "^101.0.1",
57
57
  "@metamask/base-controller": "^9.0.0",
58
- "@metamask/bridge-controller": "^69.2.0",
59
- "@metamask/bridge-status-controller": "^70.0.0",
58
+ "@metamask/bridge-controller": "^69.2.1",
59
+ "@metamask/bridge-status-controller": "^70.0.1",
60
60
  "@metamask/controller-utils": "^11.19.0",
61
61
  "@metamask/gas-fee-controller": "^26.1.0",
62
62
  "@metamask/messenger": "^0.3.0",