@xyo-network/xl1-rpc 1.7.6 → 1.7.8

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 +2352 -3
  2. package/package.json +21 -21
package/README.md CHANGED
@@ -8,13 +8,2362 @@
8
8
  [![npm-license-badge][]](LICENSE)
9
9
  [![socket-badge][]][socket-link]
10
10
 
11
- Version: 1.7.3
12
-
13
11
  XYO Layer One API
14
12
 
15
13
  ## Documentation
16
14
 
17
- [TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__xl1-rpc)
15
+ ## Reference
16
+
17
+ **@xyo-network/xl1-rpc**
18
+
19
+ ***
20
+
21
+ ## Modules
22
+
23
+ - [index-node](#index-node/README)
24
+ - [index](#index/README)
25
+
26
+ ### index
27
+
28
+ ### index-node
29
+
30
+ ### classes
31
+
32
+ ### <a id="HttpRpcTransport"></a>HttpRpcTransport
33
+
34
+ [**@xyo-network/xl1-rpc**](#../../README)
35
+
36
+ ***
37
+
38
+ ## Type Parameters
39
+
40
+ ### T
41
+
42
+ `T` *extends* [`RpcSchemaMap`](#../type-aliases/RpcSchemaMap) = [`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)
43
+
44
+ ## Implements
45
+
46
+ - [`RpcTransport`](#../interfaces/RpcTransport)\<`T`\>
47
+
48
+ ## Constructors
49
+
50
+ ### Constructor
51
+
52
+ ```ts
53
+ new HttpRpcTransport<T>(rpcUrl, schemas): HttpRpcTransport<T>;
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+ #### rpcUrl
59
+
60
+ `string`
61
+
62
+ #### schemas
63
+
64
+ `T`
65
+
66
+ ### Returns
67
+
68
+ `HttpRpcTransport`\<`T`\>
69
+
70
+ ## Properties
71
+
72
+ ### \_rpcUrl
73
+
74
+ ```ts
75
+ protected readonly _rpcUrl: string;
76
+ ```
77
+
78
+ ***
79
+
80
+ ### \_schemas
81
+
82
+ ```ts
83
+ protected readonly _schemas: T;
84
+ ```
85
+
86
+ ## Methods
87
+
88
+ ### sendRequest()
89
+
90
+ ```ts
91
+ sendRequest<TMethod>(method, params?): Promise<TypeOf<T[TMethod]["result"]["from"]>>;
92
+ ```
93
+
94
+ ### Type Parameters
95
+
96
+ #### TMethod
97
+
98
+ `TMethod` *extends* `string`
99
+
100
+ ### Parameters
101
+
102
+ #### method
103
+
104
+ `TMethod`
105
+
106
+ #### params?
107
+
108
+ `TypeOf`\<`T`\[`TMethod`\]\[`"params"`\]\[`"to"`\]\>
109
+
110
+ ### Returns
111
+
112
+ `Promise`\<`TypeOf`\<`T`\[`TMethod`\]\[`"result"`\]\[`"from"`\]\>\>
113
+
114
+ ### Implementation of
115
+
116
+ [`RpcTransport`](#../interfaces/RpcTransport).[`sendRequest`](../interfaces/RpcTransport.md#sendrequest)
117
+
118
+ ### <a id="JsonRpcXyoGateway"></a>JsonRpcXyoGateway
119
+
120
+ [**@xyo-network/xl1-rpc**](#../../README)
121
+
122
+ ***
123
+
124
+ ## Implements
125
+
126
+ - `XyoGatewayProvider`
127
+
128
+ ## Constructors
129
+
130
+ ### Constructor
131
+
132
+ ```ts
133
+ new JsonRpcXyoGateway(transport): JsonRpcXyoGateway;
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ #### transport
139
+
140
+ [`RpcTransport`](#../interfaces/RpcTransport)\<[`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)\<
141
+ \| `"xyoGateway_activeConnection"`
142
+ \| `"xyoGateway_addConnection"`
143
+ \| `"xyoGateway_connections"`
144
+ \| `"xyoGateway_getPermissions"`
145
+ \| `"xyoGateway_requestPermissions"`
146
+ \| `"xyoGateway_revokePermissions"`
147
+ \| `"xyoGateway_submitTransaction"`\>\>
148
+
149
+ ### Returns
150
+
151
+ `JsonRpcXyoGateway`
152
+
153
+ ## Methods
154
+
155
+ ### activeConnection()
156
+
157
+ ```ts
158
+ activeConnection(): Promisable<undefined | XyoConnectionProvider>;
159
+ ```
160
+
161
+ ### Returns
162
+
163
+ `Promisable`\<`undefined` \| `XyoConnectionProvider`\>
164
+
165
+ ### Implementation of
166
+
167
+ ```ts
168
+ XyoGatewayProvider.activeConnection
169
+ ```
170
+
171
+ ***
172
+
173
+ ### addConnection()
174
+
175
+ ```ts
176
+ addConnection(_config): Promisable<XyoConnectionProvider>;
177
+ ```
178
+
179
+ ### Parameters
180
+
181
+ #### \_config
182
+
183
+ `XyoRpcConnectionConfig`
184
+
185
+ ### Returns
186
+
187
+ `Promisable`\<`XyoConnectionProvider`\>
188
+
189
+ ### Implementation of
190
+
191
+ ```ts
192
+ XyoGatewayProvider.addConnection
193
+ ```
194
+
195
+ ***
196
+
197
+ ### connections()
198
+
199
+ ```ts
200
+ connections(): Promisable<Record<string, XyoConnectionProvider>>;
201
+ ```
202
+
203
+ ### Returns
204
+
205
+ `Promisable`\<`Record`\<`string`, `XyoConnectionProvider`\>\>
206
+
207
+ ### Implementation of
208
+
209
+ ```ts
210
+ XyoGatewayProvider.connections
211
+ ```
212
+
213
+ ***
214
+
215
+ ### getPermissions()
216
+
217
+ ```ts
218
+ getPermissions(): Promisable<InvokerPermission[]>;
219
+ ```
220
+
221
+ ### Returns
222
+
223
+ `Promisable`\<`InvokerPermission`[]\>
224
+
225
+ ### Implementation of
226
+
227
+ ```ts
228
+ XyoGatewayProvider.getPermissions
229
+ ```
230
+
231
+ ***
232
+
233
+ ### requestPermissions()
234
+
235
+ ```ts
236
+ requestPermissions(permissions): Promisable<boolean>;
237
+ ```
238
+
239
+ ### Parameters
240
+
241
+ #### permissions
242
+
243
+ `Permission`[]
244
+
245
+ ### Returns
246
+
247
+ `Promisable`\<`boolean`\>
248
+
249
+ ### Implementation of
250
+
251
+ ```ts
252
+ XyoGatewayProvider.requestPermissions
253
+ ```
254
+
255
+ ***
256
+
257
+ ### revokePermissions()
258
+
259
+ ```ts
260
+ revokePermissions(permissions): Promisable<boolean>;
261
+ ```
262
+
263
+ ### Parameters
264
+
265
+ #### permissions
266
+
267
+ `Permission`[]
268
+
269
+ ### Returns
270
+
271
+ `Promisable`\<`boolean`\>
272
+
273
+ ### Implementation of
274
+
275
+ ```ts
276
+ XyoGatewayProvider.revokePermissions
277
+ ```
278
+
279
+ ***
280
+
281
+ ### submitTransaction()
282
+
283
+ ```ts
284
+ submitTransaction(tx): Promise<Lowercase<string>>;
285
+ ```
286
+
287
+ ### Parameters
288
+
289
+ #### tx
290
+
291
+ `HydratedTransaction`
292
+
293
+ ### Returns
294
+
295
+ `Promise`\<`Lowercase`\<`string`\>\>
296
+
297
+ ### Implementation of
298
+
299
+ ```ts
300
+ XyoGatewayProvider.submitTransaction
301
+ ```
302
+
303
+ ### <a id="JsonRpcXyoRunner"></a>JsonRpcXyoRunner
304
+
305
+ [**@xyo-network/xl1-rpc**](#../../README)
306
+
307
+ ***
308
+
309
+ ## Implements
310
+
311
+ - `XyoRunner`
312
+
313
+ ## Constructors
314
+
315
+ ### Constructor
316
+
317
+ ```ts
318
+ new JsonRpcXyoRunner(transport): JsonRpcXyoRunner;
319
+ ```
320
+
321
+ ### Parameters
322
+
323
+ #### transport
324
+
325
+ [`RpcTransport`](#../interfaces/RpcTransport)\<[`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)\<`"xyoRunner_broadcastTransaction"`\>\>
326
+
327
+ ### Returns
328
+
329
+ `JsonRpcXyoRunner`
330
+
331
+ ## Properties
332
+
333
+ ### transport
334
+
335
+ ```ts
336
+ protected readonly transport: RpcTransport<RpcSchemaMap<"xyoRunner_broadcastTransaction">>;
337
+ ```
338
+
339
+ ## Methods
340
+
341
+ ### broadcastTransaction()
342
+
343
+ ```ts
344
+ broadcastTransaction(transaction): Promise<Lowercase<string>>;
345
+ ```
346
+
347
+ ### Parameters
348
+
349
+ #### transaction
350
+
351
+ `HydratedTransaction`
352
+
353
+ ### Returns
354
+
355
+ `Promise`\<`Lowercase`\<`string`\>\>
356
+
357
+ ### Implementation of
358
+
359
+ ```ts
360
+ XyoRunner.broadcastTransaction
361
+ ```
362
+
363
+ ### <a id="JsonRpcXyoSigner"></a>JsonRpcXyoSigner
364
+
365
+ [**@xyo-network/xl1-rpc**](#../../README)
366
+
367
+ ***
368
+
369
+ ## Implements
370
+
371
+ - `XyoSigner`
372
+
373
+ ## Constructors
374
+
375
+ ### Constructor
376
+
377
+ ```ts
378
+ new JsonRpcXyoSigner(transport): JsonRpcXyoSigner;
379
+ ```
380
+
381
+ ### Parameters
382
+
383
+ #### transport
384
+
385
+ [`RpcTransport`](#../interfaces/RpcTransport)\<[`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)\<`"xyoSigner_address"` \| `"xyoSigner_createSignedTransaction"`\>\>
386
+
387
+ ### Returns
388
+
389
+ `JsonRpcXyoSigner`
390
+
391
+ ## Properties
392
+
393
+ ### transport
394
+
395
+ ```ts
396
+ protected readonly transport: RpcTransport<RpcSchemaMap<"xyoSigner_address" | "xyoSigner_createSignedTransaction">>;
397
+ ```
398
+
399
+ ## Methods
400
+
401
+ ### address()
402
+
403
+ ```ts
404
+ address(): Promise<Lowercase<string>>;
405
+ ```
406
+
407
+ ### Returns
408
+
409
+ `Promise`\<`Lowercase`\<`string`\>\>
410
+
411
+ ### Implementation of
412
+
413
+ ```ts
414
+ XyoSigner.address
415
+ ```
416
+
417
+ ***
418
+
419
+ ### createSignedTransaction()
420
+
421
+ ```ts
422
+ createSignedTransaction(
423
+ chain,
424
+ elevatedPayloads,
425
+ additionalPayloads,
426
+ nbf,
427
+ exp,
428
+ fees,
429
+ from?): Promise<Signed<TransactionBoundWitness>>;
430
+ ```
431
+
432
+ ### Parameters
433
+
434
+ #### chain
435
+
436
+ `Lowercase`\<`string`\>
437
+
438
+ #### elevatedPayloads
439
+
440
+ `AllowedBlockPayload`[]
441
+
442
+ #### additionalPayloads
443
+
444
+ `Payload`[]
445
+
446
+ #### nbf
447
+
448
+ `number`
449
+
450
+ #### exp
451
+
452
+ `number`
453
+
454
+ #### fees
455
+
456
+ `TransactionFeesBigInt`
457
+
458
+ #### from?
459
+
460
+ `Lowercase`\<`string`\>
461
+
462
+ ### Returns
463
+
464
+ `Promise`\<`Signed`\<`TransactionBoundWitness`\>\>
465
+
466
+ ### Implementation of
467
+
468
+ ```ts
469
+ XyoSigner.createSignedTransaction
470
+ ```
471
+
472
+ ### <a id="JsonRpcXyoViewer"></a>JsonRpcXyoViewer
473
+
474
+ [**@xyo-network/xl1-rpc**](#../../README)
475
+
476
+ ***
477
+
478
+ ## Implements
479
+
480
+ - `XyoViewer`
481
+
482
+ ## Constructors
483
+
484
+ ### Constructor
485
+
486
+ ```ts
487
+ new JsonRpcXyoViewer(transport): JsonRpcXyoViewer;
488
+ ```
489
+
490
+ ### Parameters
491
+
492
+ #### transport
493
+
494
+ [`RpcTransport`](#../interfaces/RpcTransport)\<[`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)\<
495
+ \| `"xyoViewer_accountBalance"`
496
+ \| `"xyoViewer_accountHistory"`
497
+ \| `"xyoViewer_blockByHash"`
498
+ \| `"xyoViewer_blockByNumber"`
499
+ \| `"xyoViewer_blocksByHash"`
500
+ \| `"xyoViewer_chainId"`
501
+ \| `"xyoViewer_currentBlock"`
502
+ \| `"xyoViewer_currentBlockHash"`
503
+ \| `"xyoViewer_currentBlockNumber"`
504
+ \| `"xyoViewer_transactionByBlockHashAndIndex"`
505
+ \| `"xyoViewer_transactionByBlockNumberAndIndex"`
506
+ \| `"xyoViewer_transactionByHash"`\>\>
507
+
508
+ ### Returns
509
+
510
+ `JsonRpcXyoViewer`
511
+
512
+ ## Properties
513
+
514
+ ### transport
515
+
516
+ ```ts
517
+ protected readonly transport: RpcTransport<RpcSchemaMap<
518
+ | "xyoViewer_accountBalance"
519
+ | "xyoViewer_accountHistory"
520
+ | "xyoViewer_blockByHash"
521
+ | "xyoViewer_blockByNumber"
522
+ | "xyoViewer_blocksByHash"
523
+ | "xyoViewer_chainId"
524
+ | "xyoViewer_currentBlock"
525
+ | "xyoViewer_currentBlockHash"
526
+ | "xyoViewer_currentBlockNumber"
527
+ | "xyoViewer_transactionByBlockHashAndIndex"
528
+ | "xyoViewer_transactionByBlockNumberAndIndex"
529
+ | "xyoViewer_transactionByHash">>;
530
+ ```
531
+
532
+ ## Methods
533
+
534
+ ### accountBalance()
535
+
536
+ ```ts
537
+ accountBalance(address): Promise<bigint>;
538
+ ```
539
+
540
+ ### Parameters
541
+
542
+ #### address
543
+
544
+ `Lowercase`\<`string`\>
545
+
546
+ ### Returns
547
+
548
+ `Promise`\<`bigint`\>
549
+
550
+ ### Implementation of
551
+
552
+ ```ts
553
+ XyoViewer.accountBalance
554
+ ```
555
+
556
+ ***
557
+
558
+ ### accountHistory()
559
+
560
+ ```ts
561
+ accountHistory(address): Promise<[TransactionBoundWitness[], Transfer[]]>;
562
+ ```
563
+
564
+ ### Parameters
565
+
566
+ #### address
567
+
568
+ `Lowercase`\<`string`\>
569
+
570
+ ### Returns
571
+
572
+ `Promise`\<\[`TransactionBoundWitness`[], `Transfer`[]\]\>
573
+
574
+ ### Implementation of
575
+
576
+ ```ts
577
+ XyoViewer.accountHistory
578
+ ```
579
+
580
+ ***
581
+
582
+ ### blockByHash()
583
+
584
+ ```ts
585
+ blockByHash(hash): Promise<null | HydratedBlock>;
586
+ ```
587
+
588
+ ### Parameters
589
+
590
+ #### hash
591
+
592
+ `Lowercase`\<`string`\>
593
+
594
+ ### Returns
595
+
596
+ `Promise`\<`null` \| `HydratedBlock`\>
597
+
598
+ ### Implementation of
599
+
600
+ ```ts
601
+ XyoViewer.blockByHash
602
+ ```
603
+
604
+ ***
605
+
606
+ ### blockByNumber()
607
+
608
+ ```ts
609
+ blockByNumber(blockNumber): Promise<null | HydratedBlock>;
610
+ ```
611
+
612
+ ### Parameters
613
+
614
+ #### blockNumber
615
+
616
+ `number`
617
+
618
+ ### Returns
619
+
620
+ `Promise`\<`null` \| `HydratedBlock`\>
621
+
622
+ ### Implementation of
623
+
624
+ ```ts
625
+ XyoViewer.blockByNumber
626
+ ```
627
+
628
+ ***
629
+
630
+ ### blocksByHash()
631
+
632
+ ```ts
633
+ blocksByHash(hash, limit?): Promise<HydratedBlock[]>;
634
+ ```
635
+
636
+ ### Parameters
637
+
638
+ #### hash
639
+
640
+ `Lowercase`\<`string`\>
641
+
642
+ #### limit?
643
+
644
+ `number`
645
+
646
+ ### Returns
647
+
648
+ `Promise`\<`HydratedBlock`[]\>
649
+
650
+ ### Implementation of
651
+
652
+ ```ts
653
+ XyoViewer.blocksByHash
654
+ ```
655
+
656
+ ***
657
+
658
+ ### chainId()
659
+
660
+ ```ts
661
+ chainId(): Promise<Lowercase<string>>;
662
+ ```
663
+
664
+ ### Returns
665
+
666
+ `Promise`\<`Lowercase`\<`string`\>\>
667
+
668
+ ### Implementation of
669
+
670
+ ```ts
671
+ XyoViewer.chainId
672
+ ```
673
+
674
+ ***
675
+
676
+ ### currentBlock()
677
+
678
+ ```ts
679
+ currentBlock(): Promise<HydratedBlock>;
680
+ ```
681
+
682
+ ### Returns
683
+
684
+ `Promise`\<`HydratedBlock`\>
685
+
686
+ ### Implementation of
687
+
688
+ ```ts
689
+ XyoViewer.currentBlock
690
+ ```
691
+
692
+ ***
693
+
694
+ ### currentBlockHash()
695
+
696
+ ```ts
697
+ currentBlockHash(): Promise<Lowercase<string>>;
698
+ ```
699
+
700
+ ### Returns
701
+
702
+ `Promise`\<`Lowercase`\<`string`\>\>
703
+
704
+ ### Implementation of
705
+
706
+ ```ts
707
+ XyoViewer.currentBlockHash
708
+ ```
709
+
710
+ ***
711
+
712
+ ### currentBlockNumber()
713
+
714
+ ```ts
715
+ currentBlockNumber(): Promise<number>;
716
+ ```
717
+
718
+ ### Returns
719
+
720
+ `Promise`\<`number`\>
721
+
722
+ ### Implementation of
723
+
724
+ ```ts
725
+ XyoViewer.currentBlockNumber
726
+ ```
727
+
728
+ ***
729
+
730
+ ### transactionByBlockHashAndIndex()
731
+
732
+ ```ts
733
+ transactionByBlockHashAndIndex(blockHash, transactionIndex): Promise<null | HydratedTransaction>;
734
+ ```
735
+
736
+ ### Parameters
737
+
738
+ #### blockHash
739
+
740
+ `Lowercase`\<`string`\>
741
+
742
+ #### transactionIndex
743
+
744
+ `number`
745
+
746
+ ### Returns
747
+
748
+ `Promise`\<`null` \| `HydratedTransaction`\>
749
+
750
+ ### Implementation of
751
+
752
+ ```ts
753
+ XyoViewer.transactionByBlockHashAndIndex
754
+ ```
755
+
756
+ ***
757
+
758
+ ### transactionByBlockNumberAndIndex()
759
+
760
+ ```ts
761
+ transactionByBlockNumberAndIndex(blockNumber, transactionIndex): Promise<null | HydratedTransaction>;
762
+ ```
763
+
764
+ ### Parameters
765
+
766
+ #### blockNumber
767
+
768
+ `number`
769
+
770
+ #### transactionIndex
771
+
772
+ `number`
773
+
774
+ ### Returns
775
+
776
+ `Promise`\<`null` \| `HydratedTransaction`\>
777
+
778
+ ### Implementation of
779
+
780
+ ```ts
781
+ XyoViewer.transactionByBlockNumberAndIndex
782
+ ```
783
+
784
+ ***
785
+
786
+ ### transactionByHash()
787
+
788
+ ```ts
789
+ transactionByHash(transactionHash): Promise<null | HydratedTransaction>;
790
+ ```
791
+
792
+ ### Parameters
793
+
794
+ #### transactionHash
795
+
796
+ `Lowercase`\<`string`\>
797
+
798
+ ### Returns
799
+
800
+ `Promise`\<`null` \| `HydratedTransaction`\>
801
+
802
+ ### Implementation of
803
+
804
+ ```ts
805
+ XyoViewer.transactionByHash
806
+ ```
807
+
808
+ ### <a id="MemoryRpcTransport"></a>MemoryRpcTransport
809
+
810
+ [**@xyo-network/xl1-rpc**](#../../README)
811
+
812
+ ***
813
+
814
+ ## Type Parameters
815
+
816
+ ### T
817
+
818
+ `T` *extends* [`RpcSchemaMap`](#../type-aliases/RpcSchemaMap) = *typeof* [`AllRpcSchemas`](#../variables/AllRpcSchemas)
819
+
820
+ ## Implements
821
+
822
+ - [`RpcTransport`](#../interfaces/RpcTransport)\<`T`\>
823
+
824
+ ## Constructors
825
+
826
+ ### Constructor
827
+
828
+ ```ts
829
+ new MemoryRpcTransport<T>(rpcEngine, schemas): MemoryRpcTransport<T>;
830
+ ```
831
+
832
+ ### Parameters
833
+
834
+ #### rpcEngine
835
+
836
+ `JsonRpcEngine`
837
+
838
+ #### schemas
839
+
840
+ `T` = `...`
841
+
842
+ ### Returns
843
+
844
+ `MemoryRpcTransport`\<`T`\>
845
+
846
+ ## Properties
847
+
848
+ ### \_rpcEngine
849
+
850
+ ```ts
851
+ protected readonly _rpcEngine: JsonRpcEngine;
852
+ ```
853
+
854
+ ***
855
+
856
+ ### \_schemas
857
+
858
+ ```ts
859
+ protected readonly _schemas: T;
860
+ ```
861
+
862
+ ***
863
+
864
+ ### requestSchemas
865
+
866
+ ```ts
867
+ protected readonly requestSchemas: Record<string, z.AnyZodObject> = {};
868
+ ```
869
+
870
+ ***
871
+
872
+ ### responseSchemas
873
+
874
+ ```ts
875
+ protected readonly responseSchemas: Record<string, z.AnyZodObject> = {};
876
+ ```
877
+
878
+ ## Methods
879
+
880
+ ### sendRequest()
881
+
882
+ ```ts
883
+ sendRequest<TMethod>(method, params?): Promise<TypeOf<T[TMethod]["result"]["from"]>>;
884
+ ```
885
+
886
+ ### Type Parameters
887
+
888
+ #### TMethod
889
+
890
+ `TMethod` *extends* `string`
891
+
892
+ ### Parameters
893
+
894
+ #### method
895
+
896
+ `TMethod`
897
+
898
+ #### params?
899
+
900
+ `TypeOf`\<`T`\[`TMethod`\]\[`"params"`\]\[`"to"`\]\>
901
+
902
+ ### Returns
903
+
904
+ `Promise`\<`TypeOf`\<`T`\[`TMethod`\]\[`"result"`\]\[`"from"`\]\>\>
905
+
906
+ ### Implementation of
907
+
908
+ [`RpcTransport`](#../interfaces/RpcTransport).[`sendRequest`](../interfaces/RpcTransport.md#sendrequest)
909
+
910
+ ### <a id="MemoryXyoNetwork"></a>MemoryXyoNetwork
911
+
912
+ [**@xyo-network/xl1-rpc**](#../../README)
913
+
914
+ ***
915
+
916
+ ## Implements
917
+
918
+ - `XyoNetwork`
919
+
920
+ ## Constructors
921
+
922
+ ### Constructor
923
+
924
+ ```ts
925
+ new MemoryXyoNetwork(networkId): MemoryXyoNetwork;
926
+ ```
927
+
928
+ ### Parameters
929
+
930
+ #### networkId
931
+
932
+ `DefaultNetworkIds`
933
+
934
+ ### Returns
935
+
936
+ `MemoryXyoNetwork`
937
+
938
+ ## Properties
939
+
940
+ ### \_networkId
941
+
942
+ ```ts
943
+ protected readonly _networkId: DefaultNetworkIds;
944
+ ```
945
+
946
+ ## Methods
947
+
948
+ ### status()
949
+
950
+ ```ts
951
+ status(): Promise<NetworkStatus>;
952
+ ```
953
+
954
+ ### Returns
955
+
956
+ `Promise`\<`NetworkStatus`\>
957
+
958
+ ### Implementation of
959
+
960
+ ```ts
961
+ XyoNetwork.status
962
+ ```
963
+
964
+ ### <a id="MemoryXyoProvider"></a>MemoryXyoProvider
965
+
966
+ [**@xyo-network/xl1-rpc**](#../../README)
967
+
968
+ ***
969
+
970
+ ## Extended by
971
+
972
+ - [`RpcXyoProvider`](#RpcXyoProvider)
973
+
974
+ ## Implements
975
+
976
+ - `XyoConnectionProvider`
977
+
978
+ ## Constructors
979
+
980
+ ### Constructor
981
+
982
+ ```ts
983
+ new MemoryXyoProvider(params?): MemoryXyoProvider;
984
+ ```
985
+
986
+ ### Parameters
987
+
988
+ #### params?
989
+
990
+ ##### network?
991
+
992
+ `XyoNetwork`
993
+
994
+ ##### runner?
995
+
996
+ `XyoRunner`
997
+
998
+ ##### signer?
999
+
1000
+ `XyoSigner`
1001
+
1002
+ ##### viewer?
1003
+
1004
+ `XyoViewer`
1005
+
1006
+ ### Returns
1007
+
1008
+ `MemoryXyoProvider`
1009
+
1010
+ ## Accessors
1011
+
1012
+ ### network
1013
+
1014
+ ### Get Signature
1015
+
1016
+ ```ts
1017
+ get network(): undefined | XyoNetwork;
1018
+ ```
1019
+
1020
+ #### Returns
1021
+
1022
+ `undefined` \| `XyoNetwork`
1023
+
1024
+ ### Implementation of
1025
+
1026
+ ```ts
1027
+ XyoConnectionProvider.network
1028
+ ```
1029
+
1030
+ ***
1031
+
1032
+ ### runner
1033
+
1034
+ ### Get Signature
1035
+
1036
+ ```ts
1037
+ get runner(): undefined | XyoRunner;
1038
+ ```
1039
+
1040
+ #### Returns
1041
+
1042
+ `undefined` \| `XyoRunner`
1043
+
1044
+ ### Implementation of
1045
+
1046
+ ```ts
1047
+ XyoConnectionProvider.runner
1048
+ ```
1049
+
1050
+ ***
1051
+
1052
+ ### signer
1053
+
1054
+ ### Get Signature
1055
+
1056
+ ```ts
1057
+ get signer(): undefined | XyoSigner;
1058
+ ```
1059
+
1060
+ #### Returns
1061
+
1062
+ `undefined` \| `XyoSigner`
1063
+
1064
+ ### Implementation of
1065
+
1066
+ ```ts
1067
+ XyoConnectionProvider.signer
1068
+ ```
1069
+
1070
+ ***
1071
+
1072
+ ### viewer
1073
+
1074
+ ### Get Signature
1075
+
1076
+ ```ts
1077
+ get viewer(): undefined | XyoViewer;
1078
+ ```
1079
+
1080
+ #### Returns
1081
+
1082
+ `undefined` \| `XyoViewer`
1083
+
1084
+ ### Implementation of
1085
+
1086
+ ```ts
1087
+ XyoConnectionProvider.viewer
1088
+ ```
1089
+
1090
+ ## Methods
1091
+
1092
+ ### ~~send()~~
1093
+
1094
+ ```ts
1095
+ send(
1096
+ elevatedPayloads,
1097
+ additionalPayloads,
1098
+ chain?,
1099
+ nbf?,
1100
+ exp?,
1101
+ from?,
1102
+ fees?): Promise<Signed<TransactionBoundWitness>>;
1103
+ ```
1104
+
1105
+ ### Parameters
1106
+
1107
+ #### elevatedPayloads
1108
+
1109
+ `AllowedBlockPayload`[]
1110
+
1111
+ #### additionalPayloads
1112
+
1113
+ `Payload`[]
1114
+
1115
+ #### chain?
1116
+
1117
+ `Lowercase`\<`string`\>
1118
+
1119
+ #### nbf?
1120
+
1121
+ `number`
1122
+
1123
+ #### exp?
1124
+
1125
+ `number`
1126
+
1127
+ #### from?
1128
+
1129
+ `Lowercase`\<`string`\>
1130
+
1131
+ #### fees?
1132
+
1133
+ `TransactionFeesBigInt`
1134
+
1135
+ ### Returns
1136
+
1137
+ `Promise`\<`Signed`\<`TransactionBoundWitness`\>\>
1138
+
1139
+ ### Deprecated
1140
+
1141
+ - use host.submit instead
1142
+
1143
+ ### Implementation of
1144
+
1145
+ ```ts
1146
+ XyoConnectionProvider.send
1147
+ ```
1148
+
1149
+ ### <a id="MemoryXyoRunner"></a>MemoryXyoRunner
1150
+
1151
+ [**@xyo-network/xl1-rpc**](#../../README)
1152
+
1153
+ ***
1154
+
1155
+ ## Implements
1156
+
1157
+ - `XyoRunner`
1158
+
1159
+ ## Constructors
1160
+
1161
+ ### Constructor
1162
+
1163
+ ```ts
1164
+ new MemoryXyoRunner(): MemoryXyoRunner;
1165
+ ```
1166
+
1167
+ ### Returns
1168
+
1169
+ `MemoryXyoRunner`
1170
+
1171
+ ## Properties
1172
+
1173
+ ### \_archivist
1174
+
1175
+ ```ts
1176
+ protected _archivist:
1177
+ | undefined
1178
+ | MemoryArchivist<MemoryArchivistParams<AnyConfigSchema<MemoryArchivistConfig>>, ArchivistModuleEventData>;
1179
+ ```
1180
+
1181
+ ## Methods
1182
+
1183
+ ### broadcastTransaction()
1184
+
1185
+ ```ts
1186
+ broadcastTransaction(transaction): Promise<Lowercase<string>>;
1187
+ ```
1188
+
1189
+ ### Parameters
1190
+
1191
+ #### transaction
1192
+
1193
+ `HydratedTransaction`
1194
+
1195
+ ### Returns
1196
+
1197
+ `Promise`\<`Lowercase`\<`string`\>\>
1198
+
1199
+ ### Implementation of
1200
+
1201
+ ```ts
1202
+ XyoRunner.broadcastTransaction
1203
+ ```
1204
+
1205
+ ***
1206
+
1207
+ ### getArchivist()
1208
+
1209
+ ```ts
1210
+ protected getArchivist(): Promise<MemoryArchivist<MemoryArchivistParams<AnyConfigSchema<MemoryArchivistConfig>>, ArchivistModuleEventData>>;
1211
+ ```
1212
+
1213
+ ### Returns
1214
+
1215
+ `Promise`\<`MemoryArchivist`\<`MemoryArchivistParams`\<`AnyConfigSchema`\<`MemoryArchivistConfig`\>\>, `ArchivistModuleEventData`\>\>
1216
+
1217
+ ### <a id="MemoryXyoSigner"></a>MemoryXyoSigner
1218
+
1219
+ [**@xyo-network/xl1-rpc**](#../../README)
1220
+
1221
+ ***
1222
+
1223
+ ## Implements
1224
+
1225
+ - `XyoSigner`
1226
+
1227
+ ## Constructors
1228
+
1229
+ ### Constructor
1230
+
1231
+ ```ts
1232
+ new MemoryXyoSigner(account): MemoryXyoSigner;
1233
+ ```
1234
+
1235
+ ### Parameters
1236
+
1237
+ #### account
1238
+
1239
+ `AccountInstance`
1240
+
1241
+ ### Returns
1242
+
1243
+ `MemoryXyoSigner`
1244
+
1245
+ ## Properties
1246
+
1247
+ ### \_account
1248
+
1249
+ ```ts
1250
+ protected readonly _account: AccountInstance;
1251
+ ```
1252
+
1253
+ ## Methods
1254
+
1255
+ ### address()
1256
+
1257
+ ```ts
1258
+ address(): Lowercase<string>;
1259
+ ```
1260
+
1261
+ ### Returns
1262
+
1263
+ `Lowercase`\<`string`\>
1264
+
1265
+ ### Implementation of
1266
+
1267
+ ```ts
1268
+ XyoSigner.address
1269
+ ```
1270
+
1271
+ ***
1272
+
1273
+ ### createSignedTransaction()
1274
+
1275
+ ```ts
1276
+ createSignedTransaction(
1277
+ chain,
1278
+ elevatedPayloads,
1279
+ additionalPayloads,
1280
+ nbf,
1281
+ exp,
1282
+ fees,
1283
+ from?): Promise<Signed<TransactionBoundWitness>>;
1284
+ ```
1285
+
1286
+ ### Parameters
1287
+
1288
+ #### chain
1289
+
1290
+ `Lowercase`\<`string`\>
1291
+
1292
+ #### elevatedPayloads
1293
+
1294
+ `AllowedBlockPayload`[]
1295
+
1296
+ #### additionalPayloads
1297
+
1298
+ `Payload`[]
1299
+
1300
+ #### nbf
1301
+
1302
+ `number`
1303
+
1304
+ #### exp
1305
+
1306
+ `number`
1307
+
1308
+ #### fees
1309
+
1310
+ `TransactionFeesBigInt`
1311
+
1312
+ #### from?
1313
+
1314
+ `Lowercase`\<`string`\>
1315
+
1316
+ ### Returns
1317
+
1318
+ `Promise`\<`Signed`\<`TransactionBoundWitness`\>\>
1319
+
1320
+ ### Implementation of
1321
+
1322
+ ```ts
1323
+ XyoSigner.createSignedTransaction
1324
+ ```
1325
+
1326
+ ### <a id="NodeXyoRunner"></a>NodeXyoRunner
1327
+
1328
+ [**@xyo-network/xl1-rpc**](#../../README)
1329
+
1330
+ ***
1331
+
1332
+ ## Implements
1333
+
1334
+ - `XyoRunner`
1335
+
1336
+ ## Constructors
1337
+
1338
+ ### Constructor
1339
+
1340
+ ```ts
1341
+ new NodeXyoRunner(node): NodeXyoRunner;
1342
+ ```
1343
+
1344
+ ### Parameters
1345
+
1346
+ #### node
1347
+
1348
+ `NodeInstance`
1349
+
1350
+ ### Returns
1351
+
1352
+ `NodeXyoRunner`
1353
+
1354
+ ## Properties
1355
+
1356
+ ### node
1357
+
1358
+ ```ts
1359
+ protected readonly node: NodeInstance;
1360
+ ```
1361
+
1362
+ ***
1363
+
1364
+ ### pendingArchivistPath
1365
+
1366
+ ```ts
1367
+ protected readonly pendingArchivistPath: string = 'XYOChain:Pending:PendingTransactions';
1368
+ ```
1369
+
1370
+ ## Methods
1371
+
1372
+ ### broadcastTransaction()
1373
+
1374
+ ```ts
1375
+ broadcastTransaction(transaction): Promise<Lowercase<string>>;
1376
+ ```
1377
+
1378
+ ### Parameters
1379
+
1380
+ #### transaction
1381
+
1382
+ `HydratedTransaction`
1383
+
1384
+ ### Returns
1385
+
1386
+ `Promise`\<`Lowercase`\<`string`\>\>
1387
+
1388
+ ### Implementation of
1389
+
1390
+ ```ts
1391
+ XyoRunner.broadcastTransaction
1392
+ ```
1393
+
1394
+ ***
1395
+
1396
+ ### getArchivist()
1397
+
1398
+ ```ts
1399
+ protected getArchivist(identifier): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig<void, void>>>, ArchivistModuleEventData, Payload<void, void>>>;
1400
+ ```
1401
+
1402
+ ### Parameters
1403
+
1404
+ #### identifier
1405
+
1406
+ `string`
1407
+
1408
+ ### Returns
1409
+
1410
+ `Promise`\<`ArchivistInstance`\<`ArchivistParams`\<`AnyConfigSchema`\<`ArchivistConfig`\<`void`, `void`\>\>\>, `ArchivistModuleEventData`, `Payload`\<`void`, `void`\>\>\>
1411
+
1412
+ ***
1413
+
1414
+ ### getPendingArchivist()
1415
+
1416
+ ```ts
1417
+ protected getPendingArchivist(): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>>;
1418
+ ```
1419
+
1420
+ ### Returns
1421
+
1422
+ `Promise`\<`ArchivistInstance`\<`ArchivistParams`\<`AnyConfigSchema`\<`ArchivistConfig`\>\>, `ArchivistModuleEventData`, `Payload`\>\>
1423
+
1424
+ ### <a id="PostMessageRpcTransport"></a>PostMessageRpcTransport
1425
+
1426
+ [**@xyo-network/xl1-rpc**](#../../README)
1427
+
1428
+ ***
1429
+
1430
+ ## Type Parameters
1431
+
1432
+ ### T
1433
+
1434
+ `T` *extends* [`RpcSchemaMap`](#../type-aliases/RpcSchemaMap) = [`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)
1435
+
1436
+ ## Implements
1437
+
1438
+ - [`RpcTransport`](#../interfaces/RpcTransport)\<`T`\>
1439
+
1440
+ ## Constructors
1441
+
1442
+ ### Constructor
1443
+
1444
+ ```ts
1445
+ new PostMessageRpcTransport<T>(defaultDestination?, schemas?): PostMessageRpcTransport<T>;
1446
+ ```
1447
+
1448
+ ### Parameters
1449
+
1450
+ #### defaultDestination?
1451
+
1452
+ `string`
1453
+
1454
+ #### schemas?
1455
+
1456
+ `T` = `...`
1457
+
1458
+ ### Returns
1459
+
1460
+ `PostMessageRpcTransport`\<`T`\>
1461
+
1462
+ ## Properties
1463
+
1464
+ ### destination?
1465
+
1466
+ ```ts
1467
+ protected readonly optional destination: string;
1468
+ ```
1469
+
1470
+ ***
1471
+
1472
+ ### schemas
1473
+
1474
+ ```ts
1475
+ protected readonly schemas: T;
1476
+ ```
1477
+
1478
+ ## Methods
1479
+
1480
+ ### sendRequest()
1481
+
1482
+ ```ts
1483
+ sendRequest<TMethod>(method, params?): Promise<TypeOf<T[TMethod]["result"]["from"]>>;
1484
+ ```
1485
+
1486
+ ### Type Parameters
1487
+
1488
+ #### TMethod
1489
+
1490
+ `TMethod` *extends* `string`
1491
+
1492
+ ### Parameters
1493
+
1494
+ #### method
1495
+
1496
+ `TMethod`
1497
+
1498
+ #### params?
1499
+
1500
+ `TypeOf`\<`T`\[`TMethod`\]\[`"params"`\]\[`"to"`\]\>
1501
+
1502
+ ### Returns
1503
+
1504
+ `Promise`\<`TypeOf`\<`T`\[`TMethod`\]\[`"result"`\]\[`"from"`\]\>\>
1505
+
1506
+ ### Implementation of
1507
+
1508
+ [`RpcTransport`](#../interfaces/RpcTransport).[`sendRequest`](../interfaces/RpcTransport.md#sendrequest)
1509
+
1510
+ ### <a id="RpcXyoProvider"></a>RpcXyoProvider
1511
+
1512
+ [**@xyo-network/xl1-rpc**](#../../README)
1513
+
1514
+ ***
1515
+
1516
+ ## Extends
1517
+
1518
+ - [`MemoryXyoProvider`](#MemoryXyoProvider)
1519
+
1520
+ ## Constructors
1521
+
1522
+ ### Constructor
1523
+
1524
+ ```ts
1525
+ new RpcXyoProvider(params): RpcXyoProvider;
1526
+ ```
1527
+
1528
+ ### Parameters
1529
+
1530
+ #### params
1531
+
1532
+ [`RpcXyoProviderParams`](#../interfaces/RpcXyoProviderParams)
1533
+
1534
+ ### Returns
1535
+
1536
+ `RpcXyoProvider`
1537
+
1538
+ ### Overrides
1539
+
1540
+ [`MemoryXyoProvider`](#MemoryXyoProvider).[`constructor`](MemoryXyoProvider.md#constructor)
1541
+
1542
+ ## Accessors
1543
+
1544
+ ### network
1545
+
1546
+ ### Get Signature
1547
+
1548
+ ```ts
1549
+ get network(): undefined | XyoNetwork;
1550
+ ```
1551
+
1552
+ #### Returns
1553
+
1554
+ `undefined` \| `XyoNetwork`
1555
+
1556
+ ### Inherited from
1557
+
1558
+ [`MemoryXyoProvider`](#MemoryXyoProvider).[`network`](MemoryXyoProvider.md#network)
1559
+
1560
+ ***
1561
+
1562
+ ### runner
1563
+
1564
+ ### Get Signature
1565
+
1566
+ ```ts
1567
+ get runner(): undefined | XyoRunner;
1568
+ ```
1569
+
1570
+ #### Returns
1571
+
1572
+ `undefined` \| `XyoRunner`
1573
+
1574
+ ### Inherited from
1575
+
1576
+ [`MemoryXyoProvider`](#MemoryXyoProvider).[`runner`](MemoryXyoProvider.md#runner)
1577
+
1578
+ ***
1579
+
1580
+ ### signer
1581
+
1582
+ ### Get Signature
1583
+
1584
+ ```ts
1585
+ get signer(): undefined | XyoSigner;
1586
+ ```
1587
+
1588
+ #### Returns
1589
+
1590
+ `undefined` \| `XyoSigner`
1591
+
1592
+ ### Inherited from
1593
+
1594
+ [`MemoryXyoProvider`](#MemoryXyoProvider).[`signer`](MemoryXyoProvider.md#signer)
1595
+
1596
+ ***
1597
+
1598
+ ### viewer
1599
+
1600
+ ### Get Signature
1601
+
1602
+ ```ts
1603
+ get viewer(): undefined | XyoViewer;
1604
+ ```
1605
+
1606
+ #### Returns
1607
+
1608
+ `undefined` \| `XyoViewer`
1609
+
1610
+ ### Inherited from
1611
+
1612
+ [`MemoryXyoProvider`](#MemoryXyoProvider).[`viewer`](MemoryXyoProvider.md#viewer)
1613
+
1614
+ ## Methods
1615
+
1616
+ ### ~~send()~~
1617
+
1618
+ ```ts
1619
+ send(
1620
+ elevatedPayloads,
1621
+ additionalPayloads,
1622
+ chain?,
1623
+ nbf?,
1624
+ exp?,
1625
+ from?,
1626
+ fees?): Promise<Signed<TransactionBoundWitness>>;
1627
+ ```
1628
+
1629
+ ### Parameters
1630
+
1631
+ #### elevatedPayloads
1632
+
1633
+ `AllowedBlockPayload`[]
1634
+
1635
+ #### additionalPayloads
1636
+
1637
+ `Payload`[]
1638
+
1639
+ #### chain?
1640
+
1641
+ `Lowercase`\<`string`\>
1642
+
1643
+ #### nbf?
1644
+
1645
+ `number`
1646
+
1647
+ #### exp?
1648
+
1649
+ `number`
1650
+
1651
+ #### from?
1652
+
1653
+ `Lowercase`\<`string`\>
1654
+
1655
+ #### fees?
1656
+
1657
+ `TransactionFeesBigInt`
1658
+
1659
+ ### Returns
1660
+
1661
+ `Promise`\<`Signed`\<`TransactionBoundWitness`\>\>
1662
+
1663
+ ### Deprecated
1664
+
1665
+ - use host.submit instead
1666
+
1667
+ ### Inherited from
1668
+
1669
+ [`MemoryXyoProvider`](#MemoryXyoProvider).[`send`](MemoryXyoProvider.md#send)
1670
+
1671
+ ***
1672
+
1673
+ ### confirm()
1674
+
1675
+ ```ts
1676
+ confirm(
1677
+ tx,
1678
+ onConfirm?,
1679
+ onTimeout?): Promise<void>;
1680
+ ```
1681
+
1682
+ ### Parameters
1683
+
1684
+ #### tx
1685
+
1686
+ `Signed`\<`TransactionBoundWitness`\>
1687
+
1688
+ #### onConfirm?
1689
+
1690
+ (`txBWHash`) => `void`
1691
+
1692
+ #### onTimeout?
1693
+
1694
+ () => `void`
1695
+
1696
+ ### Returns
1697
+
1698
+ `Promise`\<`void`\>
1699
+
1700
+ ### functions
1701
+
1702
+ ### <a id="buildSessionMessageRequest"></a>buildSessionMessageRequest
1703
+
1704
+ [**@xyo-network/xl1-rpc**](#../../README)
1705
+
1706
+ ***
1707
+
1708
+ ```ts
1709
+ function buildSessionMessageRequest<T>(data, destination?): SessionMessageEnvelope<T>;
1710
+ ```
1711
+
1712
+ Only intended for web pages where the xyo global object was injected
1713
+
1714
+ ## Type Parameters
1715
+
1716
+ ### T
1717
+
1718
+ `T` *extends* `JsonRpcRequest`
1719
+
1720
+ ## Parameters
1721
+
1722
+ ### data
1723
+
1724
+ `T`
1725
+
1726
+ ### destination?
1727
+
1728
+ `string`
1729
+
1730
+ ## Returns
1731
+
1732
+ [`SessionMessageEnvelope`](#../interfaces/SessionMessageEnvelope)\<`T`\>
1733
+
1734
+ ### <a id="createRequestSchema"></a>createRequestSchema
1735
+
1736
+ [**@xyo-network/xl1-rpc**](#../../README)
1737
+
1738
+ ***
1739
+
1740
+ ```ts
1741
+ function createRequestSchema<TParams, TMethodName>(methodName, paramsSchema): ZodObject<{
1742
+ id: ZodUnion<[ZodString, ZodNumber]>;
1743
+ jsonrpc: ZodLiteral<"2.0">;
1744
+ method: ZodLiteral<TMethodName>;
1745
+ params: TParams | ZodUndefined;
1746
+ }, "strip", ZodTypeAny, { [k in "params" | "id" | "jsonrpc" | "method"]: addQuestionMarks<baseObjectOutputType<{ id: ZodUnion<[ZodString, ZodNumber]>; jsonrpc: ZodLiteral<"2.0">; method: ZodLiteral<TMethodName>; params: TParams | ZodUndefined }>, any>[k] }, { [k in "params" | "id" | "jsonrpc" | "method"]: baseObjectInputType<{ id: ZodUnion<[ZodString, ZodNumber]>; jsonrpc: ZodLiteral<"2.0">; method: ZodLiteral<TMethodName>; params: TParams | ZodUndefined }>[k] }>;
1747
+ ```
1748
+
1749
+ ## Type Parameters
1750
+
1751
+ ### TParams
1752
+
1753
+ `TParams` *extends* `ZodTypeAny`
1754
+
1755
+ ### TMethodName
1756
+
1757
+ `TMethodName` *extends* `string` = `string`
1758
+
1759
+ ## Parameters
1760
+
1761
+ ### methodName
1762
+
1763
+ `TMethodName`
1764
+
1765
+ ### paramsSchema
1766
+
1767
+ `TParams` | `ZodUndefined`
1768
+
1769
+ ## Returns
1770
+
1771
+ `ZodObject`\<\{
1772
+ `id`: `ZodUnion`\<\[`ZodString`, `ZodNumber`\]\>;
1773
+ `jsonrpc`: `ZodLiteral`\<`"2.0"`\>;
1774
+ `method`: `ZodLiteral`\<`TMethodName`\>;
1775
+ `params`: `TParams` \| `ZodUndefined`;
1776
+ \}, `"strip"`, `ZodTypeAny`, \{ \[k in "params" \| "id" \| "jsonrpc" \| "method"\]: addQuestionMarks\<baseObjectOutputType\<\{ id: ZodUnion\<\[ZodString, ZodNumber\]\>; jsonrpc: ZodLiteral\<"2.0"\>; method: ZodLiteral\<TMethodName\>; params: TParams \| ZodUndefined \}\>, any\>\[k\] \}, \{ \[k in "params" \| "id" \| "jsonrpc" \| "method"\]: baseObjectInputType\<\{ id: ZodUnion\<\[ZodString, ZodNumber\]\>; jsonrpc: ZodLiteral\<"2.0"\>; method: ZodLiteral\<TMethodName\>; params: TParams \| ZodUndefined \}\>\[k\] \}\>
1777
+
1778
+ ### <a id="createResponseSchema"></a>createResponseSchema
1779
+
1780
+ [**@xyo-network/xl1-rpc**](#../../README)
1781
+
1782
+ ***
1783
+
1784
+ ```ts
1785
+ function createResponseSchema<TParams>(resultSchema): ZodObject<{
1786
+ id: ZodUnion<[ZodString, ZodNumber]>;
1787
+ jsonrpc: ZodLiteral<"2.0">;
1788
+ result: ZodUndefined | TParams;
1789
+ }, "strip", ZodTypeAny, { [k in "result" | "id" | "jsonrpc"]: addQuestionMarks<baseObjectOutputType<{ id: ZodUnion<[ZodString, ZodNumber]>; jsonrpc: ZodLiteral<"2.0">; result: ZodUndefined | TParams }>, any>[k] }, { [k in "result" | "id" | "jsonrpc"]: baseObjectInputType<{ id: ZodUnion<[ZodString, ZodNumber]>; jsonrpc: ZodLiteral<"2.0">; result: ZodUndefined | TParams }>[k] }>;
1790
+ ```
1791
+
1792
+ ## Type Parameters
1793
+
1794
+ ### TParams
1795
+
1796
+ `TParams` *extends* `ZodTypeAny`
1797
+
1798
+ ## Parameters
1799
+
1800
+ ### resultSchema
1801
+
1802
+ `ZodUndefined` | `TParams`
1803
+
1804
+ ## Returns
1805
+
1806
+ `ZodObject`\<\{
1807
+ `id`: `ZodUnion`\<\[`ZodString`, `ZodNumber`\]\>;
1808
+ `jsonrpc`: `ZodLiteral`\<`"2.0"`\>;
1809
+ `result`: `ZodUndefined` \| `TParams`;
1810
+ \}, `"strip"`, `ZodTypeAny`, \{ \[k in "result" \| "id" \| "jsonrpc"\]: addQuestionMarks\<baseObjectOutputType\<\{ id: ZodUnion\<\[ZodString, ZodNumber\]\>; jsonrpc: ZodLiteral\<"2.0"\>; result: ZodUndefined \| TParams \}\>, any\>\[k\] \}, \{ \[k in "result" \| "id" \| "jsonrpc"\]: baseObjectInputType\<\{ id: ZodUnion\<\[ZodString, ZodNumber\]\>; jsonrpc: ZodLiteral\<"2.0"\>; result: ZodUndefined \| TParams \}\>\[k\] \}\>
1811
+
1812
+ ### <a id="rpcEngineFromProvider"></a>rpcEngineFromProvider
1813
+
1814
+ [**@xyo-network/xl1-rpc**](#../../README)
1815
+
1816
+ ***
1817
+
1818
+ ```ts
1819
+ function rpcEngineFromProvider(provider): JsonRpcEngine;
1820
+ ```
1821
+
1822
+ ## Parameters
1823
+
1824
+ ### provider
1825
+
1826
+ `XyoConnectionProvider`
1827
+
1828
+ ## Returns
1829
+
1830
+ `JsonRpcEngine`
1831
+
1832
+ ### <a id="rpcMethodHandlersFromProvider"></a>rpcMethodHandlersFromProvider
1833
+
1834
+ [**@xyo-network/xl1-rpc**](#../../README)
1835
+
1836
+ ***
1837
+
1838
+ ```ts
1839
+ function rpcMethodHandlersFromProvider(provider): XyoProviderRpcMethodHandlers;
1840
+ ```
1841
+
1842
+ ## Parameters
1843
+
1844
+ ### provider
1845
+
1846
+ `XyoConnectionProvider`
1847
+
1848
+ ## Returns
1849
+
1850
+ [`XyoProviderRpcMethodHandlers`](#../type-aliases/XyoProviderRpcMethodHandlers)
1851
+
1852
+ ### interfaces
1853
+
1854
+ ### <a id="RpcTransport"></a>RpcTransport
1855
+
1856
+ [**@xyo-network/xl1-rpc**](#../../README)
1857
+
1858
+ ***
1859
+
1860
+ ## Type Parameters
1861
+
1862
+ ### TSchemas
1863
+
1864
+ `TSchemas` *extends* [`RpcSchemaMap`](#../type-aliases/RpcSchemaMap)
1865
+
1866
+ ## Methods
1867
+
1868
+ ### sendRequest()
1869
+
1870
+ ```ts
1871
+ sendRequest<TMethod>(method, params?): Promise<TypeOf<TSchemas[TMethod]["result"]["from"]>>;
1872
+ ```
1873
+
1874
+ ### Type Parameters
1875
+
1876
+ #### TMethod
1877
+
1878
+ `TMethod` *extends* `string`
1879
+
1880
+ ### Parameters
1881
+
1882
+ #### method
1883
+
1884
+ `TMethod`
1885
+
1886
+ #### params?
1887
+
1888
+ `TypeOf`\<`TSchemas`\[`TMethod`\]\[`"params"`\]\[`"to"`\]\>
1889
+
1890
+ ### Returns
1891
+
1892
+ `Promise`\<`TypeOf`\<`TSchemas`\[`TMethod`\]\[`"result"`\]\[`"from"`\]\>\>
1893
+
1894
+ ### <a id="RpcXyoProviderParams"></a>RpcXyoProviderParams
1895
+
1896
+ [**@xyo-network/xl1-rpc**](#../../README)
1897
+
1898
+ ***
1899
+
1900
+ ## Properties
1901
+
1902
+ ### account?
1903
+
1904
+ ```ts
1905
+ optional account: AccountInstance;
1906
+ ```
1907
+
1908
+ ***
1909
+
1910
+ ### endpoint
1911
+
1912
+ ```ts
1913
+ endpoint: string;
1914
+ ```
1915
+
1916
+ ### <a id="SessionMessageEnvelope"></a>SessionMessageEnvelope
1917
+
1918
+ [**@xyo-network/xl1-rpc**](#../../README)
1919
+
1920
+ ***
1921
+
1922
+ ## Type Parameters
1923
+
1924
+ ### T
1925
+
1926
+ `T` *extends* `JsonValue`
1927
+
1928
+ ## Properties
1929
+
1930
+ ### data
1931
+
1932
+ ```ts
1933
+ data: T;
1934
+ ```
1935
+
1936
+ ***
1937
+
1938
+ ### destination?
1939
+
1940
+ ```ts
1941
+ optional destination: string;
1942
+ ```
1943
+
1944
+ ***
1945
+
1946
+ ### sessionId
1947
+
1948
+ ```ts
1949
+ sessionId: string;
1950
+ ```
1951
+
1952
+ ### type-aliases
1953
+
1954
+ ### <a id="ChainConnection"></a>ChainConnection
1955
+
1956
+ [**@xyo-network/xl1-rpc**](#../../README)
1957
+
1958
+ ***
1959
+
1960
+ ```ts
1961
+ type ChainConnection = z.infer<typeof ChainConnectionSchema>;
1962
+ ```
1963
+
1964
+ ### <a id="RequestResponseSchemas"></a>RequestResponseSchemas
1965
+
1966
+ [**@xyo-network/xl1-rpc**](#../../README)
1967
+
1968
+ ***
1969
+
1970
+ ```ts
1971
+ type RequestResponseSchemas = object;
1972
+ ```
1973
+
1974
+ ## Properties
1975
+
1976
+ ### params
1977
+
1978
+ ```ts
1979
+ params: SerializationTransform;
1980
+ ```
1981
+
1982
+ Schema for validating (and optionally transforming) the RPC request
1983
+
1984
+ ***
1985
+
1986
+ ### result
1987
+
1988
+ ```ts
1989
+ result: SerializationTransform;
1990
+ ```
1991
+
1992
+ Schema for validating (and optionally transforming) the result property of the RPC response
1993
+
1994
+ ### <a id="RpcSchemaMap"></a>RpcSchemaMap
1995
+
1996
+ [**@xyo-network/xl1-rpc**](#../../README)
1997
+
1998
+ ***
1999
+
2000
+ ```ts
2001
+ type RpcSchemaMap<TMethod> = Record<TMethod, RequestResponseSchemas>;
2002
+ ```
2003
+
2004
+ ## Type Parameters
2005
+
2006
+ ### TMethod
2007
+
2008
+ `TMethod` *extends* `string` = `string`
2009
+
2010
+ ### <a id="XyoGatewayMethodName"></a>XyoGatewayMethodName
2011
+
2012
+ [**@xyo-network/xl1-rpc**](#../../README)
2013
+
2014
+ ***
2015
+
2016
+ ```ts
2017
+ type XyoGatewayMethodName = keyof XyoGatewayProvider;
2018
+ ```
2019
+
2020
+ ### <a id="XyoGatewayMethodPrefix"></a>XyoGatewayMethodPrefix
2021
+
2022
+ [**@xyo-network/xl1-rpc**](#../../README)
2023
+
2024
+ ***
2025
+
2026
+ ```ts
2027
+ type XyoGatewayMethodPrefix = "xyoGateway";
2028
+ ```
2029
+
2030
+ ### <a id="XyoGatewayRpcMethodHandlers"></a>XyoGatewayRpcMethodHandlers
2031
+
2032
+ [**@xyo-network/xl1-rpc**](#../../README)
2033
+
2034
+ ***
2035
+
2036
+ ```ts
2037
+ type XyoGatewayRpcMethodHandlers = { [K in XyoGatewayMethodName as `${XyoGatewayMethodPrefix}_${K}`]: (params: Parameters<XyoGatewayProvider[K]>) => ReturnType<XyoGatewayProvider[K]> };
2038
+ ```
2039
+
2040
+ ### <a id="XyoGatewayRpcMethodName"></a>XyoGatewayRpcMethodName
2041
+
2042
+ [**@xyo-network/xl1-rpc**](#../../README)
2043
+
2044
+ ***
2045
+
2046
+ ```ts
2047
+ type XyoGatewayRpcMethodName = `${XyoGatewayMethodPrefix}_${XyoGatewayMethodName}`;
2048
+ ```
2049
+
2050
+ ### <a id="XyoProviderMethodName"></a>XyoProviderMethodName
2051
+
2052
+ [**@xyo-network/xl1-rpc**](#../../README)
2053
+
2054
+ ***
2055
+
2056
+ ```ts
2057
+ type XyoProviderMethodName = keyof Pick<XyoConnectionProvider, "send">;
2058
+ ```
2059
+
2060
+ ### <a id="XyoProviderRpcMethodHandlers"></a>XyoProviderRpcMethodHandlers
2061
+
2062
+ [**@xyo-network/xl1-rpc**](#../../README)
2063
+
2064
+ ***
2065
+
2066
+ ```ts
2067
+ type XyoProviderRpcMethodHandlers = { [K in XyoProviderMethodName as `xyoProvider_${K}`]: (params: Parameters<Required<XyoConnectionProvider>[K]>) => ReturnType<Required<XyoConnectionProvider>[K]> } & Partial<XyoRunnerRpcMethodHandlers> & Partial<XyoSignerRpcMethodHandlers> & Partial<XyoViewerRpcMethodHandlers>;
2068
+ ```
2069
+
2070
+ ### <a id="XyoProviderRpcMethodName"></a>XyoProviderRpcMethodName
2071
+
2072
+ [**@xyo-network/xl1-rpc**](#../../README)
2073
+
2074
+ ***
2075
+
2076
+ ```ts
2077
+ type XyoProviderRpcMethodName = `xyoProvider_${XyoProviderMethodName}`;
2078
+ ```
2079
+
2080
+ ### <a id="XyoRunnerMethodName"></a>XyoRunnerMethodName
2081
+
2082
+ [**@xyo-network/xl1-rpc**](#../../README)
2083
+
2084
+ ***
2085
+
2086
+ ```ts
2087
+ type XyoRunnerMethodName = keyof XyoRunner;
2088
+ ```
2089
+
2090
+ ### <a id="XyoRunnerRpcMethodHandlers"></a>XyoRunnerRpcMethodHandlers
2091
+
2092
+ [**@xyo-network/xl1-rpc**](#../../README)
2093
+
2094
+ ***
2095
+
2096
+ ```ts
2097
+ type XyoRunnerRpcMethodHandlers = { [K in XyoRunnerMethodName as `xyoRunner_${K}`]: (params: Parameters<XyoRunner[K]>) => ReturnType<XyoRunner[K]> };
2098
+ ```
2099
+
2100
+ ### <a id="XyoRunnerRpcMethodName"></a>XyoRunnerRpcMethodName
2101
+
2102
+ [**@xyo-network/xl1-rpc**](#../../README)
2103
+
2104
+ ***
2105
+
2106
+ ```ts
2107
+ type XyoRunnerRpcMethodName = `xyoRunner_${XyoRunnerMethodName}`;
2108
+ ```
2109
+
2110
+ ### <a id="XyoSignerMethodName"></a>XyoSignerMethodName
2111
+
2112
+ [**@xyo-network/xl1-rpc**](#../../README)
2113
+
2114
+ ***
2115
+
2116
+ ```ts
2117
+ type XyoSignerMethodName = keyof XyoSigner;
2118
+ ```
2119
+
2120
+ ### <a id="XyoSignerRpcMethodHandlers"></a>XyoSignerRpcMethodHandlers
2121
+
2122
+ [**@xyo-network/xl1-rpc**](#../../README)
2123
+
2124
+ ***
2125
+
2126
+ ```ts
2127
+ type XyoSignerRpcMethodHandlers = { [K in XyoSignerMethodName as `xyoSigner_${K}`]: (params: Parameters<XyoSigner[K]>) => ReturnType<XyoSigner[K]> };
2128
+ ```
2129
+
2130
+ ### <a id="XyoSignerRpcMethodName"></a>XyoSignerRpcMethodName
2131
+
2132
+ [**@xyo-network/xl1-rpc**](#../../README)
2133
+
2134
+ ***
2135
+
2136
+ ```ts
2137
+ type XyoSignerRpcMethodName = `xyoSigner_${XyoSignerMethodName}`;
2138
+ ```
2139
+
2140
+ ### <a id="XyoViewerMethodName"></a>XyoViewerMethodName
2141
+
2142
+ [**@xyo-network/xl1-rpc**](#../../README)
2143
+
2144
+ ***
2145
+
2146
+ ```ts
2147
+ type XyoViewerMethodName = keyof XyoViewer;
2148
+ ```
2149
+
2150
+ ### <a id="XyoViewerRpcMethodHandlers"></a>XyoViewerRpcMethodHandlers
2151
+
2152
+ [**@xyo-network/xl1-rpc**](#../../README)
2153
+
2154
+ ***
2155
+
2156
+ ```ts
2157
+ type XyoViewerRpcMethodHandlers = { [K in XyoViewerMethodName as `xyoViewer_${K}`]: (params: Parameters<XyoViewer[K]>) => ReturnType<XyoViewer[K]> };
2158
+ ```
2159
+
2160
+ ### <a id="XyoViewerRpcMethodName"></a>XyoViewerRpcMethodName
2161
+
2162
+ [**@xyo-network/xl1-rpc**](#../../README)
2163
+
2164
+ ***
2165
+
2166
+ ```ts
2167
+ type XyoViewerRpcMethodName = `xyoViewer_${XyoViewerMethodName}`;
2168
+ ```
2169
+
2170
+ ### variables
2171
+
2172
+ ### <a id="AllRpcSchemas"></a>AllRpcSchemas
2173
+
2174
+ [**@xyo-network/xl1-rpc**](#../../README)
2175
+
2176
+ ***
2177
+
2178
+ ```ts
2179
+ const AllRpcSchemas: RpcSchemaMap;
2180
+ ```
2181
+
2182
+ ### <a id="CaveatTypesSchema"></a>CaveatTypesSchema
2183
+
2184
+ [**@xyo-network/xl1-rpc**](#../../README)
2185
+
2186
+ ***
2187
+
2188
+ ```ts
2189
+ const CaveatTypesSchema: ZodEnum<["chain", "expiration", "filteredResponse", "rateLimit"]>;
2190
+ ```
2191
+
2192
+ ### <a id="CaveatsSchema"></a>CaveatsSchema
2193
+
2194
+ [**@xyo-network/xl1-rpc**](#../../README)
2195
+
2196
+ ***
2197
+
2198
+ ```ts
2199
+ const CaveatsSchema: ZodObject<{
2200
+ type: ZodEnum<["chain", "expiration", "filteredResponse", "rateLimit"]>;
2201
+ value: ZodUnknown;
2202
+ }, "strip", ZodTypeAny, {
2203
+ type: "chain" | "expiration" | "filteredResponse" | "rateLimit";
2204
+ value?: unknown;
2205
+ }, {
2206
+ type: "chain" | "expiration" | "filteredResponse" | "rateLimit";
2207
+ value?: unknown;
2208
+ }>;
2209
+ ```
2210
+
2211
+ ### <a id="ChainConnectionSchema"></a>ChainConnectionSchema
2212
+
2213
+ [**@xyo-network/xl1-rpc**](#../../README)
2214
+
2215
+ ***
2216
+
2217
+ ```ts
2218
+ const ChainConnectionSchema: ZodObject<{
2219
+ chainId: ZodOptional<ZodUnion<[ZodString, ZodType<Lowercase<string>, ZodTypeDef, Lowercase<string>>]>>;
2220
+ name: ZodString;
2221
+ url: ZodString;
2222
+ }, "strip", ZodTypeAny, {
2223
+ chainId?: string;
2224
+ name: string;
2225
+ url: string;
2226
+ }, {
2227
+ chainId?: string;
2228
+ name: string;
2229
+ url: string;
2230
+ }>;
2231
+ ```
2232
+
2233
+ ### <a id="InvokerPermissionSchema"></a>InvokerPermissionSchema
2234
+
2235
+ [**@xyo-network/xl1-rpc**](#../../README)
2236
+
2237
+ ***
2238
+
2239
+ ```ts
2240
+ const InvokerPermissionSchema: ZodObject<object & object, "strip", ZodTypeAny, {
2241
+ capability: string;
2242
+ caveats?: object[];
2243
+ invoker: string;
2244
+ date?: number;
2245
+ }, {
2246
+ capability: string;
2247
+ caveats?: object[];
2248
+ invoker: string;
2249
+ date?: number;
2250
+ }>;
2251
+ ```
2252
+
2253
+ ### <a id="JsonRpcErrorCodes"></a>JsonRpcErrorCodes
2254
+
2255
+ [**@xyo-network/xl1-rpc**](#../../README)
2256
+
2257
+ ***
2258
+
2259
+ ```ts
2260
+ const JsonRpcErrorCodes: Record<string, {
2261
+ code: number;
2262
+ message: string;
2263
+ }>;
2264
+ ```
2265
+
2266
+ ### <a id="PermissionSchema"></a>PermissionSchema
2267
+
2268
+ [**@xyo-network/xl1-rpc**](#../../README)
2269
+
2270
+ ***
2271
+
2272
+ ```ts
2273
+ const PermissionSchema: ZodObject<{
2274
+ capability: ZodString;
2275
+ caveats: ZodOptional<ZodArray<ZodObject<{
2276
+ type: ZodEnum<["chain", "expiration", "filteredResponse", "rateLimit"]>;
2277
+ value: ZodUnknown;
2278
+ }, "strip", ZodTypeAny, {
2279
+ type: "chain" | "expiration" | "filteredResponse" | "rateLimit";
2280
+ value?: unknown;
2281
+ }, {
2282
+ type: "chain" | "expiration" | "filteredResponse" | "rateLimit";
2283
+ value?: unknown;
2284
+ }>, "many">>;
2285
+ invoker: ZodString;
2286
+ }, "strip", ZodTypeAny, {
2287
+ capability: string;
2288
+ caveats?: object[];
2289
+ invoker: string;
2290
+ }, {
2291
+ capability: string;
2292
+ caveats?: object[];
2293
+ invoker: string;
2294
+ }>;
2295
+ ```
2296
+
2297
+ ### <a id="XyoGatewayRpcSchemas"></a>XyoGatewayRpcSchemas
2298
+
2299
+ [**@xyo-network/xl1-rpc**](#../../README)
2300
+
2301
+ ***
2302
+
2303
+ ```ts
2304
+ const XyoGatewayRpcSchemas: RpcSchemaMap<XyoGatewayRpcMethodName>;
2305
+ ```
2306
+
2307
+ ### <a id="XyoProviderRpcSchemas"></a>XyoProviderRpcSchemas
2308
+
2309
+ [**@xyo-network/xl1-rpc**](#../../README)
2310
+
2311
+ ***
2312
+
2313
+ ```ts
2314
+ const XyoProviderRpcSchemas: RpcSchemaMap<XyoProviderRpcMethodName>;
2315
+ ```
2316
+
2317
+ ### <a id="XyoRunnerRpcSchemas"></a>XyoRunnerRpcSchemas
2318
+
2319
+ [**@xyo-network/xl1-rpc**](#../../README)
2320
+
2321
+ ***
2322
+
2323
+ ```ts
2324
+ const XyoRunnerRpcSchemas: RpcSchemaMap<XyoRunnerRpcMethodName>;
2325
+ ```
2326
+
2327
+ ### <a id="XyoSignerRpcSchemas"></a>XyoSignerRpcSchemas
2328
+
2329
+ [**@xyo-network/xl1-rpc**](#../../README)
2330
+
2331
+ ***
2332
+
2333
+ ```ts
2334
+ const XyoSignerRpcSchemas: RpcSchemaMap<XyoSignerRpcMethodName>;
2335
+ ```
2336
+
2337
+ ### <a id="XyoViewerRpcSchemas"></a>XyoViewerRpcSchemas
2338
+
2339
+ [**@xyo-network/xl1-rpc**](#../../README)
2340
+
2341
+ ***
2342
+
2343
+ ```ts
2344
+ const XyoViewerRpcSchemas: RpcSchemaMap<XyoViewerRpcMethodName>;
2345
+ ```
2346
+
2347
+ ### <a id="jsonrpc"></a>jsonrpc
2348
+
2349
+ [**@xyo-network/xl1-rpc**](#../../README)
2350
+
2351
+ ***
2352
+
2353
+ ```ts
2354
+ const jsonrpc: "2.0";
2355
+ ```
2356
+
2357
+ ### <a id="requestSchemas"></a>requestSchemas
2358
+
2359
+ [**@xyo-network/xl1-rpc**](#../../README)
2360
+
2361
+ ***
2362
+
2363
+ ```ts
2364
+ const requestSchemas: Record<string, AnyZodObject | undefined> = {};
2365
+ ```
2366
+
18
2367
 
19
2368
  ## Maintainers
20
2369