@xyo-network/react-chain-network 1.16.13 → 1.16.15

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.
Files changed (2) hide show
  1. package/README.md +24 -18
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -63,7 +63,7 @@ XYO Layer One React SDK
63
63
  ***
64
64
 
65
65
  ```ts
66
- function useActiveNetworkCurrentBlock(refresh, viewer?): [undefined | HydratedBlock<BlockBoundWitness, Payload>, undefined | Error, undefined | UsePromiseState];
66
+ function useActiveNetworkCurrentBlock(refresh, viewer?): [HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined];
67
67
  ```
68
68
 
69
69
  ## Parameters
@@ -78,7 +78,7 @@ function useActiveNetworkCurrentBlock(refresh, viewer?): [undefined | HydratedBl
78
78
 
79
79
  ## Returns
80
80
 
81
- \[`undefined` \| `HydratedBlock`\<`BlockBoundWitness`, `Payload`\>, `undefined` \| `Error`, `undefined` \| `UsePromiseState`\]
81
+ \[`HydratedBlock`\<`BlockBoundWitness`, `Payload`\> \| `undefined`, `Error` \| `undefined`, `UsePromiseState` \| `undefined`\]
82
82
 
83
83
  ### <a id="useActiveNetworkCurrentBlockInPage"></a>useActiveNetworkCurrentBlockInPage
84
84
 
@@ -87,7 +87,7 @@ function useActiveNetworkCurrentBlock(refresh, viewer?): [undefined | HydratedBl
87
87
  ***
88
88
 
89
89
  ```ts
90
- function useActiveNetworkCurrentBlockInPage(refresh): [undefined | HydratedBlock<BlockBoundWitness, Payload>, undefined | Error, undefined | UsePromiseState];
90
+ function useActiveNetworkCurrentBlockInPage(refresh): [HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined];
91
91
  ```
92
92
 
93
93
  ## Parameters
@@ -98,7 +98,7 @@ function useActiveNetworkCurrentBlockInPage(refresh): [undefined | HydratedBlock
98
98
 
99
99
  ## Returns
100
100
 
101
- \[`undefined` \| `HydratedBlock`\<`BlockBoundWitness`, `Payload`\>, `undefined` \| `Error`, `undefined` \| `UsePromiseState`\]
101
+ \[`HydratedBlock`\<`BlockBoundWitness`, `Payload`\> \| `undefined`, `Error` \| `undefined`, `UsePromiseState` \| `undefined`\]
102
102
 
103
103
  ### <a id="useActiveNetworkCurrentBlockInWallet"></a>useActiveNetworkCurrentBlockInWallet
104
104
 
@@ -107,7 +107,7 @@ function useActiveNetworkCurrentBlockInPage(refresh): [undefined | HydratedBlock
107
107
  ***
108
108
 
109
109
  ```ts
110
- function useActiveNetworkCurrentBlockInWallet(refresh): [undefined | HydratedBlock<BlockBoundWitness, Payload>, undefined | Error, undefined | UsePromiseState];
110
+ function useActiveNetworkCurrentBlockInWallet(refresh): [HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined];
111
111
  ```
112
112
 
113
113
  ## Parameters
@@ -118,7 +118,7 @@ function useActiveNetworkCurrentBlockInWallet(refresh): [undefined | HydratedBlo
118
118
 
119
119
  ## Returns
120
120
 
121
- \[`undefined` \| `HydratedBlock`\<`BlockBoundWitness`, `Payload`\>, `undefined` \| `Error`, `undefined` \| `UsePromiseState`\]
121
+ \[`HydratedBlock`\<`BlockBoundWitness`, `Payload`\> \| `undefined`, `Error` \| `undefined`, `UsePromiseState` \| `undefined`\]
122
122
 
123
123
  ### <a id="useActiveNetworkNetwork"></a>useActiveNetworkNetwork
124
124
 
@@ -127,12 +127,12 @@ function useActiveNetworkCurrentBlockInWallet(refresh): [undefined | HydratedBlo
127
127
  ***
128
128
 
129
129
  ```ts
130
- function useActiveNetworkNetwork(): undefined | MemoryXyoNetwork;
130
+ function useActiveNetworkNetwork(): SimpleXyoNetwork | undefined;
131
131
  ```
132
132
 
133
133
  ## Returns
134
134
 
135
- `undefined` \| `MemoryXyoNetwork`
135
+ `SimpleXyoNetwork` \| `undefined`
136
136
 
137
137
  ### <a id="useActiveNetworkRunner"></a>useActiveNetworkRunner
138
138
 
@@ -141,12 +141,12 @@ function useActiveNetworkNetwork(): undefined | MemoryXyoNetwork;
141
141
  ***
142
142
 
143
143
  ```ts
144
- function useActiveNetworkRunner(): undefined | JsonRpcXyoRunner;
144
+ function useActiveNetworkRunner(): JsonRpcXyoRunner | undefined;
145
145
  ```
146
146
 
147
147
  ## Returns
148
148
 
149
- `undefined` \| `JsonRpcXyoRunner`
149
+ `JsonRpcXyoRunner` \| `undefined`
150
150
 
151
151
  ### <a id="useChainNetwork"></a>useChainNetwork
152
152
 
@@ -188,12 +188,12 @@ function useChainNetwork(required):
188
188
  ***
189
189
 
190
190
  ```ts
191
- function usePollNetworkStatus(): readonly [undefined | NetworkStatus, undefined | Error];
191
+ function usePollNetworkStatus(): readonly [NetworkStatus | undefined, Error | undefined];
192
192
  ```
193
193
 
194
194
  ## Returns
195
195
 
196
- readonly \[`undefined` \| `NetworkStatus`, `undefined` \| `Error`\]
196
+ readonly \[`NetworkStatus` \| `undefined`, `Error` \| `undefined`\]
197
197
 
198
198
  ### <a id="useViewerInPage"></a>useViewerInPage
199
199
 
@@ -202,14 +202,20 @@ readonly \[`undefined` \| `NetworkStatus`, `undefined` \| `Error`\]
202
202
  ***
203
203
 
204
204
  ```ts
205
- function useViewerInPage(): undefined | XyoViewer;
205
+ function useViewerInPage(networkOverride?): XyoViewer | JsonRpcXyoViewer | undefined;
206
206
  ```
207
207
 
208
208
  Get the viewer for the active network, first from the wallet or fallback to HTTP RPC
209
209
 
210
+ ## Parameters
211
+
212
+ ### networkOverride?
213
+
214
+ `NetworkBootstrap`
215
+
210
216
  ## Returns
211
217
 
212
- `undefined` \| `XyoViewer`
218
+ `XyoViewer` \| `JsonRpcXyoViewer` \| `undefined`
213
219
 
214
220
  - XyoViewer for the active network
215
221
 
@@ -220,14 +226,14 @@ Get the viewer for the active network, first from the wallet or fallback to HTTP
220
226
  ***
221
227
 
222
228
  ```ts
223
- function useViewerInWallet(): undefined | JsonRpcXyoViewer;
229
+ function useViewerInWallet(): JsonRpcXyoViewer | undefined;
224
230
  ```
225
231
 
226
232
  Get the viewer directly from the active network
227
233
 
228
234
  ## Returns
229
235
 
230
- `undefined` \| `JsonRpcXyoViewer`
236
+ `JsonRpcXyoViewer` \| `undefined`
231
237
 
232
238
  - The viewer for the active network
233
239
 
@@ -248,12 +254,12 @@ Get the viewer directly from the active network
248
254
  ### getActiveNetwork()?
249
255
 
250
256
  ```ts
251
- optional getActiveNetwork: () => Promise<undefined | NetworkBootstrap>;
257
+ optional getActiveNetwork: () => Promise<NetworkBootstrap | undefined>;
252
258
  ```
253
259
 
254
260
  ### Returns
255
261
 
256
- `Promise`\<`undefined` \| `NetworkBootstrap`\>
262
+ `Promise`\<`NetworkBootstrap` \| `undefined`\>
257
263
 
258
264
  ***
259
265
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/react-chain-network",
4
- "version": "1.16.13",
4
+ "version": "1.16.15",
5
5
  "description": "XYO Layer One React SDK",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -48,12 +48,12 @@
48
48
  "@xylabs/react-error": "~7.1.8",
49
49
  "@xylabs/react-promise": "~7.1.8",
50
50
  "@xylabs/react-shared": "~7.1.8",
51
- "@xylabs/sdk-js": "~5.0.33",
52
- "@xyo-network/react-chain-provider": "~1.16.13",
53
- "@xyo-network/react-chain-shared": "~1.16.13",
54
- "@xyo-network/xl1-network-model": "~1.16.13",
51
+ "@xylabs/sdk-js": "~5.0.34",
52
+ "@xyo-network/react-chain-provider": "~1.16.15",
53
+ "@xyo-network/react-chain-shared": "~1.16.15",
54
+ "@xyo-network/xl1-network-model": "~1.16.15",
55
55
  "@xyo-network/xl1-protocol": "~1.13.11",
56
- "@xyo-network/xl1-protocol-sdk": "~1.16.13"
56
+ "@xyo-network/xl1-protocol-sdk": "~1.16.15"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@emotion/react": "~11.14.0",
@@ -67,7 +67,7 @@
67
67
  "@xylabs/tsconfig": "~7.2.8",
68
68
  "@xylabs/tsconfig-dom": "~7.2.8",
69
69
  "@xylabs/tsconfig-react": "~7.2.8",
70
- "@xyo-network/react-chain-model": "~1.16.13",
70
+ "@xyo-network/react-chain-model": "~1.16.15",
71
71
  "eslint": "^9.39.1",
72
72
  "react": "~19.2.0",
73
73
  "react-dom": "~19.2.0",