@metamask/snaps-sdk
Advanced tools
+10
-1
@@ -10,2 +10,10 @@ # Changelog | ||
| ## [9.3.0] | ||
| ### Added | ||
| - Add support for `onActive` and `onInactive` lifecycle hooks ([#3542](https://github.com/MetaMask/snaps/pull/3542)) | ||
| - These hooks are called when the client is activated or deactivated, | ||
| respectively. | ||
| ## [9.2.0] | ||
@@ -642,3 +650,4 @@ | ||
| [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@9.2.0...HEAD | ||
| [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@9.3.0...HEAD | ||
| [9.3.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@9.2.0...@metamask/snaps-sdk@9.3.0 | ||
| [9.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@9.1.0...@metamask/snaps-sdk@9.2.0 | ||
@@ -645,0 +654,0 @@ [9.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@9.0.0...@metamask/snaps-sdk@9.1.0 |
@@ -50,2 +50,26 @@ /** | ||
| export type OnStartHandler = LifecycleEventHandler; | ||
| /** | ||
| * The `onActive` handler. This is called when the client becomes active. | ||
| * | ||
| * Note that using this handler requires the `endowment:lifecycle-hooks` | ||
| * permission. | ||
| * | ||
| * This type is an alias for {@link LifecycleEventHandler}. | ||
| * | ||
| * @param args - The request arguments. | ||
| * @param args.origin - The origin that triggered the lifecycle event hook. | ||
| */ | ||
| export type OnActiveHandler = LifecycleEventHandler; | ||
| /** | ||
| * The `onInactive` handler. This is called when the client becomes inactive. | ||
| * | ||
| * Note that using this handler requires the `endowment:lifecycle-hooks` | ||
| * permission. | ||
| * | ||
| * This type is an alias for {@link LifecycleEventHandler}. | ||
| * | ||
| * @param args - The request arguments. | ||
| * @param args.origin - The origin that triggered the lifecycle event hook. | ||
| */ | ||
| export type OnInactiveHandler = LifecycleEventHandler; | ||
| //# sourceMappingURL=lifecycle.d.cts.map |
@@ -50,2 +50,26 @@ /** | ||
| export type OnStartHandler = LifecycleEventHandler; | ||
| /** | ||
| * The `onActive` handler. This is called when the client becomes active. | ||
| * | ||
| * Note that using this handler requires the `endowment:lifecycle-hooks` | ||
| * permission. | ||
| * | ||
| * This type is an alias for {@link LifecycleEventHandler}. | ||
| * | ||
| * @param args - The request arguments. | ||
| * @param args.origin - The origin that triggered the lifecycle event hook. | ||
| */ | ||
| export type OnActiveHandler = LifecycleEventHandler; | ||
| /** | ||
| * The `onInactive` handler. This is called when the client becomes inactive. | ||
| * | ||
| * Note that using this handler requires the `endowment:lifecycle-hooks` | ||
| * permission. | ||
| * | ||
| * This type is an alias for {@link LifecycleEventHandler}. | ||
| * | ||
| * @param args - The request arguments. | ||
| * @param args.origin - The origin that triggered the lifecycle event hook. | ||
| */ | ||
| export type OnInactiveHandler = LifecycleEventHandler; | ||
| //# sourceMappingURL=lifecycle.d.mts.map |
+1
-1
| { | ||
| "name": "@metamask/snaps-sdk", | ||
| "version": "9.2.0", | ||
| "version": "9.3.0", | ||
| "description": "A library containing the core functionality for building MetaMask Snaps", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1774286
0.22%7
40%