@metamask/snaps-sdk 6.14.0 → 6.15.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 (108) hide show
  1. package/CHANGELOG.md +17 -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/jsx/components/Container.cjs +2 -1
  7. package/dist/jsx/components/Container.cjs.map +1 -1
  8. package/dist/jsx/components/Container.d.cts +7 -1
  9. package/dist/jsx/components/Container.d.cts.map +1 -1
  10. package/dist/jsx/components/Container.d.mts +7 -1
  11. package/dist/jsx/components/Container.d.mts.map +1 -1
  12. package/dist/jsx/components/Container.mjs +2 -1
  13. package/dist/jsx/components/Container.mjs.map +1 -1
  14. package/dist/jsx/components/Value.cjs +2 -0
  15. package/dist/jsx/components/Value.cjs.map +1 -1
  16. package/dist/jsx/components/Value.d.cts +5 -2
  17. package/dist/jsx/components/Value.d.cts.map +1 -1
  18. package/dist/jsx/components/Value.d.mts +5 -2
  19. package/dist/jsx/components/Value.d.mts.map +1 -1
  20. package/dist/jsx/components/Value.mjs +2 -0
  21. package/dist/jsx/components/Value.mjs.map +1 -1
  22. package/dist/jsx/validation.cjs +19 -8
  23. package/dist/jsx/validation.cjs.map +1 -1
  24. package/dist/jsx/validation.d.cts +10 -10
  25. package/dist/jsx/validation.d.cts.map +1 -1
  26. package/dist/jsx/validation.d.mts +10 -10
  27. package/dist/jsx/validation.d.mts.map +1 -1
  28. package/dist/jsx/validation.mjs +18 -7
  29. package/dist/jsx/validation.mjs.map +1 -1
  30. package/dist/types/interface.d.cts +2 -2
  31. package/dist/types/interface.d.cts.map +1 -1
  32. package/dist/types/interface.d.mts +2 -2
  33. package/dist/types/interface.d.mts.map +1 -1
  34. package/dist/types/methods/cancel-background-event.cjs +3 -0
  35. package/dist/types/methods/cancel-background-event.cjs.map +1 -0
  36. package/dist/types/methods/cancel-background-event.d.cts +15 -0
  37. package/dist/types/methods/cancel-background-event.d.cts.map +1 -0
  38. package/dist/types/methods/cancel-background-event.d.mts +15 -0
  39. package/dist/types/methods/cancel-background-event.d.mts.map +1 -0
  40. package/dist/types/methods/cancel-background-event.mjs +2 -0
  41. package/dist/types/methods/cancel-background-event.mjs.map +1 -0
  42. package/dist/types/methods/clear-state.cjs +3 -0
  43. package/dist/types/methods/clear-state.cjs.map +1 -0
  44. package/dist/types/methods/clear-state.d.cts +16 -0
  45. package/dist/types/methods/clear-state.d.cts.map +1 -0
  46. package/dist/types/methods/clear-state.d.mts +16 -0
  47. package/dist/types/methods/clear-state.d.mts.map +1 -0
  48. package/dist/types/methods/clear-state.mjs +2 -0
  49. package/dist/types/methods/clear-state.mjs.map +1 -0
  50. package/dist/types/methods/get-background-events.cjs +3 -0
  51. package/dist/types/methods/get-background-events.cjs.map +1 -0
  52. package/dist/types/methods/get-background-events.d.cts +38 -0
  53. package/dist/types/methods/get-background-events.d.cts.map +1 -0
  54. package/dist/types/methods/get-background-events.d.mts +38 -0
  55. package/dist/types/methods/get-background-events.d.mts.map +1 -0
  56. package/dist/types/methods/get-background-events.mjs +2 -0
  57. package/dist/types/methods/get-background-events.mjs.map +1 -0
  58. package/dist/types/methods/get-preferences.cjs.map +1 -1
  59. package/dist/types/methods/get-preferences.d.cts +6 -1
  60. package/dist/types/methods/get-preferences.d.cts.map +1 -1
  61. package/dist/types/methods/get-preferences.d.mts +6 -1
  62. package/dist/types/methods/get-preferences.d.mts.map +1 -1
  63. package/dist/types/methods/get-preferences.mjs.map +1 -1
  64. package/dist/types/methods/get-state.cjs +3 -0
  65. package/dist/types/methods/get-state.cjs.map +1 -0
  66. package/dist/types/methods/get-state.d.cts +21 -0
  67. package/dist/types/methods/get-state.d.cts.map +1 -0
  68. package/dist/types/methods/get-state.d.mts +21 -0
  69. package/dist/types/methods/get-state.d.mts.map +1 -0
  70. package/dist/types/methods/get-state.mjs +2 -0
  71. package/dist/types/methods/get-state.mjs.map +1 -0
  72. package/dist/types/methods/index.cjs +8 -2
  73. package/dist/types/methods/index.cjs.map +1 -1
  74. package/dist/types/methods/index.d.cts +8 -2
  75. package/dist/types/methods/index.d.cts.map +1 -1
  76. package/dist/types/methods/index.d.mts +8 -2
  77. package/dist/types/methods/index.d.mts.map +1 -1
  78. package/dist/types/methods/index.mjs +8 -2
  79. package/dist/types/methods/index.mjs.map +1 -1
  80. package/dist/types/methods/methods.cjs.map +1 -1
  81. package/dist/types/methods/methods.d.cts +21 -0
  82. package/dist/types/methods/methods.d.cts.map +1 -1
  83. package/dist/types/methods/methods.d.mts +21 -0
  84. package/dist/types/methods/methods.d.mts.map +1 -1
  85. package/dist/types/methods/methods.mjs.map +1 -1
  86. package/dist/types/methods/schedule-background-event.cjs +3 -0
  87. package/dist/types/methods/schedule-background-event.cjs.map +1 -0
  88. package/dist/types/methods/schedule-background-event.d.cts +22 -0
  89. package/dist/types/methods/schedule-background-event.d.cts.map +1 -0
  90. package/dist/types/methods/schedule-background-event.d.mts +22 -0
  91. package/dist/types/methods/schedule-background-event.d.mts.map +1 -0
  92. package/dist/types/methods/schedule-background-event.mjs +2 -0
  93. package/dist/types/methods/schedule-background-event.mjs.map +1 -0
  94. package/dist/types/methods/set-state.cjs +3 -0
  95. package/dist/types/methods/set-state.cjs.map +1 -0
  96. package/dist/types/methods/set-state.d.cts +23 -0
  97. package/dist/types/methods/set-state.d.cts.map +1 -0
  98. package/dist/types/methods/set-state.d.mts +23 -0
  99. package/dist/types/methods/set-state.d.mts.map +1 -0
  100. package/dist/types/methods/set-state.mjs +2 -0
  101. package/dist/types/methods/set-state.mjs.map +1 -0
  102. package/dist/types/permissions.cjs.map +1 -1
  103. package/dist/types/permissions.d.cts +1 -1
  104. package/dist/types/permissions.d.cts.map +1 -1
  105. package/dist/types/permissions.d.mts +1 -1
  106. package/dist/types/permissions.d.mts.map +1 -1
  107. package/dist/types/permissions.mjs.map +1 -1
  108. package/package.json +5 -5
