@metamask-previews/gator-permissions-controller 0.3.0-preview-607c80f8 → 0.4.0-preview-a345102
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 +17 -1
- package/README.md +8 -0
- package/dist/GatorPermissionsController.cjs +180 -3
- package/dist/GatorPermissionsController.cjs.map +1 -1
- package/dist/GatorPermissionsController.d.cts +57 -4
- package/dist/GatorPermissionsController.d.cts.map +1 -1
- package/dist/GatorPermissionsController.d.mts +57 -4
- package/dist/GatorPermissionsController.d.mts.map +1 -1
- package/dist/GatorPermissionsController.mjs +180 -3
- package/dist/GatorPermissionsController.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs +4 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +35 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +35 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +4 -0
- package/dist/types.mjs.map +1 -1
- package/package.json +6 -3
package/dist/types.cjs
CHANGED
|
@@ -22,5 +22,9 @@ var GatorPermissionsSnapRpcMethod;
|
|
|
22
22
|
* This method is used by the metamask to request a permissions provider to get granted permissions for all sites.
|
|
23
23
|
*/
|
|
24
24
|
GatorPermissionsSnapRpcMethod["PermissionProviderGetGrantedPermissions"] = "permissionsProvider_getGrantedPermissions";
|
|
25
|
+
/**
|
|
26
|
+
* This method is used by the metamask to submit a revocation to the permissions provider.
|
|
27
|
+
*/
|
|
28
|
+
GatorPermissionsSnapRpcMethod["PermissionProviderSubmitRevocation"] = "permissionsProvider_submitRevocation";
|
|
25
29
|
})(GatorPermissionsSnapRpcMethod || (exports.GatorPermissionsSnapRpcMethod = GatorPermissionsSnapRpcMethod = {}));
|
|
26
30
|
//# sourceMappingURL=types.cjs.map
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAcA;;GAEG;AACH,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,mGAA4D,CAAA;IAC5D,mGAA4D,CAAA;IAC5D,yGAAkE,CAAA;IAClE,0HAAmF,CAAA;IACnF,4FAAqD,CAAA;IACrD,yFAAkD,CAAA;AACpD,CAAC,EAPW,mCAAmC,mDAAnC,mCAAmC,QAO9C;AAED;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAcA;;GAEG;AACH,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,mGAA4D,CAAA;IAC5D,mGAA4D,CAAA;IAC5D,yGAAkE,CAAA;IAClE,0HAAmF,CAAA;IACnF,4FAAqD,CAAA;IACrD,yFAAkD,CAAA;AACpD,CAAC,EAPW,mCAAmC,mDAAnC,mCAAmC,QAO9C;AAED;;GAEG;AACH,IAAY,6BASX;AATD,WAAY,6BAA6B;IACvC;;OAEG;IACH,sHAAqF,CAAA;IACrF;;OAEG;IACH,4GAA2E,CAAA;AAC7E,CAAC,EATW,6BAA6B,6CAA7B,6BAA6B,QASxC","sourcesContent":["import type {\n PermissionTypes,\n Signer,\n BasePermission,\n NativeTokenStreamPermission,\n NativeTokenPeriodicPermission,\n Erc20TokenStreamPermission,\n Erc20TokenPeriodicPermission,\n Rule,\n MetaMaskBasePermissionData,\n} from '@metamask/7715-permission-types';\nimport type { Delegation } from '@metamask/delegation-core';\nimport type { Hex } from '@metamask/utils';\n\n/**\n * Enum for the error codes of the gator permissions controller.\n */\nexport enum GatorPermissionsControllerErrorCode {\n GatorPermissionsFetchError = 'gator-permissions-fetch-error',\n GatorPermissionsNotEnabled = 'gator-permissions-not-enabled',\n GatorPermissionsProviderError = 'gator-permissions-provider-error',\n GatorPermissionsMapSerializationError = 'gator-permissions-map-serialization-error',\n PermissionDecodingError = 'permission-decoding-error',\n OriginNotAllowedError = 'origin-not-allowed-error',\n}\n\n/**\n * Enum for the RPC methods of the gator permissions provider snap.\n */\nexport enum GatorPermissionsSnapRpcMethod {\n /**\n * This method is used by the metamask to request a permissions provider to get granted permissions for all sites.\n */\n PermissionProviderGetGrantedPermissions = 'permissionsProvider_getGrantedPermissions',\n /**\n * This method is used by the metamask to submit a revocation to the permissions provider.\n */\n PermissionProviderSubmitRevocation = 'permissionsProvider_submitRevocation',\n}\n\n/**\n * Represents a custom permission that are not of the standard ERC-7715 permission types.\n */\nexport type CustomPermission = BasePermission & {\n type: 'custom';\n data: MetaMaskBasePermissionData & Record<string, unknown>;\n};\n\n/**\n * Represents the type of the ERC-7715 permissions that can be granted including custom permissions.\n */\nexport type PermissionTypesWithCustom = PermissionTypes | CustomPermission;\n\n/**\n * Represents a ERC-7715 permission request.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type PermissionRequest<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = {\n /**\n * hex-encoding of uint256 defined the chain with EIP-155\n */\n chainId: Hex;\n\n /**\n *\n * The account being targeted for this permission request.\n * It is optional to let the user choose which account to grant permission from.\n */\n address?: Hex;\n\n /**\n * An account that is associated with the recipient of the granted 7715 permission or alternatively the wallet will manage the session.\n */\n signer: TSigner;\n\n /**\n * Defines the allowed behavior the signer can do on behalf of the account.\n */\n permission: TPermission;\n\n rules?: Rule[] | null;\n};\n\n/**\n * Represents a ERC-7715 permission response.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type PermissionResponse<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = PermissionRequest<TSigner, TPermission> & {\n /**\n * Is a catch-all to identify a permission for revoking permissions or submitting\n * Defined in ERC-7710.\n */\n context: Hex;\n\n /**\n * The dependencyInfo field is required and contains information needed to deploy accounts.\n * Each entry specifies a factory contract and its associated deployment data.\n * If no account deployment is needed when redeeming the permission, this array must be empty.\n * When non-empty, DApps MUST deploy the accounts by calling the factory contract with factoryData as the calldata.\n * Defined in ERC-4337.\n */\n dependencyInfo: {\n factory: Hex;\n factoryData: Hex;\n }[];\n\n /**\n * If the signer type is account then delegationManager is required as defined in ERC-7710.\n */\n signerMeta: {\n delegationManager: Hex;\n };\n};\n\n/**\n * Represents a sanitized version of the PermissionResponse type.\n * Some fields have been removed but the fields are still present in profile sync.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type PermissionResponseSanitized<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = Omit<\n PermissionResponse<TSigner, TPermission>,\n 'dependencyInfo' | 'signer' | 'rules'\n>;\n\n/**\n * Represents a gator ERC-7715 granted(ie. signed by an user account) permission entry that is stored in profile sync.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided\n */\nexport type StoredGatorPermission<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = {\n permissionResponse: PermissionResponse<TSigner, TPermission>;\n siteOrigin: string;\n /**\n * Flag indicating whether this permission has been revoked.\n */\n isRevoked?: boolean;\n};\n\n/**\n * Represents a sanitized version of the StoredGatorPermission type. Some fields have been removed but the fields are still present in profile sync.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type StoredGatorPermissionSanitized<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = {\n permissionResponse: PermissionResponseSanitized<TSigner, TPermission>;\n siteOrigin: string;\n /**\n * Flag indicating whether this permission has been revoked.\n */\n isRevoked?: boolean;\n};\n\n/**\n * Represents a map of gator permissions by chainId and permission type.\n */\nexport type GatorPermissionsMap = {\n 'native-token-stream': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n NativeTokenStreamPermission\n >[];\n };\n 'native-token-periodic': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n NativeTokenPeriodicPermission\n >[];\n };\n 'erc20-token-stream': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n Erc20TokenStreamPermission\n >[];\n };\n 'erc20-token-periodic': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n Erc20TokenPeriodicPermission\n >[];\n };\n other: {\n [chainId: Hex]: StoredGatorPermissionSanitized<Signer, CustomPermission>[];\n };\n};\n\n/**\n * Represents the supported permission type(e.g. 'native-token-stream', 'native-token-periodic', 'erc20-token-stream', 'erc20-token-periodic') of the gator permissions map.\n */\nexport type SupportedGatorPermissionType = keyof GatorPermissionsMap;\n\n/**\n * Represents a map of gator permissions for a given permission type with key of chainId. The value being an array of gator permissions for that chainId.\n */\nexport type GatorPermissionsMapByPermissionType<\n TPermissionType extends SupportedGatorPermissionType,\n> = GatorPermissionsMap[TPermissionType];\n\n/**\n * Represents an array of gator permissions for a given permission type and chainId.\n */\nexport type GatorPermissionsListByPermissionTypeAndChainId<\n TPermissionType extends SupportedGatorPermissionType,\n> = GatorPermissionsMap[TPermissionType][Hex];\n\n/**\n * Represents the details of a delegation, that are required to decode a permission.\n */\nexport type DelegationDetails = Pick<\n Delegation<Hex>,\n 'caveats' | 'delegator' | 'delegate' | 'authority'\n>;\n\n/**\n * Represents the parameters for submitting a revocation.\n */\nexport type RevocationParams = {\n /**\n * The permission context as a hex string that identifies the permission to revoke.\n */\n permissionContext: Hex;\n};\n\n/**\n * Represents the parameters for adding a pending revocation.\n */\nexport type PendingRevocationParams = {\n /**\n * The transaction metadata ID to monitor.\n */\n txId: string;\n /**\n * The permission context as a hex string that identifies the permission to revoke.\n */\n permissionContext: Hex;\n};\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -19,7 +19,11 @@ export declare enum GatorPermissionsSnapRpcMethod {
|
|
|
19
19
|
/**
|
|
20
20
|
* This method is used by the metamask to request a permissions provider to get granted permissions for all sites.
|
|
21
21
|
*/
|
|
22
|
-
PermissionProviderGetGrantedPermissions = "permissionsProvider_getGrantedPermissions"
|
|
22
|
+
PermissionProviderGetGrantedPermissions = "permissionsProvider_getGrantedPermissions",
|
|
23
|
+
/**
|
|
24
|
+
* This method is used by the metamask to submit a revocation to the permissions provider.
|
|
25
|
+
*/
|
|
26
|
+
PermissionProviderSubmitRevocation = "permissionsProvider_submitRevocation"
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Represents a custom permission that are not of the standard ERC-7715 permission types.
|
|
@@ -106,6 +110,10 @@ export type PermissionResponseSanitized<TSigner extends Signer, TPermission exte
|
|
|
106
110
|
export type StoredGatorPermission<TSigner extends Signer, TPermission extends PermissionTypesWithCustom> = {
|
|
107
111
|
permissionResponse: PermissionResponse<TSigner, TPermission>;
|
|
108
112
|
siteOrigin: string;
|
|
113
|
+
/**
|
|
114
|
+
* Flag indicating whether this permission has been revoked.
|
|
115
|
+
*/
|
|
116
|
+
isRevoked?: boolean;
|
|
109
117
|
};
|
|
110
118
|
/**
|
|
111
119
|
* Represents a sanitized version of the StoredGatorPermission type. Some fields have been removed but the fields are still present in profile sync.
|
|
@@ -116,6 +124,10 @@ export type StoredGatorPermission<TSigner extends Signer, TPermission extends Pe
|
|
|
116
124
|
export type StoredGatorPermissionSanitized<TSigner extends Signer, TPermission extends PermissionTypesWithCustom> = {
|
|
117
125
|
permissionResponse: PermissionResponseSanitized<TSigner, TPermission>;
|
|
118
126
|
siteOrigin: string;
|
|
127
|
+
/**
|
|
128
|
+
* Flag indicating whether this permission has been revoked.
|
|
129
|
+
*/
|
|
130
|
+
isRevoked?: boolean;
|
|
119
131
|
};
|
|
120
132
|
/**
|
|
121
133
|
* Represents a map of gator permissions by chainId and permission type.
|
|
@@ -153,4 +165,26 @@ export type GatorPermissionsListByPermissionTypeAndChainId<TPermissionType exten
|
|
|
153
165
|
* Represents the details of a delegation, that are required to decode a permission.
|
|
154
166
|
*/
|
|
155
167
|
export type DelegationDetails = Pick<Delegation<Hex>, 'caveats' | 'delegator' | 'delegate' | 'authority'>;
|
|
168
|
+
/**
|
|
169
|
+
* Represents the parameters for submitting a revocation.
|
|
170
|
+
*/
|
|
171
|
+
export type RevocationParams = {
|
|
172
|
+
/**
|
|
173
|
+
* The permission context as a hex string that identifies the permission to revoke.
|
|
174
|
+
*/
|
|
175
|
+
permissionContext: Hex;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Represents the parameters for adding a pending revocation.
|
|
179
|
+
*/
|
|
180
|
+
export type PendingRevocationParams = {
|
|
181
|
+
/**
|
|
182
|
+
* The transaction metadata ID to monitor.
|
|
183
|
+
*/
|
|
184
|
+
txId: string;
|
|
185
|
+
/**
|
|
186
|
+
* The permission context as a hex string that identifies the permission to revoke.
|
|
187
|
+
*/
|
|
188
|
+
permissionContext: Hex;
|
|
189
|
+
};
|
|
156
190
|
//# sourceMappingURL=types.d.cts.map
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,MAAM,EACN,cAAc,EACd,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,IAAI,EACJ,0BAA0B,EAC3B,wCAAwC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,kCAAkC;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAE3C;;GAEG;AACH,oBAAY,mCAAmC;IAC7C,0BAA0B,kCAAkC;IAC5D,0BAA0B,kCAAkC;IAC5D,6BAA6B,qCAAqC;IAClE,qCAAqC,8CAA8C;IACnF,uBAAuB,8BAA8B;IACrD,qBAAqB,6BAA6B;CACnD;AAED;;GAEG;A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types.d.mts
CHANGED
|
@@ -19,7 +19,11 @@ export declare enum GatorPermissionsSnapRpcMethod {
|
|
|
19
19
|
/**
|
|
20
20
|
* This method is used by the metamask to request a permissions provider to get granted permissions for all sites.
|
|
21
21
|
*/
|
|
22
|
-
PermissionProviderGetGrantedPermissions = "permissionsProvider_getGrantedPermissions"
|
|
22
|
+
PermissionProviderGetGrantedPermissions = "permissionsProvider_getGrantedPermissions",
|
|
23
|
+
/**
|
|
24
|
+
* This method is used by the metamask to submit a revocation to the permissions provider.
|
|
25
|
+
*/
|
|
26
|
+
PermissionProviderSubmitRevocation = "permissionsProvider_submitRevocation"
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Represents a custom permission that are not of the standard ERC-7715 permission types.
|
|
@@ -106,6 +110,10 @@ export type PermissionResponseSanitized<TSigner extends Signer, TPermission exte
|
|
|
106
110
|
export type StoredGatorPermission<TSigner extends Signer, TPermission extends PermissionTypesWithCustom> = {
|
|
107
111
|
permissionResponse: PermissionResponse<TSigner, TPermission>;
|
|
108
112
|
siteOrigin: string;
|
|
113
|
+
/**
|
|
114
|
+
* Flag indicating whether this permission has been revoked.
|
|
115
|
+
*/
|
|
116
|
+
isRevoked?: boolean;
|
|
109
117
|
};
|
|
110
118
|
/**
|
|
111
119
|
* Represents a sanitized version of the StoredGatorPermission type. Some fields have been removed but the fields are still present in profile sync.
|
|
@@ -116,6 +124,10 @@ export type StoredGatorPermission<TSigner extends Signer, TPermission extends Pe
|
|
|
116
124
|
export type StoredGatorPermissionSanitized<TSigner extends Signer, TPermission extends PermissionTypesWithCustom> = {
|
|
117
125
|
permissionResponse: PermissionResponseSanitized<TSigner, TPermission>;
|
|
118
126
|
siteOrigin: string;
|
|
127
|
+
/**
|
|
128
|
+
* Flag indicating whether this permission has been revoked.
|
|
129
|
+
*/
|
|
130
|
+
isRevoked?: boolean;
|
|
119
131
|
};
|
|
120
132
|
/**
|
|
121
133
|
* Represents a map of gator permissions by chainId and permission type.
|
|
@@ -153,4 +165,26 @@ export type GatorPermissionsListByPermissionTypeAndChainId<TPermissionType exten
|
|
|
153
165
|
* Represents the details of a delegation, that are required to decode a permission.
|
|
154
166
|
*/
|
|
155
167
|
export type DelegationDetails = Pick<Delegation<Hex>, 'caveats' | 'delegator' | 'delegate' | 'authority'>;
|
|
168
|
+
/**
|
|
169
|
+
* Represents the parameters for submitting a revocation.
|
|
170
|
+
*/
|
|
171
|
+
export type RevocationParams = {
|
|
172
|
+
/**
|
|
173
|
+
* The permission context as a hex string that identifies the permission to revoke.
|
|
174
|
+
*/
|
|
175
|
+
permissionContext: Hex;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Represents the parameters for adding a pending revocation.
|
|
179
|
+
*/
|
|
180
|
+
export type PendingRevocationParams = {
|
|
181
|
+
/**
|
|
182
|
+
* The transaction metadata ID to monitor.
|
|
183
|
+
*/
|
|
184
|
+
txId: string;
|
|
185
|
+
/**
|
|
186
|
+
* The permission context as a hex string that identifies the permission to revoke.
|
|
187
|
+
*/
|
|
188
|
+
permissionContext: Hex;
|
|
189
|
+
};
|
|
156
190
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,MAAM,EACN,cAAc,EACd,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,IAAI,EACJ,0BAA0B,EAC3B,wCAAwC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,kCAAkC;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAE3C;;GAEG;AACH,oBAAY,mCAAmC;IAC7C,0BAA0B,kCAAkC;IAC5D,0BAA0B,kCAAkC;IAC5D,6BAA6B,qCAAqC;IAClE,qCAAqC,8CAA8C;IACnF,uBAAuB,8BAA8B;IAC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AAE,GAAG,CAAC;CACxB,CAAC"}
|
package/dist/types.mjs
CHANGED
|
@@ -19,5 +19,9 @@ export var GatorPermissionsSnapRpcMethod;
|
|
|
19
19
|
* This method is used by the metamask to request a permissions provider to get granted permissions for all sites.
|
|
20
20
|
*/
|
|
21
21
|
GatorPermissionsSnapRpcMethod["PermissionProviderGetGrantedPermissions"] = "permissionsProvider_getGrantedPermissions";
|
|
22
|
+
/**
|
|
23
|
+
* This method is used by the metamask to submit a revocation to the permissions provider.
|
|
24
|
+
*/
|
|
25
|
+
GatorPermissionsSnapRpcMethod["PermissionProviderSubmitRevocation"] = "permissionsProvider_submitRevocation";
|
|
22
26
|
})(GatorPermissionsSnapRpcMethod || (GatorPermissionsSnapRpcMethod = {}));
|
|
23
27
|
//# sourceMappingURL=types.mjs.map
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,MAAM,CAAN,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,mGAA4D,CAAA;IAC5D,mGAA4D,CAAA;IAC5D,yGAAkE,CAAA;IAClE,0HAAmF,CAAA;IACnF,4FAAqD,CAAA;IACrD,yFAAkD,CAAA;AACpD,CAAC,EAPW,mCAAmC,KAAnC,mCAAmC,QAO9C;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,MAAM,CAAN,IAAY,mCAOX;AAPD,WAAY,mCAAmC;IAC7C,mGAA4D,CAAA;IAC5D,mGAA4D,CAAA;IAC5D,yGAAkE,CAAA;IAClE,0HAAmF,CAAA;IACnF,4FAAqD,CAAA;IACrD,yFAAkD,CAAA;AACpD,CAAC,EAPW,mCAAmC,KAAnC,mCAAmC,QAO9C;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,6BASX;AATD,WAAY,6BAA6B;IACvC;;OAEG;IACH,sHAAqF,CAAA;IACrF;;OAEG;IACH,4GAA2E,CAAA;AAC7E,CAAC,EATW,6BAA6B,KAA7B,6BAA6B,QASxC","sourcesContent":["import type {\n PermissionTypes,\n Signer,\n BasePermission,\n NativeTokenStreamPermission,\n NativeTokenPeriodicPermission,\n Erc20TokenStreamPermission,\n Erc20TokenPeriodicPermission,\n Rule,\n MetaMaskBasePermissionData,\n} from '@metamask/7715-permission-types';\nimport type { Delegation } from '@metamask/delegation-core';\nimport type { Hex } from '@metamask/utils';\n\n/**\n * Enum for the error codes of the gator permissions controller.\n */\nexport enum GatorPermissionsControllerErrorCode {\n GatorPermissionsFetchError = 'gator-permissions-fetch-error',\n GatorPermissionsNotEnabled = 'gator-permissions-not-enabled',\n GatorPermissionsProviderError = 'gator-permissions-provider-error',\n GatorPermissionsMapSerializationError = 'gator-permissions-map-serialization-error',\n PermissionDecodingError = 'permission-decoding-error',\n OriginNotAllowedError = 'origin-not-allowed-error',\n}\n\n/**\n * Enum for the RPC methods of the gator permissions provider snap.\n */\nexport enum GatorPermissionsSnapRpcMethod {\n /**\n * This method is used by the metamask to request a permissions provider to get granted permissions for all sites.\n */\n PermissionProviderGetGrantedPermissions = 'permissionsProvider_getGrantedPermissions',\n /**\n * This method is used by the metamask to submit a revocation to the permissions provider.\n */\n PermissionProviderSubmitRevocation = 'permissionsProvider_submitRevocation',\n}\n\n/**\n * Represents a custom permission that are not of the standard ERC-7715 permission types.\n */\nexport type CustomPermission = BasePermission & {\n type: 'custom';\n data: MetaMaskBasePermissionData & Record<string, unknown>;\n};\n\n/**\n * Represents the type of the ERC-7715 permissions that can be granted including custom permissions.\n */\nexport type PermissionTypesWithCustom = PermissionTypes | CustomPermission;\n\n/**\n * Represents a ERC-7715 permission request.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type PermissionRequest<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = {\n /**\n * hex-encoding of uint256 defined the chain with EIP-155\n */\n chainId: Hex;\n\n /**\n *\n * The account being targeted for this permission request.\n * It is optional to let the user choose which account to grant permission from.\n */\n address?: Hex;\n\n /**\n * An account that is associated with the recipient of the granted 7715 permission or alternatively the wallet will manage the session.\n */\n signer: TSigner;\n\n /**\n * Defines the allowed behavior the signer can do on behalf of the account.\n */\n permission: TPermission;\n\n rules?: Rule[] | null;\n};\n\n/**\n * Represents a ERC-7715 permission response.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type PermissionResponse<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = PermissionRequest<TSigner, TPermission> & {\n /**\n * Is a catch-all to identify a permission for revoking permissions or submitting\n * Defined in ERC-7710.\n */\n context: Hex;\n\n /**\n * The dependencyInfo field is required and contains information needed to deploy accounts.\n * Each entry specifies a factory contract and its associated deployment data.\n * If no account deployment is needed when redeeming the permission, this array must be empty.\n * When non-empty, DApps MUST deploy the accounts by calling the factory contract with factoryData as the calldata.\n * Defined in ERC-4337.\n */\n dependencyInfo: {\n factory: Hex;\n factoryData: Hex;\n }[];\n\n /**\n * If the signer type is account then delegationManager is required as defined in ERC-7710.\n */\n signerMeta: {\n delegationManager: Hex;\n };\n};\n\n/**\n * Represents a sanitized version of the PermissionResponse type.\n * Some fields have been removed but the fields are still present in profile sync.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type PermissionResponseSanitized<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = Omit<\n PermissionResponse<TSigner, TPermission>,\n 'dependencyInfo' | 'signer' | 'rules'\n>;\n\n/**\n * Represents a gator ERC-7715 granted(ie. signed by an user account) permission entry that is stored in profile sync.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided\n */\nexport type StoredGatorPermission<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = {\n permissionResponse: PermissionResponse<TSigner, TPermission>;\n siteOrigin: string;\n /**\n * Flag indicating whether this permission has been revoked.\n */\n isRevoked?: boolean;\n};\n\n/**\n * Represents a sanitized version of the StoredGatorPermission type. Some fields have been removed but the fields are still present in profile sync.\n *\n * @template Signer - The type of the signer provided, either an AccountSigner or WalletSigner.\n * @template Permission - The type of the permission provided.\n */\nexport type StoredGatorPermissionSanitized<\n TSigner extends Signer,\n TPermission extends PermissionTypesWithCustom,\n> = {\n permissionResponse: PermissionResponseSanitized<TSigner, TPermission>;\n siteOrigin: string;\n /**\n * Flag indicating whether this permission has been revoked.\n */\n isRevoked?: boolean;\n};\n\n/**\n * Represents a map of gator permissions by chainId and permission type.\n */\nexport type GatorPermissionsMap = {\n 'native-token-stream': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n NativeTokenStreamPermission\n >[];\n };\n 'native-token-periodic': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n NativeTokenPeriodicPermission\n >[];\n };\n 'erc20-token-stream': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n Erc20TokenStreamPermission\n >[];\n };\n 'erc20-token-periodic': {\n [chainId: Hex]: StoredGatorPermissionSanitized<\n Signer,\n Erc20TokenPeriodicPermission\n >[];\n };\n other: {\n [chainId: Hex]: StoredGatorPermissionSanitized<Signer, CustomPermission>[];\n };\n};\n\n/**\n * Represents the supported permission type(e.g. 'native-token-stream', 'native-token-periodic', 'erc20-token-stream', 'erc20-token-periodic') of the gator permissions map.\n */\nexport type SupportedGatorPermissionType = keyof GatorPermissionsMap;\n\n/**\n * Represents a map of gator permissions for a given permission type with key of chainId. The value being an array of gator permissions for that chainId.\n */\nexport type GatorPermissionsMapByPermissionType<\n TPermissionType extends SupportedGatorPermissionType,\n> = GatorPermissionsMap[TPermissionType];\n\n/**\n * Represents an array of gator permissions for a given permission type and chainId.\n */\nexport type GatorPermissionsListByPermissionTypeAndChainId<\n TPermissionType extends SupportedGatorPermissionType,\n> = GatorPermissionsMap[TPermissionType][Hex];\n\n/**\n * Represents the details of a delegation, that are required to decode a permission.\n */\nexport type DelegationDetails = Pick<\n Delegation<Hex>,\n 'caveats' | 'delegator' | 'delegate' | 'authority'\n>;\n\n/**\n * Represents the parameters for submitting a revocation.\n */\nexport type RevocationParams = {\n /**\n * The permission context as a hex string that identifies the permission to revoke.\n */\n permissionContext: Hex;\n};\n\n/**\n * Represents the parameters for adding a pending revocation.\n */\nexport type PendingRevocationParams = {\n /**\n * The transaction metadata ID to monitor.\n */\n txId: string;\n /**\n * The permission context as a hex string that identifies the permission to revoke.\n */\n permissionContext: Hex;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/gator-permissions-controller",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-preview-a345102",
|
|
4
4
|
"description": "Controller for managing gator permissions with profile sync integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
39
|
+
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
|
|
39
40
|
"build:docs": "typedoc",
|
|
40
41
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/gator-permissions-controller",
|
|
41
42
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/gator-permissions-controller",
|
|
@@ -61,7 +62,8 @@
|
|
|
61
62
|
"@lavamoat/preinstall-always-fail": "^2.1.0",
|
|
62
63
|
"@metamask/auto-changelog": "^3.4.4",
|
|
63
64
|
"@metamask/snaps-controllers": "^14.0.1",
|
|
64
|
-
"@
|
|
65
|
+
"@metamask/transaction-controller": "^61.1.0",
|
|
66
|
+
"@ts-bridge/cli": "^0.6.4",
|
|
65
67
|
"@types/jest": "^27.4.1",
|
|
66
68
|
"deepmerge": "^4.2.2",
|
|
67
69
|
"jest": "^27.5.1",
|
|
@@ -71,7 +73,8 @@
|
|
|
71
73
|
"typescript": "~5.2.2"
|
|
72
74
|
},
|
|
73
75
|
"peerDependencies": {
|
|
74
|
-
"@metamask/snaps-controllers": "^14.0.1"
|
|
76
|
+
"@metamask/snaps-controllers": "^14.0.1",
|
|
77
|
+
"@metamask/transaction-controller": "^61.1.0"
|
|
75
78
|
},
|
|
76
79
|
"engines": {
|
|
77
80
|
"node": "^18.18 || >=20"
|