@metamask/snaps-sdk 1.3.1 → 1.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 (29) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/dist/cjs/types/handlers/index.js +1 -0
  3. package/dist/cjs/types/handlers/index.js.map +1 -1
  4. package/dist/cjs/types/handlers/signature.js +6 -0
  5. package/dist/cjs/types/handlers/signature.js.map +1 -0
  6. package/dist/cjs/types/methods/get-client-status.js +10 -0
  7. package/dist/cjs/types/methods/get-client-status.js.map +1 -0
  8. package/dist/cjs/types/methods/index.js +1 -0
  9. package/dist/cjs/types/methods/index.js.map +1 -1
  10. package/dist/cjs/ui/components/copyable.js.map +1 -1
  11. package/dist/esm/types/handlers/index.js +1 -0
  12. package/dist/esm/types/handlers/index.js.map +1 -1
  13. package/dist/esm/types/handlers/signature.js +3 -0
  14. package/dist/esm/types/handlers/signature.js.map +1 -0
  15. package/dist/esm/types/methods/get-client-status.js +7 -0
  16. package/dist/esm/types/methods/get-client-status.js.map +1 -0
  17. package/dist/esm/types/methods/index.js +1 -0
  18. package/dist/esm/types/methods/index.js.map +1 -1
  19. package/dist/esm/types/methods/methods.js.map +1 -1
  20. package/dist/esm/types/permissions.js.map +1 -1
  21. package/dist/esm/ui/components/copyable.js.map +1 -1
  22. package/dist/types/types/handlers/index.d.ts +1 -0
  23. package/dist/types/types/handlers/signature.d.ts +107 -0
  24. package/dist/types/types/methods/get-client-status.d.ts +14 -0
  25. package/dist/types/types/methods/index.d.ts +1 -0
  26. package/dist/types/types/methods/methods.d.ts +2 -0
  27. package/dist/types/types/permissions.d.ts +3 -0
  28. package/dist/types/ui/components/copyable.d.ts +11 -14
  29. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.4.0]
