@xyo-network/xl1-network-model 1.12.6
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/LICENSE +165 -0
- package/README.md +791 -0
- package/dist/neutral/icons/index.d.ts +4 -0
- package/dist/neutral/icons/index.d.ts.map +1 -0
- package/dist/neutral/icons/local/index.d.ts +2 -0
- package/dist/neutral/icons/local/index.d.ts.map +1 -0
- package/dist/neutral/icons/mainnet/index.d.ts +2 -0
- package/dist/neutral/icons/mainnet/index.d.ts.map +1 -0
- package/dist/neutral/icons/sequence/index.d.ts +2 -0
- package/dist/neutral/icons/sequence/index.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +5 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +120 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/dist/neutral/lib/Networks.d.ts +6 -0
- package/dist/neutral/lib/Networks.d.ts.map +1 -0
- package/dist/neutral/lib/index.d.ts +2 -0
- package/dist/neutral/lib/index.d.ts.map +1 -0
- package/dist/neutral/manifest/index.d.ts +2 -0
- package/dist/neutral/manifest/index.d.ts.map +1 -0
- package/dist/neutral/manifest/networkManifest.d.ts +6 -0
- package/dist/neutral/manifest/networkManifest.d.ts.map +1 -0
- package/dist/neutral/models/Bootstrap.d.ts +45 -0
- package/dist/neutral/models/Bootstrap.d.ts.map +1 -0
- package/dist/neutral/models/index.d.ts +2 -0
- package/dist/neutral/models/index.d.ts.map +1 -0
- package/dist/neutral/modules/index.d.ts +2 -0
- package/dist/neutral/modules/index.d.ts.map +1 -0
- package/dist/neutral/modules/node/getNetworkNode.d.ts +2 -0
- package/dist/neutral/modules/node/getNetworkNode.d.ts.map +1 -0
- package/dist/neutral/modules/node/getNetworkNodes.d.ts +3 -0
- package/dist/neutral/modules/node/getNetworkNodes.d.ts.map +1 -0
- package/dist/neutral/modules/node/index.d.ts +4 -0
- package/dist/neutral/modules/node/index.d.ts.map +1 -0
- package/dist/neutral/modules/node/initNetworkNode.d.ts +4 -0
- package/dist/neutral/modules/node/initNetworkNode.d.ts.map +1 -0
- package/package.json +81 -0
- package/src/icons/index.ts +3 -0
- package/src/icons/local/index.ts +1 -0
- package/src/icons/local/local.svg +1 -0
- package/src/icons/mainnet/index.ts +1 -0
- package/src/icons/mainnet/mainnet.svg +1 -0
- package/src/icons/sequence/index.ts +1 -0
- package/src/icons/sequence/testnet.svg +1 -0
- package/src/index.ts +4 -0
- package/src/lib/Networks.ts +42 -0
- package/src/lib/index.ts +1 -0
- package/src/manifest/index.ts +1 -0
- package/src/manifest/network.json +17 -0
- package/src/manifest/networkManifest.ts +8 -0
- package/src/models/Bootstrap.ts +55 -0
- package/src/models/index.ts +1 -0
- package/src/modules/index.ts +1 -0
- package/src/modules/node/getNetworkNode.ts +11 -0
- package/src/modules/node/getNetworkNodes.ts +7 -0
- package/src/modules/node/index.ts +3 -0
- package/src/modules/node/initNetworkNode.ts +15 -0
- package/src/types/images.d.ts +9 -0
package/README.md
ADDED
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
# @xyo-network/chain-network-model
|
|
2
|
+
|
|
3
|
+
[![logo][]](https://xyo.network)
|
|
4
|
+
|
|
5
|
+
[![npm-badge][]][npm-link]
|
|
6
|
+
[![npm-downloads-badge][]][npm-link]
|
|
7
|
+
[![jsdelivr-badge][]][jsdelivr-link]
|
|
8
|
+
[![npm-license-badge][]](LICENSE)
|
|
9
|
+
[![socket-badge][]][socket-link]
|
|
10
|
+
|
|
11
|
+
XYO Layer One API
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Reference
|
|
16
|
+
|
|
17
|
+
**@xyo-network/chain-network-model**
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
## Interfaces
|
|
22
|
+
|
|
23
|
+
- [~~ChainConnection~~](#interfaces/ChainConnection)
|
|
24
|
+
- [ChainForkFields](#interfaces/ChainForkFields)
|
|
25
|
+
- [NetworkFields](#interfaces/NetworkFields)
|
|
26
|
+
- [NetworkBootstrapFields](#interfaces/NetworkBootstrapFields)
|
|
27
|
+
- [Network](#interfaces/Network)
|
|
28
|
+
|
|
29
|
+
## Type Aliases
|
|
30
|
+
|
|
31
|
+
- [NetworkBootstrapSchema](#type-aliases/NetworkBootstrapSchema)
|
|
32
|
+
- [NetworkBootstrap](#type-aliases/NetworkBootstrap)
|
|
33
|
+
|
|
34
|
+
## Variables
|
|
35
|
+
|
|
36
|
+
- [MainNetwork](#variables/MainNetwork)
|
|
37
|
+
- [SequenceNetwork](#variables/SequenceNetwork)
|
|
38
|
+
- [LocalNetwork](#variables/LocalNetwork)
|
|
39
|
+
- [DefaultNetworks](#variables/DefaultNetworks)
|
|
40
|
+
- [NetworkBootstrapSchema](#variables/NetworkBootstrapSchema)
|
|
41
|
+
- [isNetworkBootstrap](#variables/isNetworkBootstrap)
|
|
42
|
+
- [asOptionalNetwork](#variables/asOptionalNetwork)
|
|
43
|
+
- [LocalNetworkIconString](#variables/LocalNetworkIconString)
|
|
44
|
+
|
|
45
|
+
## Functions
|
|
46
|
+
|
|
47
|
+
- [getNetworkNode](#functions/getNetworkNode)
|
|
48
|
+
- [getNetworkNodes](#functions/getNetworkNodes)
|
|
49
|
+
- [initNetworkNode](#functions/initNetworkNode)
|
|
50
|
+
|
|
51
|
+
## References
|
|
52
|
+
|
|
53
|
+
### MainNetworkIconString
|
|
54
|
+
|
|
55
|
+
Renames and re-exports [LocalNetworkIconString](#variables/LocalNetworkIconString)
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### SequenceNetworkIconString
|
|
60
|
+
|
|
61
|
+
Renames and re-exports [LocalNetworkIconString](#variables/LocalNetworkIconString)
|
|
62
|
+
|
|
63
|
+
### functions
|
|
64
|
+
|
|
65
|
+
### <a id="getNetworkNode"></a>getNetworkNode
|
|
66
|
+
|
|
67
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
function getNetworkNode(): Promise<MemoryNode<MemoryNodeParams, NodeModuleEventData>>;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Returns
|
|
76
|
+
|
|
77
|
+
`Promise`\<`MemoryNode`\<`MemoryNodeParams`, `NodeModuleEventData`\>\>
|
|
78
|
+
|
|
79
|
+
### <a id="getNetworkNodes"></a>getNetworkNodes
|
|
80
|
+
|
|
81
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
82
|
+
|
|
83
|
+
***
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
function getNetworkNodes(): Map<string, AttachableNodeInstance<NodeParams<AnyConfigSchema<NodeConfig>>, NodeModuleEventData>>;
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Returns
|
|
90
|
+
|
|
91
|
+
`Map`\<`string`, `AttachableNodeInstance`\<`NodeParams`\<`AnyConfigSchema`\<`NodeConfig`\>\>, `NodeModuleEventData`\>\>
|
|
92
|
+
|
|
93
|
+
### <a id="initNetworkNode"></a>initNetworkNode
|
|
94
|
+
|
|
95
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
function initNetworkNode(activeNetwork): Promise<AttachableNodeInstance<NodeParams<AnyConfigSchema<NodeConfig>>, NodeModuleEventData>>;
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Parameters
|
|
104
|
+
|
|
105
|
+
### activeNetwork
|
|
106
|
+
|
|
107
|
+
[`NetworkBootstrap`](#../type-aliases/NetworkBootstrap)
|
|
108
|
+
|
|
109
|
+
## Returns
|
|
110
|
+
|
|
111
|
+
`Promise`\<`AttachableNodeInstance`\<`NodeParams`\<`AnyConfigSchema`\<`NodeConfig`\>\>, `NodeModuleEventData`\>\>
|
|
112
|
+
|
|
113
|
+
### interfaces
|
|
114
|
+
|
|
115
|
+
### <a id="ChainConnection"></a>ChainConnection
|
|
116
|
+
|
|
117
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
118
|
+
|
|
119
|
+
***
|
|
120
|
+
|
|
121
|
+
## Deprecated
|
|
122
|
+
|
|
123
|
+
only for backward compatibility
|
|
124
|
+
|
|
125
|
+
## Extended by
|
|
126
|
+
|
|
127
|
+
- [`NetworkBootstrapFields`](#NetworkBootstrapFields)
|
|
128
|
+
|
|
129
|
+
## Properties
|
|
130
|
+
|
|
131
|
+
### ~~chain?~~
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
optional chain: Lowercase<string>;
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Chain Identifier - can be a hex (eth contract address) or a string
|
|
138
|
+
|
|
139
|
+
***
|
|
140
|
+
|
|
141
|
+
### ~~name~~
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
name: string;
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Name of the chain
|
|
148
|
+
|
|
149
|
+
***
|
|
150
|
+
|
|
151
|
+
### ~~url~~
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
url: string;
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Url for accessing the network
|
|
158
|
+
|
|
159
|
+
### <a id="ChainForkFields"></a>ChainForkFields
|
|
160
|
+
|
|
161
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
162
|
+
|
|
163
|
+
***
|
|
164
|
+
|
|
165
|
+
## Extended by
|
|
166
|
+
|
|
167
|
+
- [`NetworkBootstrapFields`](#NetworkBootstrapFields)
|
|
168
|
+
|
|
169
|
+
## Properties
|
|
170
|
+
|
|
171
|
+
### forkedAtLastBlockNumber?
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
optional forkedAtLastBlockNumber: string;
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Block Number at which the chain was forked from
|
|
178
|
+
|
|
179
|
+
***
|
|
180
|
+
|
|
181
|
+
### forkedAtLastHash?
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
optional forkedAtLastHash: string;
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Hash in the last block the chain was forked from
|
|
188
|
+
|
|
189
|
+
***
|
|
190
|
+
|
|
191
|
+
### forkedChainId?
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
optional forkedChainId: Lowercase<string>;
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Address of the forked chain
|
|
198
|
+
|
|
199
|
+
### <a id="Network"></a>Network
|
|
200
|
+
|
|
201
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
202
|
+
|
|
203
|
+
***
|
|
204
|
+
|
|
205
|
+
## Extends
|
|
206
|
+
|
|
207
|
+
- [`NetworkBootstrap`](#../type-aliases/NetworkBootstrap)
|
|
208
|
+
|
|
209
|
+
## Properties
|
|
210
|
+
|
|
211
|
+
### chain?
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
optional chain: Lowercase<string>;
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Chain Identifier - can be a hex (eth contract address) or a string
|
|
218
|
+
|
|
219
|
+
### Inherited from
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
NetworkBootstrap.chain
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
***
|
|
226
|
+
|
|
227
|
+
### name
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
name: string;
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Name of the chain
|
|
234
|
+
|
|
235
|
+
### Inherited from
|
|
236
|
+
|
|
237
|
+
```ts
|
|
238
|
+
NetworkBootstrap.name
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
***
|
|
242
|
+
|
|
243
|
+
### url
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
url: string;
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Url for accessing the network
|
|
250
|
+
|
|
251
|
+
### Inherited from
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
NetworkBootstrap.url
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
***
|
|
258
|
+
|
|
259
|
+
### forkedAtLastBlockNumber?
|
|
260
|
+
|
|
261
|
+
```ts
|
|
262
|
+
optional forkedAtLastBlockNumber: string;
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Block Number at which the chain was forked from
|
|
266
|
+
|
|
267
|
+
### Inherited from
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
NetworkBootstrap.forkedAtLastBlockNumber
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
***
|
|
274
|
+
|
|
275
|
+
### forkedAtLastHash?
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
optional forkedAtLastHash: string;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Hash in the last block the chain was forked from
|
|
282
|
+
|
|
283
|
+
### Inherited from
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
NetworkBootstrap.forkedAtLastHash
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
***
|
|
290
|
+
|
|
291
|
+
### forkedChainId?
|
|
292
|
+
|
|
293
|
+
```ts
|
|
294
|
+
optional forkedChainId: Lowercase<string>;
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Address of the forked chain
|
|
298
|
+
|
|
299
|
+
### Inherited from
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
NetworkBootstrap.forkedChainId
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
***
|
|
306
|
+
|
|
307
|
+
### description
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
description: string;
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Description of the network
|
|
314
|
+
|
|
315
|
+
### Inherited from
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
NetworkBootstrap.description
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
***
|
|
322
|
+
|
|
323
|
+
### explorerUrl?
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
optional explorerUrl: string;
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Url for accessing the network explorer
|
|
330
|
+
|
|
331
|
+
### Inherited from
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
NetworkBootstrap.explorerUrl
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
***
|
|
338
|
+
|
|
339
|
+
### icon?
|
|
340
|
+
|
|
341
|
+
```ts
|
|
342
|
+
optional icon: string;
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
string representation of the icon (svg)
|
|
346
|
+
|
|
347
|
+
### Inherited from
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
NetworkBootstrap.icon
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
***
|
|
354
|
+
|
|
355
|
+
### id
|
|
356
|
+
|
|
357
|
+
```ts
|
|
358
|
+
id: DefaultNetworkIds;
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Machine-readable identifier
|
|
362
|
+
|
|
363
|
+
### Inherited from
|
|
364
|
+
|
|
365
|
+
```ts
|
|
366
|
+
NetworkBootstrap.id
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
***
|
|
370
|
+
|
|
371
|
+
### symbol?
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
optional symbol: string;
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Symbol of the network
|
|
378
|
+
|
|
379
|
+
### Inherited from
|
|
380
|
+
|
|
381
|
+
```ts
|
|
382
|
+
NetworkBootstrap.symbol
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
***
|
|
386
|
+
|
|
387
|
+
### custom
|
|
388
|
+
|
|
389
|
+
```ts
|
|
390
|
+
custom: boolean;
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### <a id="NetworkBootstrapFields"></a>NetworkBootstrapFields
|
|
394
|
+
|
|
395
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
396
|
+
|
|
397
|
+
***
|
|
398
|
+
|
|
399
|
+
Note: Optional Properties can be found walking the chain to the genesis block
|
|
400
|
+
|
|
401
|
+
## Extends
|
|
402
|
+
|
|
403
|
+
- [`NetworkFields`](#NetworkFields).[`ChainForkFields`](#ChainForkFields).[`ChainConnection`](#ChainConnection)
|
|
404
|
+
|
|
405
|
+
## Properties
|
|
406
|
+
|
|
407
|
+
### chain?
|
|
408
|
+
|
|
409
|
+
```ts
|
|
410
|
+
optional chain: Lowercase<string>;
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Chain Identifier - can be a hex (eth contract address) or a string
|
|
414
|
+
|
|
415
|
+
### Inherited from
|
|
416
|
+
|
|
417
|
+
[`ChainConnection`](#ChainConnection).[`chain`](ChainConnection.md#chain)
|
|
418
|
+
|
|
419
|
+
***
|
|
420
|
+
|
|
421
|
+
### name
|
|
422
|
+
|
|
423
|
+
```ts
|
|
424
|
+
name: string;
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Name of the chain
|
|
428
|
+
|
|
429
|
+
### Inherited from
|
|
430
|
+
|
|
431
|
+
[`ChainConnection`](#ChainConnection).[`name`](ChainConnection.md#name)
|
|
432
|
+
|
|
433
|
+
***
|
|
434
|
+
|
|
435
|
+
### url
|
|
436
|
+
|
|
437
|
+
```ts
|
|
438
|
+
url: string;
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Url for accessing the network
|
|
442
|
+
|
|
443
|
+
### Inherited from
|
|
444
|
+
|
|
445
|
+
[`ChainConnection`](#ChainConnection).[`url`](ChainConnection.md#url)
|
|
446
|
+
|
|
447
|
+
***
|
|
448
|
+
|
|
449
|
+
### forkedAtLastBlockNumber?
|
|
450
|
+
|
|
451
|
+
```ts
|
|
452
|
+
optional forkedAtLastBlockNumber: string;
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
Block Number at which the chain was forked from
|
|
456
|
+
|
|
457
|
+
### Inherited from
|
|
458
|
+
|
|
459
|
+
[`ChainForkFields`](#ChainForkFields).[`forkedAtLastBlockNumber`](ChainForkFields.md#forkedatlastblocknumber)
|
|
460
|
+
|
|
461
|
+
***
|
|
462
|
+
|
|
463
|
+
### forkedAtLastHash?
|
|
464
|
+
|
|
465
|
+
```ts
|
|
466
|
+
optional forkedAtLastHash: string;
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
Hash in the last block the chain was forked from
|
|
470
|
+
|
|
471
|
+
### Inherited from
|
|
472
|
+
|
|
473
|
+
[`ChainForkFields`](#ChainForkFields).[`forkedAtLastHash`](ChainForkFields.md#forkedatlasthash)
|
|
474
|
+
|
|
475
|
+
***
|
|
476
|
+
|
|
477
|
+
### forkedChainId?
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
optional forkedChainId: Lowercase<string>;
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Address of the forked chain
|
|
484
|
+
|
|
485
|
+
### Inherited from
|
|
486
|
+
|
|
487
|
+
[`ChainForkFields`](#ChainForkFields).[`forkedChainId`](ChainForkFields.md#forkedchainid)
|
|
488
|
+
|
|
489
|
+
***
|
|
490
|
+
|
|
491
|
+
### description
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
description: string;
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Description of the network
|
|
498
|
+
|
|
499
|
+
### Inherited from
|
|
500
|
+
|
|
501
|
+
[`NetworkFields`](#NetworkFields).[`description`](NetworkFields.md#description)
|
|
502
|
+
|
|
503
|
+
***
|
|
504
|
+
|
|
505
|
+
### explorerUrl?
|
|
506
|
+
|
|
507
|
+
```ts
|
|
508
|
+
optional explorerUrl: string;
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
Url for accessing the network explorer
|
|
512
|
+
|
|
513
|
+
### Inherited from
|
|
514
|
+
|
|
515
|
+
[`NetworkFields`](#NetworkFields).[`explorerUrl`](NetworkFields.md#explorerurl)
|
|
516
|
+
|
|
517
|
+
***
|
|
518
|
+
|
|
519
|
+
### icon?
|
|
520
|
+
|
|
521
|
+
```ts
|
|
522
|
+
optional icon: string;
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
string representation of the icon (svg)
|
|
526
|
+
|
|
527
|
+
### Inherited from
|
|
528
|
+
|
|
529
|
+
[`NetworkFields`](#NetworkFields).[`icon`](NetworkFields.md#icon)
|
|
530
|
+
|
|
531
|
+
***
|
|
532
|
+
|
|
533
|
+
### id
|
|
534
|
+
|
|
535
|
+
```ts
|
|
536
|
+
id: DefaultNetworkIds;
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Machine-readable identifier
|
|
540
|
+
|
|
541
|
+
### Inherited from
|
|
542
|
+
|
|
543
|
+
[`NetworkFields`](#NetworkFields).[`id`](NetworkFields.md#id)
|
|
544
|
+
|
|
545
|
+
***
|
|
546
|
+
|
|
547
|
+
### schema
|
|
548
|
+
|
|
549
|
+
```ts
|
|
550
|
+
schema: "network.xyo.network.bootstrap";
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Inherited from
|
|
554
|
+
|
|
555
|
+
[`NetworkFields`](#NetworkFields).[`schema`](NetworkFields.md#schema)
|
|
556
|
+
|
|
557
|
+
***
|
|
558
|
+
|
|
559
|
+
### symbol?
|
|
560
|
+
|
|
561
|
+
```ts
|
|
562
|
+
optional symbol: string;
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
Symbol of the network
|
|
566
|
+
|
|
567
|
+
### Inherited from
|
|
568
|
+
|
|
569
|
+
[`NetworkFields`](#NetworkFields).[`symbol`](NetworkFields.md#symbol)
|
|
570
|
+
|
|
571
|
+
### <a id="NetworkFields"></a>NetworkFields
|
|
572
|
+
|
|
573
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
574
|
+
|
|
575
|
+
***
|
|
576
|
+
|
|
577
|
+
## Extended by
|
|
578
|
+
|
|
579
|
+
- [`NetworkBootstrapFields`](#NetworkBootstrapFields)
|
|
580
|
+
|
|
581
|
+
## Properties
|
|
582
|
+
|
|
583
|
+
### description
|
|
584
|
+
|
|
585
|
+
```ts
|
|
586
|
+
description: string;
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
Description of the network
|
|
590
|
+
|
|
591
|
+
***
|
|
592
|
+
|
|
593
|
+
### explorerUrl?
|
|
594
|
+
|
|
595
|
+
```ts
|
|
596
|
+
optional explorerUrl: string;
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
Url for accessing the network explorer
|
|
600
|
+
|
|
601
|
+
***
|
|
602
|
+
|
|
603
|
+
### icon?
|
|
604
|
+
|
|
605
|
+
```ts
|
|
606
|
+
optional icon: string;
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
string representation of the icon (svg)
|
|
610
|
+
|
|
611
|
+
***
|
|
612
|
+
|
|
613
|
+
### id
|
|
614
|
+
|
|
615
|
+
```ts
|
|
616
|
+
id: DefaultNetworkIds;
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
Machine-readable identifier
|
|
620
|
+
|
|
621
|
+
***
|
|
622
|
+
|
|
623
|
+
### schema
|
|
624
|
+
|
|
625
|
+
```ts
|
|
626
|
+
schema: "network.xyo.network.bootstrap";
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
***
|
|
630
|
+
|
|
631
|
+
### symbol?
|
|
632
|
+
|
|
633
|
+
```ts
|
|
634
|
+
optional symbol: string;
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
Symbol of the network
|
|
638
|
+
|
|
639
|
+
### type-aliases
|
|
640
|
+
|
|
641
|
+
### <a id="NetworkBootstrap"></a>NetworkBootstrap
|
|
642
|
+
|
|
643
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
644
|
+
|
|
645
|
+
***
|
|
646
|
+
|
|
647
|
+
```ts
|
|
648
|
+
type NetworkBootstrap = Payload<NetworkBootstrapFields, NetworkBootstrapSchema>;
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
### <a id="NetworkBootstrapSchema"></a>NetworkBootstrapSchema
|
|
652
|
+
|
|
653
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
654
|
+
|
|
655
|
+
***
|
|
656
|
+
|
|
657
|
+
```ts
|
|
658
|
+
type NetworkBootstrapSchema = typeof NetworkBootstrapSchema;
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### variables
|
|
662
|
+
|
|
663
|
+
### <a id="DefaultNetworks"></a>DefaultNetworks
|
|
664
|
+
|
|
665
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
666
|
+
|
|
667
|
+
***
|
|
668
|
+
|
|
669
|
+
```ts
|
|
670
|
+
const DefaultNetworks: NetworkBootstrap[];
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### <a id="LocalNetwork"></a>LocalNetwork
|
|
674
|
+
|
|
675
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
676
|
+
|
|
677
|
+
***
|
|
678
|
+
|
|
679
|
+
```ts
|
|
680
|
+
const LocalNetwork: NetworkBootstrap;
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
### <a id="LocalNetworkIconString"></a>LocalNetworkIconString
|
|
684
|
+
|
|
685
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
686
|
+
|
|
687
|
+
***
|
|
688
|
+
|
|
689
|
+
```ts
|
|
690
|
+
const LocalNetworkIconString: string;
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### <a id="MainNetwork"></a>MainNetwork
|
|
694
|
+
|
|
695
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
696
|
+
|
|
697
|
+
***
|
|
698
|
+
|
|
699
|
+
```ts
|
|
700
|
+
const MainNetwork: NetworkBootstrap;
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### <a id="NetworkBootstrapSchema"></a>NetworkBootstrapSchema
|
|
704
|
+
|
|
705
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
706
|
+
|
|
707
|
+
***
|
|
708
|
+
|
|
709
|
+
```ts
|
|
710
|
+
const NetworkBootstrapSchema: "network.xyo.network.bootstrap";
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### <a id="SequenceNetwork"></a>SequenceNetwork
|
|
714
|
+
|
|
715
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
716
|
+
|
|
717
|
+
***
|
|
718
|
+
|
|
719
|
+
```ts
|
|
720
|
+
const SequenceNetwork: NetworkBootstrap;
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
### <a id="asOptionalNetwork"></a>asOptionalNetwork
|
|
724
|
+
|
|
725
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
726
|
+
|
|
727
|
+
***
|
|
728
|
+
|
|
729
|
+
```ts
|
|
730
|
+
const asOptionalNetwork: (value) => undefined | NetworkBootstrap;
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
## Parameters
|
|
734
|
+
|
|
735
|
+
### value
|
|
736
|
+
|
|
737
|
+
`AnyNonPromise`
|
|
738
|
+
|
|
739
|
+
## Returns
|
|
740
|
+
|
|
741
|
+
`undefined` \| [`NetworkBootstrap`](#../type-aliases/NetworkBootstrap)
|
|
742
|
+
|
|
743
|
+
### <a id="isNetworkBootstrap"></a>isNetworkBootstrap
|
|
744
|
+
|
|
745
|
+
[**@xyo-network/chain-network-model**](#../README)
|
|
746
|
+
|
|
747
|
+
***
|
|
748
|
+
|
|
749
|
+
```ts
|
|
750
|
+
const isNetworkBootstrap: (x?) => x is NetworkBootstrap;
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
## Parameters
|
|
754
|
+
|
|
755
|
+
### x?
|
|
756
|
+
|
|
757
|
+
`unknown`
|
|
758
|
+
|
|
759
|
+
## Returns
|
|
760
|
+
|
|
761
|
+
`x is NetworkBootstrap`
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
## Maintainers
|
|
765
|
+
|
|
766
|
+
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
767
|
+
- [Matt Jones](https://github.com/jonesmac)
|
|
768
|
+
- [Joel Carter](https://github.com/JoelBCarter)
|
|
769
|
+
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
770
|
+
|
|
771
|
+
## License
|
|
772
|
+
|
|
773
|
+
> See the [LICENSE](LICENSE) file for license details
|
|
774
|
+
|
|
775
|
+
## Credits
|
|
776
|
+
|
|
777
|
+
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
778
|
+
|
|
779
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
780
|
+
|
|
781
|
+
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/chain-network-model.svg
|
|
782
|
+
[npm-link]: https://www.npmjs.com/package/@xyo-network/chain-network-model
|
|
783
|
+
|
|
784
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dw/@xyo-network/chain-network-model
|
|
785
|
+
[npm-license-badge]: https://img.shields.io/npm/l/@xyo-network/chain-network-model
|
|
786
|
+
|
|
787
|
+
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xyo-network/chain-network-model/badge
|
|
788
|
+
[jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xyo-network/chain-network-model
|
|
789
|
+
|
|
790
|
+
[socket-badge]: https://socket.dev/api/badge/npm/package/@xyo-network/chain-network-model
|
|
791
|
+
[socket-link]: https://socket.dev/npm/package/@xyo-network/chain-network-model
|