@xyo-network/xl1-protocol 1.12.51 → 1.12.52
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { InvokerPermission, PermissionRequest, RequestedPermission } from './InvokerPermission.ts';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Handles Getting Permissions
|
|
4
|
+
*/
|
|
5
|
+
export interface XyoPermissionsGetHandler {
|
|
3
6
|
/**
|
|
4
7
|
* Returns the permissions that are currently granted
|
|
5
8
|
*
|
|
@@ -9,9 +12,21 @@ export interface XyoPermissions {
|
|
|
9
12
|
* See - https://eips.ethereum.org/EIPS/eip-2255#specification
|
|
10
13
|
*/
|
|
11
14
|
getPermissions(): Promise<InvokerPermission[]>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Handles Permission Requests
|
|
18
|
+
*/
|
|
19
|
+
export interface XyoPermissionsRequestHandler {
|
|
12
20
|
requestPermissions(permissions: PermissionRequest[]): Promise<RequestedPermission[]>;
|
|
13
21
|
revokePermissions(permissions: PermissionRequest): Promise<RequestedPermission[]>;
|
|
14
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Interface for getting, requesting and revoking permissions
|
|
25
|
+
*
|
|
26
|
+
* See - https://eips.ethereum.org/EIPS/eip-2255
|
|
27
|
+
*/
|
|
28
|
+
export interface XyoPermissions extends XyoPermissionsGetHandler, XyoPermissionsRequestHandler {
|
|
29
|
+
}
|
|
15
30
|
export interface PermissionsProvider extends XyoPermissions {
|
|
16
31
|
}
|
|
17
32
|
//# sourceMappingURL=XyoPermissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XyoPermissions.d.ts","sourceRoot":"","sources":["../../../../src/provider/permissions/XyoPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAC1D,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"XyoPermissions.d.ts","sourceRoot":"","sources":["../../../../src/provider/permissions/XyoPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAC1D,MAAM,wBAAwB,CAAA;AAE/B;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;;OAOG;IACH,cAAc,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAA;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAE3C,kBAAkB,CAAC,WAAW,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAA;IAEpF,iBAAiB,CAAC,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAA;CAClF;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAe,SAAQ,wBAAwB,EAAE,4BAA4B;CAE7F;AAGD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,10 @@ import type {
|
|
|
2
2
|
InvokerPermission, PermissionRequest, RequestedPermission,
|
|
3
3
|
} from './InvokerPermission.ts'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Handles Getting Permissions
|
|
7
|
+
*/
|
|
8
|
+
export interface XyoPermissionsGetHandler {
|
|
6
9
|
/**
|
|
7
10
|
* Returns the permissions that are currently granted
|
|
8
11
|
*
|
|
@@ -12,11 +15,26 @@ export interface XyoPermissions {
|
|
|
12
15
|
* See - https://eips.ethereum.org/EIPS/eip-2255#specification
|
|
13
16
|
*/
|
|
14
17
|
getPermissions(): Promise<InvokerPermission[]>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Handles Permission Requests
|
|
22
|
+
*/
|
|
23
|
+
export interface XyoPermissionsRequestHandler {
|
|
15
24
|
// Given a permissions request, attempts to request the permissions from the user
|
|
16
25
|
requestPermissions(permissions: PermissionRequest[]): Promise<RequestedPermission[]>
|
|
17
26
|
// Given a permissions request, attempts to revoke the permissions from the user
|
|
18
27
|
revokePermissions(permissions: PermissionRequest): Promise<RequestedPermission[]>
|
|
19
28
|
}
|
|
20
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Interface for getting, requesting and revoking permissions
|
|
32
|
+
*
|
|
33
|
+
* See - https://eips.ethereum.org/EIPS/eip-2255
|
|
34
|
+
*/
|
|
35
|
+
export interface XyoPermissions extends XyoPermissionsGetHandler, XyoPermissionsRequestHandler {
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
21
39
|
// @deprecated - use XyoPermissions instead
|
|
22
40
|
export interface PermissionsProvider extends XyoPermissions {}
|