@metamask/snaps-sdk 10.3.0 → 10.4.0

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/dist/error-wrappers.d.cts +192 -192
  3. package/dist/error-wrappers.d.mts +192 -192
  4. package/dist/internals/error-wrappers.d.cts +12 -12
  5. package/dist/internals/error-wrappers.d.mts +12 -12
  6. package/dist/types/handlers/assets-market-data.cjs.map +1 -1
  7. package/dist/types/handlers/assets-market-data.d.cts +1 -1
  8. package/dist/types/handlers/assets-market-data.d.mts +1 -1
  9. package/dist/types/handlers/assets-market-data.mjs.map +1 -1
  10. package/dist/types/methods/index.cjs.map +1 -1
  11. package/dist/types/methods/index.d.cts +1 -0
  12. package/dist/types/methods/index.d.cts.map +1 -1
  13. package/dist/types/methods/index.d.mts +1 -0
  14. package/dist/types/methods/index.d.mts.map +1 -1
  15. package/dist/types/methods/index.mjs.map +1 -1
  16. package/dist/types/methods/methods.cjs.map +1 -1
  17. package/dist/types/methods/methods.d.cts +5 -0
  18. package/dist/types/methods/methods.d.cts.map +1 -1
  19. package/dist/types/methods/methods.d.mts +5 -0
  20. package/dist/types/methods/methods.d.mts.map +1 -1
  21. package/dist/types/methods/methods.mjs.map +1 -1
  22. package/dist/types/methods/multichain/create-session.cjs +3 -0
  23. package/dist/types/methods/multichain/create-session.cjs.map +1 -0
  24. package/dist/types/methods/multichain/create-session.d.cts +34 -0
  25. package/dist/types/methods/multichain/create-session.d.cts.map +1 -0
  26. package/dist/types/methods/multichain/create-session.d.mts +34 -0
  27. package/dist/types/methods/multichain/create-session.d.mts.map +1 -0
  28. package/dist/types/methods/multichain/create-session.mjs +2 -0
  29. package/dist/types/methods/multichain/create-session.mjs.map +1 -0
  30. package/dist/types/methods/multichain/get-session.cjs +3 -0
  31. package/dist/types/methods/multichain/get-session.cjs.map +1 -0
  32. package/dist/types/methods/multichain/get-session.d.cts +14 -0
  33. package/dist/types/methods/multichain/get-session.d.cts.map +1 -0
  34. package/dist/types/methods/multichain/get-session.d.mts +14 -0
  35. package/dist/types/methods/multichain/get-session.d.mts.map +1 -0
  36. package/dist/types/methods/multichain/get-session.mjs +2 -0
  37. package/dist/types/methods/multichain/get-session.mjs.map +1 -0
  38. package/dist/types/methods/multichain/index.cjs +3 -0
  39. package/dist/types/methods/multichain/index.cjs.map +1 -0
  40. package/dist/types/methods/multichain/index.d.cts +5 -0
  41. package/dist/types/methods/multichain/index.d.cts.map +1 -0
  42. package/dist/types/methods/multichain/index.d.mts +5 -0
  43. package/dist/types/methods/multichain/index.d.mts.map +1 -0
  44. package/dist/types/methods/multichain/index.mjs +2 -0
  45. package/dist/types/methods/multichain/index.mjs.map +1 -0
  46. package/dist/types/methods/multichain/invoke-method.cjs +3 -0
  47. package/dist/types/methods/multichain/invoke-method.cjs.map +1 -0
  48. package/dist/types/methods/multichain/invoke-method.d.cts +18 -0
  49. package/dist/types/methods/multichain/invoke-method.d.cts.map +1 -0
  50. package/dist/types/methods/multichain/invoke-method.d.mts +18 -0
  51. package/dist/types/methods/multichain/invoke-method.d.mts.map +1 -0
  52. package/dist/types/methods/multichain/invoke-method.mjs +2 -0
  53. package/dist/types/methods/multichain/invoke-method.mjs.map +1 -0
  54. package/dist/types/methods/multichain/revoke-session.cjs +3 -0
  55. package/dist/types/methods/multichain/revoke-session.cjs.map +1 -0
  56. package/dist/types/methods/multichain/revoke-session.d.cts +13 -0
  57. package/dist/types/methods/multichain/revoke-session.d.cts.map +1 -0
  58. package/dist/types/methods/multichain/revoke-session.d.mts +13 -0
  59. package/dist/types/methods/multichain/revoke-session.d.mts.map +1 -0
  60. package/dist/types/methods/multichain/revoke-session.mjs +2 -0
  61. package/dist/types/methods/multichain/revoke-session.mjs.map +1 -0
  62. package/package.json +3 -3
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=invoke-method.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-method.cjs","sourceRoot":"","sources":["../../../../src/types/methods/multichain/invoke-method.ts"],"names":[],"mappings":"","sourcesContent":["import type { CaipChainId, Json, JsonRpcRequest } from '@metamask/utils';\n\n/**\n * The request parameters for the `wallet_invokeMethod` method.\n *\n * @property scope - The scope on which to invoke the method.\n * @property request - The request to send.\n */\nexport type InvokeMethodParams = {\n scope: CaipChainId;\n request: Pick<JsonRpcRequest, 'method' | 'params'>;\n};\n\n/**\n * The result returned for the `wallet_invokeMethod` method.\n *\n * This method returns the response of the wrapped request.\n */\nexport type InvokeMethodResult = Json;\n"]}
@@ -0,0 +1,18 @@
1
+ import type { CaipChainId, Json, JsonRpcRequest } from "@metamask/utils";
2
+ /**
3
+ * The request parameters for the `wallet_invokeMethod` method.
4
+ *
5
+ * @property scope - The scope on which to invoke the method.
6
+ * @property request - The request to send.
7
+ */
8
+ export type InvokeMethodParams = {
9
+ scope: CaipChainId;
10
+ request: Pick<JsonRpcRequest, 'method' | 'params'>;
11
+ };
12
+ /**
13
+ * The result returned for the `wallet_invokeMethod` method.
14
+ *
15
+ * This method returns the response of the wrapped request.
16
+ */
17
+ export type InvokeMethodResult = Json;
18
+ //# sourceMappingURL=invoke-method.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-method.d.cts","sourceRoot":"","sources":["../../../../src/types/methods/multichain/invoke-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,wBAAwB;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { CaipChainId, Json, JsonRpcRequest } from "@metamask/utils";
2
+ /**
3
+ * The request parameters for the `wallet_invokeMethod` method.
4
+ *
5
+ * @property scope - The scope on which to invoke the method.
6
+ * @property request - The request to send.
7
+ */
8
+ export type InvokeMethodParams = {
9
+ scope: CaipChainId;
10
+ request: Pick<JsonRpcRequest, 'method' | 'params'>;
11
+ };
12
+ /**
13
+ * The result returned for the `wallet_invokeMethod` method.
14
+ *
15
+ * This method returns the response of the wrapped request.
16
+ */
17
+ export type InvokeMethodResult = Json;
18
+ //# sourceMappingURL=invoke-method.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-method.d.mts","sourceRoot":"","sources":["../../../../src/types/methods/multichain/invoke-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,wBAAwB;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=invoke-method.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-method.mjs","sourceRoot":"","sources":["../../../../src/types/methods/multichain/invoke-method.ts"],"names":[],"mappings":"","sourcesContent":["import type { CaipChainId, Json, JsonRpcRequest } from '@metamask/utils';\n\n/**\n * The request parameters for the `wallet_invokeMethod` method.\n *\n * @property scope - The scope on which to invoke the method.\n * @property request - The request to send.\n */\nexport type InvokeMethodParams = {\n scope: CaipChainId;\n request: Pick<JsonRpcRequest, 'method' | 'params'>;\n};\n\n/**\n * The result returned for the `wallet_invokeMethod` method.\n *\n * This method returns the response of the wrapped request.\n */\nexport type InvokeMethodResult = Json;\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=revoke-session.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revoke-session.cjs","sourceRoot":"","sources":["../../../../src/types/methods/multichain/revoke-session.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The request parameters for the `wallet_revokeSession` method.\n *\n * @property scopes - The scopes to revoke.\n */\nexport type RevokeSessionParams = {\n scopes?: string[];\n};\n\n/**\n * The result returned for the `wallet_revokeSession` method.\n */\nexport type RevokeSessionResult = true;\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The request parameters for the `wallet_revokeSession` method.
3
+ *
4
+ * @property scopes - The scopes to revoke.
5
+ */
6
+ export type RevokeSessionParams = {
7
+ scopes?: string[];
8
+ };
9
+ /**
10
+ * The result returned for the `wallet_revokeSession` method.
11
+ */
12
+ export type RevokeSessionResult = true;
13
+ //# sourceMappingURL=revoke-session.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revoke-session.d.cts","sourceRoot":"","sources":["../../../../src/types/methods/multichain/revoke-session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The request parameters for the `wallet_revokeSession` method.
3
+ *
4
+ * @property scopes - The scopes to revoke.
5
+ */
6
+ export type RevokeSessionParams = {
7
+ scopes?: string[];
8
+ };
9
+ /**
10
+ * The result returned for the `wallet_revokeSession` method.
11
+ */
12
+ export type RevokeSessionResult = true;
13
+ //# sourceMappingURL=revoke-session.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revoke-session.d.mts","sourceRoot":"","sources":["../../../../src/types/methods/multichain/revoke-session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=revoke-session.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revoke-session.mjs","sourceRoot":"","sources":["../../../../src/types/methods/multichain/revoke-session.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The request parameters for the `wallet_revokeSession` method.\n *\n * @property scopes - The scopes to revoke.\n */\nexport type RevokeSessionParams = {\n scopes?: string[];\n};\n\n/**\n * The result returned for the `wallet_revokeSession` method.\n */\nexport type RevokeSessionResult = true;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-sdk",
3
- "version": "10.3.0",
3
+ "version": "10.4.0",
4
4
  "description": "A library containing the core functionality for building MetaMask Snaps",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -95,11 +95,11 @@
95
95
  "@metamask/providers": "^22.1.1",
96
96
  "@metamask/rpc-errors": "^7.0.3",
97
97
  "@metamask/superstruct": "^3.2.1",
98
- "@metamask/utils": "^11.8.1",
98
+ "@metamask/utils": "^11.9.0",
99
99
  "luxon": "^3.5.0"
100
100
  },
101
101
  "devDependencies": {
102
- "@lavamoat/allow-scripts": "^3.4.0",
102
+ "@lavamoat/allow-scripts": "^3.4.2",
103
103
  "@metamask/auto-changelog": "^5.0.2",
104
104
  "@ts-bridge/cli": "^0.6.1",
105
105
  "@types/jest": "^27.5.1",