@xyo-network/xl1-protocol-sdk 1.22.21 → 1.22.23

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/xl1-protocol-sdk",
4
- "version": "1.22.21",
4
+ "version": "1.22.23",
5
5
  "description": "XYO Layer One SDK Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -56,8 +56,8 @@
56
56
  "@xyo-network/payload-builder": "~5.3.2",
57
57
  "@xyo-network/payload-model": "~5.3.2",
58
58
  "@xyo-network/wallet": "~5.3.2",
59
- "@xyo-network/xl1-protocol": "~1.22.21",
60
- "@xyo-network/xl1-schema": "~1.22.21",
59
+ "@xyo-network/xl1-protocol": "~1.22.23",
60
+ "@xyo-network/xl1-schema": "~1.22.23",
61
61
  "async-mutex": "~0.5.0",
62
62
  "ethers": "^6.16.0",
63
63
  "lru-cache": "^11.2.5"
@@ -0,0 +1,12 @@
1
+ import type { Config } from '../../config/index.ts'
2
+ import { type CreatableProviderContext, ProviderFactoryLocator } from '../../CreatableProvider/index.ts'
3
+
4
+ // This file should not be exported from the package
5
+ export function getEmptyProviderContext(config: Config): CreatableProviderContext {
6
+ const singletons = {}
7
+ const caches = {}
8
+ const locator = new ProviderFactoryLocator({
9
+ config, singletons, caches, logger: console,
10
+ })
11
+ return locator.context
12
+ }
@@ -0,0 +1 @@
1
+ export * from './getEmptyProviderContext.ts'
@@ -0,0 +1,2 @@
1
+ // _internal should never be exported from public barrel
2
+ export * from './context/index.ts'
@@ -1,6 +1,7 @@
1
1
  import type { Config } from '../config/index.ts'
2
2
  import { type CreatableProviderContext, ProviderFactoryLocator } from '../CreatableProvider/index.ts'
3
3
 
4
+ /** @deprecated use getTestProviderContext instead */
4
5
  export function getEmptyProviderContext(config: Config): CreatableProviderContext {
5
6
  const singletons = {}
6
7
  const caches = {}
@@ -12,5 +13,6 @@ export function getEmptyProviderContext(config: Config): CreatableProviderContex
12
13
 
13
14
  /** @deprecated Use getEmptyProviderContext instead */
14
15
  export function getEmptyContext(config: Config) {
16
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
15
17
  return getEmptyProviderContext(config)
16
18
  }
@@ -3,9 +3,9 @@ import { Account } from '@xyo-network/account'
3
3
  import type { ArchivistInstance } from '@xyo-network/archivist-model'
4
4
  import { type ChainId, XYO_ZERO_ADDRESS } from '@xyo-network/xl1-protocol'
5
5
 
6
+ import { getEmptyProviderContext } from '../_internal/index.ts'
6
7
  import type { Config } from '../config/index.ts'
7
8
  import { ConfigZod } from '../config/index.ts'
8
- import { getEmptyProviderContext } from '../context/index.ts'
9
9
  import {
10
10
  SimpleBlockViewer, SimpleChainContractViewer, SimpleFinalizationViewer,
11
11
  } from '../simple/index.ts'
@@ -0,0 +1,7 @@
1
+ import { getEmptyProviderContext } from '../_internal/index.ts'
2
+ import type { Config } from '../config/index.ts'
3
+ import { type CreatableProviderContext } from '../CreatableProvider/index.ts'
4
+
5
+ export function getTestProviderContext(config: Config): CreatableProviderContext {
6
+ return getEmptyProviderContext(config)
7
+ }
package/src/test/index.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './getSimpleBlockViewerLocator.ts'
2
+ export * from './getTestProviderContext.ts'