@xyo-network/xl1-protocol 1.5.0 → 1.5.2
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/dist/types/services/ChainServiceCollection.d.ts +30 -0
- package/dist/types/services/ChainServiceCollection.d.ts.map +1 -1
- package/dist/types/services/Params.d.ts +2 -5
- package/dist/types/services/Params.d.ts.map +1 -1
- package/dist/types/services/Service.d.ts +4 -8
- package/dist/types/services/Service.d.ts.map +1 -1
- package/package.json +12 -7
- package/src/services/ChainServiceCollection.ts +30 -0
- package/src/services/Params.ts +2 -5
- package/src/services/Service.ts +4 -9
|
@@ -8,6 +8,9 @@ import type { ChainContractViewer, ChainStaker, ChainStakeViewer } from './Chain
|
|
|
8
8
|
import type { ElectionService } from './Election.ts';
|
|
9
9
|
import type { StakeIntentService } from './StakeIntentService/index.ts';
|
|
10
10
|
export interface ChainServiceCollection {
|
|
11
|
+
/**
|
|
12
|
+
* The account which is used to sign transactions
|
|
13
|
+
*/
|
|
11
14
|
account: WalletInstance;
|
|
12
15
|
/**
|
|
13
16
|
* Services for working with account balances
|
|
@@ -17,16 +20,43 @@ export interface ChainServiceCollection {
|
|
|
17
20
|
* The archivist which the chain data is stored in
|
|
18
21
|
*/
|
|
19
22
|
chainArchivist: ArchivistInstance;
|
|
23
|
+
/**
|
|
24
|
+
* Service for viewing codified chain information
|
|
25
|
+
* from a contract
|
|
26
|
+
*/
|
|
20
27
|
chainContractViewer: ChainContractViewer;
|
|
21
28
|
/**
|
|
22
29
|
* The chain iterator
|
|
23
30
|
*/
|
|
24
31
|
chainIterator?: EventingChainBlockNumberIterator;
|
|
32
|
+
/**
|
|
33
|
+
* Service for viewing stake information
|
|
34
|
+
*/
|
|
25
35
|
chainStakeViewer: ChainStakeViewer;
|
|
36
|
+
/**
|
|
37
|
+
* Service for staking
|
|
38
|
+
*/
|
|
26
39
|
chainStaker: ChainStaker;
|
|
40
|
+
/**
|
|
41
|
+
* The archivist which the chain submissions are stored in
|
|
42
|
+
*/
|
|
27
43
|
chainSubmissionsArchivistWrite: WriteArchivist;
|
|
44
|
+
/**
|
|
45
|
+
* Service for determining leader election
|
|
46
|
+
*/
|
|
28
47
|
electionService: ElectionService;
|
|
48
|
+
/**
|
|
49
|
+
* The archivist which the pending transactions are stored
|
|
50
|
+
* as bundled transactions
|
|
51
|
+
*/
|
|
52
|
+
pendingBundledTransactionsArchivistWrite: ArchivistInstance;
|
|
53
|
+
/**
|
|
54
|
+
* The block producer service
|
|
55
|
+
*/
|
|
29
56
|
producer: BlockProducerService;
|
|
57
|
+
/**
|
|
58
|
+
* Service response for calculating block rewards
|
|
59
|
+
*/
|
|
30
60
|
rewardService: BlockRewardService;
|
|
31
61
|
/**
|
|
32
62
|
* Services for working with staked intents
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainServiceCollection.d.ts","sourceRoot":"","sources":["../../../src/services/ChainServiceCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EACV,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,EACnD,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAEvE,MAAM,WAAW,sBAAsB;IAErC,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,EAAE,qBAAqB,CAAA;IACrC;;OAEG;IACH,cAAc,EAAE,iBAAiB,CAAA;IACjC,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;OAEG;IACH,aAAa,CAAC,EAAE,gCAAgC,CAAA;IAChD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,WAAW,EAAE,WAAW,CAAA;IACxB,8BAA8B,EAAE,cAAc,CAAA;IAC9C,eAAe,EAAE,eAAe,CAAA;IAChC,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,aAAa,EAAE,kBAAkB,CAAA;IACjC;;OAEG;IACH,kBAAkB,EAAE,kBAAkB,CAAA;CACvC"}
|
|
1
|
+
{"version":3,"file":"ChainServiceCollection.d.ts","sourceRoot":"","sources":["../../../src/services/ChainServiceCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EACV,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,EACnD,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAEvE,MAAM,WAAW,sBAAsB;IAErC;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,EAAE,qBAAqB,CAAA;IACrC;;OAEG;IACH,cAAc,EAAE,iBAAiB,CAAA;IACjC;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;OAEG;IACH,aAAa,CAAC,EAAE,gCAAgC,CAAA;IAChD;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;IAClC;;OAEG;IACH,WAAW,EAAE,WAAW,CAAA;IACxB;;OAEG;IACH,8BAA8B,EAAE,cAAc,CAAA;IAC9C;;OAEG;IACH,eAAe,EAAE,eAAe,CAAA;IAChC;;;OAGG;IACH,wCAAwC,EAAE,iBAAiB,CAAA;IAC3D;;OAEG;IACH,QAAQ,EAAE,oBAAoB,CAAA;IAC9B;;OAEG;IACH,aAAa,EAAE,kBAAkB,CAAA;IACjC;;OAEG;IACH,kBAAkB,EAAE,kBAAkB,CAAA;CACvC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreatableParams } from '@xylabs/creatable';
|
|
2
2
|
import type { EmptyObject } from '@xylabs/object';
|
|
3
3
|
import type { AccountInstance } from '@xyo-network/account-model';
|
|
4
4
|
import type { OpenTelemetryProviders } from '../OpenTelemetryProviders.ts';
|
|
5
|
-
|
|
6
|
-
export type BaseServiceParams<TAdditionalParams extends EmptyObject = EmptyObject> = BaseParams<TAdditionalParams & OpenTelemetryProviders & {
|
|
7
|
-
statusReporter?: ServiceStatusReporter;
|
|
8
|
-
}>;
|
|
5
|
+
export type BaseServiceParams<TAdditionalParams extends EmptyObject = EmptyObject> = CreatableParams<TAdditionalParams & OpenTelemetryProviders>;
|
|
9
6
|
export type BaseAccountableServiceParams = BaseServiceParams<{
|
|
10
7
|
account: AccountInstance;
|
|
11
8
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../src/services/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../../src/services/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAE1E,MAAM,MAAM,iBAAiB,CAAC,iBAAiB,SAAS,WAAW,GAAG,WAAW,IAAI,eAAe,CAAC,iBAAiB,GAAG,sBAAsB,CAAC,CAAA;AAEhJ,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,OAAO,EAAE,eAAe,CAAA;CACzB,CAAC,CAAA"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export
|
|
4
|
-
reportStatus: (name: ServiceName, status: ServiceStatus, progress?: number) => void;
|
|
5
|
-
}
|
|
6
|
-
export interface Service {
|
|
1
|
+
import type { CreatableInstance, CreatableName } from '@xylabs/creatable';
|
|
2
|
+
export type ServiceName = Exclude<string, 'reserved-service-name-value'> & CreatableName;
|
|
3
|
+
export type Service = CreatableInstance<{
|
|
7
4
|
name: ServiceName;
|
|
8
|
-
|
|
9
|
-
}
|
|
5
|
+
}>;
|
|
10
6
|
//# sourceMappingURL=Service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../../src/services/Service.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../../src/services/Service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEzE,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,6BAA6B,CAAC,GAAG,aAAa,CAAA;AAExF,MAAM,MAAM,OAAO,GAAG,iBAAiB,CAAC;IACtC,IAAI,EAAE,WAAW,CAAA;CAClB,CAAC,CAAA"}
|
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.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
5
|
"description": "XYO Layer One Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -38,12 +38,13 @@
|
|
|
38
38
|
"types": "./dist/types/index.d.ts",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@opentelemetry/api": "^1.9.0",
|
|
41
|
-
"@xylabs/base": "^4.12.
|
|
42
|
-
"@xylabs/
|
|
43
|
-
"@xylabs/
|
|
44
|
-
"@xylabs/
|
|
45
|
-
"@xylabs/
|
|
46
|
-
"@xylabs/
|
|
41
|
+
"@xylabs/base": "^4.12.10",
|
|
42
|
+
"@xylabs/creatable": "^4.12.10",
|
|
43
|
+
"@xylabs/events": "^4.12.10",
|
|
44
|
+
"@xylabs/hex": "^4.12.10",
|
|
45
|
+
"@xylabs/object": "^4.12.10",
|
|
46
|
+
"@xylabs/promise": "^4.12.10",
|
|
47
|
+
"@xylabs/typeof": "^4.12.10",
|
|
47
48
|
"@xyo-network/account-model": "^3.18.10",
|
|
48
49
|
"@xyo-network/archivist-model": "^3.18.10",
|
|
49
50
|
"@xyo-network/boundwitness-model": "^3.18.10",
|
|
@@ -71,6 +72,10 @@
|
|
|
71
72
|
"node": ">=22.3 <23"
|
|
72
73
|
},
|
|
73
74
|
"engineStrict": true,
|
|
75
|
+
"volta": {
|
|
76
|
+
"node": "22.3.0",
|
|
77
|
+
"yarn": "4.9.2"
|
|
78
|
+
},
|
|
74
79
|
"publishConfig": {
|
|
75
80
|
"access": "public"
|
|
76
81
|
}
|
|
@@ -13,6 +13,9 @@ import type { StakeIntentService } from './StakeIntentService/index.ts'
|
|
|
13
13
|
|
|
14
14
|
export interface ChainServiceCollection {
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* The account which is used to sign transactions
|
|
18
|
+
*/
|
|
16
19
|
account: WalletInstance
|
|
17
20
|
/**
|
|
18
21
|
* Services for working with account balances
|
|
@@ -22,16 +25,43 @@ export interface ChainServiceCollection {
|
|
|
22
25
|
* The archivist which the chain data is stored in
|
|
23
26
|
*/
|
|
24
27
|
chainArchivist: ArchivistInstance
|
|
28
|
+
/**
|
|
29
|
+
* Service for viewing codified chain information
|
|
30
|
+
* from a contract
|
|
31
|
+
*/
|
|
25
32
|
chainContractViewer: ChainContractViewer
|
|
26
33
|
/**
|
|
27
34
|
* The chain iterator
|
|
28
35
|
*/
|
|
29
36
|
chainIterator?: EventingChainBlockNumberIterator
|
|
37
|
+
/**
|
|
38
|
+
* Service for viewing stake information
|
|
39
|
+
*/
|
|
30
40
|
chainStakeViewer: ChainStakeViewer
|
|
41
|
+
/**
|
|
42
|
+
* Service for staking
|
|
43
|
+
*/
|
|
31
44
|
chainStaker: ChainStaker
|
|
45
|
+
/**
|
|
46
|
+
* The archivist which the chain submissions are stored in
|
|
47
|
+
*/
|
|
32
48
|
chainSubmissionsArchivistWrite: WriteArchivist
|
|
49
|
+
/**
|
|
50
|
+
* Service for determining leader election
|
|
51
|
+
*/
|
|
33
52
|
electionService: ElectionService
|
|
53
|
+
/**
|
|
54
|
+
* The archivist which the pending transactions are stored
|
|
55
|
+
* as bundled transactions
|
|
56
|
+
*/
|
|
57
|
+
pendingBundledTransactionsArchivistWrite: ArchivistInstance
|
|
58
|
+
/**
|
|
59
|
+
* The block producer service
|
|
60
|
+
*/
|
|
34
61
|
producer: BlockProducerService
|
|
62
|
+
/**
|
|
63
|
+
* Service response for calculating block rewards
|
|
64
|
+
*/
|
|
35
65
|
rewardService: BlockRewardService
|
|
36
66
|
/**
|
|
37
67
|
* Services for working with staked intents
|
package/src/services/Params.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreatableParams } from '@xylabs/creatable'
|
|
2
2
|
import type { EmptyObject } from '@xylabs/object'
|
|
3
3
|
import type { AccountInstance } from '@xyo-network/account-model'
|
|
4
4
|
|
|
5
5
|
import type { OpenTelemetryProviders } from '../OpenTelemetryProviders.ts'
|
|
6
|
-
import type { ServiceStatusReporter } from './Service.ts'
|
|
7
6
|
|
|
8
|
-
export type BaseServiceParams<TAdditionalParams extends EmptyObject = EmptyObject> =
|
|
9
|
-
statusReporter?: ServiceStatusReporter
|
|
10
|
-
}>
|
|
7
|
+
export type BaseServiceParams<TAdditionalParams extends EmptyObject = EmptyObject> = CreatableParams<TAdditionalParams & OpenTelemetryProviders>
|
|
11
8
|
|
|
12
9
|
export type BaseAccountableServiceParams = BaseServiceParams<{
|
|
13
10
|
account: AccountInstance
|
package/src/services/Service.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CreatableInstance, CreatableName } from '@xylabs/creatable'
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type ServiceName = Exclude<string, 'reserved-service-name-value'> & CreatableName
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
reportStatus: (name: ServiceName, status: ServiceStatus, progress?: number) => void
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface Service {
|
|
5
|
+
export type Service = CreatableInstance<{
|
|
10
6
|
name: ServiceName
|
|
11
|
-
|
|
12
|
-
}
|
|
7
|
+
}>
|