@xyo-network/xl1-protocol 1.7.2 → 1.7.3
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,16 +1,8 @@
|
|
|
1
|
-
import type { Hex } from '@xylabs/hex';
|
|
2
1
|
import type { JsonValue } from '@xylabs/object';
|
|
3
2
|
import type { Promisable } from '@xylabs/promise';
|
|
4
3
|
import type { Signed } from '@xyo-network/boundwitness-model';
|
|
5
4
|
import type { HydratedTransaction, TransactionBoundWitness } from '../../transaction/index.ts';
|
|
6
|
-
|
|
7
|
-
/** Chain Identifier - can be a hex (eth contract address) or a string */
|
|
8
|
-
chain?: Hex;
|
|
9
|
-
/** Name of the chain */
|
|
10
|
-
name: string;
|
|
11
|
-
/** Url for accessing the network */
|
|
12
|
-
url: string;
|
|
13
|
-
}
|
|
5
|
+
import type { XyoConnectionProvider } from './XyoProvider.ts';
|
|
14
6
|
/**
|
|
15
7
|
* Modeled after EIP-2255
|
|
16
8
|
* See - https://eips.ethereum.org/EIPS/eip-2255#specification
|
|
@@ -58,9 +50,9 @@ export interface InvokerPermission extends Permission {
|
|
|
58
50
|
date?: number;
|
|
59
51
|
}
|
|
60
52
|
export interface XyoGatewayProvider {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
activeConnection(): Promisable<XyoConnectionProvider | undefined>;
|
|
54
|
+
addConnection(chainConnectionInfo: XyoConnectionProvider): Promisable<boolean>;
|
|
55
|
+
connections(): Promisable<Record<string, XyoConnectionProvider>>;
|
|
64
56
|
getPermissions(): Promisable<InvokerPermission[]>;
|
|
65
57
|
requestPermissions(permissions: Permission[]): Promisable<boolean>;
|
|
66
58
|
revokePermissions(permissions: Permission[]): Promisable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XyoGateway.d.ts","sourceRoot":"","sources":["../../../../src/provider/v1/XyoGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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U,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAA;IACjE,aAAa,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAC9E,WAAW,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAA;IAChE,cAAc,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACjD,kBAAkB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IAClE,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACjE,iBAAiB,CAAC,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAA;CACrF"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import type { Hex } from '@xylabs/hex'
|
|
2
1
|
import type { JsonValue } from '@xylabs/object'
|
|
3
2
|
import type { Promisable } from '@xylabs/promise'
|
|
4
3
|
import type { Signed } from '@xyo-network/boundwitness-model'
|
|
5
4
|
|
|
6
5
|
import type { HydratedTransaction, TransactionBoundWitness } from '../../transaction/index.ts'
|
|
7
|
-
|
|
8
|
-
export interface ChainConnection {
|
|
9
|
-
/** Chain Identifier - can be a hex (eth contract address) or a string */
|
|
10
|
-
chain?: Hex
|
|
11
|
-
/** Name of the chain */
|
|
12
|
-
name: string
|
|
13
|
-
/** Url for accessing the network */
|
|
14
|
-
url: string
|
|
15
|
-
}
|
|
6
|
+
import type { XyoConnectionProvider } from './XyoProvider.ts'
|
|
16
7
|
|
|
17
8
|
/**
|
|
18
9
|
* Modeled after EIP-2255
|
|
@@ -67,9 +58,9 @@ export interface InvokerPermission extends Permission {
|
|
|
67
58
|
}
|
|
68
59
|
|
|
69
60
|
export interface XyoGatewayProvider {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
activeConnection(): Promisable<XyoConnectionProvider | undefined>
|
|
62
|
+
addConnection(chainConnectionInfo: XyoConnectionProvider): Promisable<boolean>
|
|
63
|
+
connections(): Promisable<Record<string, XyoConnectionProvider>>
|
|
73
64
|
getPermissions(): Promisable<InvokerPermission[]>
|
|
74
65
|
requestPermissions(permissions: Permission[]): Promisable<boolean>
|
|
75
66
|
revokePermissions(permissions: Permission[]): Promisable<boolean>
|