@xyo-network/chain-services 1.15.19 → 1.15.21

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/chain-services",
4
- "version": "1.15.19",
4
+ "version": "1.15.21",
5
5
  "description": "XYO Layer One SDK Services",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -37,48 +37,48 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@opentelemetry/api": "~1.9.0",
40
- "@xylabs/array": "~5.0.13",
41
- "@xylabs/assert": "~5.0.13",
42
- "@xylabs/creatable": "~5.0.13",
43
- "@xylabs/decimal-precision": "~5.0.13",
44
- "@xylabs/events": "~5.0.13",
45
- "@xylabs/exists": "~5.0.13",
46
- "@xylabs/forget": "~5.0.13",
47
- "@xylabs/hex": "~5.0.13",
48
- "@xylabs/promise": "~5.0.13",
49
- "@xylabs/telemetry": "~5.0.13",
50
- "@xylabs/typeof": "~5.0.13",
51
- "@xyo-network/account-model": "~5.1.7",
52
- "@xyo-network/archivist-memory": "~5.1.7",
53
- "@xyo-network/archivist-model": "~5.1.7",
54
- "@xyo-network/boundwitness-model": "~5.1.7",
55
- "@xyo-network/boundwitness-validator": "~5.1.7",
56
- "@xyo-network/boundwitness-wrapper": "~5.1.7",
57
- "@xyo-network/chain-analyze": "~1.15.19",
58
- "@xyo-network/chain-modules": "~1.15.19",
59
- "@xyo-network/chain-protocol": "~1.15.19",
60
- "@xyo-network/chain-utils": "~1.15.19",
61
- "@xyo-network/payload-builder": "~5.1.7",
62
- "@xyo-network/payload-model": "~5.1.7",
40
+ "@xylabs/array": "~5.0.14",
41
+ "@xylabs/assert": "~5.0.14",
42
+ "@xylabs/creatable": "~5.0.14",
43
+ "@xylabs/decimal-precision": "~5.0.14",
44
+ "@xylabs/events": "~5.0.14",
45
+ "@xylabs/exists": "~5.0.14",
46
+ "@xylabs/forget": "~5.0.14",
47
+ "@xylabs/hex": "~5.0.14",
48
+ "@xylabs/promise": "~5.0.14",
49
+ "@xylabs/telemetry": "~5.0.14",
50
+ "@xylabs/typeof": "~5.0.14",
51
+ "@xyo-network/account-model": "~5.1.8",
52
+ "@xyo-network/archivist-memory": "~5.1.8",
53
+ "@xyo-network/archivist-model": "~5.1.8",
54
+ "@xyo-network/boundwitness-model": "~5.1.8",
55
+ "@xyo-network/boundwitness-validator": "~5.1.8",
56
+ "@xyo-network/boundwitness-wrapper": "~5.1.8",
57
+ "@xyo-network/chain-analyze": "~1.15.21",
58
+ "@xyo-network/chain-modules": "~1.15.21",
59
+ "@xyo-network/chain-protocol": "~1.15.21",
60
+ "@xyo-network/chain-utils": "~1.15.21",
61
+ "@xyo-network/payload-builder": "~5.1.8",
62
+ "@xyo-network/payload-model": "~5.1.8",
63
63
  "@xyo-network/typechain": "~4.0.10",
64
64
  "@xyo-network/xl1-protocol": "~1.12.84",
65
- "@xyo-network/xl1-protocol-sdk": "~1.15.19",
66
- "@xyo-network/xl1-validation": "~1.15.19",
67
- "@xyo-network/xl1-wrappers": "~1.15.19",
65
+ "@xyo-network/xl1-protocol-sdk": "~1.15.21",
66
+ "@xyo-network/xl1-validation": "~1.15.21",
67
+ "@xyo-network/xl1-wrappers": "~1.15.21",
68
68
  "async-mutex": "~0.5.0",
69
69
  "ethers": "6.15.0",
70
70
  "lru-cache": "~11.2.2"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/node": "~24.9.1",