@@ -1,6 +1,9 @@
1
1
  import type { Method } from "../../internals/index.mjs";
2
+ import type { CancelBackgroundEventParams, CancelBackgroundEventResult } from "./cancel-background-event.mjs";
3
+ import type { ClearStateParams, ClearStateResult } from "./clear-state.mjs";
2
4
  import type { CreateInterfaceParams, CreateInterfaceResult } from "./create-interface.mjs";
3
5
  import type { DialogParams, DialogResult } from "./dialog.mjs";
6
+ import type { GetBackgroundEventsParams, GetBackgroundEventsResult } from "./get-background-events.mjs";
4
7
  import type { GetBip32EntropyParams, GetBip32EntropyResult } from "./get-bip32-entropy.mjs";
5
8
  import type { GetBip32PublicKeyParams, GetBip32PublicKeyResult } from "./get-bip32-public-key.mjs";
6
9
  import type { GetBip44EntropyParams, GetBip44EntropyResult } from "./get-bip44-entropy.mjs";
@@ -13,6 +16,7 @@ import type { GetInterfaceStateParams, GetInterfaceStateResult } from "./get-int
13
16
  import type { GetLocaleParams, GetLocaleResult } from "./get-locale.mjs";
14
17
  import type { GetPreferencesParams, GetPreferencesResult } from "./get-preferences.mjs";
15
18
  import type { GetSnapsParams, GetSnapsResult } from "./get-snaps.mjs";
19
+ import type { GetStateParams, GetStateResult } from "./get-state.mjs";
16
20
  import type { InvokeKeyringParams, InvokeKeyringResult } from "./invoke-keyring.mjs";
17
21
  import type { InvokeSnapParams, InvokeSnapResult } from "./invoke-snap.mjs";
18
22
  import type { ManageAccountsParams, ManageAccountsResult } from "./manage-accounts.mjs";
@@ -20,12 +24,15 @@ import type { ManageStateParams, ManageStateResult } from "./manage-state.mjs";
20
24
  import type { NotifyParams, NotifyResult } from "./notify.mjs";
21
25
  import type { RequestSnapsParams, RequestSnapsResult } from "./request-snaps.mjs";
22
26
  import type { ResolveInterfaceParams, ResolveInterfaceResult } from "./resolve-interface.mjs";
27
+ import type { ScheduleBackgroundEventParams, ScheduleBackgroundEventResult } from "./schedule-background-event.mjs";
28
+ import type { SetStateParams, SetStateResult } from "./set-state.mjs";
23
29
  import type { UpdateInterfaceParams, UpdateInterfaceResult } from "./update-interface.mjs";
24
30
  /**
25
31
  * The methods that are available to the Snap. Each method is a tuple of the
26
32
  * request parameters and the result returned by the method.
27
33
  */