10
+ ### Added
11
+ - Add support for signature insights ([#2074](https://github.com/MetaMask/snaps/pull/2074), [#2079](https://github.com/MetaMask/snaps/pull/2079))
12
+ - Add types for `snap_getClientStatus` ([#2051](https://github.com/MetaMask/snaps/pull/2051))
13
+
14
+ ### Changed
15
+ - Bump @metamask/utils from 8.2.1 to 8.3.0 ([#2100](https://github.com/MetaMask/snaps/pull/2100))
16
+
17
+ ## [1.3.2]
18
+ ### Fixed
19
+ - Fix missing `sensitive` property in `Copyable` type ([#2070](https://github.com/MetaMask/snaps/pull/2070))
20
+
9
21
  ## [1.3.1]
10
22
  ### Fixed
11
23
  - Export error wrappers ([#2043](https://github.com/MetaMask/snaps/pull/2043))
@@ -33,7 +45,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
33
45
  ### Added
34
46
  - Initial release of this package.
35
47
 
36
- [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.3.1...HEAD
48
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.4.0...HEAD
49
+ [1.4.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.3.2...@metamask/snaps-sdk@1.4.0
50
+ [1.3.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.3.1...@metamask/snaps-sdk@1.3.2
37
51
  [1.3.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.3.0...@metamask/snaps-sdk@1.3.1
38
52
  [1.3.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.2.0...@metamask/snaps-sdk@1.3.0
39
53
  [1.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@1.1.0...@metamask/snaps-sdk@1.2.0
@@ -9,6 +9,7 @@ _export_star(require("./lifecycle"), exports);
9
9
  _export_star(require("./name-lookup"), exports);
10
10
  _export_star(require("./rpc-request"), exports);
11
11
  _export_star(require("./transaction"), exports);
12
+ _export_star(require("./signature"), exports);
12
13
  function _export_star(from, to) {
13
14
  Object.keys(from).forEach(function(k) {
14
15
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/types/handlers/index.ts"],"sourcesContent":["export * from './cronjob';\nexport * from './home-page';\nexport * from './keyring';\nexport * from './lifecycle';\nexport * from './name-lookup';\nexport * from './rpc-request';\nexport * from './transaction';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
1
+ {"version":3,"sources":["../../../../src/types/handlers/index.ts"],"sourcesContent":["export * from './cronjob';\nexport * from './home-page';\nexport * from './keyring';\nexport * from './lifecycle';\nexport * from './name-lookup';\nexport * from './rpc-request';\nexport * from './transaction';\nexport * from './signature';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //# sourceMappingURL=signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/types/handlers/signature.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The request parameters for the `snap_getClientStatus` method.
3
+ *
4
+ * This method does not accept any parameters.
5
+ */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+
10
+ //# sourceMappingURL=get-client-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/types/methods/get-client-status.ts"],"sourcesContent":["/**\n * The request parameters for the `snap_getClientStatus` method.\n *\n * This method does not accept any parameters.\n */\nexport type GetClientStatusParams = never;\n\n/**\n * The result returned by the `snap_getClientStatus` method.\n *\n * It returns an object containing useful information about the client.\n */\nexport type GetClientStatusResult = { locked: boolean };\n"],"names":[],"mappings":"AAAA;;;;CAIC"}
@@ -6,6 +6,7 @@ _export_star(require("./dialog"), exports);
6
6
  _export_star(require("./get-bip32-entropy"), exports);
7
7
  _export_star(require("./get-bip32-public-key"), exports);
8
8
  _export_star(require("./get-bip44-entropy"), exports);
9
+ _export_star(require("./get-client-status"), exports);
9
10
  _export_star(require("./get-entropy"), exports);
10
11
  _export_star(require("./get-file"), exports);
11
12
  _export_star(require("./get-locale"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/types/methods/index.ts"],"sourcesContent":["export * from './dialog';\nexport * from './get-bip32-entropy';\nexport * from './get-bip32-public-key';\nexport * from './get-bip44-entropy';\nexport * from './get-entropy';\nexport * from './get-file';\nexport * from './get-locale';\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';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
1
+ {"version":3,"sources":["../../../../src/types/methods/index.ts"],"sourcesContent":["export * 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-locale';\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';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ui/components/copyable.ts"],"sourcesContent":["import {\n assign,\n boolean,\n literal,\n object,\n optional,\n string,\n} from 'superstruct';\n\nimport { createBuilder } from '../builder';\nimport { LiteralStruct, NodeType } from '../nodes';\nimport type { Literal } from '../nodes';\n\n/**\n * Text that can be copied to the clipboard. It can optionally be marked as\n * sensitive, in which case it will only be displayed to the user after clicking\n * on the component.\n *\n * @property type - The type of the node. Must be the string `copyable`.\n * @property value - The text to be copied.\n * @property sensitive - Whether the value is sensitive or not. Sensitive values\n * are only displayed to the user after clicking on the component. Defaults to\n * false.\n */\nexport type Copyable = Literal & {\n type: NodeType.Copyable;\n value: string;\n};\n\nexport const CopyableStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Copyable),\n value: string(),\n sensitive: optional(boolean()),\n }),\n);\n\n/**\n * Create a {@link Copyable} component.\n *\n * @param args - The node arguments. This can either be a string, or an object\n * with the `text` property.\n * @param args.value - The text to be copied.\n * @param args.sensitive - Whether the value is sensitive or not. Sensitive\n * values are only displayed to the user after clicking on the component.\n * Defaults to false.\n * @returns A {@link Copyable} component.\n * @example\n * const node = copyable('Hello, world!');\n * const node = copyable({ value: 'Hello, world!' });\n */\nexport const copyable = createBuilder(NodeType.Copyable, CopyableStruct, [\n 'value',\n 'sensitive',\n]);\n"],"names":["CopyableStruct","copyable","assign","LiteralStruct","object","type","literal","NodeType","Copyable","value","string","sensitive","optional","boolean","createBuilder"],"mappings":";;;;;;;;;;;IA6BaA,cAAc;eAAdA;;IAuBAC,QAAQ;eAARA;;;6BA7CN;yBAEuB;uBACU;AAmBjC,MAAMD,iBAAiBE,IAAAA,mBAAM,EAClCC,oBAAa,EACbC,IAAAA,mBAAM,EAAC;IACLC,MAAMC,IAAAA,oBAAO,EAACC,eAAQ,CAACC,QAAQ;IAC/BC,OAAOC,IAAAA,mBAAM;IACbC,WAAWC,IAAAA,qBAAQ,EAACC,IAAAA,oBAAO;AAC7B;AAiBK,MAAMZ,WAAWa,IAAAA,sBAAa,EAACP,eAAQ,CAACC,QAAQ,EAAER,gBAAgB;IACvE;IACA;CACD"}
1
+ {"version":3,"sources":["../../../../src/ui/components/copyable.ts"],"sourcesContent":["import type { Infer } from 'superstruct';\nimport {\n assign,\n boolean,\n literal,\n object,\n optional,\n string,\n} from 'superstruct';\n\nimport { createBuilder } from '../builder';\nimport { LiteralStruct, NodeType } from '../nodes';\n\nexport const CopyableStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Copyable),\n value: string(),\n sensitive: optional(boolean()),\n }),\n);\n\n/**\n * Text that can be copied to the clipboard. It can optionally be marked as\n * sensitive, in which case it will only be displayed to the user after clicking\n * on the component.\n *\n * @property type - The type of the node. Must be the string `copyable`.\n * @property value - The text to be copied.\n * @property sensitive - Whether the value is sensitive or not. Sensitive values\n * are only displayed to the user after clicking on the component. Defaults to\n * false.\n */\nexport type Copyable = Infer<typeof CopyableStruct>;\n\n/**\n * Create a {@link Copyable} component.\n *\n * @param args - The node arguments. This can either be a string, or an object\n * with the `text` property.\n * @param args.value - The text to be copied.\n * @param args.sensitive - Whether the value is sensitive or not. Sensitive\n * values are only displayed to the user after clicking on the component.\n * Defaults to false.\n * @returns A {@link Copyable} component.\n * @example\n * const node = copyable('Hello, world!');\n * const node = copyable({ value: 'Hello, world!' });\n */\nexport const copyable = createBuilder(NodeType.Copyable, CopyableStruct, [\n 'value',\n 'sensitive',\n]);\n"],"names":["CopyableStruct","copyable","assign","LiteralStruct","object","type","literal","NodeType","Copyable","value","string","sensitive","optional","boolean","createBuilder"],"mappings":";;;;;;;;;;;IAaaA,cAAc;eAAdA;;IAoCAC,QAAQ;eAARA;;;6BAzCN;yBAEuB;uBACU;AAEjC,MAAMD,iBAAiBE,IAAAA,mBAAM,EAClCC,oBAAa,EACbC,IAAAA,mBAAM,EAAC;IACLC,MAAMC,IAAAA,oBAAO,EAACC,eAAQ,CAACC,QAAQ;IAC/BC,OAAOC,IAAAA,mBAAM;IACbC,WAAWC,IAAAA,qBAAQ,EAACC,IAAAA,oBAAO;AAC7B;AA8BK,MAAMZ,WAAWa,IAAAA,sBAAa,EAACP,eAAQ,CAACC,QAAQ,EAAER,gBAAgB;IACvE;IACA;CACD"}
@@ -5,5 +5,6 @@ export * from './lifecycle';
5
5
  export * from './name-lookup';
6
6
  export * from './rpc-request';
7
7
  export * from './transaction';
8
+ export * from './signature';
8
9
 
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/types/handlers/index.ts"],"sourcesContent":["export * from './cronjob';\nexport * from './home-page';\nexport * from './keyring';\nexport * from './lifecycle';\nexport * from './name-lookup';\nexport * from './rpc-request';\nexport * from './transaction';\n"],"names":[],"mappings":"AAAA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB"}
1
+ {"version":3,"sources":["../../../../src/types/handlers/index.ts"],"sourcesContent":["export * from './cronjob';\nexport * from './home-page';\nexport * from './keyring';\nexport * from './lifecycle';\nexport * from './name-lookup';\nexport * from './rpc-request';\nexport * from './transaction';\nexport * from './signature';\n"],"names":[],"mappings":"AAAA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,cAAc"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/types/handlers/signature.ts"],"sourcesContent":["import type { EnumToUnion } from '../../internals';\nimport type { Component } from '../../ui';\nimport type { SeverityLevel } from './transaction';\n\n/**\n * An eth_sign signature object.\n *\n * @property from - The address the signature is being sent from.\n * @property data - The data (hex string) that is being signed.\n * @property signatureMethod - The signature method, which in this case is eth_sign\n */\nexport type EthSignature = {\n from: string;\n data: string;\n signatureMethod: 'eth_sign';\n};\n\n/**\n * A personal_sign signature object.\n *\n * @property from - The address the signature is being sent from.\n * @property data - The data (hex string) that is being signed.\n * @property signatureMethod - The signature method, which in this case is personal_sign\n */\nexport type PersonalSignature = {\n from: string;\n data: string;\n signatureMethod: 'personal_sign';\n};\n\n/**\n * An eth_signTypedData signature object.\n *\n * @property from - The address the signature is being sent from.\n * @property data - The data that is being signed.\n * @property signatureMethod - The signature method, which in this case is eth_signTypedData\n */\nexport type SignTypedDataSignature = {\n from: string;\n data: Record<string, any>[];\n signatureMethod: 'eth_signTypedData';\n};\n\n/**\n * An eth_signTypedData_v3 signature object.\n *\n * @property from - The address the signature is being sent from.\n * @property data - The data that is being signed.\n * @property signatureMethod - The signature method, which in this case is eth_signTypedData_v3\n */\nexport type SignTypedDataV3Signature = {\n from: string;\n data: Record<string, any>;\n signatureMethod: 'eth_signTypedData_v3';\n};\n\n/**\n * An eth_signTypedData_v4 signature object.\n *\n * @property from - The address the signature is being sent from.\n * @property data - The data that is being signed.\n * @property signatureMethod - The signature method, which in this case is eth_signTypedData_v4\n */\nexport type SignTypedDataV4Signature = {\n from: string;\n data: Record<string, any>;\n signatureMethod: 'eth_signTypedData_v4';\n};\n\n/**\n * A signature object. This can be one of the below signature methods.\n *\n * @see EthSignature\n * @see PersonalSignature\n * @see SignTypedDataSignature\n * @see SignTypedDataV3Signature\n * @see SignTypedDataV4Signature\n */\nexport type Signature =\n | EthSignature\n | PersonalSignature\n | SignTypedDataSignature\n | SignTypedDataV3Signature\n | SignTypedDataV4Signature;\n\n/**\n * The `onSignature` handler. This is called whenever a signature is\n * submitted to the snap. It can return insights about the signature, which\n * will be displayed to the user.\n *\n * Note that using this handler requires the `endowment:signature-insight`\n * permission.\n *\n * @param args - The request arguments.\n * @param args.signature - The signature object that contains the from address,\n * data and signature method.\n * @param args.signatureOrigin - The origin of the signature. This is the\n * URL of the website that submitted the signature. This is only available if\n * the Snap has enabled the `allowSignatureOrigin` option in the\n * `endowment:signature-insight` permission.\n * @returns An object containing insights about the signature. See\n * {@link OnSignatureResponse}. Can also return `null` if no insights are\n * available.\n */\nexport type OnSignatureHandler = (args: {\n signature: Signature;\n signatureOrigin?: string;\n}) => Promise<OnSignatureResponse | null>;\n\n/**\n * The response from a Snap's `onSignature` handler.\n *\n * @property component - A custom UI component, that will be shown in MetaMask.\n * @property severity - The severity level of the content. Currently only one\n * level is supported: `critical`.\n */\nexport type OnSignatureResponse = {\n content: Component;\n severity?: EnumToUnion<SeverityLevel>;\n};\n"],"names":[],"mappings":"AAAA,WAuHE"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The request parameters for the `snap_getClientStatus` method.
3
+ *
4
+ * This method does not accept any parameters.
5
+ */ export { };
6
+
7
+ //# sourceMappingURL=get-client-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/types/methods/get-client-status.ts"],"sourcesContent":["/**\n * The request parameters for the `snap_getClientStatus` method.\n *\n * This method does not accept any parameters.\n */\nexport type GetClientStatusParams = never;\n\n/**\n * The result returned by the `snap_getClientStatus` method.\n *\n * It returns an object containing useful information about the client.\n */\nexport type GetClientStatusResult = { locked: boolean };\n"],"names":[],"mappings":"AAAA;;;;CAIC,GACD,WAOwD"}
@@ -2,6 +2,7 @@ export * from './dialog';
2
2
  export * from './get-bip32-entropy';
3
3
  export * from './get-bip32-public-key';
4
4
  export * from './get-bip44-entropy';
5
+ export * from './get-client-status';
5
6
  export * from './get-entropy';
6
7
  export * from './get-file';
7
8
  export * from './get-locale';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/types/methods/index.ts"],"sourcesContent":["export * from './dialog';\nexport * from './get-bip32-entropy';\nexport * from './get-bip32-public-key';\nexport * from './get-bip44-entropy';\nexport * from './get-entropy';\nexport * from './get-file';\nexport * from './get-locale';\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';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,cAAc,kBAAkB"}
1
+ {"version":3,"sources":["../../../../src/types/methods/index.ts"],"sourcesContent":["export * 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-locale';\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';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,cAAc,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/types/methods/methods.ts"],"sourcesContent":["import type { Method } from '../../internals';\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 { GetEntropyParams, GetEntropyResult } from './get-entropy';\nimport type { GetFileParams, GetFileResult } from './get-file';\nimport type { GetLocaleParams, GetLocaleResult } from './get-locale';\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';\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_getEntropy: [GetEntropyParams, GetEntropyResult];\n snap_getFile: [GetFileParams, GetFileResult];\n snap_getLocale: [GetLocaleParams, GetLocaleResult];\n snap_manageAccounts: [ManageAccountsParams, ManageAccountsResult];\n snap_manageState: [ManageStateParams, ManageStateResult];\n snap_notify: [NotifyParams, NotifyResult];\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"],"names":[],"mappings":"AAAA,WAkFyC"}
1
+ {"version":3,"sources":["../../../../src/types/methods/methods.ts"],"sourcesContent":["import type { Method } from '../../internals';\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 { GetEntropyParams, GetEntropyResult } from './get-entropy';\nimport type { GetFileParams, GetFileResult } from './get-file';\nimport type { GetLocaleParams, GetLocaleResult } from './get-locale';\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';\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_getEntropy: [GetEntropyParams, GetEntropyResult];\n snap_getFile: [GetFileParams, GetFileResult];\n snap_getLocale: [GetLocaleParams, GetLocaleResult];\n snap_manageAccounts: [ManageAccountsParams, ManageAccountsResult];\n snap_manageState: [ManageStateParams, ManageStateResult];\n snap_notify: [NotifyParams, NotifyResult];\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"],"names":[],"mappings":"AAAA,WAuFyC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/permissions.ts"],"sourcesContent":["import 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 Bip32Entropy = {\n curve: 'secp256k1' | 'ed25519';\n path: string[];\n};\n\nexport type Bip44Entropy = {\n coinType: number;\n};\n\nexport type RequestedSnap = {\n version?: string;\n};\n\nexport type InitialPermissions = {\n 'endowment:cronjob'?: {\n jobs: Cronjob[];\n };\n 'endowment:keyring'?: {\n allowedOrigins?: string[];\n };\n 'endowment:name-lookup'?: ChainId[];\n 'endowment:network-access'?: EmptyObject;\n 'endowment:rpc'?: {\n dapps?: boolean;\n snaps?: boolean;\n allowedOrigins?: string[];\n };\n 'endowment:transaction-insight'?: {\n allowTransactionOrigin?: boolean;\n };\n 'endowment:webassembly'?: EmptyObject;\n\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_confirm?: EmptyObject;\n snap_dialog?: EmptyObject;\n snap_getBip32Entropy?: Bip32Entropy[];\n snap_getBip32PublicKey?: Bip32Entropy[];\n snap_getBip44Entropy?: Bip44Entropy[];\n snap_getEntropy?: 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"],"names":[],"mappings":"AAAA,WAuDE"}
1
+ {"version":3,"sources":["../../../src/types/permissions.ts"],"sourcesContent":["import 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 Bip32Entropy = {\n curve: 'secp256k1' | 'ed25519';\n path: string[];\n};\n\nexport type Bip44Entropy = {\n coinType: number;\n};\n\nexport type RequestedSnap = {\n version?: string;\n};\n\nexport type InitialPermissions = {\n 'endowment:cronjob'?: {\n jobs: Cronjob[];\n };\n 'endowment:keyring'?: {\n allowedOrigins?: string[];\n };\n 'endowment:name-lookup'?: ChainId[];\n 'endowment:network-access'?: EmptyObject;\n 'endowment:rpc'?: {\n dapps?: boolean;\n snaps?: boolean;\n allowedOrigins?: string[];\n };\n 'endowment:signature-insight'?: {\n allowSignatureOrigin?: boolean;\n };\n 'endowment:transaction-insight'?: {\n allowTransactionOrigin?: boolean;\n };\n 'endowment:webassembly'?: EmptyObject;\n\n /* eslint-disable @typescript-eslint/naming-convention */\n snap_confirm?: EmptyObject;\n snap_dialog?: EmptyObject;\n snap_getBip32Entropy?: Bip32Entropy[];\n snap_getBip32PublicKey?: Bip32Entropy[];\n snap_getBip44Entropy?: Bip44Entropy[];\n snap_getEntropy?: 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"],"names":[],"mappings":"AAAA,WA0DE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/ui/components/copyable.ts"],"sourcesContent":["import {\n assign,\n boolean,\n literal,\n object,\n optional,\n string,\n} from 'superstruct';\n\nimport { createBuilder } from '../builder';\nimport { LiteralStruct, NodeType } from '../nodes';\nimport type { Literal } from '../nodes';\n\n/**\n * Text that can be copied to the clipboard. It can optionally be marked as\n * sensitive, in which case it will only be displayed to the user after clicking\n * on the component.\n *\n * @property type - The type of the node. Must be the string `copyable`.\n * @property value - The text to be copied.\n * @property sensitive - Whether the value is sensitive or not. Sensitive values\n * are only displayed to the user after clicking on the component. Defaults to\n * false.\n */\nexport type Copyable = Literal & {\n type: NodeType.Copyable;\n value: string;\n};\n\nexport const CopyableStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Copyable),\n value: string(),\n sensitive: optional(boolean()),\n }),\n);\n\n/**\n * Create a {@link Copyable} component.\n *\n * @param args - The node arguments. This can either be a string, or an object\n * with the `text` property.\n * @param args.value - The text to be copied.\n * @param args.sensitive - Whether the value is sensitive or not. Sensitive\n * values are only displayed to the user after clicking on the component.\n * Defaults to false.\n * @returns A {@link Copyable} component.\n * @example\n * const node = copyable('Hello, world!');\n * const node = copyable({ value: 'Hello, world!' });\n */\nexport const copyable = createBuilder(NodeType.Copyable, CopyableStruct, [\n 'value',\n 'sensitive',\n]);\n"],"names":["assign","boolean","literal","object","optional","string","createBuilder","LiteralStruct","NodeType","CopyableStruct","type","Copyable","value","sensitive","copyable"],"mappings":"AAAA,SACEA,MAAM,EACNC,OAAO,EACPC,OAAO,EACPC,MAAM,EACNC,QAAQ,EACRC,MAAM,QACD,cAAc;AAErB,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,aAAa,EAAEC,QAAQ,QAAQ,WAAW;AAmBnD,OAAO,MAAMC,iBAAiBT,OAC5BO,eACAJ,OAAO;IACLO,MAAMR,QAAQM,SAASG,QAAQ;IAC/BC,OAAOP;IACPQ,WAAWT,SAASH;AACtB,IACA;AAEF;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMa,WAAWR,cAAcE,SAASG,QAAQ,EAAEF,gBAAgB;IACvE;IACA;CACD,EAAE"}
1
+ {"version":3,"sources":["../../../../src/ui/components/copyable.ts"],"sourcesContent":["import type { Infer } from 'superstruct';\nimport {\n assign,\n boolean,\n literal,\n object,\n optional,\n string,\n} from 'superstruct';\n\nimport { createBuilder } from '../builder';\nimport { LiteralStruct, NodeType } from '../nodes';\n\nexport const CopyableStruct = assign(\n LiteralStruct,\n object({\n type: literal(NodeType.Copyable),\n value: string(),\n sensitive: optional(boolean()),\n }),\n);\n\n/**\n * Text that can be copied to the clipboard. It can optionally be marked as\n * sensitive, in which case it will only be displayed to the user after clicking\n * on the component.\n *\n * @property type - The type of the node. Must be the string `copyable`.\n * @property value - The text to be copied.\n * @property sensitive - Whether the value is sensitive or not. Sensitive values\n * are only displayed to the user after clicking on the component. Defaults to\n * false.\n */\nexport type Copyable = Infer<typeof CopyableStruct>;\n\n/**\n * Create a {@link Copyable} component.\n *\n * @param args - The node arguments. This can either be a string, or an object\n * with the `text` property.\n * @param args.value - The text to be copied.\n * @param args.sensitive - Whether the value is sensitive or not. Sensitive\n * values are only displayed to the user after clicking on the component.\n * Defaults to false.\n * @returns A {@link Copyable} component.\n * @example\n * const node = copyable('Hello, world!');\n * const node = copyable({ value: 'Hello, world!' });\n */\nexport const copyable = createBuilder(NodeType.Copyable, CopyableStruct, [\n 'value',\n 'sensitive',\n]);\n"],"names":["assign","boolean","literal","object","optional","string","createBuilder","LiteralStruct","NodeType","CopyableStruct","type","Copyable","value","sensitive","copyable"],"mappings":"AACA,SACEA,MAAM,EACNC,OAAO,EACPC,OAAO,EACPC,MAAM,EACNC,QAAQ,EACRC,MAAM,QACD,cAAc;AAErB,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,aAAa,EAAEC,QAAQ,QAAQ,WAAW;AAEnD,OAAO,MAAMC,iBAAiBT,OAC5BO,eACAJ,OAAO;IACLO,MAAMR,QAAQM,SAASG,QAAQ;IAC/BC,OAAOP;IACPQ,WAAWT,SAASH;AACtB,IACA;AAeF;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMa,WAAWR,cAAcE,SAASG,QAAQ,EAAEF,gBAAgB;IACvE;IACA;CACD,EAAE"}
@@ -5,3 +5,4 @@ export * from './lifecycle';
5
5
  export * from './name-lookup';
6
6
  export * from './rpc-request';
7
7
  export * from './transaction';
8
+ export * from './signature';
@@ -0,0 +1,107 @@
1
+ import type { EnumToUnion } from '../../internals';
2
+ import type { Component } from '../../ui';
3
+ import type { SeverityLevel } from './transaction';
4
+ /**
5
+ * An eth_sign signature object.
6
+ *
7
+ * @property from - The address the signature is being sent from.
8
+ * @property data - The data (hex string) that is being signed.
9
+ * @property signatureMethod - The signature method, which in this case is eth_sign
10
+ */
11
+ export declare type EthSignature = {
12
+ from: string;
13
+ data: string;
14
+ signatureMethod: 'eth_sign';
15
+ };
16
+ /**
17
+ * A personal_sign signature object.
18
+ *
19
+ * @property from - The address the signature is being sent from.
20
+ * @property data - The data (hex string) that is being signed.
21
+ * @property signatureMethod - The signature method, which in this case is personal_sign
22
+ */
23
+ export declare type PersonalSignature = {
24
+ from: string;
25
+ data: string;
26
+ signatureMethod: 'personal_sign';
27
+ };
28
+ /**
29
+ * An eth_signTypedData signature object.
30
+ *
31
+ * @property from - The address the signature is being sent from.
32
+ * @property data - The data that is being signed.
33
+ * @property signatureMethod - The signature method, which in this case is eth_signTypedData
34
+ */
35
+ export declare type SignTypedDataSignature = {
36
+ from: string;
37
+ data: Record<string, any>[];
38
+ signatureMethod: 'eth_signTypedData';
39
+ };
40
+ /**
41
+ * An eth_signTypedData_v3 signature object.
42
+ *
43
+ * @property from - The address the signature is being sent from.
44
+ * @property data - The data that is being signed.
45
+ * @property signatureMethod - The signature method, which in this case is eth_signTypedData_v3
46
+ */
47
+ export declare type SignTypedDataV3Signature = {
48
+ from: string;
49
+ data: Record<string, any>;
50
+ signatureMethod: 'eth_signTypedData_v3';
51
+ };
52
+ /**
53
+ * An eth_signTypedData_v4 signature object.
54
+ *
55
+ * @property from - The address the signature is being sent from.
56
+ * @property data - The data that is being signed.
57
+ * @property signatureMethod - The signature method, which in this case is eth_signTypedData_v4
58
+ */
59
+ export declare type SignTypedDataV4Signature = {
60
+ from: string;
61
+ data: Record<string, any>;
62
+ signatureMethod: 'eth_signTypedData_v4';
63
+ };
64
+ /**
65
+ * A signature object. This can be one of the below signature methods.
66
+ *
67
+ * @see EthSignature
68
+ * @see PersonalSignature
69
+ * @see SignTypedDataSignature
70
+ * @see SignTypedDataV3Signature
71
+ * @see SignTypedDataV4Signature
72
+ */
73
+ export declare type Signature = EthSignature | PersonalSignature | SignTypedDataSignature | SignTypedDataV3Signature | SignTypedDataV4Signature;
74
+ /**
75
+ * The `onSignature` handler. This is called whenever a signature is
76
+ * submitted to the snap. It can return insights about the signature, which
77
+ * will be displayed to the user.
78
+ *
79
+ * Note that using this handler requires the `endowment:signature-insight`
80
+ * permission.
81
+ *
82
+ * @param args - The request arguments.
83
+ * @param args.signature - The signature object that contains the from address,
84
+ * data and signature method.
85
+ * @param args.signatureOrigin - The origin of the signature. This is the
86
+ * URL of the website that submitted the signature. This is only available if
87
+ * the Snap has enabled the `allowSignatureOrigin` option in the
88
+ * `endowment:signature-insight` permission.
89
+ * @returns An object containing insights about the signature. See
90
+ * {@link OnSignatureResponse}. Can also return `null` if no insights are
91
+ * available.
92
+ */
93
+ export declare type OnSignatureHandler = (args: {
94
+ signature: Signature;
95
+ signatureOrigin?: string;
96
+ }) => Promise<OnSignatureResponse | null>;
97
+ /**
98
+ * The response from a Snap's `onSignature` handler.
99
+ *
100
+ * @property component - A custom UI component, that will be shown in MetaMask.
101
+ * @property severity - The severity level of the content. Currently only one
102
+ * level is supported: `critical`.
103
+ */
104
+ export declare type OnSignatureResponse = {
105
+ content: Component;
106
+ severity?: EnumToUnion<SeverityLevel>;
107
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The request parameters for the `snap_getClientStatus` method.
3
+ *
4
+ * This method does not accept any parameters.
5
+ */
6
+ export declare type GetClientStatusParams = never;
7
+ /**
8
+ * The result returned by the `snap_getClientStatus` method.
9
+ *
10
+ * It returns an object containing useful information about the client.
11
+ */
12
+ export declare type GetClientStatusResult = {
13
+ locked: boolean;
14
+ };
@@ -2,6 +2,7 @@ export * from './dialog';
2
2
  export * from './get-bip32-entropy';
3
3
  export * from './get-bip32-public-key';
4
4
  export * from './get-bip44-entropy';
5
+ export * from './get-client-status';
5
6
  export * from './get-entropy';
6
7
  export * from './get-file';
7
8
  export * from './get-locale';
@@ -3,6 +3,7 @@ import type { DialogParams, DialogResult } from './dialog';
3
3
  import type { GetBip32EntropyParams, GetBip32EntropyResult } from './get-bip32-entropy';
4
4
  import type { GetBip32PublicKeyParams, GetBip32PublicKeyResult } from './get-bip32-public-key';
5
5
  import type { GetBip44EntropyParams, GetBip44EntropyResult } from './get-bip44-entropy';
6
+ import type { GetClientStatusParams, GetClientStatusResult } from './get-client-status';
6
7
  import type { GetEntropyParams, GetEntropyResult } from './get-entropy';
7
8
  import type { GetFileParams, GetFileResult } from './get-file';
8
9
  import type { GetLocaleParams, GetLocaleResult } from './get-locale';
@@ -22,6 +23,7 @@ export declare type SnapMethods = {
22
23
  snap_getBip32Entropy: [GetBip32EntropyParams, GetBip32EntropyResult];
23
24
  snap_getBip32PublicKey: [GetBip32PublicKeyParams, GetBip32PublicKeyResult];
24
25
  snap_getBip44Entropy: [GetBip44EntropyParams, GetBip44EntropyResult];
26
+ snap_getClientStatus: [GetClientStatusParams, GetClientStatusResult];
25
27
  snap_getEntropy: [GetEntropyParams, GetEntropyResult];
26
28
  snap_getFile: [GetFileParams, GetFileResult];
27
29
  snap_getLocale: [GetLocaleParams, GetLocaleResult];
@@ -29,6 +29,9 @@ export declare type InitialPermissions = {
29
29
  snaps?: boolean;
30
30
  allowedOrigins?: string[];
31
31
  };
32
+ 'endowment:signature-insight'?: {
33
+ allowSignatureOrigin?: boolean;
34
+ };
32
35
  'endowment:transaction-insight'?: {
33
36
  allowTransactionOrigin?: boolean;
34
37
  };
@@ -1,5 +1,14 @@
1
+ import type { Infer } from 'superstruct';
1
2
  import { NodeType } from '../nodes';
2
- import type { Literal } from '../nodes';
3
+ export declare const CopyableStruct: import("superstruct").Struct<{
4
+ value: string;
5
+ type: NodeType.Copyable;
6
+ sensitive?: boolean | undefined;
7
+ }, {
8
+ type: import("superstruct").Struct<NodeType.Copyable, NodeType.Copyable>;
9
+ value: import("superstruct").Struct<string, null>;
10
+ sensitive: import("superstruct").Struct<boolean | undefined, null>;
11
+ }>;
3
12
  /**
4
13
  * Text that can be copied to the clipboard. It can optionally be marked as
5
14
  * sensitive, in which case it will only be displayed to the user after clicking
@@ -11,19 +20,7 @@ import type { Literal } from '../nodes';
11
20
  * are only displayed to the user after clicking on the component. Defaults to
12
21
  * false.
13
22
  */
14
- export declare type Copyable = Literal & {
15
- type: NodeType.Copyable;
16
- value: string;
17
- };
18
- export declare const CopyableStruct: import("superstruct").Struct<{
19
- value: string;
20
- type: NodeType.Copyable;
21
- sensitive?: boolean | undefined;
22
- }, {
23
- type: import("superstruct").Struct<NodeType.Copyable, NodeType.Copyable>;
24
- value: import("superstruct").Struct<string, null>;
25
- sensitive: import("superstruct").Struct<boolean | undefined, null>;
26
- }>;
23
+ export declare type Copyable = Infer<typeof CopyableStruct>;
27
24
  /**
28
25
  * Create a {@link Copyable} component.
29
26
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-sdk",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/MetaMask/snaps.git"
@@ -38,13 +38,13 @@
38
38
  "@metamask/key-tree": "^9.0.0",
39
39
  "@metamask/providers": "^14.0.2",
40
40
  "@metamask/rpc-errors": "^6.1.0",
41
- "@metamask/utils": "^8.2.1",
41
+ "@metamask/utils": "^8.3.0",
42
42
  "is-svg": "^4.4.0",
43
43
  "superstruct": "^1.0.3"
44
44
  },
45
45
  "devDependencies": {
46
- "@lavamoat/allow-scripts": "^2.5.1",
47
- "@metamask/auto-changelog": "^3.4.3",
46
+ "@lavamoat/allow-scripts": "^3.0.0",
47
+ "@metamask/auto-changelog": "^3.4.4",
48
48
  "@metamask/eslint-config": "^12.1.0",
49
49
  "@metamask/eslint-config-jest": "^12.1.0",
50
50
  "@metamask/eslint-config-nodejs": "^12.1.0",