@xyo-network/react-network 2.26.36 → 2.26.39
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/docs.json +1 -1
- package/package.json +2 -2
- package/src/components/SelectEx/NetworkSelectEx.stories.tsx +100 -0
- package/src/components/SelectEx/NetworkSelectEx.tsx +38 -0
- package/src/components/SelectEx/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/contexts/Context.ts +5 -0
- package/src/contexts/Provider/Memory.tsx +15 -0
- package/src/contexts/Provider/Props.tsx +5 -0
- package/src/contexts/Provider/Route.tsx +71 -0
- package/src/contexts/Provider/index.ts +3 -0
- package/src/contexts/State.ts +12 -0
- package/src/contexts/index.ts +4 -0
- package/src/contexts/use.ts +8 -0
- package/src/index.ts +3 -0
- package/src/lib/Config/default.ts +28 -0
- package/src/lib/Config/find.ts +10 -0
- package/src/lib/Config/index.ts +2 -0
- package/src/lib/ExplorerMapHashes.ts +16 -0
- package/src/lib/archivistPresets.ts +50 -0
- package/src/lib/divinerPresets.ts +36 -0
- package/src/lib/index.ts +3 -0
package/dist/docs.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"fileName": "index.ts",
|
|
11
11
|
"line": 1,
|
|
12
12
|
"character": 0,
|
|
13
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
13
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/413a933/packages/network/src/index.ts#L1"
|
|
14
14
|
}
|
|
15
15
|
]
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@xylabs/react-shared": "^2.14.10",
|
|
19
19
|
"@xylabs/sdk-js": "^2.6.2",
|
|
20
20
|
"@xyo-network/network": "^2.22.15",
|
|
21
|
-
"@xyo-network/react-shared": "^2.26.
|
|
21
|
+
"@xyo-network/react-shared": "^2.26.39",
|
|
22
22
|
"react": "^18.2.0",
|
|
23
23
|
"react-dom": "^18.2.0",
|
|
24
24
|
"react-router-dom": "^6.3.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
},
|
|
82
82
|
"sideEffects": false,
|
|
83
83
|
"types": "dist/esm/index.d.ts",
|
|
84
|
-
"version": "2.26.
|
|
84
|
+
"version": "2.26.39"
|
|
85
85
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Card, CardContent } from '@mui/material'
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
|
3
|
+
import { FlexCol } from '@xylabs/react-flexbox'
|
|
4
|
+
import { useEffect, useState } from 'react'
|
|
5
|
+
import { BrowserRouter } from 'react-router-dom'
|
|
6
|
+
|
|
7
|
+
import { NetworkMemoryProvider, NetworkRouteProvider, useNetwork } from '../../contexts'
|
|
8
|
+
import { NetworkSelectEx } from './NetworkSelectEx'
|
|
9
|
+
|
|
10
|
+
const StorybookEntry = {
|
|
11
|
+
argTypes: {
|
|
12
|
+
responsive: {
|
|
13
|
+
defaultValue: false,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
component: NetworkSelectEx,
|
|
17
|
+
parameters: {
|
|
18
|
+
docs: {
|
|
19
|
+
page: null,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
title: 'network/NetworkSelectEx',
|
|
23
|
+
} as ComponentMeta<typeof NetworkSelectEx>
|
|
24
|
+
|
|
25
|
+
const NetworkConfigOutput = () => {
|
|
26
|
+
const { network } = useNetwork()
|
|
27
|
+
return (
|
|
28
|
+
<FlexCol my={2}>
|
|
29
|
+
<Card>
|
|
30
|
+
<CardContent>
|
|
31
|
+
<pre>{JSON.stringify(network, null, 2)}</pre>
|
|
32
|
+
</CardContent>
|
|
33
|
+
</Card>
|
|
34
|
+
</FlexCol>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const Template: ComponentStory<typeof NetworkSelectEx> = (args) => {
|
|
39
|
+
return <NetworkSelectEx {...args}></NetworkSelectEx>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const TemplateWithMemoryProvider: ComponentStory<typeof NetworkSelectEx> = (props) => {
|
|
43
|
+
return (
|
|
44
|
+
<NetworkMemoryProvider>
|
|
45
|
+
<NetworkSelectEx {...props}></NetworkSelectEx>
|
|
46
|
+
<NetworkConfigOutput />
|
|
47
|
+
</NetworkMemoryProvider>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const TemplateWithRouteProvider: ComponentStory<typeof NetworkSelectEx> = (props) => {
|
|
52
|
+
const url = new URL(window.location.toString())
|
|
53
|
+
url.searchParams.set('network', 'main')
|
|
54
|
+
history.pushState({}, '', url)
|
|
55
|
+
return (
|
|
56
|
+
<BrowserRouter>
|
|
57
|
+
<NetworkRouteProvider>
|
|
58
|
+
<TemplateWithRouteProviderInner {...props} />
|
|
59
|
+
</NetworkRouteProvider>
|
|
60
|
+
</BrowserRouter>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const TemplateWithRouteProviderInner: ComponentStory<typeof NetworkSelectEx> = (props) => {
|
|
65
|
+
const { network } = useNetwork()
|
|
66
|
+
const [uris, setUris] = useState<(string | undefined)[]>([])
|
|
67
|
+
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
setUris((previous) => [...previous, network?.nodes?.find((node) => node.type === 'archivist')?.uri])
|
|
70
|
+
}, [network?.nodes])
|
|
71
|
+
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (uris.length > 1) {
|
|
74
|
+
throw Error('Error: Route Provider sent multiple network uris but should only send one.')
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<>
|
|
80
|
+
<NetworkSelectEx {...props}></NetworkSelectEx>
|
|
81
|
+
{uris.map((uri) => (
|
|
82
|
+
<p key={uri}>{uri}</p>
|
|
83
|
+
))}
|
|
84
|
+
</>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const Default = Template.bind({})
|
|
89
|
+
Default.args = {}
|
|
90
|
+
|
|
91
|
+
const WithMemoryProvider = TemplateWithMemoryProvider.bind({})
|
|
92
|
+
WithMemoryProvider.args = {}
|
|
93
|
+
|
|
94
|
+
const WithRouteProvider = TemplateWithRouteProvider.bind({})
|
|
95
|
+
WithRouteProvider.args = {}
|
|
96
|
+
|
|
97
|
+
export { Default, WithMemoryProvider, WithRouteProvider }
|
|
98
|
+
|
|
99
|
+
// eslint-disable-next-line import/no-default-export
|
|
100
|
+
export default StorybookEntry
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MenuItem } from '@mui/material'
|
|
2
|
+
import { SelectEx, SelectExProps } from '@xylabs/react-common'
|
|
3
|
+
import { useBreakpoint } from '@xylabs/react-shared'
|
|
4
|
+
import { assertEx } from '@xylabs/sdk-js'
|
|
5
|
+
|
|
6
|
+
import { useNetwork } from '../../contexts'
|
|
7
|
+
import { findNetworkConfig } from '../../lib'
|
|
8
|
+
|
|
9
|
+
export interface NetworkSelectExProps extends SelectExProps<string> {
|
|
10
|
+
responsive?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const NetworkSelectEx: React.FC<NetworkSelectExProps> = ({ onChange, responsive = true, ...props }) => {
|
|
14
|
+
const { network, setNetwork, networks } = useNetwork(false)
|
|
15
|
+
const sm = useBreakpoint() === 'sm'
|
|
16
|
+
return (
|
|
17
|
+
<SelectEx
|
|
18
|
+
variant="outlined"
|
|
19
|
+
size="small"
|
|
20
|
+
value={network?.slug ?? ''}
|
|
21
|
+
onChange={(event, child) => {
|
|
22
|
+
if (event.target.value !== network?.slug) {
|
|
23
|
+
onChange?.(event, child)
|
|
24
|
+
setNetwork?.(assertEx(findNetworkConfig(event.target.value, networks)))
|
|
25
|
+
}
|
|
26
|
+
}}
|
|
27
|
+
{...props}
|
|
28
|
+
>
|
|
29
|
+
{networks?.map((network) => {
|
|
30
|
+
return (
|
|
31
|
+
<MenuItem key={network.slug} value={network.slug}>
|
|
32
|
+
{responsive && sm ? network.name?.[0].toUpperCase() : network.name}
|
|
33
|
+
</MenuItem>
|
|
34
|
+
)
|
|
35
|
+
})}
|
|
36
|
+
</SelectEx>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NetworkSelectEx'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SelectEx'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { WithChildren } from '@xylabs/react-shared'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
|
|
4
|
+
import { defaultNetworkConfigs } from '../../lib'
|
|
5
|
+
import { NetworkContext } from '../Context'
|
|
6
|
+
import { NetworkProviderProps } from './Props'
|
|
7
|
+
|
|
8
|
+
export const NetworkMemoryProvider: React.FC<WithChildren<NetworkProviderProps>> = ({ defaultNetwork, ...props }) => {
|
|
9
|
+
const [network, setNetwork] = useState(defaultNetwork ?? defaultNetworkConfigs[0])
|
|
10
|
+
|
|
11
|
+
return <NetworkContext.Provider value={{ network, networks: defaultNetworkConfigs, provided: true, setNetwork }} {...props} />
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** @deprecated use NetworkMemoryProvider instead */
|
|
15
|
+
export const NetworkProvider = NetworkMemoryProvider
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { WithChildren } from '@xylabs/react-shared'
|
|
2
|
+
import { XyoNetworkPayload } from '@xyo-network/network'
|
|
3
|
+
import { useCallback, useEffect, useState } from 'react'
|
|
4
|
+
import { useSearchParams } from 'react-router-dom'
|
|
5
|
+
|
|
6
|
+
import { defaultNetworkConfigs, findNetworkConfig } from '../../lib'
|
|
7
|
+
import { NetworkContext } from '../Context'
|
|
8
|
+
import { useNetwork } from '../use'
|
|
9
|
+
import { NetworkMemoryProvider } from './Memory'
|
|
10
|
+
import { NetworkProviderProps } from './Props'
|
|
11
|
+
|
|
12
|
+
const NetworkRouteProviderInner: React.FC<WithChildren> = ({ children }) => {
|
|
13
|
+
const [initialized, setInitialized] = useState(false)
|
|
14
|
+
const { network, setNetwork } = useNetwork()
|
|
15
|
+
|
|
16
|
+
const [params, setParams] = useSearchParams()
|
|
17
|
+
|
|
18
|
+
const slug = params.get('network')
|
|
19
|
+
const routeNetwork = slug ? findNetworkConfig(slug) : undefined
|
|
20
|
+
|
|
21
|
+
//update the network stored in the route
|
|
22
|
+
const setNetworkParam = useCallback(
|
|
23
|
+
(network?: XyoNetworkPayload) => {
|
|
24
|
+
if (network) {
|
|
25
|
+
params.set('network', network.slug)
|
|
26
|
+
setParams(params, { replace: true })
|
|
27
|
+
setNetwork?.(network)
|
|
28
|
+
} else {
|
|
29
|
+
params.delete('network')
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
[params, setParams, setNetwork]
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
//if the network is actively changed, update both memory and route
|
|
36
|
+
const setNetworkLocal = useCallback(
|
|
37
|
+
(network: XyoNetworkPayload) => {
|
|
38
|
+
setNetworkParam(network)
|
|
39
|
+
setNetwork?.(network)
|
|
40
|
+
},
|
|
41
|
+
[setNetworkParam, setNetwork]
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
//sync memory and route storage of network
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (routeNetwork !== network) {
|
|
47
|
+
if (routeNetwork === undefined && network !== undefined) {
|
|
48
|
+
//if the route does not have a network selected, use what is in the memory context
|
|
49
|
+
setNetworkParam(network)
|
|
50
|
+
} else if (routeNetwork) {
|
|
51
|
+
//if the route has a selection and it is different from memory, update memory
|
|
52
|
+
setNetwork?.(routeNetwork)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
setInitialized(true)
|
|
56
|
+
}, [routeNetwork, network, setNetworkParam, setNetwork])
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<NetworkContext.Provider value={{ network, networks: defaultNetworkConfigs, provided: true, setNetwork: setNetworkLocal }}>
|
|
60
|
+
{initialized ? children : null}
|
|
61
|
+
</NetworkContext.Provider>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const NetworkRouteProvider: React.FC<WithChildren<NetworkProviderProps>> = ({ defaultNetwork, ...props }) => {
|
|
66
|
+
return (
|
|
67
|
+
<NetworkMemoryProvider defaultNetwork={defaultNetwork}>
|
|
68
|
+
<NetworkRouteProviderInner {...props} />
|
|
69
|
+
</NetworkMemoryProvider>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { XyoNetworkPayload } from '@xyo-network/network'
|
|
2
|
+
import { ContextExState } from '@xyo-network/react-shared'
|
|
3
|
+
import { Dispatch } from 'react'
|
|
4
|
+
|
|
5
|
+
export interface NetworkContextState extends ContextExState {
|
|
6
|
+
/** @field The currently selected XYO Network */
|
|
7
|
+
network?: XyoNetworkPayload
|
|
8
|
+
/** @field The list of known available networks */
|
|
9
|
+
networks?: XyoNetworkPayload[]
|
|
10
|
+
/** @field Function to set the selected Network */
|
|
11
|
+
setNetwork?: Dispatch<XyoNetworkPayload>
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useContextEx } from '@xyo-network/react-shared'
|
|
2
|
+
|
|
3
|
+
import { NetworkContext } from './Context'
|
|
4
|
+
import { NetworkContextState } from './State'
|
|
5
|
+
|
|
6
|
+
export const useNetwork = (required = false) => {
|
|
7
|
+
return useContextEx<NetworkContextState>(NetworkContext, 'Network', required)
|
|
8
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { XyoNetworkPayload, XyoNetworkPayloadSchema } from '@xyo-network/network'
|
|
2
|
+
|
|
3
|
+
import { findArchivistPreset } from '../archivistPresets'
|
|
4
|
+
import { findDivinerPreset } from '../divinerPresets'
|
|
5
|
+
|
|
6
|
+
export const defaultNetworkConfigs: XyoNetworkPayload[] = [
|
|
7
|
+
{
|
|
8
|
+
name: 'Kerplunk',
|
|
9
|
+
nodes: [findArchivistPreset('kerplunk-archivist-xyo-network'), findDivinerPreset('beta-location-diviner-xyo-network')],
|
|
10
|
+
schema: XyoNetworkPayloadSchema,
|
|
11
|
+
slug: 'kerplunk',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Main',
|
|
15
|
+
nodes: [findArchivistPreset('main-archivist-xyo-network'), findDivinerPreset('location-diviner-xyo-network')],
|
|
16
|
+
schema: XyoNetworkPayloadSchema,
|
|
17
|
+
slug: 'main',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Local',
|
|
21
|
+
nodes: [findArchivistPreset('local-archivist-xyo-network'), findDivinerPreset('local-location-diviner-xyo-network')],
|
|
22
|
+
schema: XyoNetworkPayloadSchema,
|
|
23
|
+
slug: 'local',
|
|
24
|
+
},
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
/** @deprecated use defaultNetworkConfigs instead */
|
|
28
|
+
export const networkPresets = defaultNetworkConfigs
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defaultNetworkConfigs } from './default'
|
|
2
|
+
|
|
3
|
+
export const findNetworkConfig = (slug: string, configs = defaultNetworkConfigs) => {
|
|
4
|
+
return configs.find((item) => {
|
|
5
|
+
return item.slug === slug
|
|
6
|
+
})
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** @deprecated use findNetworkConfig instead */
|
|
10
|
+
export const findNetworkPreset = findNetworkConfig
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const ExplorerMapHashes = {
|
|
2
|
+
animatedAnswerHashes: [
|
|
3
|
+
'79af071f451fc7af10d009dc63236ef9a9b211732c1ee0c06f028fcecf2336c5',
|
|
4
|
+
'531bfba6d8dfefd3bcc888aca54cdbbd4574ed2b3ec551b230845a1f9a608898',
|
|
5
|
+
'c874412b4faa4947de81372fd1ba12fdd6f43f5e408622b7f357cb2bcb3f17cb',
|
|
6
|
+
'29d3f8b882c61a82a1a1675782a27e797ea7196f45a23b4409680ab8b8d5f14e',
|
|
7
|
+
'cfd20f80ac073fd9518f4ef3f43d2a1f5e4e56e40c2677f38d6f6fecd05df60c',
|
|
8
|
+
'1354fa73497519a39aed19fc99bdbae78a880a1eafb2f7898d607e07db36528d',
|
|
9
|
+
'1043b0d25eacfc5013ae9dba780305a6fbf01a43543bd871d7c00537fca142a9',
|
|
10
|
+
'973dfc5df142851ced258d52d0ac2784e814000ac22e35776f772256b0d4dde9',
|
|
11
|
+
'463808eb74d3d87e6563970e0301a493577f8cd1b501e6e0ffa5e027ad2cea95',
|
|
12
|
+
'15b21acea2e3fd9d1ace3768a72636ee7bdf67a6f8e0807bfa2273dea2207555',
|
|
13
|
+
'32d377bfe7ebe382598c54dd13f8af7510e0a1e2fd2e913311fdd58e517e5e2e',
|
|
14
|
+
],
|
|
15
|
+
staticAnswerHash: 'c7bbf61f61cfd4a1b2def160c28136fc1d100d39fbdb67b227a2c6e558d9d3a5',
|
|
16
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { XyoNetworkNodePayload, XyoNetworkNodePayloadSchema } from '@xyo-network/network'
|
|
2
|
+
|
|
3
|
+
import { ExplorerMapHashes } from './ExplorerMapHashes'
|
|
4
|
+
|
|
5
|
+
export interface XyoArchivistPreset extends XyoNetworkNodePayload {
|
|
6
|
+
explorerMapHashes?: {
|
|
7
|
+
staticAnswerHash: string
|
|
8
|
+
animatedAnswerHashes: string[]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const findArchivistPreset = (slug: string) => {
|
|
13
|
+
return (
|
|
14
|
+
archivistPresets.find((item) => {
|
|
15
|
+
return item.slug === slug
|
|
16
|
+
}) ?? archivistPresets[0]
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const archivistPresets: XyoArchivistPreset[] = [
|
|
21
|
+
{
|
|
22
|
+
docs: 'https://beta.archivist.xyo.network/api',
|
|
23
|
+
explorerMapHashes: ExplorerMapHashes,
|
|
24
|
+
name: 'XYO Shared Archivist (kerplunk)',
|
|
25
|
+
schema: XyoNetworkNodePayloadSchema,
|
|
26
|
+
slug: 'kerplunk-archivist-xyo-network',
|
|
27
|
+
type: 'archivist',
|
|
28
|
+
uri: 'https://beta.api.archivist.xyo.network',
|
|
29
|
+
web: 'https://beta.archivist.xyo.network',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
docs: 'https://archivist.xyo.network/api',
|
|
33
|
+
explorerMapHashes: ExplorerMapHashes,
|
|
34
|
+
name: 'XYO Shared Archivist (main)',
|
|
35
|
+
schema: XyoNetworkNodePayloadSchema,
|
|
36
|
+
slug: 'main-archivist-xyo-network',
|
|
37
|
+
type: 'archivist',
|
|
38
|
+
uri: 'https://api.archivist.xyo.network',
|
|
39
|
+
web: 'https://archivist.xyo.network',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
docs: 'http://localhost:8080/api',
|
|
43
|
+
name: 'XYO Shared Archivist (local)',
|
|
44
|
+
schema: XyoNetworkNodePayloadSchema,
|
|
45
|
+
slug: 'local-archivist-xyo-network',
|
|
46
|
+
type: 'archivist',
|
|
47
|
+
uri: 'http://localhost:8080',
|
|
48
|
+
web: 'http://localhost:8081',
|
|
49
|
+
},
|
|
50
|
+
]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { XyoNetworkNodePayload, XyoNetworkNodePayloadSchema } from '@xyo-network/network'
|
|
2
|
+
|
|
3
|
+
export const findDivinerPreset = (slug: string) => {
|
|
4
|
+
return (
|
|
5
|
+
divinerPresets.find((item) => {
|
|
6
|
+
return item.slug === slug
|
|
7
|
+
}) ?? divinerPresets[0]
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const divinerPresets: XyoNetworkNodePayload[] = [
|
|
12
|
+
{
|
|
13
|
+
name: 'XYO Location (beta)',
|
|
14
|
+
schema: XyoNetworkNodePayloadSchema,
|
|
15
|
+
slug: 'beta-location-diviner-xyo-network',
|
|
16
|
+
type: 'diviner',
|
|
17
|
+
uri: 'https://beta.api.location.diviner.xyo.network',
|
|
18
|
+
web: 'https://beta.explore.xyo.network',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'XYO Location',
|
|
22
|
+
schema: XyoNetworkNodePayloadSchema,
|
|
23
|
+
slug: 'location-diviner-xyo-network',
|
|
24
|
+
type: 'diviner',
|
|
25
|
+
uri: 'https://api.location.diviner.xyo.network',
|
|
26
|
+
web: 'https://explore.xyo.network',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'XYO Location (local)',
|
|
30
|
+
schema: XyoNetworkNodePayloadSchema,
|
|
31
|
+
slug: 'local-location-diviner-xyo-network',
|
|
32
|
+
type: 'diviner',
|
|
33
|
+
uri: 'http://localhost:8082',
|
|
34
|
+
web: 'http://localhost:3000',
|
|
35
|
+
},
|
|
36
|
+
]
|
package/src/lib/index.ts
ADDED