-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrnode-grpc-js-v0.12.4.d.ts
1151 lines (987 loc) · 33.6 KB
/
rnode-grpc-js-v0.12.4.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { ec } from 'elliptic'
import * as _ from "@tgrospic/rnode-grpc-js"
/**
* Generated TypeScript definitions for RNode v0.12.4
*/
declare module "@tgrospic/rnode-grpc-js" {
interface Options {
// gRPC protocol implementation
// - `@grpc/grpc-js` for Nodejs
// - `grpc-web` for browser
grpcLib: any
// Custom options for gRPC clients
// grpc-web: https://github.com/grpc/grpc-web/blob/8b501a96f/javascript/net/grpc/web/grpcwebclientbase.js#L45
// grpc : https://github.com/grpc/grpc-node/blob/b05caec/packages/grpc-js/src/client.ts#L67
// - `credentials` can be supplied as part of `clientOptions` for `grpc-js`
clientOptions?: any,
// RNode host (method prefix)
host: string,
// Generated JSON schema
protoSchema: Object
}
/**
* Example how to instantiate RNode client generated with **rnode-grpc-js** tool.
* ```typescript
* // Import generated protobuf types (in global scope)
* require('../../rnode-grpc-gen/js/DeployServiceV1_pb')
* require('../../rnode-grpc-gen/js/ProposeServiceV1_pb')
*
* const options = {
* // JSON schema of proto definitions (generated also with rnode-grpc-js tool)
* protoSchema: require('../rnode-grpc-gen/js/pbjs_generated.json'),
* // Nodejs client
* grpcLib: require('@grpc/grpc-js'),
* host: 'node0.testnet.rchain-dev.tk:40401',
* // Web client
* grpcLib: require('grpc-web'),
* host: 'https://testnet-0.grpc.rchain.isotypic.com',
* }
*
* // Instantiate client Deploy service
* const { getBlocks, listenForDataAtName, DoDeploy } = rnodeDeploy(options)
*
* // Call remote function
* const blocks = await getBlocks({ depth: 2 })
* ```
*/
export function rnodeDeploy(opt: Options): DeployService
/**
* Example how to instantiate RNode client generated with **rnode-grpc-js** tool.
* ```typescript
* // Import generated protobuf types (in global scope)
* require('../../rnode-grpc-gen/js/DeployServiceV1_pb')
* require('../../rnode-grpc-gen/js/ProposeServiceV1_pb')
*
* const options = {
* // JSON schema of proto definitions (generated also with rnode-grpc-js tool)
* protoSchema: require('../rnode-grpc-gen/js/pbjs_generated.json'),
* // Nodejs client
* grpcLib: require('@grpc/grpc-js'),
* host: 'node0.testnet.rchain-dev.tk:40401',
* // Web client
* grpcLib: require('grpc-web'),
* host: 'https://testnet-0.grpc.rchain.isotypic.com',
* }
*
* // Instantiate client Propose service
* const { propose } = rnodePropose(options)
*
* // Call remote function
* const { result } = await propose()
* ```
*/
export function rnodePropose(opt: Options): ProposeService
/**
* Example how to instantiate RNode client generated with **rnode-grpc-js** tool.
* ```typescript
* // Import generated protobuf types (in global scope)
* require('../../rnode-grpc-gen/js/repl_pb')
*
* const options = {
* // JSON schema of proto definitions (generated also with rnode-grpc-js tool)
* protoSchema: require('../rnode-grpc-gen/js/pbjs_generated.json'),
* // Nodejs client
* grpcLib: require('@grpc/grpc-js'),
* host: 'node0.testnet.rchain-dev.tk:40402',
* }
*
* // Instantiate client Repl service
* const { Eval, Run } = rnodeRepl(options)
*
* // Call remote function
* const evalResult = await Eval({ program: 'new a in { *a }' })
* ```
*/
export function rnodeRepl(opt: Options): Repl
/**
* Example how to instantiate RNode client generated with **rnode-grpc-js** tool.
* ```typescript
* // Import generated protobuf types (in global scope)
* require('../../rnode-grpc-gen/js/DeployServiceV1_pb')
* require('../../rnode-grpc-gen/js/ProposeServiceV1_pb')
*
* const options = {
* // JSON schema of proto definitions (generated also with rnode-grpc-js tool)
* protoSchema: require('../rnode-grpc-gen/js/pbjs_generated.json'),
* // Nodejs client
* grpcLib: require('@grpc/grpc-js'),
* host: 'node0.testnet.rchain-dev.tk:40401',
* // Web client
* grpcLib: require('grpc-web'),
* host: 'https://testnet-0.grpc.rchain.isotypic.com',
* }
*
* // Remote methods
* const { DoDeploy, propose, Eval } = rnodeService(options)
* ```
*/
export function rnodeService(opt: Options): DeployService & ProposeService & Repl
/**
* Protobuf serialize / deserialize operations.
*/
export function rnodeProtobuf({protoSchema}: {protoSchema: Object}): TypesBinary
interface DeployService {
doDeploy(_?: DeployDataProto): Promise<DeployResponse>
getBlock(_?: BlockQuery): Promise<BlockResponse>
visualizeDag(_?: VisualizeDagQuery): Promise<VisualizeBlocksResponse[]>
machineVerifiableDag(_?: MachineVerifyQuery): Promise<MachineVerifyResponse>
showMainChain(_?: BlocksQuery): Promise<BlockInfoResponse[]>
getBlocks(_?: BlocksQuery): Promise<BlockInfoResponse[]>
listenForDataAtName(_: DataAtNameQuery): Promise<ListeningNameDataResponse>
listenForContinuationAtName(_: ContinuationAtNameQuery): Promise<ContinuationAtNameResponse>
findDeploy(_?: FindDeployQuery): Promise<FindDeployResponse>
previewPrivateNames(_?: PrivateNamePreviewQuery): Promise<PrivateNamePreviewResponse>
lastFinalizedBlock(_?: LastFinalizedBlockQuery): Promise<LastFinalizedBlockResponse>
isFinalized(_?: IsFinalizedQuery): Promise<IsFinalizedResponse>
bondStatus(_?: BondStatusQuery): Promise<BondStatusResponse>
exploratoryDeploy(_?: ExploratoryDeployQuery): Promise<ExploratoryDeployResponse>
getBlocksByHeights(_?: BlocksQueryByHeight): Promise<BlockInfoResponse[]>
getEventByHash(_?: ReportQuery): Promise<EventInfoResponse>
}
interface ProposeService {
propose(_?: ProposeQuery): Promise<ProposeResponse>
proposeResult(_?: ProposeResultQuery): Promise<ProposeResultResponse>
}
interface Repl {
Run(_?: CmdRequest): Promise<ReplResponse>
Eval(_?: EvalRequest): Promise<ReplResponse>
}
interface Unit {}
// TODO: add support to generate nested types
interface WildcardMsg {}
interface HasBlockRequestProto {
readonly hash?: Uint8Array /* bytes */
}
interface HasBlockProto {
readonly hash?: Uint8Array /* bytes */
}
interface BlockRequestProto {
readonly hash?: Uint8Array /* bytes */
}
interface ForkChoiceTipRequestProto {
}
interface ApprovedBlockCandidateProto {
readonly block: BlockMessageProto
readonly requiredsigs?: number /* int32 */
}
interface UnapprovedBlockProto {
readonly candidate: ApprovedBlockCandidateProto
readonly timestamp?: number /* int64 */
readonly duration?: number /* int64 */
}
interface Signature {
readonly publickey?: Uint8Array /* bytes */
readonly algorithm?: string
readonly sig?: Uint8Array /* bytes */
}
interface BlockApprovalProto {
readonly candidate: ApprovedBlockCandidateProto
readonly sig: Signature
}
interface ApprovedBlockProto {
readonly candidate: ApprovedBlockCandidateProto
readonly sigsList?: Signature[]
}
interface ApprovedBlockRequestProto {
readonly identifier?: string
readonly trimstate?: boolean /* bool */
}
interface NoApprovedBlockAvailableProto {
readonly identifier?: string
readonly nodeidentifer?: string
}
interface BlockMessageProto {
readonly blockhash?: Uint8Array /* bytes */
readonly header: HeaderProto
readonly body: BodyProto
readonly justificationsList?: JustificationProto[]
readonly sender?: Uint8Array /* bytes */
readonly seqnum?: number /* int32 */
readonly sig?: Uint8Array /* bytes */
readonly sigalgorithm?: string
readonly shardid?: string
readonly extrabytes?: Uint8Array /* bytes */
}
interface BlockHashMessageProto {
readonly hash?: Uint8Array /* bytes */
readonly blockcreator?: Uint8Array /* bytes */
}
interface BlockMetadataInternal {
readonly blockhash?: Uint8Array /* bytes */
readonly parentsList?: Uint8Array[] /* bytes */
readonly sender?: Uint8Array /* bytes */
readonly justificationsList?: JustificationProto[]
readonly bondsList?: BondProto[]
readonly blocknum?: number /* int64 */
readonly seqnum?: number /* int32 */
readonly invalid?: boolean /* bool */
readonly directlyfinalized?: boolean /* bool */
readonly finalized?: boolean /* bool */
}
interface HeaderProto {
readonly parentshashlistList?: Uint8Array[] /* bytes */
readonly timestamp?: number /* int64 */
readonly version?: number /* int64 */
readonly extrabytes?: Uint8Array /* bytes */
}
interface DeployDataProto {
readonly deployer?: Uint8Array /* bytes */
readonly term?: string
readonly timestamp?: number /* int64 */
readonly sig?: Uint8Array /* bytes */
readonly sigalgorithm?: string
readonly phloprice?: number /* int64 */
readonly phlolimit?: number /* int64 */
readonly validafterblocknumber?: number /* int64 */
}
interface ProcessedDeployProto {
readonly deploy: DeployDataProto
readonly cost: PCost
readonly deploylogList?: EventProto[]
readonly errored?: boolean /* bool */
readonly systemdeployerror?: string
}
interface SlashSystemDeployDataProto {
readonly invalidblockhash?: Uint8Array /* bytes */
readonly issuerpublickey?: Uint8Array /* bytes */
}
interface CloseBlockSystemDeployDataProto {
}
interface SystemDeployDataProto {
readonly slashsystemdeploy?: SlashSystemDeployDataProto
readonly closeblocksystemdeploy?: CloseBlockSystemDeployDataProto
}
interface ProcessedSystemDeployProto {
readonly systemdeploy: SystemDeployDataProto
readonly deploylogList?: EventProto[]
readonly errormsg?: string
}
interface BodyProto {
readonly state: RChainStateProto
readonly deploysList?: ProcessedDeployProto[]
readonly systemdeploysList?: ProcessedSystemDeployProto[]
readonly extrabytes?: Uint8Array /* bytes */
readonly rejecteddeploysList?: RejectedDeployProto[]
}
interface RejectedDeployProto {
readonly sig?: Uint8Array /* bytes */
}
interface JustificationProto {
readonly validator?: Uint8Array /* bytes */
readonly latestblockhash?: Uint8Array /* bytes */
}
interface RChainStateProto {
readonly prestatehash?: Uint8Array /* bytes */
readonly poststatehash?: Uint8Array /* bytes */
readonly bondsList?: BondProto[]
readonly blocknumber?: number /* int64 */
}
interface EventProto {
readonly produce?: ProduceEventProto
readonly consume?: ConsumeEventProto
readonly comm?: CommEventProto
}
interface ProduceEventProto {
readonly channelshash?: Uint8Array /* bytes */
readonly hash?: Uint8Array /* bytes */
readonly persistent?: boolean /* bool */
readonly timesrepeated?: number /* int32 */
}
interface ConsumeEventProto {
readonly channelshashesList?: Uint8Array[] /* bytes */
readonly hash?: Uint8Array /* bytes */
readonly persistent?: boolean /* bool */
}
interface CommEventProto {
readonly consume: ConsumeEventProto
readonly producesList?: ProduceEventProto[]
readonly peeksList?: PeekProto[]
}
interface PeekProto {
readonly channelindex?: number /* int32 */
}
interface BondProto {
readonly validator?: Uint8Array /* bytes */
readonly stake?: number /* int64 */
}
interface StoreNodeKeyProto {
readonly hash?: Uint8Array /* bytes */
readonly index?: number /* int32 */
}
interface StoreItemsMessageRequestProto {
readonly startpathList?: StoreNodeKeyProto[]
readonly skip?: number /* int32 */
readonly take?: number /* int32 */
}
interface StoreItemProto {
readonly key?: Uint8Array /* bytes */
readonly value?: Uint8Array /* bytes */
}
interface StoreItemsMessageProto {
readonly startpathList?: StoreNodeKeyProto[]
readonly lastpathList?: StoreNodeKeyProto[]
readonly historyitemsList?: StoreItemProto[]
readonly dataitemsList?: StoreItemProto[]
}
interface FindDeployQuery {
readonly deployid?: Uint8Array /* bytes */
}
interface BlockQuery {
readonly hash?: string
}
interface ReportQuery {
readonly hash?: string
readonly forcereplay?: boolean /* bool */
}
interface BlocksQuery {
readonly depth?: number /* int32 */
}
interface BlocksQueryByHeight {
readonly startblocknumber?: number /* int64 */
readonly endblocknumber?: number /* int64 */
}
interface DataAtNameQuery {
readonly depth?: number /* int32 */
readonly name: Par
}
interface ContinuationAtNameQuery {
readonly depth?: number /* int32 */
readonly namesList?: Par[]
}
interface VisualizeDagQuery {
readonly depth?: number /* int32 */
readonly showjustificationlines?: boolean /* bool */
readonly startblocknumber?: number /* int32 */
}
interface MachineVerifyQuery {
}
interface PrivateNamePreviewQuery {
readonly user?: Uint8Array /* bytes */
readonly timestamp?: number /* int64 */
readonly nameqty?: number /* int32 */
}
interface LastFinalizedBlockQuery {
}
interface IsFinalizedQuery {
readonly hash?: string
}
interface BondStatusQuery {
readonly publickey?: Uint8Array /* bytes */
}
interface ExploratoryDeployQuery {
readonly term?: string
readonly blockhash?: string
readonly useprestatehash?: boolean /* bool */
}
interface BondInfo {
readonly validator?: string
readonly stake?: number /* int64 */
}
interface JustificationInfo {
readonly validator?: string
readonly latestblockhash?: string
}
interface DeployInfo {
readonly deployer?: string
readonly term?: string
readonly timestamp?: number /* int64 */
readonly sig?: string
readonly sigalgorithm?: string
readonly phloprice?: number /* int64 */
readonly phlolimit?: number /* int64 */
readonly validafterblocknumber?: number /* int64 */
readonly cost?: number /* uint64 */
readonly errored?: boolean /* bool */
readonly systemdeployerror?: string
}
interface LightBlockInfo {
readonly blockhash?: string
readonly sender?: string
readonly seqnum?: number /* int64 */
readonly sig?: string
readonly sigalgorithm?: string
readonly shardid?: string
readonly extrabytes?: Uint8Array /* bytes */
readonly version?: number /* int64 */
readonly timestamp?: number /* int64 */
readonly headerextrabytes?: Uint8Array /* bytes */
readonly parentshashlistList?: string[]
readonly blocknumber?: number /* int64 */
readonly prestatehash?: string
readonly poststatehash?: string
readonly bodyextrabytes?: Uint8Array /* bytes */
readonly bondsList?: BondInfo[]
readonly blocksize?: string
readonly deploycount?: number /* int32 */
readonly faulttolerance?: number /* float */
readonly justificationsList?: JustificationInfo[]
readonly rejecteddeploysList?: RejectedDeployInfo[]
}
interface RejectedDeployInfo {
readonly sig?: string
}
interface BlockInfo {
readonly blockinfo: LightBlockInfo
readonly deploysList?: DeployInfo[]
}
interface DataWithBlockInfo {
readonly postblockdataList?: Par[]
readonly block: LightBlockInfo
}
interface ContinuationsWithBlockInfo {
readonly postblockcontinuationsList?: WaitingContinuationInfo[]
readonly block: LightBlockInfo
}
interface WaitingContinuationInfo {
readonly postblockpatternsList?: BindPattern[]
readonly postblockcontinuation: Par
}
interface ReportProduceProto {
readonly channel: Par
readonly data: ListParWithRandom
}
interface ReportConsumeProto {
readonly channelsList?: Par[]
readonly patternsList?: BindPattern[]
readonly peeksList?: PeekProto[]
}
interface ReportCommProto {
readonly consume: ReportConsumeProto
readonly producesList?: ReportProduceProto[]
}
interface ReportProto {
readonly produce?: ReportProduceProto
readonly consume?: ReportConsumeProto
readonly comm?: ReportCommProto
}
interface SingleReport {
readonly eventsList?: ReportProto[]
}
interface DeployInfoWithEventData {
readonly deployinfo: DeployInfo
readonly reportList?: SingleReport[]
}
interface SystemDeployInfoWithEventData {
readonly systemdeploy: SystemDeployDataProto
readonly reportList?: SingleReport[]
}
interface BlockEventInfo {
readonly blockinfo: LightBlockInfo
readonly deploysList?: DeployInfoWithEventData[]
readonly systemdeploysList?: SystemDeployInfoWithEventData[]
readonly poststatehash?: Uint8Array /* bytes */
}
interface EventInfoResponse {
readonly result?: BlockEventInfo
}
interface ExploratoryDeployResponse {
readonly result?: DataWithBlockInfo
}
interface DeployResponse {
readonly result?: string
}
interface BlockResponse {
readonly blockinfo?: BlockInfo
}
interface VisualizeBlocksResponse {
readonly content?: string
}
interface MachineVerifyResponse {
readonly content?: string
}
interface BlockInfoResponse {
readonly blockinfo?: LightBlockInfo
}
interface ListeningNameDataResponse {
readonly payload?: ListeningNameDataPayload
}
interface ListeningNameDataPayload {
readonly blockinfoList?: DataWithBlockInfo[]
readonly length?: number /* int32 */
}
interface ContinuationAtNameResponse {
readonly payload?: ContinuationAtNamePayload
}
interface ContinuationAtNamePayload {
readonly blockresultsList?: ContinuationsWithBlockInfo[]
readonly length?: number /* int32 */
}
interface FindDeployResponse {
readonly blockinfo?: LightBlockInfo
}
interface PrivateNamePreviewResponse {
readonly payload?: PrivateNamePreviewPayload
}
interface PrivateNamePreviewPayload {
readonly idsList?: Uint8Array[] /* bytes */
}
interface LastFinalizedBlockResponse {
readonly blockinfo?: BlockInfo
}
interface IsFinalizedResponse {
readonly isfinalized?: boolean /* bool */
}
interface BondStatusResponse {
readonly isbonded?: boolean /* bool */
}
interface ProposeResponse {
readonly result?: string
}
interface ProposeResultResponse {
readonly result?: string
}
interface PrintUnmatchedSendsQuery {
readonly printunmatchedsends?: boolean /* bool */
}
interface ProposeResultQuery {
}
interface ProposeQuery {
readonly isasync?: boolean /* bool */
}
interface Par {
readonly sendsList?: Send[]
readonly receivesList?: Receive[]
readonly newsList?: New[]
readonly exprsList?: Expr[]
readonly matchesList?: Match[]
readonly unforgeablesList?: GUnforgeable[]
readonly bundlesList?: Bundle[]
readonly connectivesList?: Connective[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
}
interface TaggedContinuation {
readonly parBody?: ParWithRandom
readonly scalaBodyRef?: number /* int64 */
}
interface ParWithRandom {
readonly body: Par
readonly randomstate?: Uint8Array /* bytes */
}
interface PCost {
readonly cost?: number /* uint64 */
}
interface ListParWithRandom {
readonly parsList?: Par[]
readonly randomstate?: Uint8Array /* bytes */
}
interface Var {
readonly boundVar?: number /* sint32 */
readonly freeVar?: number /* sint32 */
readonly wildcard?: WildcardMsg
}
interface Bundle {
readonly body: Par
readonly writeflag?: boolean /* bool */
readonly readflag?: boolean /* bool */
}
interface Send {
readonly chan: Par
readonly dataList?: Par[]
readonly persistent?: boolean /* bool */
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
}
interface ReceiveBind {
readonly patternsList?: Par[]
readonly source: Par
readonly remainder: Var
readonly freecount?: number /* int32 */
}
interface BindPattern {
readonly patternsList?: Par[]
readonly remainder: Var
readonly freecount?: number /* int32 */
}
interface ListBindPatterns {
readonly patternsList?: BindPattern[]
}
interface Receive {
readonly bindsList?: ReceiveBind[]
readonly body: Par
readonly persistent?: boolean /* bool */
readonly peek?: boolean /* bool */
readonly bindcount?: number /* int32 */
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
}
interface New {
readonly bindcount?: number /* sint32 */
readonly p: Par
readonly uriList?: string[]
readonly injections: Par
readonly locallyfree?: Uint8Array /* bytes */
}
interface MatchCase {
readonly pattern: Par
readonly source: Par
readonly freecount?: number /* int32 */
}
interface Match {
readonly target: Par
readonly casesList?: MatchCase[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
}
interface Expr {
readonly gBool?: boolean /* bool */
readonly gInt?: number /* sint64 */
readonly gString?: string
readonly gUri?: string
readonly gByteArray?: Uint8Array /* bytes */
readonly eNotBody?: ENot
readonly eNegBody?: ENeg
readonly eMultBody?: EMult
readonly eDivBody?: EDiv
readonly ePlusBody?: EPlus
readonly eMinusBody?: EMinus
readonly eLtBody?: ELt
readonly eLteBody?: ELte
readonly eGtBody?: EGt
readonly eGteBody?: EGte
readonly eEqBody?: EEq
readonly eNeqBody?: ENeq
readonly eAndBody?: EAnd
readonly eOrBody?: EOr
readonly eVarBody?: EVar
readonly eListBody?: EList
readonly eTupleBody?: ETuple
readonly eSetBody?: ESet
readonly eMapBody?: EMap
readonly eMethodBody?: EMethod
readonly eMatchesBody?: EMatches
readonly ePercentPercentBody?: EPercentPercent
readonly ePlusPlusBody?: EPlusPlus
readonly eMinusMinusBody?: EMinusMinus
readonly eModBody?: EMod
}
interface EList {
readonly psList?: Par[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
readonly remainder: Var
}
interface ETuple {
readonly psList?: Par[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
}
interface ESet {
readonly psList?: Par[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
readonly remainder: Var
}
interface EMap {
readonly kvsList?: KeyValuePair[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
readonly remainder: Var
}
interface EMethod {
readonly methodname?: string
readonly target: Par
readonly argumentsList?: Par[]
readonly locallyfree?: Uint8Array /* bytes */
readonly connectiveUsed?: boolean /* bool */
}
interface KeyValuePair {
readonly key: Par
readonly value: Par
}
interface EVar {
readonly v: Var
}
interface ENot {
readonly p: Par
}
interface ENeg {
readonly p: Par
}
interface EMult {
readonly p1: Par
readonly p2: Par
}
interface EDiv {
readonly p1: Par
readonly p2: Par
}
interface EMod {
readonly p1: Par
readonly p2: Par
}
interface EPlus {
readonly p1: Par
readonly p2: Par
}
interface EMinus {
readonly p1: Par
readonly p2: Par
}
interface ELt {
readonly p1: Par
readonly p2: Par
}
interface ELte {
readonly p1: Par
readonly p2: Par
}
interface EGt {
readonly p1: Par
readonly p2: Par
}
interface EGte {
readonly p1: Par
readonly p2: Par
}
interface EEq {
readonly p1: Par
readonly p2: Par
}
interface ENeq {
readonly p1: Par
readonly p2: Par
}
interface EAnd {
readonly p1: Par
readonly p2: Par
}
interface EOr {
readonly p1: Par
readonly p2: Par
}
interface EMatches {
readonly target: Par
readonly pattern: Par
}
interface EPercentPercent {
readonly p1: Par
readonly p2: Par
}
interface EPlusPlus {
readonly p1: Par
readonly p2: Par
}
interface EMinusMinus {
readonly p1: Par
readonly p2: Par
}
interface Connective {
readonly connAndBody?: ConnectiveBody
readonly connOrBody?: ConnectiveBody
readonly connNotBody?: Par
readonly varRefBody?: VarRef
readonly connBool?: boolean /* bool */
readonly connInt?: boolean /* bool */
readonly connString?: boolean /* bool */
readonly connUri?: boolean /* bool */
readonly connByteArray?: boolean /* bool */
}
interface VarRef {
readonly index?: number /* sint32 */
readonly depth?: number /* sint32 */
}
interface ConnectiveBody {
readonly psList?: Par[]
}
interface DeployId {
readonly sig?: Uint8Array /* bytes */
}
interface DeployerId {
readonly publickey?: Uint8Array /* bytes */
}
interface GUnforgeable {
readonly gPrivateBody?: GPrivate
readonly gDeployIdBody?: GDeployId
readonly gDeployerIdBody?: GDeployerId
readonly gSysAuthTokenBody?: GSysAuthToken
}
interface GPrivate {
readonly id?: Uint8Array /* bytes */
}
interface GDeployId {
readonly sig?: Uint8Array /* bytes */
}
interface GDeployerId {
readonly publickey?: Uint8Array /* bytes */
}
interface GSysAuthToken {
}
interface ServiceError {
readonly messagesList?: string[]
}
interface CmdRequest {
readonly line?: string
}
interface EvalRequest {
readonly program?: string
readonly printunmatchedsendsonly?: boolean /* bool */
}
interface ReplResponse {
readonly output?: string
}
// Protobuf binary serializer
interface BinaryOp<T> {
/**
* Serializes plain JS object with `google-protobuf` serializer.
*/
serialize(_: T): Uint8Array
/**
* Deserializes bytes to plain JS object with `google-protobuf` deserializer.
*/
deserialize(_: Uint8Array): T
/**
* Creates underlying message object generated by `protoc`.
* https://github.com/protocolbuffers/protobuf/tree/master/js#api
*/
create(opt_data?: any[]): any