@latticexyz/services 1.10.0 → 1.12.0
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/bin/ecs-relay +0 -0
- package/bin/ecs-snapshot +0 -0
- package/bin/ecs-stream +0 -0
- package/bin/faucet +0 -0
- package/package.json +2 -2
- package/protobuf/go/ecs-relay/ecs-relay.pb.go +170 -54
- package/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go +17 -17
- package/protobuf/ts/ecs-relay/ecs-relay.ts +88 -9
package/bin/ecs-relay
CHANGED
|
Binary file
|
package/bin/ecs-snapshot
CHANGED
|
Binary file
|
package/bin/ecs-stream
CHANGED
|
Binary file
|
package/bin/faucet
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/services",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.12.0",
|
|
5
5
|
"description": "MUD services for enhanced interactions with on-chain ECS state",
|
|
6
6
|
"main": "protobuf/ts",
|
|
7
7
|
"repository": {
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"ts-proto": "^1.126.1",
|
|
21
21
|
"typedoc": "^0.23.10"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "36f2107bd655c43585584c7b01ddfa3a44c6c1ac"
|
|
24
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-go v1.28.1
|
|
4
|
-
// protoc v3.
|
|
4
|
+
// protoc v3.21.3
|
|
5
5
|
// source: proto/ecs-relay.proto
|
|
6
6
|
|
|
7
7
|
package ecs_relay
|
|
@@ -538,6 +538,91 @@ func (x *CountIdentitiesResponse) GetCount() uint32 {
|
|
|
538
538
|
return 0
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
+
type BalanceRequest struct {
|
|
542
|
+
state protoimpl.MessageState
|
|
543
|
+
sizeCache protoimpl.SizeCache
|
|
544
|
+
unknownFields protoimpl.UnknownFields
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
func (x *BalanceRequest) Reset() {
|
|
548
|
+
*x = BalanceRequest{}
|
|
549
|
+
if protoimpl.UnsafeEnabled {
|
|
550
|
+
mi := &file_proto_ecs_relay_proto_msgTypes[10]
|
|
551
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
552
|
+
ms.StoreMessageInfo(mi)
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
func (x *BalanceRequest) String() string {
|
|
557
|
+
return protoimpl.X.MessageStringOf(x)
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
func (*BalanceRequest) ProtoMessage() {}
|
|
561
|
+
|
|
562
|
+
func (x *BalanceRequest) ProtoReflect() protoreflect.Message {
|
|
563
|
+
mi := &file_proto_ecs_relay_proto_msgTypes[10]
|
|
564
|
+
if protoimpl.UnsafeEnabled && x != nil {
|
|
565
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
566
|
+
if ms.LoadMessageInfo() == nil {
|
|
567
|
+
ms.StoreMessageInfo(mi)
|
|
568
|
+
}
|
|
569
|
+
return ms
|
|
570
|
+
}
|
|
571
|
+
return mi.MessageOf(x)
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.
|
|
575
|
+
func (*BalanceRequest) Descriptor() ([]byte, []int) {
|
|
576
|
+
return file_proto_ecs_relay_proto_rawDescGZIP(), []int{10}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
type BalanceResponse struct {
|
|
580
|
+
state protoimpl.MessageState
|
|
581
|
+
sizeCache protoimpl.SizeCache
|
|
582
|
+
unknownFields protoimpl.UnknownFields
|
|
583
|
+
|
|
584
|
+
Balance uint64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
func (x *BalanceResponse) Reset() {
|
|
588
|
+
*x = BalanceResponse{}
|
|
589
|
+
if protoimpl.UnsafeEnabled {
|
|
590
|
+
mi := &file_proto_ecs_relay_proto_msgTypes[11]
|
|
591
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
592
|
+
ms.StoreMessageInfo(mi)
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
func (x *BalanceResponse) String() string {
|
|
597
|
+
return protoimpl.X.MessageStringOf(x)
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
func (*BalanceResponse) ProtoMessage() {}
|
|
601
|
+
|
|
602
|
+
func (x *BalanceResponse) ProtoReflect() protoreflect.Message {
|
|
603
|
+
mi := &file_proto_ecs_relay_proto_msgTypes[11]
|
|
604
|
+
if protoimpl.UnsafeEnabled && x != nil {
|
|
605
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
606
|
+
if ms.LoadMessageInfo() == nil {
|
|
607
|
+
ms.StoreMessageInfo(mi)
|
|
608
|
+
}
|
|
609
|
+
return ms
|
|
610
|
+
}
|
|
611
|
+
return mi.MessageOf(x)
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.
|
|
615
|
+
func (*BalanceResponse) Descriptor() ([]byte, []int) {
|
|
616
|
+
return file_proto_ecs_relay_proto_rawDescGZIP(), []int{11}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
func (x *BalanceResponse) GetBalance() uint64 {
|
|
620
|
+
if x != nil {
|
|
621
|
+
return x.Balance
|
|
622
|
+
}
|
|
623
|
+
return 0
|
|
624
|
+
}
|
|
625
|
+
|
|
541
626
|
var File_proto_ecs_relay_proto protoreflect.FileDescriptor
|
|
542
627
|
|
|
543
628
|
var file_proto_ecs_relay_proto_rawDesc = []byte{
|
|
@@ -586,56 +671,61 @@ var file_proto_ecs_relay_proto_rawDesc = []byte{
|
|
|
586
671
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
|
587
672
|
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
588
673
|
0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
589
|
-
0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
0x43, 0x6f, 0x75, 0x6e, 0x74,
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
0x73,
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
674
|
+
0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x42, 0x61, 0x6c, 0x61,
|
|
675
|
+
0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x42, 0x61,
|
|
676
|
+
0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
|
|
677
|
+
0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07,
|
|
678
|
+
0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x32, 0xfa, 0x05, 0x0a, 0x0f, 0x45, 0x43, 0x53, 0x52,
|
|
679
|
+
0x65, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x41,
|
|
680
|
+
0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x65, 0x63,
|
|
681
|
+
0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
|
682
|
+
0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e,
|
|
683
|
+
0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65,
|
|
684
|
+
0x12, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e,
|
|
685
|
+
0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79,
|
|
686
|
+
0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, 0x50,
|
|
687
|
+
0x69, 0x6e, 0x67, 0x12, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53,
|
|
688
|
+
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65,
|
|
689
|
+
0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b,
|
|
690
|
+
0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
|
691
|
+
0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e,
|
|
692
|
+
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52,
|
|
693
|
+
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61,
|
|
694
|
+
0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
|
|
695
|
+
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x43,
|
|
696
|
+
0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x20, 0x2e,
|
|
697
|
+
0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64,
|
|
698
|
+
0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
|
699
|
+
0x21, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
|
700
|
+
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
701
|
+
0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
|
|
702
|
+
0x65, 0x12, 0x1d, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62,
|
|
703
|
+
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
704
|
+
0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73,
|
|
705
|
+
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x55, 0x6e,
|
|
706
|
+
0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x65, 0x63, 0x73, 0x72,
|
|
620
707
|
0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
|
621
|
-
0x6e,
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
0x6c, 0x61,
|
|
708
|
+
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65,
|
|
709
|
+
0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
|
710
|
+
0x22, 0x00, 0x12, 0x38, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
|
711
|
+
0x12, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e,
|
|
712
|
+
0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79,
|
|
713
|
+
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0a,
|
|
714
|
+
0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x15, 0x2e, 0x65, 0x63, 0x73,
|
|
715
|
+
0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
716
|
+
0x74, 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, 0x73,
|
|
717
|
+
0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12,
|
|
718
|
+
0x37, 0x0a, 0x04, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c,
|
|
719
|
+
0x61, 0x79, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
|
720
|
+
0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65,
|
|
721
|
+
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x11, 0x4d, 0x69, 0x6e, 0x42,
|
|
722
|
+
0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x2e,
|
|
723
|
+
0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
|
|
724
|
+
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c,
|
|
725
|
+
0x61, 0x79, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
726
|
+
0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
|
727
|
+
0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x63, 0x73, 0x2d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x62, 0x06, 0x70,
|
|
728
|
+
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
639
729
|
}
|
|
640
730
|
|
|
641
731
|
var (
|
|
@@ -650,7 +740,7 @@ func file_proto_ecs_relay_proto_rawDescGZIP() []byte {
|
|
|
650
740
|
return file_proto_ecs_relay_proto_rawDescData
|
|
651
741
|
}
|
|
652
742
|
|
|
653
|
-
var file_proto_ecs_relay_proto_msgTypes = make([]protoimpl.MessageInfo,
|
|
743
|
+
var file_proto_ecs_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
|
654
744
|
var file_proto_ecs_relay_proto_goTypes = []interface{}{
|
|
655
745
|
(*Identity)(nil), // 0: ecsrelay.Identity
|
|
656
746
|
(*Signature)(nil), // 1: ecsrelay.Signature
|
|
@@ -662,6 +752,8 @@ var file_proto_ecs_relay_proto_goTypes = []interface{}{
|
|
|
662
752
|
(*PushResponse)(nil), // 7: ecsrelay.PushResponse
|
|
663
753
|
(*CountIdentitiesRequest)(nil), // 8: ecsrelay.CountIdentitiesRequest
|
|
664
754
|
(*CountIdentitiesResponse)(nil), // 9: ecsrelay.CountIdentitiesResponse
|
|
755
|
+
(*BalanceRequest)(nil), // 10: ecsrelay.BalanceRequest
|
|
756
|
+
(*BalanceResponse)(nil), // 11: ecsrelay.BalanceResponse
|
|
665
757
|
}
|
|
666
758
|
var file_proto_ecs_relay_proto_depIdxs = []int32{
|
|
667
759
|
1, // 0: ecsrelay.SubscriptionRequest.signature:type_name -> ecsrelay.Signature
|
|
@@ -679,7 +771,7 @@ var file_proto_ecs_relay_proto_depIdxs = []int32{
|
|
|
679
771
|
1, // 12: ecsrelay.ECSRelayService.OpenStream:input_type -> ecsrelay.Signature
|
|
680
772
|
5, // 13: ecsrelay.ECSRelayService.PushStream:input_type -> ecsrelay.PushRequest
|
|
681
773
|
5, // 14: ecsrelay.ECSRelayService.Push:input_type -> ecsrelay.PushRequest
|
|
682
|
-
|
|
774
|
+
10, // 15: ecsrelay.ECSRelayService.MinBalanceForPush:input_type -> ecsrelay.BalanceRequest
|
|
683
775
|
0, // 16: ecsrelay.ECSRelayService.Authenticate:output_type -> ecsrelay.Identity
|
|
684
776
|
0, // 17: ecsrelay.ECSRelayService.Revoke:output_type -> ecsrelay.Identity
|
|
685
777
|
0, // 18: ecsrelay.ECSRelayService.Ping:output_type -> ecsrelay.Identity
|
|
@@ -690,7 +782,7 @@ var file_proto_ecs_relay_proto_depIdxs = []int32{
|
|
|
690
782
|
2, // 23: ecsrelay.ECSRelayService.OpenStream:output_type -> ecsrelay.Message
|
|
691
783
|
7, // 24: ecsrelay.ECSRelayService.PushStream:output_type -> ecsrelay.PushResponse
|
|
692
784
|
7, // 25: ecsrelay.ECSRelayService.Push:output_type -> ecsrelay.PushResponse
|
|
693
|
-
|
|
785
|
+
11, // 26: ecsrelay.ECSRelayService.MinBalanceForPush:output_type -> ecsrelay.BalanceResponse
|
|
694
786
|
16, // [16:27] is the sub-list for method output_type
|
|
695
787
|
5, // [5:16] is the sub-list for method input_type
|
|
696
788
|
5, // [5:5] is the sub-list for extension type_name
|
|
@@ -824,6 +916,30 @@ func file_proto_ecs_relay_proto_init() {
|
|
|
824
916
|
return nil
|
|
825
917
|
}
|
|
826
918
|
}
|
|
919
|
+
file_proto_ecs_relay_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
|
920
|
+
switch v := v.(*BalanceRequest); i {
|
|
921
|
+
case 0:
|
|
922
|
+
return &v.state
|
|
923
|
+
case 1:
|
|
924
|
+
return &v.sizeCache
|
|
925
|
+
case 2:
|
|
926
|
+
return &v.unknownFields
|
|
927
|
+
default:
|
|
928
|
+
return nil
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
file_proto_ecs_relay_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
|
932
|
+
switch v := v.(*BalanceResponse); i {
|
|
933
|
+
case 0:
|
|
934
|
+
return &v.state
|
|
935
|
+
case 1:
|
|
936
|
+
return &v.sizeCache
|
|
937
|
+
case 2:
|
|
938
|
+
return &v.unknownFields
|
|
939
|
+
default:
|
|
940
|
+
return nil
|
|
941
|
+
}
|
|
942
|
+
}
|
|
827
943
|
}
|
|
828
944
|
type x struct{}
|
|
829
945
|
out := protoimpl.TypeBuilder{
|
|
@@ -831,7 +947,7 @@ func file_proto_ecs_relay_proto_init() {
|
|
|
831
947
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
832
948
|
RawDescriptor: file_proto_ecs_relay_proto_rawDesc,
|
|
833
949
|
NumEnums: 0,
|
|
834
|
-
NumMessages:
|
|
950
|
+
NumMessages: 12,
|
|
835
951
|
NumExtensions: 0,
|
|
836
952
|
NumServices: 1,
|
|
837
953
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// - protoc-gen-go-grpc v1.2.0
|
|
4
|
-
// - protoc v3.
|
|
4
|
+
// - protoc v3.21.3
|
|
5
5
|
// source: proto/ecs-relay.proto
|
|
6
6
|
|
|
7
7
|
package ecs_relay
|
|
@@ -34,8 +34,8 @@ type ECSRelayServiceClient interface {
|
|
|
34
34
|
PushStream(ctx context.Context, opts ...grpc.CallOption) (ECSRelayService_PushStreamClient, error)
|
|
35
35
|
// Push a single message to be relayed.
|
|
36
36
|
Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
|
|
37
|
-
//
|
|
38
|
-
|
|
37
|
+
// Minimum balance an account must have to be able to push.
|
|
38
|
+
MinBalanceForPush(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
type eCSRelayServiceClient struct {
|
|
@@ -181,9 +181,9 @@ func (c *eCSRelayServiceClient) Push(ctx context.Context, in *PushRequest, opts
|
|
|
181
181
|
return out, nil
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
func (c *eCSRelayServiceClient)
|
|
185
|
-
out := new(
|
|
186
|
-
err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/
|
|
184
|
+
func (c *eCSRelayServiceClient) MinBalanceForPush(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) {
|
|
185
|
+
out := new(BalanceResponse)
|
|
186
|
+
err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/MinBalanceForPush", in, out, opts...)
|
|
187
187
|
if err != nil {
|
|
188
188
|
return nil, err
|
|
189
189
|
}
|
|
@@ -206,8 +206,8 @@ type ECSRelayServiceServer interface {
|
|
|
206
206
|
PushStream(ECSRelayService_PushStreamServer) error
|
|
207
207
|
// Push a single message to be relayed.
|
|
208
208
|
Push(context.Context, *PushRequest) (*PushResponse, error)
|
|
209
|
-
//
|
|
210
|
-
|
|
209
|
+
// Minimum balance an account must have to be able to push.
|
|
210
|
+
MinBalanceForPush(context.Context, *BalanceRequest) (*BalanceResponse, error)
|
|
211
211
|
mustEmbedUnimplementedECSRelayServiceServer()
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -245,8 +245,8 @@ func (UnimplementedECSRelayServiceServer) PushStream(ECSRelayService_PushStreamS
|
|
|
245
245
|
func (UnimplementedECSRelayServiceServer) Push(context.Context, *PushRequest) (*PushResponse, error) {
|
|
246
246
|
return nil, status.Errorf(codes.Unimplemented, "method Push not implemented")
|
|
247
247
|
}
|
|
248
|
-
func (UnimplementedECSRelayServiceServer)
|
|
249
|
-
return nil, status.Errorf(codes.Unimplemented, "method
|
|
248
|
+
func (UnimplementedECSRelayServiceServer) MinBalanceForPush(context.Context, *BalanceRequest) (*BalanceResponse, error) {
|
|
249
|
+
return nil, status.Errorf(codes.Unimplemented, "method MinBalanceForPush not implemented")
|
|
250
250
|
}
|
|
251
251
|
func (UnimplementedECSRelayServiceServer) mustEmbedUnimplementedECSRelayServiceServer() {}
|
|
252
252
|
|
|
@@ -452,20 +452,20 @@ func _ECSRelayService_Push_Handler(srv interface{}, ctx context.Context, dec fun
|
|
|
452
452
|
return interceptor(ctx, in, info, handler)
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
func
|
|
456
|
-
in := new(
|
|
455
|
+
func _ECSRelayService_MinBalanceForPush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
456
|
+
in := new(BalanceRequest)
|
|
457
457
|
if err := dec(in); err != nil {
|
|
458
458
|
return nil, err
|
|
459
459
|
}
|
|
460
460
|
if interceptor == nil {
|
|
461
|
-
return srv.(ECSRelayServiceServer).
|
|
461
|
+
return srv.(ECSRelayServiceServer).MinBalanceForPush(ctx, in)
|
|
462
462
|
}
|
|
463
463
|
info := &grpc.UnaryServerInfo{
|
|
464
464
|
Server: srv,
|
|
465
|
-
FullMethod: "/ecsrelay.ECSRelayService/
|
|
465
|
+
FullMethod: "/ecsrelay.ECSRelayService/MinBalanceForPush",
|
|
466
466
|
}
|
|
467
467
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
468
|
-
return srv.(ECSRelayServiceServer).
|
|
468
|
+
return srv.(ECSRelayServiceServer).MinBalanceForPush(ctx, req.(*BalanceRequest))
|
|
469
469
|
}
|
|
470
470
|
return interceptor(ctx, in, info, handler)
|
|
471
471
|
}
|
|
@@ -510,8 +510,8 @@ var ECSRelayService_ServiceDesc = grpc.ServiceDesc{
|
|
|
510
510
|
Handler: _ECSRelayService_Push_Handler,
|
|
511
511
|
},
|
|
512
512
|
{
|
|
513
|
-
MethodName: "
|
|
514
|
-
Handler:
|
|
513
|
+
MethodName: "MinBalanceForPush",
|
|
514
|
+
Handler: _ECSRelayService_MinBalanceForPush_Handler,
|
|
515
515
|
},
|
|
516
516
|
},
|
|
517
517
|
Streams: []grpc.StreamDesc{
|
|
@@ -51,6 +51,12 @@ export interface CountIdentitiesResponse {
|
|
|
51
51
|
count: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
export interface BalanceRequest {}
|
|
55
|
+
|
|
56
|
+
export interface BalanceResponse {
|
|
57
|
+
balance: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
function createBaseIdentity(): Identity {
|
|
55
61
|
return { name: "" };
|
|
56
62
|
}
|
|
@@ -469,6 +475,73 @@ export const CountIdentitiesResponse = {
|
|
|
469
475
|
},
|
|
470
476
|
};
|
|
471
477
|
|
|
478
|
+
function createBaseBalanceRequest(): BalanceRequest {
|
|
479
|
+
return {};
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export const BalanceRequest = {
|
|
483
|
+
encode(_: BalanceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
484
|
+
return writer;
|
|
485
|
+
},
|
|
486
|
+
|
|
487
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BalanceRequest {
|
|
488
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
489
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
490
|
+
const message = createBaseBalanceRequest();
|
|
491
|
+
while (reader.pos < end) {
|
|
492
|
+
const tag = reader.uint32();
|
|
493
|
+
switch (tag >>> 3) {
|
|
494
|
+
default:
|
|
495
|
+
reader.skipType(tag & 7);
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return message;
|
|
500
|
+
},
|
|
501
|
+
|
|
502
|
+
fromPartial(_: DeepPartial<BalanceRequest>): BalanceRequest {
|
|
503
|
+
const message = createBaseBalanceRequest();
|
|
504
|
+
return message;
|
|
505
|
+
},
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
function createBaseBalanceResponse(): BalanceResponse {
|
|
509
|
+
return { balance: 0 };
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export const BalanceResponse = {
|
|
513
|
+
encode(message: BalanceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
514
|
+
if (message.balance !== 0) {
|
|
515
|
+
writer.uint32(8).uint64(message.balance);
|
|
516
|
+
}
|
|
517
|
+
return writer;
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BalanceResponse {
|
|
521
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
522
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
523
|
+
const message = createBaseBalanceResponse();
|
|
524
|
+
while (reader.pos < end) {
|
|
525
|
+
const tag = reader.uint32();
|
|
526
|
+
switch (tag >>> 3) {
|
|
527
|
+
case 1:
|
|
528
|
+
message.balance = longToNumber(reader.uint64() as Long);
|
|
529
|
+
break;
|
|
530
|
+
default:
|
|
531
|
+
reader.skipType(tag & 7);
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
return message;
|
|
536
|
+
},
|
|
537
|
+
|
|
538
|
+
fromPartial(object: DeepPartial<BalanceResponse>): BalanceResponse {
|
|
539
|
+
const message = createBaseBalanceResponse();
|
|
540
|
+
message.balance = object.balance ?? 0;
|
|
541
|
+
return message;
|
|
542
|
+
},
|
|
543
|
+
};
|
|
544
|
+
|
|
472
545
|
/** The Relay Service definition. */
|
|
473
546
|
export type ECSRelayServiceDefinition = typeof ECSRelayServiceDefinition;
|
|
474
547
|
export const ECSRelayServiceDefinition = {
|
|
@@ -557,12 +630,12 @@ export const ECSRelayServiceDefinition = {
|
|
|
557
630
|
responseStream: false,
|
|
558
631
|
options: {},
|
|
559
632
|
},
|
|
560
|
-
/**
|
|
561
|
-
|
|
562
|
-
name: "
|
|
563
|
-
requestType:
|
|
633
|
+
/** Minimum balance an account must have to be able to push. */
|
|
634
|
+
minBalanceForPush: {
|
|
635
|
+
name: "MinBalanceForPush",
|
|
636
|
+
requestType: BalanceRequest,
|
|
564
637
|
requestStream: false,
|
|
565
|
-
responseType:
|
|
638
|
+
responseType: BalanceResponse,
|
|
566
639
|
responseStream: false,
|
|
567
640
|
options: {},
|
|
568
641
|
},
|
|
@@ -594,8 +667,11 @@ export interface ECSRelayServiceServiceImplementation<CallContextExt = {}> {
|
|
|
594
667
|
): ServerStreamingMethodResult<DeepPartial<PushResponse>>;
|
|
595
668
|
/** Push a single message to be relayed. */
|
|
596
669
|
push(request: PushRequest, context: CallContext & CallContextExt): Promise<DeepPartial<PushResponse>>;
|
|
597
|
-
/**
|
|
598
|
-
|
|
670
|
+
/** Minimum balance an account must have to be able to push. */
|
|
671
|
+
minBalanceForPush(
|
|
672
|
+
request: BalanceRequest,
|
|
673
|
+
context: CallContext & CallContextExt
|
|
674
|
+
): Promise<DeepPartial<BalanceResponse>>;
|
|
599
675
|
}
|
|
600
676
|
|
|
601
677
|
export interface ECSRelayServiceClient<CallOptionsExt = {}> {
|
|
@@ -620,8 +696,11 @@ export interface ECSRelayServiceClient<CallOptionsExt = {}> {
|
|
|
620
696
|
): AsyncIterable<PushResponse>;
|
|
621
697
|
/** Push a single message to be relayed. */
|
|
622
698
|
push(request: DeepPartial<PushRequest>, options?: CallOptions & CallOptionsExt): Promise<PushResponse>;
|
|
623
|
-
/**
|
|
624
|
-
|
|
699
|
+
/** Minimum balance an account must have to be able to push. */
|
|
700
|
+
minBalanceForPush(
|
|
701
|
+
request: DeepPartial<BalanceRequest>,
|
|
702
|
+
options?: CallOptions & CallOptionsExt
|
|
703
|
+
): Promise<BalanceResponse>;
|
|
625
704
|
}
|
|
626
705
|
|
|
627
706
|
declare var self: any | undefined;
|