74
- "@xylabs/delay": "~5.0.13",
74
+ "@xylabs/delay": "~5.0.14",
75
75
  "@xylabs/ts-scripts-yarn3": "~7.1.8",
76
76
  "@xylabs/tsconfig": "~7.1.8",
77
- "@xylabs/vitest-extended": "~5.0.13",
78
- "@xyo-network/account": "~5.1.7",
79
- "@xyo-network/account-model": "~5.1.7",
80
- "@xyo-network/chain-validation": "~1.15.19",
81
- "@xyo-network/wallet": "~5.1.7",
77
+ "@xylabs/vitest-extended": "~5.0.14",
78
+ "@xyo-network/account": "~5.1.8",
79
+ "@xyo-network/account-model": "~5.1.8",
80
+ "@xyo-network/chain-validation": "~1.15.21",
81
+ "@xyo-network/wallet": "~5.1.8",
82
82
  "eslint": "^9.38.0",
83
83
  "tslib": "~2.8.1",
84
84
  "typescript": "~5.9.3",
@@ -1,6 +1,6 @@
1
- import { ZERO_HASH } from '@xylabs/hex'
1
+ import { assertEx } from '@xylabs/assert'
2
2
  import type { ReadArchivist } from '@xyo-network/archivist-model'
3
- import { LruCacheMap } from '@xyo-network/chain-protocol'
3
+ import { findMostRecentBlock, LruCacheMap } from '@xyo-network/chain-protocol'
4
4
  import type { Payload, WithStorageMeta } from '@xyo-network/payload-model'
5
5
  import type { AccountBalanceServiceV2, ChainId } from '@xyo-network/xl1-protocol'
6
6
  import { StepSizes } from '@xyo-network/xl1-protocol'
@@ -21,13 +21,17 @@ export const accountBalancesServiceFromArchivist = async (
21
21
  updateAgeOnGet: true,
22
22
  })
23
23
  const chainMap = readPayloadMapFromStore<WithStorageMeta<Payload>>(archivist)
24
+ const headFunc = async () => {
25
+ const head = await findMostRecentBlock(archivist)
26
+ return assertEx(head?._hash, () => 'No head found in chainArchivist')
27
+ }
24
28
  const service = await BaseAccountBalanceService.create({
25
29
  context: {
26
30
  chainId,
27
31
  store: { chainMap },
28
32
  stepSemaphores: StepSizes.map(() => new Semaphore(20)),
29
33
  summaryMap,
30
- head: () => ZERO_HASH,
34
+ head: headFunc,
31
35
  },
32
36
  })
33
37
  return service
@@ -1,6 +1,6 @@
1
- import { ZERO_HASH } from '@xylabs/hex'
1
+ import { assertEx } from '@xylabs/assert'
2
2
  import type { ReadArchivist } from '@xyo-network/archivist-model'
3
- import { LruCacheMap } from '@xyo-network/chain-protocol'
3
+ import { findMostRecentBlock, LruCacheMap } from '@xyo-network/chain-protocol'
4
4
  import type { Payload, WithStorageMeta } from '@xyo-network/payload-model'
5
5
  import type { AccountTransfersService, ChainId } from '@xyo-network/xl1-protocol'
6
6
  import { StepSizes } from '@xyo-network/xl1-protocol'
@@ -21,13 +21,17 @@ export const accountTransfersServiceFromArchivist = async (
21
21
  updateAgeOnGet: true,
22
22
  })
23
23
  const chainMap = readPayloadMapFromStore<WithStorageMeta<Payload>>(archivist)
24
+ const headFunc = async () => {
25
+ const head = await findMostRecentBlock(archivist)
26
+ return assertEx(head?._hash, () => 'No head found in chainArchivist')
27
+ }
24
28
  const service = await BaseAccountTransfersService.create({
25
29
  context: {
26
30
  chainId,
27
31
  store: { chainMap },
28
32
  stepSemaphores: StepSizes.map(() => new Semaphore(20)),
29
33
  summaryMap,
30
- head: () => ZERO_HASH,
34
+ head: headFunc,
31
35
  },
32
36
  })
33
37
  return service