@xyo-network/xl1-network-model 1.26.12 → 1.26.13

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/xl1-network-model",
3
- "version": "1.26.12",
3
+ "version": "1.26.13",
4
4
  "description": "XYO Layer One API",
5
5
  "homepage": "https://xylabs.com",
6
6
  "bugs": {
@@ -42,29 +42,45 @@
42
42
  "types": "./dist/neutral/index.d.ts",
43
43
  "files": [
44
44
  "dist",
45
- "src",
46
45
  "!**/*.bench.*",
47
46
  "!**/*.spec.*",
48
47
  "!**/*.test.*",
49
48
  "README.md"
50
49
  ],
51
50
  "dependencies": {
52
- "@xyo-network/xl1-protocol-lib": "~1.26.12"
51
+ "@xyo-network/xl1-protocol-lib": "~1.26.13"
53
52
  },
54
53
  "devDependencies": {
54
+ "@firebase/app": "0.x",
55
+ "@firebase/app-compat": "0.x",
56
+ "@firebase/app-types": "0.x",
57
+ "@firebase/util": "1.x",
58
+ "@metamask/providers": "^22",
55
59
  "@opentelemetry/api": "^1.9.1",
56
60
  "@types/node": "^25.5.0",
61
+ "@xylabs/geo": "^5",
57
62
  "@xylabs/sdk-js": "^5.0.91",
58
- "@xylabs/ts-scripts-common": "~7.6.2",
59
- "@xylabs/ts-scripts-yarn3": "~7.6.2",
60
- "@xylabs/tsconfig": "~7.6.2",
61
- "@xyo-network/sdk-js": "^5.3.20",
62
- "axios": "^1",
63
- "dotenv": "~17.3.1",
64
- "ethers": "^6",
63
+ "@xylabs/ts-scripts-common": "~7.6.13",
64
+ "@xylabs/ts-scripts-yarn3": "~7.6.13",
65
+ "@xylabs/tsconfig": "~7.6.13",
66
+ "@xyo-network/sdk-js": "^5.3.22",
67
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0",
68
+ "ajv": "^8",
69
+ "axios": "^1.14.0",
70
+ "cosmiconfig": ">=9",
71
+ "dotenv": "~17.4.0",
72
+ "esbuild": ">=0.18",
73
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0",
74
+ "ethers": "^6.16.0",
75
+ "firebase": "^12",
76
+ "lru-cache": "^11",
77
+ "mapbox-gl": "^3",
78
+ "rollup": "^3.29.4 || ^4",
79
+ "tslib": "^2.8.1",
65
80
  "typescript": "~5.9.3",
66
- "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
81
+ "vite": "^8.0.3",
67
82
  "vitest": "~4.1.2",
83
+ "webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0",
68
84
  "zod": "~4.3.6"
69
85
  },
70
86
  "peerDependencies": {
@@ -1,3 +0,0 @@
1
- export * from './local/index.ts'
2
- export * from './mainnet/index.ts'
3
- export * from './sequence/index.ts'
@@ -1 +0,0 @@
1
- export { default as LocalNetworkIconString } from './local.svg'
@@ -1 +0,0 @@
1
- <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><g style="opacity:.5;"><path d="M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z" style="fill:#f47f00;"/><path d="M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z" style="fill:#f47f00;"/><path d="M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z" style="fill:#f47f00;"/><path d="M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z" style="fill:#f47f00;"/></g><path d="M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z" style="fill:#f47f00;"/></svg>
@@ -1 +0,0 @@
1
- export { default as MainNetworkIconString } from './mainnet.svg'
@@ -1 +0,0 @@
1
- <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z" style="fill:#8d8fc6;"/><path d="M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z" style="fill:#eb407a;"/><path d="M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z" style="fill:#579fd6;"/><path d="M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z" style="fill:#f27046;"/><path d="M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z" style="fill:#572aff;"/></svg>
@@ -1 +0,0 @@
1
- export { default as SequenceNetworkIconString } from './testnet.svg'
@@ -1 +0,0 @@
1
- <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><g style="opacity:.5;"><path d="M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z" style="fill:#579fd6;"/><path d="M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z" style="fill:#579fd6;"/><path d="M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z" style="fill:#579fd6;"/><path d="M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z" style="fill:#579fd6;"/></g><path d="M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z" style="fill:#579fd6;"/></svg>
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './icons/index.ts'
2
- export * from './lib/index.ts'
3
- export * from './models/index.ts'
4
- export * from './modules/index.ts'
@@ -1,12 +0,0 @@
1
- import type { GatewayName } from '@xyo-network/xl1-protocol-lib'
2
-
3
- import {
4
- LocalNetwork, MainNetwork, SequenceNetwork,
5
- } from './Networks.ts'
6
-
7
- /** Map of network IDs to their corresponding Data Lake API URLs. */
8
- export const NetworkDataLakeUrls = {
9
- [MainNetwork.id]: 'https://api.archivist.xyo.network/dataLake',
10
- [SequenceNetwork.id]: 'https://beta.api.archivist.xyo.network/dataLake',
11
- [LocalNetwork.id]: 'http://localhost:8080/dataLake',
12
- } as const satisfies Record<GatewayName, string>
@@ -1,48 +0,0 @@
1
- import { asHex } from '@xylabs/sdk-js'
2
-
3
- import {
4
- LocalNetworkIconString, MainNetworkIconString, SequenceNetworkIconString,
5
- } from '../icons/index.ts'
6
- import type { NetworkBootstrap, NetworkId } from '../models/index.ts'
7
- import { NetworkBootstrapSchema } from '../models/index.ts'
8
-
9
- /** Bootstrap configuration for the XYO Layer 1 mainnet. */
10
- export const MainNetwork: NetworkBootstrap = {
11
- chain: asHex('319e667ced10452a117472811130444ded357f26', true),
12
- description: 'Main Network for XYO Layer 1',
13
- icon: MainNetworkIconString,
14
- id: 'mainnet' as NetworkId,
15
- name: 'Mainnet',
16
- schema: NetworkBootstrapSchema,
17
- symbol: 'XL1',
18
- url: 'https://api.chain.xyo.network',
19
- explorerUrl: 'https://explore.xyo.network',
20
- }
21
-
22
- /** Bootstrap configuration for the XYO Layer 1 sequence (test) network. */
23
- export const SequenceNetwork: NetworkBootstrap = {
24
- chain: asHex('4b43a753c8024c0e5000e8ac948ac0063ac624bc', true),
25
- description: 'Test Network for XYO Layer 1',
26
- icon: SequenceNetworkIconString,
27
- id: 'sequence' as NetworkId,
28
- name: 'Sequence',
29
- schema: NetworkBootstrapSchema,
30
- symbol: 'XL1',
31
- url: 'https://beta.api.chain.xyo.network',
32
- explorerUrl: 'https://beta.explore.xyo.network',
33
- }
34
-
35
- /** Bootstrap configuration for a local development network. */
36
- export const LocalNetwork: NetworkBootstrap = {
37
- description: 'Local Node',
38
- icon: LocalNetworkIconString,
39
- id: 'local' as NetworkId,
40
- name: 'Local',
41
- schema: NetworkBootstrapSchema,
42
- symbol: 'XL1',
43
- url: 'http://localhost:8080',
44
- explorerUrl: 'http://localhost:3000',
45
- }
46
-
47
- /** Default set of available XYO Layer 1 networks (mainnet, sequence, local). */
48
- export const DefaultNetworks: NetworkBootstrap[] = [MainNetwork, SequenceNetwork, LocalNetwork]
package/src/lib/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './NetworkDataLakeUrls.ts'
2
- export * from './Networks.ts'
@@ -1 +0,0 @@
1
- export * from './networkManifest.ts'
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
- "nodes": [
4
- {
5
- "config": {
6
- "accountPath": "44'/60'/1",
7
- "name": "Network",
8
- "schema": "network.xyo.node.config"
9
- },
10
- "modules": {
11
- "private": [],
12
- "public": []
13
- }
14
- }
15
- ],
16
- "schema": "network.xyo.manifest"
17
- }
@@ -1,8 +0,0 @@
1
- import type { PackageManifestPayload } from '@xyo-network/sdk-js'
2
-
3
- import node from './network.json' with { type: 'json' }
4
-
5
- /**
6
- * Root Node Manifest
7
- */
8
- export const NetworkNodeManifest = node as unknown as PackageManifestPayload
@@ -1,64 +0,0 @@
1
- import type { Address } from '@xylabs/sdk-js'
2
- import { AsObjectFactory } from '@xylabs/sdk-js'
3
- import type { Payload } from '@xyo-network/sdk-js'
4
- import { asSchema, isPayloadOfSchemaType } from '@xyo-network/sdk-js'
5
- import type { ChainId } from '@xyo-network/xl1-protocol-lib'
6
-
7
- import type { NetworkId } from './NetworkId.ts'
8
-
9
- /** Connection details for accessing a chain endpoint. */
10
- export interface ChainConnection {
11
- /** Chain Identifier - can be a hex (eth contract address) or a string */
12
- chain?: ChainId
13
- /** Name of the chain */
14
- name: string
15
- /** Url for accessing the network */
16
- url: string
17
- }
18
-
19
- /** Schema identifier for network bootstrap payloads. */
20
- export const NetworkBootstrapSchema = asSchema('network.xyo.network.bootstrap', true)
21
- /** Schema type for network bootstrap payloads. */
22
- export type NetworkBootstrapSchema = typeof NetworkBootstrapSchema
23
-
24
- /** Fields describing a chain fork origin. */
25
- export interface ChainForkFields {
26
- /** Block Number at which the chain was forked from */
27
- forkedAtLastBlockNumber?: string
28
- /** Hash in the last block the chain was forked from */
29
- forkedAtLastHash?: string
30
- /** Address of the forked chain */
31
- forkedChainId?: Address
32
- }
33
-
34
- /** Core fields describing an XYO network. */
35
- export interface NetworkFields {
36
- /** Description of the network */
37
- description: string
38
- /** Url for accessing the network explorer */
39
- explorerUrl?: string
40
- /** string representation of the icon (svg) */
41
- icon?: string
42
- /** Machine-readable identifier */
43
- id: NetworkId
44
- schema: NetworkBootstrapSchema
45
- /** Symbol of the network */
46
- symbol?: string
47
- }
48
-
49
- /** Optional Properties can be found walking the chain to the genesis block */
50
- export interface NetworkBootstrapFields extends NetworkFields, ChainForkFields, ChainConnection {}
51
-
52
- /** A network bootstrap extended with a flag indicating whether it is a custom network. */
53
- export interface Network extends NetworkBootstrap {
54
- custom: boolean
55
- }
56
-
57
- /** Payload type containing all network bootstrap configuration fields. */
58
- export type NetworkBootstrap = Payload<NetworkBootstrapFields, NetworkBootstrapSchema>
59
-
60
- /** Type guard that checks whether a payload is a NetworkBootstrap. */
61
- export const isNetworkBootstrap = isPayloadOfSchemaType<NetworkBootstrap>(NetworkBootstrapSchema)
62
-
63
- /** Optionally casts a value to a Network if it is a valid NetworkBootstrap. */
64
- export const asOptionalNetwork = AsObjectFactory.createOptional(isNetworkBootstrap)
@@ -1,6 +0,0 @@
1
- import type { GatewayName } from '@xyo-network/xl1-protocol-lib'
2
-
3
- /** Default network identifiers for mainnet, sequence, and local environments. */
4
- export type DefaultNetworkIds = ('mainnet' & { __gatewayName: true }) | ('sequence' & { __gatewayName: true }) | ('local' & { __gatewayName: true })
5
- /** A network identifier, either a custom gateway name or one of the default network IDs. */
6
- export type NetworkId<T extends GatewayName | void = void> = | T extends void ? DefaultNetworkIds : T | DefaultNetworkIds
@@ -1,2 +0,0 @@
1
- export * from './Bootstrap.ts'
2
- export * from './NetworkId.ts'
@@ -1 +0,0 @@
1
- export * from './node/index.ts'
@@ -1,11 +0,0 @@
1
- import type { AttachableNodeInstance, WalletInstance } from '@xyo-network/sdk-js'
2
- import { ManifestWrapper, ModuleFactoryLocator } from '@xyo-network/sdk-js'
3
-
4
- import { NetworkNodeManifest } from '../../manifest/index.ts'
5
-
6
- /** Creates a network node from the network manifest using the provided wallet. */
7
- export const getNetworkNode = async (wallet: WalletInstance): Promise<AttachableNodeInstance> => {
8
- const wrapper = new ManifestWrapper(NetworkNodeManifest, wallet, new ModuleFactoryLocator())
9
- const [node] = await wrapper.loadNodes()
10
- return node
11
- }
@@ -1,8 +0,0 @@
1
- import type { AttachableNodeInstance } from '@xyo-network/sdk-js'
2
-
3
- const networkNodeMap = new Map<string, AttachableNodeInstance>()
4
-
5
- /** Returns the global map of network URL to node instance. */
6
- export const getNetworkNodes = () => {
7
- return networkNodeMap
8
- }
@@ -1,3 +0,0 @@
1
- export * from './getNetworkNode.ts'
2
- export * from './getNetworkNodes.ts'
3
- export * from './initNetworkNode.ts'
@@ -1,16 +0,0 @@
1
- import type { AttachableNodeInstance, WalletInstance } from '@xyo-network/sdk-js'
2
-
3
- import type { NetworkBootstrap } from '../../models/index.ts'
4
- import { getNetworkNode } from './getNetworkNode.ts'
5
- import { getNetworkNodes } from './getNetworkNodes.ts'
6
-
7
- /** Initializes or retrieves a cached network node for the given network and wallet. */
8
- export const initNetworkNode = async (activeNetwork: NetworkBootstrap, wallet: WalletInstance): Promise<AttachableNodeInstance> => {
9
- const networkNodeMap = getNetworkNodes()
10
- if (networkNodeMap.has(activeNetwork.url)) return networkNodeMap.get(activeNetwork.url)!
11
-
12
- const activeNetworkNode = await getNetworkNode(wallet)
13
- networkNodeMap.set(activeNetwork.url, activeNetworkNode)
14
-
15
- return activeNetworkNode
16
- }
@@ -1,9 +0,0 @@
1
- declare module '*.png'
2
- declare module '*.jpg'
3
- declare module '*.gif'
4
- declare module '*.webp'
5
-
6
- declare module '*.svg' {
7
- const src: string
8
- export default src
9
- }