@xyo-network/xl1-protocol 1.12.48 → 1.12.50

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,6 +1,4 @@
1
1
  import type { Promisable } from '@xylabs/promise';
2
- import type { InvokerPermission, Permission } from './permissions/index.ts';
3
- import type { TransactionSubmitter } from './TransactionSubmitter.ts';
4
2
  import type { XyoConnection } from './XyoConnection.ts';
5
3
  import type { XyoGatewayHelpers } from './XyoGatewayHelpers.ts';
6
4
  import type { XyoSigner } from './XyoSigner.ts';
@@ -8,34 +6,7 @@ import type { XyoSigner } from './XyoSigner.ts';
8
6
  export interface XyoConnectionConfigDeprecated {
9
7
  name: string;
10
8
  }
11
- /** @deprecated use XyoGatewayProvider instead */
12
- export interface XyoGatewayProviderDeprecated extends TransactionSubmitter {
13
- /**
14
- * @deprecated use `connection()` instead
15
- */
16
- activeConnection(): Promisable<XyoConnection | undefined>;
17
- /**
18
- * @deprecated use `connection()` instead
19
- */
20
- addConnection(config: XyoConnectionConfigDeprecated): Promisable<XyoConnection>;
21
- /**
22
- * @deprecated use `connection()` instead
23
- */
24
- connections(): Promisable<Record<string, XyoConnection>>;
25
- /**
26
- * @deprecated Permissions now at Client level
27
- */
28
- getPermissions(): Promisable<InvokerPermission[]>;
29
- /**
30
- * @deprecated Permissions now at Client level
31
- */
32
- requestPermissions(permissions: Permission[]): Promisable<boolean>;
33
- /**
34
- * @deprecated Permissions now at Client level
35
- */
36
- revokePermissions(permissions: Permission[]): Promisable<boolean>;
37
- }
38
- export interface XyoGatewayProvider extends Partial<XyoGatewayHelpers>, Partial<XyoGatewayProviderDeprecated> {
9
+ export interface XyoGatewayProvider extends Partial<XyoGatewayHelpers> {
39
10
  /**
40
11
  * Returns the connection provider for this gateway.
41
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"XyoGateway.d.ts","sourceRoot":"","sources":["../../../src/provider/XyoGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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":"XyoGateway.d.ts","sourceRoot":"","sources":["../../../src/provider/XyoGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IACpE;;OAEG;IACH,UAAU,IAAI,UAAU,CAAC,aAAa,CAAC,CAAA;IACvC;;OAEG;IACH,MAAM,IAAI,UAAU,CAAC,SAAS,CAAC,CAAA;CAChC"}
@@ -1,7 +1,7 @@
1
1
  import type { Address } from '@xylabs/hex';
2
2
  import type { Promisable } from '@xylabs/promise';
3
3
  import type { Chain } from '../model.ts';
4
- /** @deprecated - use XyoHost instead */
4
+ /** @deprecated - use XyoClient instead */
5
5
  export interface XyoWallet {
6
6
  accounts(): Promisable<Address[]>;
7
7
  addChain(chain: Chain, name?: string): Promisable<object>;
@@ -1 +1 @@
1
- {"version":3,"file":"XyoWallet.d.ts","sourceRoot":"","sources":["../../../src/provider/XyoWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,yCAAyC;AACzC,MAAM,WAAW,SAAS;IACxB,QAAQ,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,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AC,KAAK,EAAE,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAC5C"}
@@ -2,6 +2,9 @@ import type { JsonValue } from '@xylabs/object';
2
2
  /**
3
3
  * Modeled after EIP-2255
4
4
  * See - https://eips.ethereum.org/EIPS/eip-2255#specification
5
+ *
6
+ * NOTE: In order to send multiple permission requests at once, do not send multiple parentCapability keys.
7
+ * Instead, send multiple PermissionRequest objects in the params array of the rpc call.
5
8
  */
6
9
  export interface PermissionRequest {
7
10
  [parentCapability: string]: {
@@ -1 +1 @@
1
- {"version":3,"file":"InvokerPermission.d.ts","sourceRoot":"","sources":["../../../../src/provider/permissions/InvokerPermission.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,gBAAgB,EAAE,MAAM,GAAG;QAC1B,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;KAChC,CAAA;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,GAAG,WAAW,GAAG,0BAA0B,CAAA;AAEhH;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,qBAAqB;IACrB,IAAI,EAAE,WAAW,CAAA;IACjB,yGAAyG;IACzG,KAAK,EAAE,SAAS,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
1
+ {"version":3,"file":"InvokerPermission.d.ts","sourceRoot":"","sources":["../../../../src/provider/permissions/InvokerPermission.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,gBAAgB,EAAE,MAAM,GAAG;QAC1B,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;KAChC,CAAA;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,GAAG,WAAW,GAAG,0BAA0B,CAAA;AAEhH;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,qBAAqB;IACrB,IAAI,EAAE,WAAW,CAAA;IACjB,yGAAyG;IACzG,KAAK,EAAE,SAAS,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;IACnB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
@@ -1,9 +1,17 @@
1
1
  import type { Promisable } from '@xylabs/promise';
2
- import type { InvokerPermission, RequestedPermission } from './InvokerPermission.ts';
2
+ import type { InvokerPermission, PermissionRequest, RequestedPermission } from './InvokerPermission.ts';
3
3
  export interface XyoPermissions {
4
- getPermissions(permissions: RequestedPermission[]): Promisable<InvokerPermission[]>;
5
- requestPermissions(permissions: RequestedPermission[]): Promisable<boolean>;
6
- revokePermissions(permissions: RequestedPermission[]): Promisable<boolean>;
4
+ /**
5
+ * Returns the permissions that are currently granted
6
+ *
7
+ * Per the spec - "The wallet_getPermissions method is used for getting an array of current permissions
8
+ * (empty by default). It takes no parameters and returns an array of Permission objects."
9
+ *
10
+ * See - https://eips.ethereum.org/EIPS/eip-2255#specification
11
+ */
12
+ getPermissions(): Promisable<InvokerPermission[]>;
13
+ requestPermissions(permissions: PermissionRequest[]): Promisable<RequestedPermission[]>;
14
+ revokePermissions(permissions: PermissionRequest): Promisable<RequestedPermission[]>;
7
15
  }
8
16
  export interface PermissionsProvider extends XyoPermissions {
9
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"XyoPermissions.d.ts","sourceRoot":"","sources":["../../../../src/provider/permissions/XyoPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAEpF,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,WAAW,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACnF,kBAAkB,CAAC,WAAW,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC3E,iBAAiB,CAAC,WAAW,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;CAC3E;AAGD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG"}
1
+ {"version":3,"file":"XyoPermissions.d.ts","sourceRoot":"","sources":["../../../../src/provider/permissions/XyoPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EACV,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAC1D,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,cAAc,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAEjD,kBAAkB,CAAC,WAAW,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAA;IAEvF,iBAAiB,CAAC,WAAW,EAAE,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAA;CACrF;AAGD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/xl1-protocol",
4
- "version": "1.12.48",
4
+ "version": "1.12.50",
5
5
  "description": "XYO Layer One Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -1,8 +1,5 @@
1
1
  import type { Promisable } from '@xylabs/promise'
2
2
 
3
- import type { InvokerPermission, Permission } from './permissions/index.ts'
4
- // eslint-disable-next-line sonarjs/deprecation
5
- import type { TransactionSubmitter } from './TransactionSubmitter.ts'
6
3
  import type { XyoConnection } from './XyoConnection.ts'
7
4
  import type { XyoGatewayHelpers } from './XyoGatewayHelpers.ts'
8
5
  import type { XyoSigner } from './XyoSigner.ts'
@@ -12,38 +9,7 @@ export interface XyoConnectionConfigDeprecated {
12
9
  name: string
13
10
  }
14
11
 
15
- /** @deprecated use XyoGatewayProvider instead */
16
- // eslint-disable-next-line sonarjs/deprecation
17
- export interface XyoGatewayProviderDeprecated extends TransactionSubmitter {
18
- /**
19
- * @deprecated use `connection()` instead
20
- */
21
- activeConnection(): Promisable<XyoConnection | undefined>
22
- /**
23
- * @deprecated use `connection()` instead
24
- */
25
- // eslint-disable-next-line sonarjs/deprecation
26
- addConnection(config: XyoConnectionConfigDeprecated): Promisable<XyoConnection>
27
- /**
28
- * @deprecated use `connection()` instead
29
- */
30
- connections(): Promisable<Record<string, XyoConnection>>
31
- /**
32
- * @deprecated Permissions now at Client level
33
- */
34
- getPermissions(): Promisable<InvokerPermission[]>
35
- /**
36
- * @deprecated Permissions now at Client level
37
- */
38
- requestPermissions(permissions: Permission[]): Promisable<boolean>
39
- /**
40
- * @deprecated Permissions now at Client level
41
- */
42
- revokePermissions(permissions: Permission[]): Promisable<boolean>
43
- }
44
-
45
- // eslint-disable-next-line sonarjs/deprecation
46
- export interface XyoGatewayProvider extends Partial<XyoGatewayHelpers>, Partial<XyoGatewayProviderDeprecated> {
12
+ export interface XyoGatewayProvider extends Partial<XyoGatewayHelpers> {
47
13
  /**
48
14
  * Returns the connection provider for this gateway.
49
15
  */
@@ -3,7 +3,7 @@ import type { Promisable } from '@xylabs/promise'
3
3
 
4
4
  import type { Chain } from '../model.ts'
5
5
 
6
- /** @deprecated - use XyoHost instead */
6
+ /** @deprecated - use XyoClient instead */
7
7
  export interface XyoWallet {
8
8
  accounts(): Promisable<Address[]>
9
9
  addChain(chain: Chain, name?: string): Promisable<object>
@@ -3,6 +3,9 @@ import type { JsonValue } from '@xylabs/object'
3
3
  /**
4
4
  * Modeled after EIP-2255
5
5
  * See - https://eips.ethereum.org/EIPS/eip-2255#specification
6
+ *
7
+ * NOTE: In order to send multiple permission requests at once, do not send multiple parentCapability keys.
8
+ * Instead, send multiple PermissionRequest objects in the params array of the rpc call.
6
9
  */
7
10
  export interface PermissionRequest {
8
11
  [parentCapability: string]: {
@@ -1,11 +1,23 @@
1
1
  import type { Promisable } from '@xylabs/promise'
2
2
 
3
- import type { InvokerPermission, RequestedPermission } from './InvokerPermission.ts'
3
+ import type {
4
+ InvokerPermission, PermissionRequest, RequestedPermission,
5
+ } from './InvokerPermission.ts'
4
6
 
5
7
  export interface XyoPermissions {
6
- getPermissions(permissions: RequestedPermission[]): Promisable<InvokerPermission[]>
7
- requestPermissions(permissions: RequestedPermission[]): Promisable<boolean>
8
- revokePermissions(permissions: RequestedPermission[]): Promisable<boolean>
8
+ /**
9
+ * Returns the permissions that are currently granted
10
+ *
11
+ * Per the spec - "The wallet_getPermissions method is used for getting an array of current permissions
12
+ * (empty by default). It takes no parameters and returns an array of Permission objects."
13
+ *
14
+ * See - https://eips.ethereum.org/EIPS/eip-2255#specification
15
+ */
16
+ getPermissions(): Promisable<InvokerPermission[]>
17
+ // Given a permissions request, attempts to request the permissions from the user
18
+ requestPermissions(permissions: PermissionRequest[]): Promisable<RequestedPermission[]>
19
+ // Given a permissions request, attempts to revoke the permissions from the user
20
+ revokePermissions(permissions: PermissionRequest): Promisable<RequestedPermission[]>
9
21
  }
10
22
 
11
23
  // @deprecated - use XyoPermissions instead