@metamask/snaps-sdk 6.11.0 → 6.12.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.
@@ -15,10 +15,10 @@ export type JsonRpcErrorFunction = typeof rpcErrors.parse;
15
15
  */
16
16
  export declare function createSnapError(fn: JsonRpcErrorFunction): {
17
17
  new (message?: string): {
18
- readonly "__#182157@#code": number;
19
- readonly "__#182157@#message": string;
20
- readonly "__#182157@#data"?: Record<string, Json> | undefined;
21
- readonly "__#182157@#stack"?: string | undefined;
18
+ readonly "__#182177@#code": number;
19
+ readonly "__#182177@#message": string;
20
+ readonly "__#182177@#data"?: Record<string, Json> | undefined;
21
+ readonly "__#182177@#stack"?: string | undefined;
22
22
  readonly name: string;
23
23
  readonly code: number;
24
24
  readonly message: string;
@@ -29,10 +29,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
29
29
  cause?: unknown;
30
30
  };
31
31
  new (data?: Record<string, Json>): {
32
- readonly "__#182157@#code": number;
33
- readonly "__#182157@#message": string;
34
- readonly "__#182157@#data"?: Record<string, Json> | undefined;
35
- readonly "__#182157@#stack"?: string | undefined;
32
+ readonly "__#182177@#code": number;
33
+ readonly "__#182177@#message": string;
34
+ readonly "__#182177@#data"?: Record<string, Json> | undefined;
35
+ readonly "__#182177@#stack"?: string | undefined;
36
36
  readonly name: string;
37
37
  readonly code: number;
38
38
  readonly message: string;
@@ -43,10 +43,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
43
43
  cause?: unknown;
44
44
  };
45
45
  new (message?: string | Record<string, Json>, data?: Record<string, Json>): {
46
- readonly "__#182157@#code": number;
47
- readonly "__#182157@#message": string;
48
- readonly "__#182157@#data"?: Record<string, Json> | undefined;
49
- readonly "__#182157@#stack"?: string | undefined;
46
+ readonly "__#182177@#code": number;
47
+ readonly "__#182177@#message": string;
48
+ readonly "__#182177@#data"?: Record<string, Json> | undefined;
49
+ readonly "__#182177@#stack"?: string | undefined;
50
50
  readonly name: string;
51
51
  readonly code: number;
52
52
  readonly message: string;
@@ -15,10 +15,10 @@ export type JsonRpcErrorFunction = typeof rpcErrors.parse;
15
15
  */
16
16
  export declare function createSnapError(fn: JsonRpcErrorFunction): {
17
17
  new (message?: string): {
18
- readonly "__#91080@#code": number;
19
- readonly "__#91080@#message": string;
20
- readonly "__#91080@#data"?: Record<string, Json> | undefined;
21
- readonly "__#91080@#stack"?: string | undefined;
18
+ readonly "__#91090@#code": number;
19
+ readonly "__#91090@#message": string;
20
+ readonly "__#91090@#data"?: Record<string, Json> | undefined;
21
+ readonly "__#91090@#stack"?: string | undefined;
22
22
  readonly name: string;
23
23
  readonly code: number;
24
24
  readonly message: string;
@@ -29,10 +29,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
29
29
  cause?: unknown;
30
30
  };
31
31
  new (data?: Record<string, Json>): {
32
- readonly "__#91080@#code": number;
33
- readonly "__#91080@#message": string;
34
- readonly "__#91080@#data"?: Record<string, Json> | undefined;
35
- readonly "__#91080@#stack"?: string | undefined;
32
+ readonly "__#91090@#code": number;
33
+ readonly "__#91090@#message": string;
34
+ readonly "__#91090@#data"?: Record<string, Json> | undefined;
35
+ readonly "__#91090@#stack"?: string | undefined;
36
36
  readonly name: string;
37
37
  readonly code: number;
38
38
  readonly message: string;
@@ -43,10 +43,10 @@ export declare function createSnapError(fn: JsonRpcErrorFunction): {
43
43
  cause?: unknown;
44
44
  };
45
45
  new (message?: string | Record<string, Json>, data?: Record<string, Json>): {
46
- readonly "__#91080@#code": number;
47
- readonly "__#91080@#message": string;
48
- readonly "__#91080@#data"?: Record<string, Json> | undefined;
49
- readonly "__#91080@#stack"?: string | undefined;
46
+ readonly "__#91090@#code": number;
47
+ readonly "__#91090@#message": string;
48
+ readonly "__#91090@#data"?: Record<string, Json> | undefined;
49
+ readonly "__#91090@#stack"?: string | undefined;
50
50
  readonly name: string;
51
51
  readonly code: number;
52
52
  readonly message: string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=get-interface-context.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-interface-context.cjs","sourceRoot":"","sources":["../../../src/types/methods/get-interface-context.ts"],"names":[],"mappings":"","sourcesContent":["import type { InterfaceContext } from '../interface';\n\n/**\n * The request parameters for the `snap_getInterfaceContext` method.\n *\n * @property id - The interface id.\n */\nexport type GetInterfaceContextParams = {\n id: string;\n};\n\n/**\n * The result returned by the `snap_getInterfaceContext` method, which is the context for a given interface.\n */\nexport type GetInterfaceContextResult = InterfaceContext | null;\n"]}
@@ -0,0 +1,14 @@
1
+ import type { InterfaceContext } from "../interface.cjs";
2
+ /**
3
+ * The request parameters for the `snap_getInterfaceContext` method.
4
+ *
5
+ * @property id - The interface id.
6
+ */
7
+ export type GetInterfaceContextParams = {
8
+ id: string;
9
+ };
10
+ /**
11
+ * The result returned by the `snap_getInterfaceContext` method, which is the context for a given interface.
12
+ */
13
+ export type GetInterfaceContextResult = InterfaceContext | null;
14
+ //# sourceMappingURL=get-interface-context.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-interface-context.d.cts","sourceRoot":"","sources":["../../../src/types/methods/get-interface-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAqB;AAErD;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { InterfaceContext } from "../interface.mjs";
2
+ /**
3
+ * The request parameters for the `snap_getInterfaceContext` method.
4
+ *
5
+ * @property id - The interface id.
6
+ */
7
+ export type GetInterfaceContextParams = {
8
+ id: string;
9
+ };
10
+ /**
11
+ * The result returned by the `snap_getInterfaceContext` method, which is the context for a given interface.
12
+ */
13
+ export type GetInterfaceContextResult = InterfaceContext | null;
14
+ //# sourceMappingURL=get-interface-context.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-interface-context.d.mts","sourceRoot":"","sources":["../../../src/types/methods/get-interface-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAqB;AAErD;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-interface-context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-interface-context.mjs","sourceRoot":"","sources":["../../../src/types/methods/get-interface-context.ts"],"names":[],"mappings":"","sourcesContent":["import type { InterfaceContext } from '../interface';\n\n/**\n * The request parameters for the `snap_getInterfaceContext` method.\n *\n * @property id - The interface id.\n */\nexport type GetInterfaceContextParams = {\n id: string;\n};\n\n/**\n * The result returned by the `snap_getInterfaceContext` method, which is the context for a given interface.\n */\nexport type GetInterfaceContextResult = InterfaceContext | null;\n"]}
@@ -22,6 +22,7 @@ __exportStar(require("./get-bip44-entropy.cjs"), exports);
22
22
  __exportStar(require("./get-client-status.cjs"), exports);
23
23
  __exportStar(require("./get-entropy.cjs"), exports);
24
24
  __exportStar(require("./get-file.cjs"), exports);
25
+ __exportStar(require("./get-interface-context.cjs"), exports);
25
26
  __exportStar(require("./get-interface-state.cjs"), exports);
26
27
  __exportStar(require("./get-locale.cjs"), exports);
27
28
  __exportStar(require("./get-preferences.cjs"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAmC;AACnC,+CAAyB;AACzB,0DAAoC;AACpC,6DAAuC;AACvC,0DAAoC;AACpC,0DAAoC;AACpC,oDAA8B;AAC9B,iDAA2B;AAC3B,4DAAsC;AACtC,mDAA6B;AAC7B,wDAAkC;AAClC,kDAA4B;AAC5B,uDAAiC;AACjC,oDAA8B;AAC9B,wDAAkC;AAClC,qDAA+B;AAC/B,gDAA0B;AAC1B,+CAAyB;AACzB,sDAAgC;AAChC,yDAAmC;AACnC,0DAAoC;AACpC,0DAAoC;AACpC,yDAAmC","sourcesContent":["export * from './create-interface';\nexport * from './dialog';\nexport * from './get-bip32-entropy';\nexport * from './get-bip32-public-key';\nexport * from './get-bip44-entropy';\nexport * from './get-client-status';\nexport * from './get-entropy';\nexport * from './get-file';\nexport * from './get-interface-state';\nexport * from './get-locale';\nexport * from './get-preferences';\nexport * from './get-snaps';\nexport * from './invoke-keyring';\nexport * from './invoke-snap';\nexport * from './manage-accounts';\nexport * from './manage-state';\nexport * from './methods';\nexport * from './notify';\nexport * from './request-snaps';\nexport * from './update-interface';\nexport * from './resolve-interface';\nexport * from './get-currency-rate';\nexport * from './provider-request';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAmC;AACnC,+CAAyB;AACzB,0DAAoC;AACpC,6DAAuC;AACvC,0DAAoC;AACpC,0DAAoC;AACpC,oDAA8B;AAC9B,iDAA2B;AAC3B,8DAAwC;AACxC,4DAAsC;AACtC,mDAA6B;AAC7B,wDAAkC;AAClC,kDAA4B;AAC5B,uDAAiC;AACjC,oDAA8B;AAC9B,wDAAkC;AAClC,qDAA+B;AAC/B,gDAA0B;AAC1B,+CAAyB;AACzB,sDAAgC;AAChC,yDAAmC;AACnC,0DAAoC;AACpC,0DAAoC;AACpC,yDAAmC","sourcesContent":["export * from './create-interface';\nexport * from './dialog';\nexport * from './get-bip32-entropy';\nexport * from './get-bip32-public-key';\nexport * from './get-bip44-entropy';\nexport * from './get-client-status';\nexport * from './get-entropy';\nexport * from './get-file';\nexport * from './get-interface-context';\nexport * from './get-interface-state';\nexport * from './get-locale';\nexport * from './get-preferences';\nexport * from './get-snaps';\nexport * from './invoke-keyring';\nexport * from './invoke-snap';\nexport * from './manage-accounts';\nexport * from './manage-state';\nexport * from './methods';\nexport * from './notify';\nexport * from './request-snaps';\nexport * from './update-interface';\nexport * from './resolve-interface';\nexport * from './get-currency-rate';\nexport * from './provider-request';\n"]}
@@ -6,6 +6,7 @@ export * from "./get-bip44-entropy.cjs";
6
6
  export * from "./get-client-status.cjs";
7
7
  export * from "./get-entropy.cjs";
8
8
  export * from "./get-file.cjs";
9
+ export * from "./get-interface-context.cjs";
9
10
  export * from "./get-interface-state.cjs";
10
11
  export * from "./get-locale.cjs";
11
12
  export * from "./get-preferences.cjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":"AAAA,uCAAmC;AACnC,6BAAyB;AACzB,wCAAoC;AACpC,2CAAuC;AACvC,wCAAoC;AACpC,wCAAoC;AACpC,kCAA8B;AAC9B,+BAA2B;AAC3B,0CAAsC;AACtC,iCAA6B;AAC7B,sCAAkC;AAClC,gCAA4B;AAC5B,qCAAiC;AACjC,kCAA8B;AAC9B,sCAAkC;AAClC,mCAA+B;AAC/B,8BAA0B;AAC1B,6BAAyB;AACzB,oCAAgC;AAChC,uCAAmC;AACnC,wCAAoC;AACpC,wCAAoC;AACpC,uCAAmC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":"AAAA,uCAAmC;AACnC,6BAAyB;AACzB,wCAAoC;AACpC,2CAAuC;AACvC,wCAAoC;AACpC,wCAAoC;AACpC,kCAA8B;AAC9B,+BAA2B;AAC3B,4CAAwC;AACxC,0CAAsC;AACtC,iCAA6B;AAC7B,sCAAkC;AAClC,gCAA4B;AAC5B,qCAAiC;AACjC,kCAA8B;AAC9B,sCAAkC;AAClC,mCAA+B;AAC/B,8BAA0B;AAC1B,6BAAyB;AACzB,oCAAgC;AAChC,uCAAmC;AACnC,wCAAoC;AACpC,wCAAoC;AACpC,uCAAmC"}
@@ -6,6 +6,7 @@ export * from "./get-bip44-entropy.mjs";
6
6
  export * from "./get-client-status.mjs";
7
7
  export * from "./get-entropy.mjs";
8
8
  export * from "./get-file.mjs";
9
+ export * from "./get-interface-context.mjs";
9
10
  export * from "./get-interface-state.mjs";
10
11
  export * from "./get-locale.mjs";
11
12
  export * from "./get-preferences.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":"AAAA,uCAAmC;AACnC,6BAAyB;AACzB,wCAAoC;AACpC,2CAAuC;AACvC,wCAAoC;AACpC,wCAAoC;AACpC,kCAA8B;AAC9B,+BAA2B;AAC3B,0CAAsC;AACtC,iCAA6B;AAC7B,sCAAkC;AAClC,gCAA4B;AAC5B,qCAAiC;AACjC,kCAA8B;AAC9B,sCAAkC;AAClC,mCAA+B;AAC/B,8BAA0B;AAC1B,6BAAyB;AACzB,oCAAgC;AAChC,uCAAmC;AACnC,wCAAoC;AACpC,wCAAoC;AACpC,uCAAmC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":"AAAA,uCAAmC;AACnC,6BAAyB;AACzB,wCAAoC;AACpC,2CAAuC;AACvC,wCAAoC;AACpC,wCAAoC;AACpC,kCAA8B;AAC9B,+BAA2B;AAC3B,4CAAwC;AACxC,0CAAsC;AACtC,iCAA6B;AAC7B,sCAAkC;AAClC,gCAA4B;AAC5B,qCAAiC;AACjC,kCAA8B;AAC9B,sCAAkC;AAClC,mCAA+B;AAC/B,8BAA0B;AAC1B,6BAAyB;AACzB,oCAAgC;AAChC,uCAAmC;AACnC,wCAAoC;AACpC,wCAAoC;AACpC,uCAAmC"}
@@ -6,6 +6,7 @@ export * from "./get-bip44-entropy.mjs";
6
6
  export * from "./get-client-status.mjs";
7
7
  export * from "./get-entropy.mjs";
8
8
  export * from "./get-file.mjs";
9
+ export * from "./get-interface-context.mjs";
9
10
  export * from "./get-interface-state.mjs";
10
11
  export * from "./get-locale.mjs";
11
12
  export * from "./get-preferences.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":"AAAA,uCAAmC;AACnC,6BAAyB;AACzB,wCAAoC;AACpC,2CAAuC;AACvC,wCAAoC;AACpC,wCAAoC;AACpC,kCAA8B;AAC9B,+BAA2B;AAC3B,0CAAsC;AACtC,iCAA6B;AAC7B,sCAAkC;AAClC,gCAA4B;AAC5B,qCAAiC;AACjC,kCAA8B;AAC9B,sCAAkC;AAClC,mCAA+B;AAC/B,8BAA0B;AAC1B,6BAAyB;AACzB,oCAAgC;AAChC,uCAAmC;AACnC,wCAAoC;AACpC,wCAAoC;AACpC,uCAAmC","sourcesContent":["export * from './create-interface';\nexport * from './dialog';\nexport * from './get-bip32-entropy';\nexport * from './get-bip32-public-key';\nexport * from './get-bip44-entropy';\nexport * from './get-client-status';\nexport * from './get-entropy';\nexport * from './get-file';\nexport * from './get-interface-state';\nexport * from './get-locale';\nexport * from './get-preferences';\nexport * from './get-snaps';\nexport * from './invoke-keyring';\nexport * from './invoke-snap';\nexport * from './manage-accounts';\nexport * from './manage-state';\nexport * from './methods';\nexport * from './notify';\nexport * from './request-snaps';\nexport * from './update-interface';\nexport * from './resolve-interface';\nexport * from './get-currency-rate';\nexport * from './provider-request';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/methods/index.ts"],"names":[],"mappings":"AAAA,uCAAmC;AACnC,6BAAyB;AACzB,wCAAoC;AACpC,2CAAuC;AACvC,wCAAoC;AACpC,wCAAoC;AACpC,kCAA8B;AAC9B,+BAA2B;AAC3B,4CAAwC;AACxC,0CAAsC;AACtC,iCAA6B;AAC7B,sCAAkC;AAClC,gCAA4B;AAC5B,qCAAiC;AACjC,kCAA8B;AAC9B,sCAAkC;AAClC,mCAA+B;AAC/B,8BAA0B;AAC1B,6BAAyB;AACzB,oCAAgC;AAChC,uCAAmC;AACnC,wCAAoC;AACpC,wCAAoC;AACpC,uCAAmC","sourcesContent":["export * from './create-interface';\nexport * from './dialog';\nexport * from './get-bip32-entropy';\nexport * from './get-bip32-public-key';\nexport * from './get-bip44-entropy';\nexport * from './get-client-status';\nexport * from './get-entropy';\nexport * from './get-file';\nexport * from './get-interface-context';\nexport * from './get-interface-state';\nexport * from './get-locale';\nexport * from './get-preferences';\nexport * from './get-snaps';\nexport * from './invoke-keyring';\nexport * from './invoke-snap';\nexport * from './manage-accounts';\nexport * from './manage-state';\nexport * from './methods';\nexport * from './notify';\nexport * from './request-snaps';\nexport * from './update-interface';\nexport * from './resolve-interface';\nexport * from './get-currency-rate';\nexport * from './provider-request';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"methods.cjs","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 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_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.cjs","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"]}
@@ -8,6 +8,7 @@ import type { GetClientStatusParams, GetClientStatusResult } from "./get-client-
8
8
  import type { GetCurrencyRateParams, GetCurrencyRateResult } from "./get-currency-rate.cjs";
9
9
  import type { GetEntropyParams, GetEntropyResult } from "./get-entropy.cjs";
10
10
  import type { GetFileParams, GetFileResult } from "./get-file.cjs";
11
+ import type { GetInterfaceContextParams, GetInterfaceContextResult } from "./get-interface-context.cjs";
11
12
  import type { GetInterfaceStateParams, GetInterfaceStateResult } from "./get-interface-state.cjs";
12
13
  import type { GetLocaleParams, GetLocaleResult } from "./get-locale.cjs";
13
14
  import type { GetPreferencesParams, GetPreferencesResult } from "./get-preferences.cjs";
@@ -41,6 +42,10 @@ export type SnapMethods = {
41
42
  snap_createInterface: [CreateInterfaceParams, CreateInterfaceResult];
42
43
  snap_updateInterface: [UpdateInterfaceParams, UpdateInterfaceResult];
43
44
  snap_getInterfaceState: [GetInterfaceStateParams, GetInterfaceStateResult];
45
+ snap_getInterfaceContext: [
46
+ GetInterfaceContextParams,
47
+ GetInterfaceContextResult
48
+ ];
44
49
  snap_resolveInterface: [ResolveInterfaceParams, ResolveInterfaceResult];
45
50
  wallet_getSnaps: [GetSnapsParams, GetSnapsResult];
46
51
  wallet_invokeKeyring: [InvokeKeyringParams, InvokeKeyringResult];
@@ -1 +1 @@
1
- {"version":3,"file":"methods.d.cts","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,uBAAuB,EACvB,uBAAuB,EACxB,kCAA8B;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,yBAAqB;AACrE,OAAO,KAAK,EACV,oBA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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"}
@@ -8,6 +8,7 @@ import type { GetClientStatusParams, GetClientStatusResult } from "./get-client-
8
8
  import type { GetCurrencyRateParams, GetCurrencyRateResult } from "./get-currency-rate.mjs";
9
9
  import type { GetEntropyParams, GetEntropyResult } from "./get-entropy.mjs";
10
10
  import type { GetFileParams, GetFileResult } from "./get-file.mjs";
11
+ import type { GetInterfaceContextParams, GetInterfaceContextResult } from "./get-interface-context.mjs";
11
12
  import type { GetInterfaceStateParams, GetInterfaceStateResult } from "./get-interface-state.mjs";
12
13
  import type { GetLocaleParams, GetLocaleResult } from "./get-locale.mjs";
13
14
  import type { GetPreferencesParams, GetPreferencesResult } from "./get-preferences.mjs";
@@ -41,6 +42,10 @@ export type SnapMethods = {
41
42
  snap_createInterface: [CreateInterfaceParams, CreateInterfaceResult];
42
43
  snap_updateInterface: [UpdateInterfaceParams, UpdateInterfaceResult];
43
44
  snap_getInterfaceState: [GetInterfaceStateParams, GetInterfaceStateResult];
45
+ snap_getInterfaceContext: [
46
+ GetInterfaceContextParams,
47
+ GetInterfaceContextResult
48
+ ];
44
49
  snap_resolveInterface: [ResolveInterfaceParams, ResolveInterfaceResult];
45
50
  wallet_getSnaps: [GetSnapsParams, GetSnapsResult];
46
51
  wallet_invokeKeyring: [InvokeKeyringParams, InvokeKeyringResult];
@@ -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,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,iBAAiB,EAAE,2BAAuB;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,qBAAiB;AAC3D,O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AC,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 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_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 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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-sdk",
3
- "version": "6.11.0",
3
+ "version": "6.12.0",
4
4
  "description": "A library containing the core functionality for building MetaMask Snaps",
5
5
  "keywords": [
6
6
  "MetaMask",