@metamask-previews/signature-controller 36.0.0-preview-afa0dd61 → 36.0.0-preview-20df3e99

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Changed
11
+
12
+ - Permit string `id` values in `OriginalRequest` type ([#7065](https://github.com/MetaMask/core/pull/7065))
13
+ - Previously, only number values were permitted for the `id` property.
14
+
10
15
  ## [36.0.0]
11
16
 
12
17
  ### Changed
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,2CAA8B,CAAA;IAC9B,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;AAC1C,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,iDAAiD;AACjD,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;IACnB,mDAAyB,CAAA;IACzB,6CAAmB,CAAA;IACnB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAuLD,qCAAqC;AACrC,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,mDAAyB,CAAA;IACzB,2CAAiB,CAAA;IACjB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAED,4CAA4C;AAC5C,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,sDAA8B,CAAA;IAC9B,uDAA+B,CAAA;AACjC,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\nimport type { DecodedPermission } from '@metamask/gator-permissions-controller';\nimport type { SignTypedDataVersion } from '@metamask/keyring-controller';\nimport type { Hex, Json } from '@metamask/utils';\n\n/**\n * Supported signature methods.\n */\nexport enum EthMethod {\n PersonalSign = 'personal_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n}\n\n/** Different decoding data state change types */\nexport enum DecodingDataChangeType {\n Receive = 'RECEIVE',\n Transfer = 'TRANSFER',\n Approve = 'APPROVE',\n Revoke = 'REVOKE_APPROVE',\n Bidding = 'BIDDING',\n Listing = 'LISTING',\n}\n\n/** Original client request that triggered the signature request. */\nexport type OriginalRequest = {\n /** Unique ID to identify the client request. */\n id?: number;\n\n /** Method of signature request */\n method?: string;\n\n /** ID of the network client associated with the request. */\n networkClientId?: string;\n\n /** Source of the client request. */\n origin?: string;\n\n /** Parameters in signature request */\n params: string[];\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n};\n\n/** Options for signing typed data. */\nexport type TypedSigningOptions = {\n /** Whether to automatically convert JSON string data to an object. */\n parseJsonData: boolean;\n};\n\n/** The message parameters that were requested to be signed. */\nexport type MessageParams = {\n /** Whether to delay marking the request as signed until a signature is provided via `setDeferredSignSuccess`. */\n deferSetAsSigned?: boolean;\n\n /** Ethereum address to sign with. */\n from: string;\n\n /** ID of the associated signature request. */\n metamaskId?: string;\n\n /**\n * Source of the request.\n * Such as a hostname of a dApp.\n */\n origin?: string;\n\n /**\n * ID of the request that triggered this signature request.\n */\n requestId?: number;\n};\n\nexport type StateSIWEMessage = Omit<SIWEMessage, 'parsedMessage'> & {\n parsedMessage: Omit<SIWEMessage['parsedMessage'], 'constructor'>;\n};\n\n/** Personal message parameters that were requested to be signed. */\nexport type MessageParamsPersonal = MessageParams & {\n /** Hexadecimal data to sign. */\n data: string;\n\n /** Sign-In With Ethereum data extracted from the data. */\n siwe?: StateSIWEMessage;\n};\n\n/** Typed data used in the signTypedData request. */\nexport type MessageParamsTypedData = {\n types: Record<string, Json>;\n domain: Record<string, Json>;\n primaryType: string;\n message: Json;\n};\n\n/** Metadata use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type ExecutionPermissionMetadata = {\n origin: string;\n justification: string;\n};\n\n/** Typed data use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type MessageParamsTypedDataWithMetadata = MessageParamsTypedData & {\n metadata: ExecutionPermissionMetadata;\n};\n\n/** Typed message parameters that were requested to be signed. */\nexport type MessageParamsTyped = MessageParams & {\n /** Structured data to sign. */\n data: Record<string, Json>[] | string | MessageParamsTypedData;\n /** Version of the signTypedData request. */\n version?: string;\n};\n\n/** Information about a single state change returned by decoding api. */\nexport type DecodingDataStateChange = {\n assetType: string;\n changeType: (typeof DecodingDataChangeType)[keyof typeof DecodingDataChangeType];\n address: string;\n amount: string;\n contractAddress: string;\n tokenID?: string;\n};\n\n/** Array of the various state changes returned by decoding api. */\nexport type DecodingDataStateChanges = DecodingDataStateChange[];\n\n/** Error details for unfulfilled the decoding request. */\nexport type DecodingDataError = {\n message: string;\n type: string;\n};\n\n/** Decoding data about typed sign V4 signature request. */\nexport type DecodingData = {\n stateChanges: DecodingDataStateChanges | null;\n error?: DecodingDataError;\n};\n\ntype SignatureRequestBase = {\n /** ID of the associated chain. */\n chainId: Hex;\n\n /** Response from message decoding api. */\n decodingData?: DecodingData;\n\n /** Whether decoding is in progress. */\n decodingLoading?: boolean;\n\n /** Decoded permission for the request if the signature is for an EIP-7715 execution permission. */\n decodedPermission?: DecodedPermission;\n\n /** Error message that occurred during the signing. */\n error?: string;\n\n /** Unique ID to identify this request. */\n id: string;\n\n /** Custom metadata stored with the request. */\n metadata?: Json;\n\n /** ID of the associated network client. */\n networkClientId: string;\n\n /** Signature hash resulting from the request. */\n rawSig?: string;\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n\n /** Options used for signing. */\n signingOptions?: TypedSigningOptions;\n\n /** Current status of the request. */\n status: string;\n\n /** Time the request was created. */\n time: number;\n\n /** Version of the signTypedData request. */\n version?: SignTypedDataVersion;\n};\n\n/** Legacy messages stored in the state. */\nexport type LegacyStateMessage = SignatureRequestBase & {\n /** Message parameters that were requested to be signed. */\n msgParams: MessageParamsPersonal | MessageParamsTyped;\n\n /** Type of the signature request. */\n type: string;\n};\n\n/** Metadata concerning a request to sign data. */\nexport type SignatureRequest = SignatureRequestBase &\n (\n | {\n messageParams: MessageParamsPersonal;\n type: SignatureRequestType.PersonalSign;\n }\n | {\n messageParams: MessageParamsTyped;\n type: SignatureRequestType.TypedSign;\n }\n );\n\n/** Status of a signature request. */\nexport enum SignatureRequestStatus {\n Unapproved = 'unapproved',\n Approved = 'approved',\n Rejected = 'rejected',\n InProgress = 'inProgress',\n Signed = 'signed',\n Errored = 'errored',\n}\n\n/** Type of supported signature requests. */\nexport enum SignatureRequestType {\n PersonalSign = 'personal_sign',\n TypedSign = 'eth_signTypedData',\n}\n"]}
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,2CAA8B,CAAA;IAC9B,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;AAC1C,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,iDAAiD;AACjD,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;IACnB,mDAAyB,CAAA;IACzB,6CAAmB,CAAA;IACnB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAuLD,qCAAqC;AACrC,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,mDAAyB,CAAA;IACzB,2CAAiB,CAAA;IACjB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAED,4CAA4C;AAC5C,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,sDAA8B,CAAA;IAC9B,uDAA+B,CAAA;AACjC,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\nimport type { DecodedPermission } from '@metamask/gator-permissions-controller';\nimport type { SignTypedDataVersion } from '@metamask/keyring-controller';\nimport type { Hex, Json } from '@metamask/utils';\n\n/**\n * Supported signature methods.\n */\nexport enum EthMethod {\n PersonalSign = 'personal_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n}\n\n/** Different decoding data state change types */\nexport enum DecodingDataChangeType {\n Receive = 'RECEIVE',\n Transfer = 'TRANSFER',\n Approve = 'APPROVE',\n Revoke = 'REVOKE_APPROVE',\n Bidding = 'BIDDING',\n Listing = 'LISTING',\n}\n\n/** Original client request that triggered the signature request. */\nexport type OriginalRequest = {\n /** Unique ID to identify the client request. */\n id?: number | string;\n\n /** Method of signature request */\n method?: string;\n\n /** ID of the network client associated with the request. */\n networkClientId?: string;\n\n /** Source of the client request. */\n origin?: string;\n\n /** Parameters in signature request */\n params: string[];\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n};\n\n/** Options for signing typed data. */\nexport type TypedSigningOptions = {\n /** Whether to automatically convert JSON string data to an object. */\n parseJsonData: boolean;\n};\n\n/** The message parameters that were requested to be signed. */\nexport type MessageParams = {\n /** Whether to delay marking the request as signed until a signature is provided via `setDeferredSignSuccess`. */\n deferSetAsSigned?: boolean;\n\n /** Ethereum address to sign with. */\n from: string;\n\n /** ID of the associated signature request. */\n metamaskId?: string;\n\n /**\n * Source of the request.\n * Such as a hostname of a dApp.\n */\n origin?: string;\n\n /**\n * ID of the request that triggered this signature request.\n */\n requestId?: number;\n};\n\nexport type StateSIWEMessage = Omit<SIWEMessage, 'parsedMessage'> & {\n parsedMessage: Omit<SIWEMessage['parsedMessage'], 'constructor'>;\n};\n\n/** Personal message parameters that were requested to be signed. */\nexport type MessageParamsPersonal = MessageParams & {\n /** Hexadecimal data to sign. */\n data: string;\n\n /** Sign-In With Ethereum data extracted from the data. */\n siwe?: StateSIWEMessage;\n};\n\n/** Typed data used in the signTypedData request. */\nexport type MessageParamsTypedData = {\n types: Record<string, Json>;\n domain: Record<string, Json>;\n primaryType: string;\n message: Json;\n};\n\n/** Metadata use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type ExecutionPermissionMetadata = {\n origin: string;\n justification: string;\n};\n\n/** Typed data use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type MessageParamsTypedDataWithMetadata = MessageParamsTypedData & {\n metadata: ExecutionPermissionMetadata;\n};\n\n/** Typed message parameters that were requested to be signed. */\nexport type MessageParamsTyped = MessageParams & {\n /** Structured data to sign. */\n data: Record<string, Json>[] | string | MessageParamsTypedData;\n /** Version of the signTypedData request. */\n version?: string;\n};\n\n/** Information about a single state change returned by decoding api. */\nexport type DecodingDataStateChange = {\n assetType: string;\n changeType: (typeof DecodingDataChangeType)[keyof typeof DecodingDataChangeType];\n address: string;\n amount: string;\n contractAddress: string;\n tokenID?: string;\n};\n\n/** Array of the various state changes returned by decoding api. */\nexport type DecodingDataStateChanges = DecodingDataStateChange[];\n\n/** Error details for unfulfilled the decoding request. */\nexport type DecodingDataError = {\n message: string;\n type: string;\n};\n\n/** Decoding data about typed sign V4 signature request. */\nexport type DecodingData = {\n stateChanges: DecodingDataStateChanges | null;\n error?: DecodingDataError;\n};\n\ntype SignatureRequestBase = {\n /** ID of the associated chain. */\n chainId: Hex;\n\n /** Response from message decoding api. */\n decodingData?: DecodingData;\n\n /** Whether decoding is in progress. */\n decodingLoading?: boolean;\n\n /** Decoded permission for the request if the signature is for an EIP-7715 execution permission. */\n decodedPermission?: DecodedPermission;\n\n /** Error message that occurred during the signing. */\n error?: string;\n\n /** Unique ID to identify this request. */\n id: string;\n\n /** Custom metadata stored with the request. */\n metadata?: Json;\n\n /** ID of the associated network client. */\n networkClientId: string;\n\n /** Signature hash resulting from the request. */\n rawSig?: string;\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n\n /** Options used for signing. */\n signingOptions?: TypedSigningOptions;\n\n /** Current status of the request. */\n status: string;\n\n /** Time the request was created. */\n time: number;\n\n /** Version of the signTypedData request. */\n version?: SignTypedDataVersion;\n};\n\n/** Legacy messages stored in the state. */\nexport type LegacyStateMessage = SignatureRequestBase & {\n /** Message parameters that were requested to be signed. */\n msgParams: MessageParamsPersonal | MessageParamsTyped;\n\n /** Type of the signature request. */\n type: string;\n};\n\n/** Metadata concerning a request to sign data. */\nexport type SignatureRequest = SignatureRequestBase &\n (\n | {\n messageParams: MessageParamsPersonal;\n type: SignatureRequestType.PersonalSign;\n }\n | {\n messageParams: MessageParamsTyped;\n type: SignatureRequestType.TypedSign;\n }\n );\n\n/** Status of a signature request. */\nexport enum SignatureRequestStatus {\n Unapproved = 'unapproved',\n Approved = 'approved',\n Rejected = 'rejected',\n InProgress = 'inProgress',\n Signed = 'signed',\n Errored = 'errored',\n}\n\n/** Type of supported signature requests. */\nexport enum SignatureRequestType {\n PersonalSign = 'personal_sign',\n TypedSign = 'eth_signTypedData',\n}\n"]}
package/dist/types.d.cts CHANGED
@@ -24,7 +24,7 @@ export declare enum DecodingDataChangeType {
24
24
  /** Original client request that triggered the signature request. */
25
25
  export type OriginalRequest = {
26
26
  /** Unique ID to identify the client request. */
27
- id?: number;
27
+ id?: number | string;
28
28
  /** Method of signature request */
29
29
  method?: string;
30
30
  /** ID of the network client associated with the request. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mCAAmC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,+CAA+C;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,qCAAqC;AACzE,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,wBAAwB;AAEjD;;GAEG;AACH,oBAAY,SAAS;IACnB,YAAY,kBAAkB;IAC9B,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;CACzC;AAED,iDAAiD;AACjD,oBAAY,sBAAsB;IAChC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,mBAAmB;IACzB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG;IAC5B,gDAAgD;IAChD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,sCAAsC;IACtC,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,yDAAyD;IACzD,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CAC9C,CAAC;AAEF,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG;IAChC,sEAAsE;IACtE,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,aAAa,GAAG;IAC1B,iHAAiH;IACjH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B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BAAqB,CAAC;IACrC,IAAI,EAAE,oBAAoB,CAAC,YAAY,CAAC;CACzC,GACD;IACE,aAAa,EAAE,kBAAkB,CAAC;IAClC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC;CACtC,CACJ,CAAC;AAEJ,qCAAqC;AACrC,oBAAY,sBAAsB;IAChC,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,4CAA4C;AAC5C,oBAAY,oBAAoB;IAC9B,YAAY,kBAAkB;IAC9B,SAAS,sBAAsB;CAChC"}
package/dist/types.d.mts CHANGED
@@ -24,7 +24,7 @@ export declare enum DecodingDataChangeType {
24
24
  /** Original client request that triggered the signature request. */
25
25
  export type OriginalRequest = {
26
26
  /** Unique ID to identify the client request. */
27
- id?: number;
27
+ id?: number | string;
28
28
  /** Method of signature request */
29
29
  method?: string;
30
30
  /** ID of the network client associated with the request. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mCAAmC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,+CAA+C;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,qCAAqC;AACzE,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,wBAAwB;AAEjD;;GAEG;AACH,oBAAY,SAAS;IACnB,YAAY,kBAAkB;IAC9B,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;CACzC;AAED,iDAAiD;AACjD,oBAAY,sBAAsB;IAChC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,mBAAmB;IACzB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG;I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,KAAT,SAAS,QAMpB;AAED,iDAAiD;AACjD,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;IACnB,mDAAyB,CAAA;IACzB,6CAAmB,CAAA;IACnB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAuLD,qCAAqC;AACrC,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,mDAAyB,CAAA;IACzB,2CAAiB,CAAA;IACjB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAED,4CAA4C;AAC5C,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,sDAA8B,CAAA;IAC9B,uDAA+B,CAAA;AACjC,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\nimport type { DecodedPermission } from '@metamask/gator-permissions-controller';\nimport type { SignTypedDataVersion } from '@metamask/keyring-controller';\nimport type { Hex, Json } from '@metamask/utils';\n\n/**\n * Supported signature methods.\n */\nexport enum EthMethod {\n PersonalSign = 'personal_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n}\n\n/** Different decoding data state change types */\nexport enum DecodingDataChangeType {\n Receive = 'RECEIVE',\n Transfer = 'TRANSFER',\n Approve = 'APPROVE',\n Revoke = 'REVOKE_APPROVE',\n Bidding = 'BIDDING',\n Listing = 'LISTING',\n}\n\n/** Original client request that triggered the signature request. */\nexport type OriginalRequest = {\n /** Unique ID to identify the client request. */\n id?: number;\n\n /** Method of signature request */\n method?: string;\n\n /** ID of the network client associated with the request. */\n networkClientId?: string;\n\n /** Source of the client request. */\n origin?: string;\n\n /** Parameters in signature request */\n params: string[];\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n};\n\n/** Options for signing typed data. */\nexport type TypedSigningOptions = {\n /** Whether to automatically convert JSON string data to an object. */\n parseJsonData: boolean;\n};\n\n/** The message parameters that were requested to be signed. */\nexport type MessageParams = {\n /** Whether to delay marking the request as signed until a signature is provided via `setDeferredSignSuccess`. */\n deferSetAsSigned?: boolean;\n\n /** Ethereum address to sign with. */\n from: string;\n\n /** ID of the associated signature request. */\n metamaskId?: string;\n\n /**\n * Source of the request.\n * Such as a hostname of a dApp.\n */\n origin?: string;\n\n /**\n * ID of the request that triggered this signature request.\n */\n requestId?: number;\n};\n\nexport type StateSIWEMessage = Omit<SIWEMessage, 'parsedMessage'> & {\n parsedMessage: Omit<SIWEMessage['parsedMessage'], 'constructor'>;\n};\n\n/** Personal message parameters that were requested to be signed. */\nexport type MessageParamsPersonal = MessageParams & {\n /** Hexadecimal data to sign. */\n data: string;\n\n /** Sign-In With Ethereum data extracted from the data. */\n siwe?: StateSIWEMessage;\n};\n\n/** Typed data used in the signTypedData request. */\nexport type MessageParamsTypedData = {\n types: Record<string, Json>;\n domain: Record<string, Json>;\n primaryType: string;\n message: Json;\n};\n\n/** Metadata use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type ExecutionPermissionMetadata = {\n origin: string;\n justification: string;\n};\n\n/** Typed data use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type MessageParamsTypedDataWithMetadata = MessageParamsTypedData & {\n metadata: ExecutionPermissionMetadata;\n};\n\n/** Typed message parameters that were requested to be signed. */\nexport type MessageParamsTyped = MessageParams & {\n /** Structured data to sign. */\n data: Record<string, Json>[] | string | MessageParamsTypedData;\n /** Version of the signTypedData request. */\n version?: string;\n};\n\n/** Information about a single state change returned by decoding api. */\nexport type DecodingDataStateChange = {\n assetType: string;\n changeType: (typeof DecodingDataChangeType)[keyof typeof DecodingDataChangeType];\n address: string;\n amount: string;\n contractAddress: string;\n tokenID?: string;\n};\n\n/** Array of the various state changes returned by decoding api. */\nexport type DecodingDataStateChanges = DecodingDataStateChange[];\n\n/** Error details for unfulfilled the decoding request. */\nexport type DecodingDataError = {\n message: string;\n type: string;\n};\n\n/** Decoding data about typed sign V4 signature request. */\nexport type DecodingData = {\n stateChanges: DecodingDataStateChanges | null;\n error?: DecodingDataError;\n};\n\ntype SignatureRequestBase = {\n /** ID of the associated chain. */\n chainId: Hex;\n\n /** Response from message decoding api. */\n decodingData?: DecodingData;\n\n /** Whether decoding is in progress. */\n decodingLoading?: boolean;\n\n /** Decoded permission for the request if the signature is for an EIP-7715 execution permission. */\n decodedPermission?: DecodedPermission;\n\n /** Error message that occurred during the signing. */\n error?: string;\n\n /** Unique ID to identify this request. */\n id: string;\n\n /** Custom metadata stored with the request. */\n metadata?: Json;\n\n /** ID of the associated network client. */\n networkClientId: string;\n\n /** Signature hash resulting from the request. */\n rawSig?: string;\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n\n /** Options used for signing. */\n signingOptions?: TypedSigningOptions;\n\n /** Current status of the request. */\n status: string;\n\n /** Time the request was created. */\n time: number;\n\n /** Version of the signTypedData request. */\n version?: SignTypedDataVersion;\n};\n\n/** Legacy messages stored in the state. */\nexport type LegacyStateMessage = SignatureRequestBase & {\n /** Message parameters that were requested to be signed. */\n msgParams: MessageParamsPersonal | MessageParamsTyped;\n\n /** Type of the signature request. */\n type: string;\n};\n\n/** Metadata concerning a request to sign data. */\nexport type SignatureRequest = SignatureRequestBase &\n (\n | {\n messageParams: MessageParamsPersonal;\n type: SignatureRequestType.PersonalSign;\n }\n | {\n messageParams: MessageParamsTyped;\n type: SignatureRequestType.TypedSign;\n }\n );\n\n/** Status of a signature request. */\nexport enum SignatureRequestStatus {\n Unapproved = 'unapproved',\n Approved = 'approved',\n Rejected = 'rejected',\n InProgress = 'inProgress',\n Signed = 'signed',\n Errored = 'errored',\n}\n\n/** Type of supported signature requests. */\nexport enum SignatureRequestType {\n PersonalSign = 'personal_sign',\n TypedSign = 'eth_signTypedData',\n}\n"]}
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,2CAA8B,CAAA;IAC9B,oDAAuC,CAAA;IACvC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;IACxC,qDAAwC,CAAA;AAC1C,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB;AAED,iDAAiD;AACjD,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;IACnB,mDAAyB,CAAA;IACzB,6CAAmB,CAAA;IACnB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAuLD,qCAAqC;AACrC,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,+CAAqB,CAAA;IACrB,+CAAqB,CAAA;IACrB,mDAAyB,CAAA;IACzB,2CAAiB,CAAA;IACjB,6CAAmB,CAAA;AACrB,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAED,4CAA4C;AAC5C,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,sDAA8B,CAAA;IAC9B,uDAA+B,CAAA;AACjC,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\nimport type { DecodedPermission } from '@metamask/gator-permissions-controller';\nimport type { SignTypedDataVersion } from '@metamask/keyring-controller';\nimport type { Hex, Json } from '@metamask/utils';\n\n/**\n * Supported signature methods.\n */\nexport enum EthMethod {\n PersonalSign = 'personal_sign',\n SignTransaction = 'eth_signTransaction',\n SignTypedDataV1 = 'eth_signTypedData_v1',\n SignTypedDataV3 = 'eth_signTypedData_v3',\n SignTypedDataV4 = 'eth_signTypedData_v4',\n}\n\n/** Different decoding data state change types */\nexport enum DecodingDataChangeType {\n Receive = 'RECEIVE',\n Transfer = 'TRANSFER',\n Approve = 'APPROVE',\n Revoke = 'REVOKE_APPROVE',\n Bidding = 'BIDDING',\n Listing = 'LISTING',\n}\n\n/** Original client request that triggered the signature request. */\nexport type OriginalRequest = {\n /** Unique ID to identify the client request. */\n id?: number | string;\n\n /** Method of signature request */\n method?: string;\n\n /** ID of the network client associated with the request. */\n networkClientId?: string;\n\n /** Source of the client request. */\n origin?: string;\n\n /** Parameters in signature request */\n params: string[];\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n};\n\n/** Options for signing typed data. */\nexport type TypedSigningOptions = {\n /** Whether to automatically convert JSON string data to an object. */\n parseJsonData: boolean;\n};\n\n/** The message parameters that were requested to be signed. */\nexport type MessageParams = {\n /** Whether to delay marking the request as signed until a signature is provided via `setDeferredSignSuccess`. */\n deferSetAsSigned?: boolean;\n\n /** Ethereum address to sign with. */\n from: string;\n\n /** ID of the associated signature request. */\n metamaskId?: string;\n\n /**\n * Source of the request.\n * Such as a hostname of a dApp.\n */\n origin?: string;\n\n /**\n * ID of the request that triggered this signature request.\n */\n requestId?: number;\n};\n\nexport type StateSIWEMessage = Omit<SIWEMessage, 'parsedMessage'> & {\n parsedMessage: Omit<SIWEMessage['parsedMessage'], 'constructor'>;\n};\n\n/** Personal message parameters that were requested to be signed. */\nexport type MessageParamsPersonal = MessageParams & {\n /** Hexadecimal data to sign. */\n data: string;\n\n /** Sign-In With Ethereum data extracted from the data. */\n siwe?: StateSIWEMessage;\n};\n\n/** Typed data used in the signTypedData request. */\nexport type MessageParamsTypedData = {\n types: Record<string, Json>;\n domain: Record<string, Json>;\n primaryType: string;\n message: Json;\n};\n\n/** Metadata use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type ExecutionPermissionMetadata = {\n origin: string;\n justification: string;\n};\n\n/** Typed data use in the signTypedData request when handling EIP-7715 execution permission requests */\nexport type MessageParamsTypedDataWithMetadata = MessageParamsTypedData & {\n metadata: ExecutionPermissionMetadata;\n};\n\n/** Typed message parameters that were requested to be signed. */\nexport type MessageParamsTyped = MessageParams & {\n /** Structured data to sign. */\n data: Record<string, Json>[] | string | MessageParamsTypedData;\n /** Version of the signTypedData request. */\n version?: string;\n};\n\n/** Information about a single state change returned by decoding api. */\nexport type DecodingDataStateChange = {\n assetType: string;\n changeType: (typeof DecodingDataChangeType)[keyof typeof DecodingDataChangeType];\n address: string;\n amount: string;\n contractAddress: string;\n tokenID?: string;\n};\n\n/** Array of the various state changes returned by decoding api. */\nexport type DecodingDataStateChanges = DecodingDataStateChange[];\n\n/** Error details for unfulfilled the decoding request. */\nexport type DecodingDataError = {\n message: string;\n type: string;\n};\n\n/** Decoding data about typed sign V4 signature request. */\nexport type DecodingData = {\n stateChanges: DecodingDataStateChanges | null;\n error?: DecodingDataError;\n};\n\ntype SignatureRequestBase = {\n /** ID of the associated chain. */\n chainId: Hex;\n\n /** Response from message decoding api. */\n decodingData?: DecodingData;\n\n /** Whether decoding is in progress. */\n decodingLoading?: boolean;\n\n /** Decoded permission for the request if the signature is for an EIP-7715 execution permission. */\n decodedPermission?: DecodedPermission;\n\n /** Error message that occurred during the signing. */\n error?: string;\n\n /** Unique ID to identify this request. */\n id: string;\n\n /** Custom metadata stored with the request. */\n metadata?: Json;\n\n /** ID of the associated network client. */\n networkClientId: string;\n\n /** Signature hash resulting from the request. */\n rawSig?: string;\n\n /** Response following a security scan of the request. */\n securityAlertResponse?: Record<string, Json>;\n\n /** Options used for signing. */\n signingOptions?: TypedSigningOptions;\n\n /** Current status of the request. */\n status: string;\n\n /** Time the request was created. */\n time: number;\n\n /** Version of the signTypedData request. */\n version?: SignTypedDataVersion;\n};\n\n/** Legacy messages stored in the state. */\nexport type LegacyStateMessage = SignatureRequestBase & {\n /** Message parameters that were requested to be signed. */\n msgParams: MessageParamsPersonal | MessageParamsTyped;\n\n /** Type of the signature request. */\n type: string;\n};\n\n/** Metadata concerning a request to sign data. */\nexport type SignatureRequest = SignatureRequestBase &\n (\n | {\n messageParams: MessageParamsPersonal;\n type: SignatureRequestType.PersonalSign;\n }\n | {\n messageParams: MessageParamsTyped;\n type: SignatureRequestType.TypedSign;\n }\n );\n\n/** Status of a signature request. */\nexport enum SignatureRequestStatus {\n Unapproved = 'unapproved',\n Approved = 'approved',\n Rejected = 'rejected',\n InProgress = 'inProgress',\n Signed = 'signed',\n Errored = 'errored',\n}\n\n/** Type of supported signature requests. */\nexport enum SignatureRequestType {\n PersonalSign = 'personal_sign',\n TypedSign = 'eth_signTypedData',\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/signature-controller",
3
- "version": "36.0.0-preview-afa0dd61",
3
+ "version": "36.0.0-preview-20df3e99",
4
4
  "description": "Processes signing requests in order to sign arbitrary and typed data",
5
5
  "keywords": [
6
6
  "MetaMask",