28
34
  export type SnapMethods = {
35
+ snap_clearState: [ClearStateParams, ClearStateResult];
29
36
  snap_dialog: [DialogParams, DialogResult];
30
37
  snap_getBip32Entropy: [GetBip32EntropyParams, GetBip32EntropyResult];
31
38
  snap_getBip32PublicKey: [GetBip32PublicKeyParams, GetBip32PublicKeyResult];
@@ -36,9 +43,22 @@ export type SnapMethods = {
36
43
  snap_getFile: [GetFileParams, GetFileResult];
37
44
  snap_getLocale: [GetLocaleParams, GetLocaleResult];
38
45
  snap_getPreferences: [GetPreferencesParams, GetPreferencesResult];
46
+ snap_getState: [GetStateParams, GetStateResult];
39
47
  snap_manageAccounts: [ManageAccountsParams, ManageAccountsResult];
40
48
  snap_manageState: [ManageStateParams, ManageStateResult];
41
49
  snap_notify: [NotifyParams, NotifyResult];
50
+ snap_scheduleBackgroundEvent: [
51
+ ScheduleBackgroundEventParams,
52
+ ScheduleBackgroundEventResult
53
+ ];
54
+ snap_cancelBackgroundEvent: [
55
+ CancelBackgroundEventParams,
56
+ CancelBackgroundEventResult
57
+ ];
58
+ snap_getBackgroundEvents: [
59
+ GetBackgroundEventsParams,
60
+ GetBackgroundEventsResult
61
+ ];
42
62
  snap_createInterface: [CreateInterfaceParams, CreateInterfaceResult];
43
63
  snap_updateInterface: [UpdateInterfaceParams, UpdateInterfaceResult];
44
64
  snap_getInterfaceState: [GetInterfaceStateParams, GetInterfaceStateResult];
@@ -47,6 +67,7 @@ export type SnapMethods = {
47
67
  GetInterfaceContextResult
48
68
  ];
49
69
  snap_resolveInterface: [ResolveInterfaceParams, ResolveInterfaceResult];
70
+ snap_setState: [SetStateParams, SetStateResult];
50
71
  wallet_getSnaps: [GetSnapsParams, GetSnapsResult];
51
72
  wallet_invokeKeyring: [InvokeKeyringParams, InvokeKeyringResult];
52
73
  wallet_invokeSnap: [InvokeSnapParams, InvokeSnapResult];
@@ -1 +1 @@
1
- {"version":3,"file":"methods.d.mts","sourceRoot":"","sources":["../../../src/types/methods/methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,kCAAwB;AAC9C,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,+BAA2B;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,qBAAiB;AAC3D,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,gCAA4B;AAC7B,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,mCAA+B;AAChC,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,gCAA4B;AAC7B,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,gCAA4B;AAC7B,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,gCAA4B;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,0BAAsB;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,uBAAmB;AAC/D,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EAC1B,oCAAgC;AACjC,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,kCAA8B;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,yBAAqB;AACrE,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,8BAA0B;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,wBAAoB;AAClE,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,6BAAyB;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,0BAAsB;AACxE,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,8BAA0B;AAC3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAA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E,qBAAqB,CAAC,CAAC;IACrE,oBAAoB,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC;IACrE,sBAAsB,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;IAC3E,wBAAwB,EAAE;QACxB,yBAAyB;QACzB,yBAAyB;KAC1B,CAAC;IACF,qBAAqB,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;IACxE,aAAa,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAChD,eAAe,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAClD,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;IACjE,iBAAiB,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IACxD,WAAW,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;IAClD,mBAAmB,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;CAE/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,UAAU,SAAS,MAAM,WAAW,EACjE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KACpD,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"methods.mjs","sourceRoot":"","sources":["../../../src/types/methods/methods.ts"],"names":[],"mappings":"","sourcesContent":["import type { Method } from '../../internals';\nimport type {\n CreateInterfaceParams,\n CreateInterfaceResult,\n} from './create-interface';\nimport type { DialogParams, DialogResult } from './dialog';\nimport type {\n GetBip32EntropyParams,\n GetBip32EntropyResult,\n} from './get-bip32-entropy';\nimport type {\n GetBip32PublicKeyParams,\n GetBip32PublicKeyResult,\n} from './get-bip32-public-key';\nimport type {\n GetBip44EntropyParams,\n GetBip44EntropyResult,\n} from './get-bip44-entropy';\nimport type {\n GetClientStatusParams,\n GetClientStatusResult,\n} from './get-client-status';\nimport type {\n GetCurrencyRateParams,\n GetCurrencyRateResult,\n} from './get-currency-rate';\nimport type { GetEntropyParams, GetEntropyResult } from './get-entropy';\nimport type { GetFileParams, GetFileResult } from './get-file';\nimport type {\n GetInterfaceContextParams,\n GetInterfaceContextResult,\n} from './get-interface-context';\nimport type {\n GetInterfaceStateParams,\n GetInterfaceStateResult,\n} from './get-interface-state';\nimport type { GetLocaleParams, GetLocaleResult } from './get-locale';\nimport type {\n GetPreferencesParams,\n GetPreferencesResult,\n} from './get-preferences';\nimport type { GetSnapsParams, GetSnapsResult } from './get-snaps';\nimport type {\n InvokeKeyringParams,\n InvokeKeyringResult,\n} from './invoke-keyring';\nimport type { InvokeSnapParams, InvokeSnapResult } from './invoke-snap';\nimport type {\n ManageAccountsParams,\n ManageAccountsResult,\n} from './manage-accounts';\nimport type { ManageStateParams, ManageStateResult } from './manage-state';\nimport type { NotifyParams, NotifyResult } from './notify';\nimport type { RequestSnapsParams, RequestSnapsResult } from './request-snaps';\nimport type {\n ResolveInterfaceParams,\n ResolveInterfaceResult,\n} from './resolve-interface';\nimport type {\n UpdateInterfaceParams,\n UpdateInterfaceResult,\n} from './update-interface';\n\n/**\n * The methods that are available to the Snap. Each method is a tuple of the\n * request parameters and the result returned by the method.\n */\nexport type SnapMethods = {\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_dialog: [DialogParams, DialogResult];\n snap_getBip32Entropy: [GetBip32EntropyParams, GetBip32EntropyResult];\n snap_getBip32PublicKey: [GetBip32PublicKeyParams, GetBip32PublicKeyResult];\n snap_getBip44Entropy: [GetBip44EntropyParams, GetBip44EntropyResult];\n snap_getClientStatus: [GetClientStatusParams, GetClientStatusResult];\n snap_getCurrencyRate: [GetCurrencyRateParams, GetCurrencyRateResult];\n snap_getEntropy: [GetEntropyParams, GetEntropyResult];\n snap_getFile: [GetFileParams, GetFileResult];\n snap_getLocale: [GetLocaleParams, GetLocaleResult];\n snap_getPreferences: [GetPreferencesParams, GetPreferencesResult];\n snap_manageAccounts: [ManageAccountsParams, ManageAccountsResult];\n snap_manageState: [ManageStateParams, ManageStateResult];\n snap_notify: [NotifyParams, NotifyResult];\n snap_createInterface: [CreateInterfaceParams, CreateInterfaceResult];\n snap_updateInterface: [UpdateInterfaceParams, UpdateInterfaceResult];\n snap_getInterfaceState: [GetInterfaceStateParams, GetInterfaceStateResult];\n snap_getInterfaceContext: [\n GetInterfaceContextParams,\n GetInterfaceContextResult,\n ];\n snap_resolveInterface: [ResolveInterfaceParams, ResolveInterfaceResult];\n wallet_getSnaps: [GetSnapsParams, GetSnapsResult];\n wallet_invokeKeyring: [InvokeKeyringParams, InvokeKeyringResult];\n wallet_invokeSnap: [InvokeSnapParams, InvokeSnapResult];\n wallet_snap: [InvokeSnapParams, InvokeSnapResult];\n wallet_requestSnaps: [RequestSnapsParams, RequestSnapsResult];\n /* eslint-enable @typescript-eslint/naming-convention */\n};\n\n/**\n * The request function that is available to the Snap. It takes a request\n * object and returns a promise that resolves to the result of the request.\n *\n * @param request - The request object.\n * @param request.method - The method to call.\n * @param request.params - The parameters to pass to the method. This is\n * inferred from the method, based on the {@link SnapMethods} type, and may be\n * optional.\n * @returns A promise that resolves to the result of the request. This is\n * inferred from the request method, based on the {@link SnapMethods} type.\n * @example\n * // Get the user's locale\n * const result = await request({\n * method: 'snap_getLocale',\n * });\n * @example\n * // Get a file\n * const result = await request({\n * method: 'snap_getFile',\n * params: {\n * path: 'foo/bar.txt',\n * },\n * });\n */\nexport type RequestFunction = <MethodName extends keyof SnapMethods>(\n request: Method<MethodName, SnapMethods[MethodName][0]>,\n) => Promise<SnapMethods[MethodName][1]>;\n"]}
1
+ {"version":3,"file":"methods.mjs","sourceRoot":"","sources":["../../../src/types/methods/methods.ts"],"names":[],"mappings":"","sourcesContent":["import type { Method } from '../../internals';\nimport type {\n CancelBackgroundEventParams,\n CancelBackgroundEventResult,\n} from './cancel-background-event';\nimport type { ClearStateParams, ClearStateResult } from './clear-state';\nimport type {\n CreateInterfaceParams,\n CreateInterfaceResult,\n} from './create-interface';\nimport type { DialogParams, DialogResult } from './dialog';\nimport type {\n GetBackgroundEventsParams,\n GetBackgroundEventsResult,\n} from './get-background-events';\nimport type {\n GetBip32EntropyParams,\n GetBip32EntropyResult,\n} from './get-bip32-entropy';\nimport type {\n GetBip32PublicKeyParams,\n GetBip32PublicKeyResult,\n} from './get-bip32-public-key';\nimport type {\n GetBip44EntropyParams,\n GetBip44EntropyResult,\n} from './get-bip44-entropy';\nimport type {\n GetClientStatusParams,\n GetClientStatusResult,\n} from './get-client-status';\nimport type {\n GetCurrencyRateParams,\n GetCurrencyRateResult,\n} from './get-currency-rate';\nimport type { GetEntropyParams, GetEntropyResult } from './get-entropy';\nimport type { GetFileParams, GetFileResult } from './get-file';\nimport type {\n GetInterfaceContextParams,\n GetInterfaceContextResult,\n} from './get-interface-context';\nimport type {\n GetInterfaceStateParams,\n GetInterfaceStateResult,\n} from './get-interface-state';\nimport type { GetLocaleParams, GetLocaleResult } from './get-locale';\nimport type {\n GetPreferencesParams,\n GetPreferencesResult,\n} from './get-preferences';\nimport type { GetSnapsParams, GetSnapsResult } from './get-snaps';\nimport type { GetStateParams, GetStateResult } from './get-state';\nimport type {\n InvokeKeyringParams,\n InvokeKeyringResult,\n} from './invoke-keyring';\nimport type { InvokeSnapParams, InvokeSnapResult } from './invoke-snap';\nimport type {\n ManageAccountsParams,\n ManageAccountsResult,\n} from './manage-accounts';\nimport type { ManageStateParams, ManageStateResult } from './manage-state';\nimport type { NotifyParams, NotifyResult } from './notify';\nimport type { RequestSnapsParams, RequestSnapsResult } from './request-snaps';\nimport type {\n ResolveInterfaceParams,\n ResolveInterfaceResult,\n} from './resolve-interface';\nimport type {\n ScheduleBackgroundEventParams,\n ScheduleBackgroundEventResult,\n} from './schedule-background-event';\nimport type { SetStateParams, SetStateResult } from './set-state';\nimport type {\n UpdateInterfaceParams,\n UpdateInterfaceResult,\n} from './update-interface';\n\n/**\n * The methods that are available to the Snap. Each method is a tuple of the\n * request parameters and the result returned by the method.\n */\nexport type SnapMethods = {\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_clearState: [ClearStateParams, ClearStateResult];\n snap_dialog: [DialogParams, DialogResult];\n snap_getBip32Entropy: [GetBip32EntropyParams, GetBip32EntropyResult];\n snap_getBip32PublicKey: [GetBip32PublicKeyParams, GetBip32PublicKeyResult];\n snap_getBip44Entropy: [GetBip44EntropyParams, GetBip44EntropyResult];\n snap_getClientStatus: [GetClientStatusParams, GetClientStatusResult];\n snap_getCurrencyRate: [GetCurrencyRateParams, GetCurrencyRateResult];\n snap_getEntropy: [GetEntropyParams, GetEntropyResult];\n snap_getFile: [GetFileParams, GetFileResult];\n snap_getLocale: [GetLocaleParams, GetLocaleResult];\n snap_getPreferences: [GetPreferencesParams, GetPreferencesResult];\n snap_getState: [GetStateParams, GetStateResult];\n snap_manageAccounts: [ManageAccountsParams, ManageAccountsResult];\n snap_manageState: [ManageStateParams, ManageStateResult];\n snap_notify: [NotifyParams, NotifyResult];\n snap_scheduleBackgroundEvent: [\n ScheduleBackgroundEventParams,\n ScheduleBackgroundEventResult,\n ];\n snap_cancelBackgroundEvent: [\n CancelBackgroundEventParams,\n CancelBackgroundEventResult,\n ];\n snap_getBackgroundEvents: [\n GetBackgroundEventsParams,\n GetBackgroundEventsResult,\n ];\n snap_createInterface: [CreateInterfaceParams, CreateInterfaceResult];\n snap_updateInterface: [UpdateInterfaceParams, UpdateInterfaceResult];\n snap_getInterfaceState: [GetInterfaceStateParams, GetInterfaceStateResult];\n snap_getInterfaceContext: [\n GetInterfaceContextParams,\n GetInterfaceContextResult,\n ];\n snap_resolveInterface: [ResolveInterfaceParams, ResolveInterfaceResult];\n snap_setState: [SetStateParams, SetStateResult];\n wallet_getSnaps: [GetSnapsParams, GetSnapsResult];\n wallet_invokeKeyring: [InvokeKeyringParams, InvokeKeyringResult];\n wallet_invokeSnap: [InvokeSnapParams, InvokeSnapResult];\n wallet_snap: [InvokeSnapParams, InvokeSnapResult];\n wallet_requestSnaps: [RequestSnapsParams, RequestSnapsResult];\n /* eslint-enable @typescript-eslint/naming-convention */\n};\n\n/**\n * The request function that is available to the Snap. It takes a request\n * object and returns a promise that resolves to the result of the request.\n *\n * @param request - The request object.\n * @param request.method - The method to call.\n * @param request.params - The parameters to pass to the method. This is\n * inferred from the method, based on the {@link SnapMethods} type, and may be\n * optional.\n * @returns A promise that resolves to the result of the request. This is\n * inferred from the request method, based on the {@link SnapMethods} type.\n * @example\n * // Get the user's locale\n * const result = await request({\n * method: 'snap_getLocale',\n * });\n * @example\n * // Get a file\n * const result = await request({\n * method: 'snap_getFile',\n * params: {\n * path: 'foo/bar.txt',\n * },\n * });\n */\nexport type RequestFunction = <MethodName extends keyof SnapMethods>(\n request: Method<MethodName, SnapMethods[MethodName][0]>,\n) => Promise<SnapMethods[MethodName][1]>;\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schedule-background-event.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-background-event.cjs","sourceRoot":"","sources":["../../../src/types/methods/schedule-background-event.ts"],"names":[],"mappings":"","sourcesContent":["import type { Cronjob } from '../permissions';\n\n/**\n * The request parameters for the `snap_scheduleBackgroundEvent` method.\n *\n * Note: The date generated from a duration will be represented in UTC.\n *\n * @property date - The ISO 8601 date of when to fire the background event.\n * @property duration - The ISO 8601 duration of when to fire the background event.\n * @property request - The request to be called when the event fires.\n */\nexport type ScheduleBackgroundEventParams =\n | {\n date: string;\n request: Cronjob['request'];\n }\n | { duration: string; request: Cronjob['request'] };\n\n/**\n * The result returned by the `snap_scheduleBackgroundEvent` method, which is the ID of the scheduled event.\n */\nexport type ScheduleBackgroundEventResult = string;\n"]}
@@ -0,0 +1,22 @@
1
+ import type { Cronjob } from "../permissions.cjs";
2
+ /**
3
+ * The request parameters for the `snap_scheduleBackgroundEvent` method.
4
+ *
5
+ * Note: The date generated from a duration will be represented in UTC.
6
+ *
7
+ * @property date - The ISO 8601 date of when to fire the background event.
8
+ * @property duration - The ISO 8601 duration of when to fire the background event.
9
+ * @property request - The request to be called when the event fires.
10
+ */
11
+ export type ScheduleBackgroundEventParams = {
12
+ date: string;
13
+ request: Cronjob['request'];
14
+ } | {
15
+ duration: string;
16
+ request: Cronjob['request'];
17
+ };
18
+ /**
19
+ * The result returned by the `snap_scheduleBackgroundEvent` method, which is the ID of the scheduled event.
20
+ */
21
+ export type ScheduleBackgroundEventResult = string;
22
+ //# sourceMappingURL=schedule-background-event.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-background-event.d.cts","sourceRoot":"","sources":["../../../src/types/methods/schedule-background-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,2BAAuB;AAE9C;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GACrC;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7B,GACD;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { Cronjob } from "../permissions.mjs";
2
+ /**
3
+ * The request parameters for the `snap_scheduleBackgroundEvent` method.
4
+ *
5
+ * Note: The date generated from a duration will be represented in UTC.
6
+ *
7
+ * @property date - The ISO 8601 date of when to fire the background event.
8
+ * @property duration - The ISO 8601 duration of when to fire the background event.
9
+ * @property request - The request to be called when the event fires.
10
+ */
11
+ export type ScheduleBackgroundEventParams = {
12
+ date: string;
13
+ request: Cronjob['request'];
14
+ } | {
15
+ duration: string;
16
+ request: Cronjob['request'];
17
+ };
18
+ /**
19
+ * The result returned by the `snap_scheduleBackgroundEvent` method, which is the ID of the scheduled event.
20
+ */
21
+ export type ScheduleBackgroundEventResult = string;
22
+ //# sourceMappingURL=schedule-background-event.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-background-event.d.mts","sourceRoot":"","sources":["../../../src/types/methods/schedule-background-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,2BAAuB;AAE9C;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GACrC;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7B,GACD;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schedule-background-event.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-background-event.mjs","sourceRoot":"","sources":["../../../src/types/methods/schedule-background-event.ts"],"names":[],"mappings":"","sourcesContent":["import type { Cronjob } from '../permissions';\n\n/**\n * The request parameters for the `snap_scheduleBackgroundEvent` method.\n *\n * Note: The date generated from a duration will be represented in UTC.\n *\n * @property date - The ISO 8601 date of when to fire the background event.\n * @property duration - The ISO 8601 duration of when to fire the background event.\n * @property request - The request to be called when the event fires.\n */\nexport type ScheduleBackgroundEventParams =\n | {\n date: string;\n request: Cronjob['request'];\n }\n | { duration: string; request: Cronjob['request'] };\n\n/**\n * The result returned by the `snap_scheduleBackgroundEvent` method, which is the ID of the scheduled event.\n */\nexport type ScheduleBackgroundEventResult = string;\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=set-state.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-state.cjs","sourceRoot":"","sources":["../../../src/types/methods/set-state.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json } from '@metamask/utils';\n\n/**\n * The request parameters for the `snap_setState` method.\n *\n * @property key - The key of the state to update. If not provided, the entire\n * state is updated. This may contain Lodash-style path syntax, e.g.,\n * `a.b.c`, with the exception of array syntax.\n * @property value - The value to set the state to.\n * @property encrypted - Whether to use the separate encrypted state, or the\n * unencrypted state. Defaults to the encrypted state. Encrypted state can only\n * be used if the client is unlocked, while unencrypted state can be used\n * whether the client is locked or unlocked.\n */\nexport type SetStateParams = {\n key?: string;\n value: Json;\n encrypted?: boolean;\n};\n\n/**\n * The result returned by the `snap_setState` method.\n */\nexport type SetStateResult = null;\n"]}
@@ -0,0 +1,23 @@
1
+ import type { Json } from "@metamask/utils";
2
+ /**
3
+ * The request parameters for the `snap_setState` method.
4
+ *
5
+ * @property key - The key of the state to update. If not provided, the entire
6
+ * state is updated. This may contain Lodash-style path syntax, e.g.,
7
+ * `a.b.c`, with the exception of array syntax.
8
+ * @property value - The value to set the state to.
9
+ * @property encrypted - Whether to use the separate encrypted state, or the
10
+ * unencrypted state. Defaults to the encrypted state. Encrypted state can only
11
+ * be used if the client is unlocked, while unencrypted state can be used
12
+ * whether the client is locked or unlocked.
13
+ */
14
+ export type SetStateParams = {
15
+ key?: string;
16
+ value: Json;
17
+ encrypted?: boolean;
18
+ };
19
+ /**
20
+ * The result returned by the `snap_setState` method.
21
+ */
22
+ export type SetStateResult = null;
23
+ //# sourceMappingURL=set-state.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-state.d.cts","sourceRoot":"","sources":["../../../src/types/methods/set-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Json } from "@metamask/utils";
2
+ /**
3
+ * The request parameters for the `snap_setState` method.
4
+ *
5
+ * @property key - The key of the state to update. If not provided, the entire
6
+ * state is updated. This may contain Lodash-style path syntax, e.g.,
7
+ * `a.b.c`, with the exception of array syntax.
8
+ * @property value - The value to set the state to.
9
+ * @property encrypted - Whether to use the separate encrypted state, or the
10
+ * unencrypted state. Defaults to the encrypted state. Encrypted state can only
11
+ * be used if the client is unlocked, while unencrypted state can be used
12
+ * whether the client is locked or unlocked.
13
+ */
14
+ export type SetStateParams = {
15
+ key?: string;
16
+ value: Json;
17
+ encrypted?: boolean;
18
+ };
19
+ /**
20
+ * The result returned by the `snap_setState` method.
21
+ */
22
+ export type SetStateResult = null;
23
+ //# sourceMappingURL=set-state.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-state.d.mts","sourceRoot":"","sources":["../../../src/types/methods/set-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=set-state.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-state.mjs","sourceRoot":"","sources":["../../../src/types/methods/set-state.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json } from '@metamask/utils';\n\n/**\n * The request parameters for the `snap_setState` method.\n *\n * @property key - The key of the state to update. If not provided, the entire\n * state is updated. This may contain Lodash-style path syntax, e.g.,\n * `a.b.c`, with the exception of array syntax.\n * @property value - The value to set the state to.\n * @property encrypted - Whether to use the separate encrypted state, or the\n * unencrypted state. Defaults to the encrypted state. Encrypted state can only\n * be used if the client is unlocked, while unencrypted state can be used\n * whether the client is locked or unlocked.\n */\nexport type SetStateParams = {\n key?: string;\n value: Json;\n encrypted?: boolean;\n};\n\n/**\n * The result returned by the `snap_setState` method.\n */\nexport type SetStateResult = null;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.cjs","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"","sourcesContent":["import type { SupportedCurve } from '@metamask/key-tree';\nimport type { JsonRpcRequest } from '@metamask/utils';\n\nimport type { ChainId } from './caip';\n\nexport type EmptyObject = Record<string, never>;\n\nexport type Cronjob = {\n expression: string;\n request: Omit<JsonRpcRequest, 'jsonrpc' | 'id'>;\n};\n\nexport type NameLookupMatchers =\n | {\n tlds: string[];\n }\n | {\n schemes: string[];\n }\n | {\n tlds: string[];\n schemes: string[];\n };\n\nexport type Bip32Entropy = {\n curve: SupportedCurve;\n path: string[];\n};\n\nexport type Bip44Entropy = {\n coinType: number;\n};\n\nexport type RequestedSnap = {\n version?: string;\n};\n\nexport type InitialPermissions = Partial<{\n 'endowment:cronjob': {\n jobs: Cronjob[];\n maxRequestTime?: number;\n };\n 'endowment:ethereum-provider': EmptyObject;\n 'endowment:keyring': {\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:lifecycle-hooks'?: {\n maxRequestTime?: number;\n };\n 'endowment:name-lookup': {\n chains?: ChainId[];\n matchers?: NameLookupMatchers;\n maxRequestTime?: number;\n };\n 'endowment:network-access': EmptyObject;\n 'endowment:page-home'?: {\n maxRequestTime?: number;\n };\n 'endowment:page-settings'?: {\n maxRequestTime?: number;\n };\n 'endowment:rpc': {\n dapps?: boolean;\n snaps?: boolean;\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:signature-insight': {\n allowSignatureOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:transaction-insight': {\n allowTransactionOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:webassembly': EmptyObject;\n\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_dialog: EmptyObject;\n snap_getBip32Entropy: Bip32Entropy[];\n snap_getBip32PublicKey: Bip32Entropy[];\n snap_getBip44Entropy: Bip44Entropy[];\n snap_getEntropy: EmptyObject;\n snap_getLocale: EmptyObject;\n snap_manageAccounts: EmptyObject;\n snap_manageState: EmptyObject;\n snap_notify: EmptyObject;\n wallet_snap: Record<string, RequestedSnap>;\n /* eslint-enable @typescript-eslint/naming-convention */\n}>;\n"]}
1
+ {"version":3,"file":"permissions.cjs","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"","sourcesContent":["import type { SupportedCurve } from '@metamask/key-tree';\nimport type { JsonRpcRequest } from '@metamask/utils';\n\nimport type { ChainId } from './caip';\n\nexport type EmptyObject = Record<string, never>;\n\nexport type Cronjob = {\n expression: string;\n request: Omit<JsonRpcRequest, 'jsonrpc' | 'id'>;\n};\n\nexport type NameLookupMatchers =\n | {\n tlds: string[];\n }\n | {\n schemes: string[];\n }\n | {\n tlds: string[];\n schemes: string[];\n };\n\nexport type Bip32Entropy = {\n curve: SupportedCurve;\n path: string[];\n};\n\nexport type Bip44Entropy = {\n coinType: number;\n};\n\nexport type RequestedSnap = {\n version?: string;\n};\n\nexport type InitialPermissions = Partial<{\n 'endowment:cronjob': {\n jobs?: Cronjob[];\n maxRequestTime?: number;\n };\n 'endowment:ethereum-provider': EmptyObject;\n 'endowment:keyring': {\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:lifecycle-hooks'?: {\n maxRequestTime?: number;\n };\n 'endowment:name-lookup': {\n chains?: ChainId[];\n matchers?: NameLookupMatchers;\n maxRequestTime?: number;\n };\n 'endowment:network-access': EmptyObject;\n 'endowment:page-home'?: {\n maxRequestTime?: number;\n };\n 'endowment:page-settings'?: {\n maxRequestTime?: number;\n };\n 'endowment:rpc': {\n dapps?: boolean;\n snaps?: boolean;\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:signature-insight': {\n allowSignatureOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:transaction-insight': {\n allowTransactionOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:webassembly': EmptyObject;\n\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_dialog: EmptyObject;\n snap_getBip32Entropy: Bip32Entropy[];\n snap_getBip32PublicKey: Bip32Entropy[];\n snap_getBip44Entropy: Bip44Entropy[];\n snap_getEntropy: EmptyObject;\n snap_getLocale: EmptyObject;\n snap_manageAccounts: EmptyObject;\n snap_manageState: EmptyObject;\n snap_notify: EmptyObject;\n wallet_snap: Record<string, RequestedSnap>;\n /* eslint-enable @typescript-eslint/naming-convention */\n}>;\n"]}
@@ -26,7 +26,7 @@ export type RequestedSnap = {
26
26
  };
27
27
  export type InitialPermissions = Partial<{
28
28
  'endowment:cronjob': {
29
- jobs: Cronjob[];
29
+ jobs?: Cronjob[];
30
30
  maxRequestTime?: number;
31
31
  };
32
32
  'endowment:ethereum-provider': EmptyObject;
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.cts","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,2BAA2B;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAe;AAEtC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B;IACE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,MAAM,CAAC;KACzB,CAAC;IACF,6BAA6B,EAAE;QAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,+BAA+B,EAAE;QAC/B,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,uBAAuB,EAAE,WAAW,CAAC;IAGrC,WAAW,EAAE,WAAW,CAAC;IACzB,oBAAoB,EAAE,YAAY,EAAE,CAAC;IACrC,sBAAsB,EAAE,YAAY,EAAE,CAAC;IACvC,oBAAoB,EAAE,YAAY,EAAE,CAAC;IACrC,eAAe,EAAE,WAAW,CAAC;IAC7B,cAAc,EAAE,WAAW,CAAC;IAC5B,mBAAmB,EAAE,WAAW,CAAC;IACjC,gBAAgB,EAAE,WAAW,CAAC;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAE5C,CAAC,CAAC"}
@@ -26,7 +26,7 @@ export type RequestedSnap = {
26
26
  };
27
27
  export type InitialPermissions = Partial<{
28
28
  'endowment:cronjob': {
29
- jobs: Cronjob[];
29
+ jobs?: Cronjob[];
30
30
  maxRequestTime?: number;
31
31
  };
32
32
  'endowment:ethereum-provider': EmptyObject;
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.mts","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,2BAA2B;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAe;AAEtC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC,c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CAAC,EAAE,OAAO,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,6BAA6B,EAAE;QAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,+BAA+B,EAAE;QAC/B,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,uBAAuB,EAAE,WAAW,CAAC;IAGrC,WAAW,EAAE,WAAW,CAAC;IACzB,oBAAoB,EAAE,YAAY,EAAE,CAAC;IACrC,sBAAsB,EAAE,YAAY,EAAE,CAAC;IACvC,oBAAoB,EAAE,YAAY,EAAE,CAAC;IACrC,eAAe,EAAE,WAAW,CAAC;IAC7B,cAAc,EAAE,WAAW,CAAC;IAC5B,mBAAmB,EAAE,WAAW,CAAC;IACjC,gBAAgB,EAAE,WAAW,CAAC;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAE5C,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.mjs","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"","sourcesContent":["import type { SupportedCurve } from '@metamask/key-tree';\nimport type { JsonRpcRequest } from '@metamask/utils';\n\nimport type { ChainId } from './caip';\n\nexport type EmptyObject = Record<string, never>;\n\nexport type Cronjob = {\n expression: string;\n request: Omit<JsonRpcRequest, 'jsonrpc' | 'id'>;\n};\n\nexport type NameLookupMatchers =\n | {\n tlds: string[];\n }\n | {\n schemes: string[];\n }\n | {\n tlds: string[];\n schemes: string[];\n };\n\nexport type Bip32Entropy = {\n curve: SupportedCurve;\n path: string[];\n};\n\nexport type Bip44Entropy = {\n coinType: number;\n};\n\nexport type RequestedSnap = {\n version?: string;\n};\n\nexport type InitialPermissions = Partial<{\n 'endowment:cronjob': {\n jobs: Cronjob[];\n maxRequestTime?: number;\n };\n 'endowment:ethereum-provider': EmptyObject;\n 'endowment:keyring': {\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:lifecycle-hooks'?: {\n maxRequestTime?: number;\n };\n 'endowment:name-lookup': {\n chains?: ChainId[];\n matchers?: NameLookupMatchers;\n maxRequestTime?: number;\n };\n 'endowment:network-access': EmptyObject;\n 'endowment:page-home'?: {\n maxRequestTime?: number;\n };\n 'endowment:page-settings'?: {\n maxRequestTime?: number;\n };\n 'endowment:rpc': {\n dapps?: boolean;\n snaps?: boolean;\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:signature-insight': {\n allowSignatureOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:transaction-insight': {\n allowTransactionOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:webassembly': EmptyObject;\n\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_dialog: EmptyObject;\n snap_getBip32Entropy: Bip32Entropy[];\n snap_getBip32PublicKey: Bip32Entropy[];\n snap_getBip44Entropy: Bip44Entropy[];\n snap_getEntropy: EmptyObject;\n snap_getLocale: EmptyObject;\n snap_manageAccounts: EmptyObject;\n snap_manageState: EmptyObject;\n snap_notify: EmptyObject;\n wallet_snap: Record<string, RequestedSnap>;\n /* eslint-enable @typescript-eslint/naming-convention */\n}>;\n"]}
1
+ {"version":3,"file":"permissions.mjs","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"","sourcesContent":["import type { SupportedCurve } from '@metamask/key-tree';\nimport type { JsonRpcRequest } from '@metamask/utils';\n\nimport type { ChainId } from './caip';\n\nexport type EmptyObject = Record<string, never>;\n\nexport type Cronjob = {\n expression: string;\n request: Omit<JsonRpcRequest, 'jsonrpc' | 'id'>;\n};\n\nexport type NameLookupMatchers =\n | {\n tlds: string[];\n }\n | {\n schemes: string[];\n }\n | {\n tlds: string[];\n schemes: string[];\n };\n\nexport type Bip32Entropy = {\n curve: SupportedCurve;\n path: string[];\n};\n\nexport type Bip44Entropy = {\n coinType: number;\n};\n\nexport type RequestedSnap = {\n version?: string;\n};\n\nexport type InitialPermissions = Partial<{\n 'endowment:cronjob': {\n jobs?: Cronjob[];\n maxRequestTime?: number;\n };\n 'endowment:ethereum-provider': EmptyObject;\n 'endowment:keyring': {\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:lifecycle-hooks'?: {\n maxRequestTime?: number;\n };\n 'endowment:name-lookup': {\n chains?: ChainId[];\n matchers?: NameLookupMatchers;\n maxRequestTime?: number;\n };\n 'endowment:network-access': EmptyObject;\n 'endowment:page-home'?: {\n maxRequestTime?: number;\n };\n 'endowment:page-settings'?: {\n maxRequestTime?: number;\n };\n 'endowment:rpc': {\n dapps?: boolean;\n snaps?: boolean;\n allowedOrigins?: string[];\n maxRequestTime?: number;\n };\n 'endowment:signature-insight': {\n allowSignatureOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:transaction-insight': {\n allowTransactionOrigin?: boolean;\n maxRequestTime?: number;\n };\n 'endowment:webassembly': EmptyObject;\n\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_dialog: EmptyObject;\n snap_getBip32Entropy: Bip32Entropy[];\n snap_getBip32PublicKey: Bip32Entropy[];\n snap_getBip44Entropy: Bip44Entropy[];\n snap_getEntropy: EmptyObject;\n snap_getLocale: EmptyObject;\n snap_manageAccounts: EmptyObject;\n snap_manageState: EmptyObject;\n snap_notify: EmptyObject;\n wallet_snap: Record<string, RequestedSnap>;\n /* eslint-enable @typescript-eslint/naming-convention */\n}>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-sdk",
3
- "version": "6.14.0",
3
+ "version": "6.15.0",
4
4
  "description": "A library containing the core functionality for building MetaMask Snaps",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -91,11 +91,11 @@
91
91
  "test:watch": "jest --watch"
92
92
  },
93
93
  "dependencies": {
94
- "@metamask/key-tree": "^10.0.1",
95
- "@metamask/providers": "^18.1.1",
96
- "@metamask/rpc-errors": "^7.0.1",
94
+ "@metamask/key-tree": "^10.0.2",
95
+ "@metamask/providers": "^18.3.1",
96
+ "@metamask/rpc-errors": "^7.0.2",
97
97
  "@metamask/superstruct": "^3.1.0",
98
- "@metamask/utils": "^10.0.0"
98
+ "@metamask/utils": "^11.0.1"
99
99
  },
100
100
  "devDependencies": {
101
101
  "@lavamoat/allow-scripts": "^3.0.4",