diff --git a/foundation/rpc_server/rpc_server.go b/foundation/rpc_server/rpc_server.go index 8021189..b923087 100644 --- a/foundation/rpc_server/rpc_server.go +++ b/foundation/rpc_server/rpc_server.go @@ -267,7 +267,6 @@ func (s *Server) Start() error { } func int8ArrayToString(array []int8) string { - runes := make([]rune, 0) for _, char := range array { @@ -280,6 +279,64 @@ func int8ArrayToString(array []int8) string { return string(runes) } +func int8ArrayToInt32Array(array []int8) []int32 { + ints := make([]int32, 0) + + for _, smallInt := range array { + ints = append(ints, int32(smallInt)) + } + return ints +} + +func (s *Server) GetIssuedAssets(ctx context.Context, req *protobuff.IssuedAssetsRequest) (*protobuff.IssuedAssetsResponse, error) { + client, err := s.qPool.Get() + if err != nil { + return nil, status.Errorf(codes.Internal, "getting pool connection :%v", err) + } + + assets, err := client.GetIssuedAssets(ctx, req.Identity) + if err != nil { + s.qPool.Close(client) + return nil, status.Errorf(codes.Internal, "getting issued assets from node %v", err) + } + + s.qPool.Put(client) + + issuedAssets := make([]*protobuff.IssuedAsset, 0) + + for _, asset := range assets { + + iAsset := asset.Data + var iAssetIdentity types.Identity + iAssetIdentity, err = iAssetIdentity.FromPubKey(iAsset.PublicKey, false) + if err != nil { + return nil, errors.Wrap(err, "failed to get identity for issued asset public key") + } + + data := protobuff.IssuedAssetData{ + IssuerIdentity: iAssetIdentity.String(), + Type: uint32(iAsset.Type), + Name: int8ArrayToString(iAsset.Name[:]), + NumberOfDecimalPlaces: int32(iAsset.NumberOfDecimalPlaces), + UnitOfMeasurement: int8ArrayToInt32Array(iAsset.UnitOfMeasurement[:]), + } + + info := protobuff.AssetInfo{ + Tick: asset.Info.Tick, + UniverseIndex: asset.Info.UniverseIndex, + } + + issuedAsset := protobuff.IssuedAsset{ + Data: &data, + Info: &info, + } + + issuedAssets = append(issuedAssets, &issuedAsset) + } + + return &protobuff.IssuedAssetsResponse{IssuedAssets: issuedAssets}, nil +} + func (s *Server) GetOwnedAssets(ctx context.Context, req *protobuff.OwnedAssetsRequest) (*protobuff.OwnedAssetsResponse, error) { client, err := s.qPool.Get() if err != nil { @@ -311,7 +368,7 @@ func (s *Server) GetOwnedAssets(ctx context.Context, req *protobuff.OwnedAssetsR Type: uint32(iAsset.Type), Name: int8ArrayToString(iAsset.Name[:]), NumberOfDecimalPlaces: int32(iAsset.NumberOfDecimalPlaces), - UnitOfMeasurement: int8ArrayToString(iAsset.UnitOfMeasurement[:]), + UnitOfMeasurement: int8ArrayToInt32Array(iAsset.UnitOfMeasurement[:]), } var oAssetIdentity types.Identity @@ -384,7 +441,7 @@ func (s *Server) GetPossessedAssets(ctx context.Context, req *protobuff.Possesse Type: uint32(iAsset.Type), Name: int8ArrayToString(iAsset.Name[:]), NumberOfDecimalPlaces: int32(iAsset.NumberOfDecimalPlaces), - UnitOfMeasurement: int8ArrayToString(iAsset.UnitOfMeasurement[:]), + UnitOfMeasurement: int8ArrayToInt32Array(iAsset.UnitOfMeasurement[:]), } ownedAsset := protobuff.OwnedAssetData{ diff --git a/protobuff/qubic.pb.go b/protobuff/qubic.pb.go index 35a12c0..74b2de9 100644 --- a/protobuff/qubic.pb.go +++ b/protobuff/qubic.pb.go @@ -525,16 +525,17 @@ func (x *AssetInfo) GetUniverseIndex() uint32 { return 0 } +// Issued type IssuedAssetData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IssuerIdentity string `protobuf:"bytes,1,opt,name=issuer_identity,json=issuerIdentity,proto3" json:"issuer_identity,omitempty"` - Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - NumberOfDecimalPlaces int32 `protobuf:"varint,4,opt,name=number_of_decimal_places,json=numberOfDecimalPlaces,proto3" json:"number_of_decimal_places,omitempty"` - UnitOfMeasurement string `protobuf:"bytes,5,opt,name=unit_of_measurement,json=unitOfMeasurement,proto3" json:"unit_of_measurement,omitempty"` + IssuerIdentity string `protobuf:"bytes,1,opt,name=issuer_identity,json=issuerIdentity,proto3" json:"issuer_identity,omitempty"` + Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + NumberOfDecimalPlaces int32 `protobuf:"varint,4,opt,name=number_of_decimal_places,json=numberOfDecimalPlaces,proto3" json:"number_of_decimal_places,omitempty"` + UnitOfMeasurement []int32 `protobuf:"varint,5,rep,packed,name=unit_of_measurement,json=unitOfMeasurement,proto3" json:"unit_of_measurement,omitempty"` } func (x *IssuedAssetData) Reset() { @@ -597,11 +598,11 @@ func (x *IssuedAssetData) GetNumberOfDecimalPlaces() int32 { return 0 } -func (x *IssuedAssetData) GetUnitOfMeasurement() string { +func (x *IssuedAssetData) GetUnitOfMeasurement() []int32 { if x != nil { return x.UnitOfMeasurement } - return "" + return nil } type IssuedAsset struct { @@ -659,6 +660,101 @@ func (x *IssuedAsset) GetInfo() *AssetInfo { return nil } +type IssuedAssetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` +} + +func (x *IssuedAssetsRequest) Reset() { + *x = IssuedAssetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_qubic_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IssuedAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IssuedAssetsRequest) ProtoMessage() {} + +func (x *IssuedAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_qubic_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IssuedAssetsRequest.ProtoReflect.Descriptor instead. +func (*IssuedAssetsRequest) Descriptor() ([]byte, []int) { + return file_qubic_proto_rawDescGZIP(), []int{11} +} + +func (x *IssuedAssetsRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type IssuedAssetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IssuedAssets []*IssuedAsset `protobuf:"bytes,1,rep,name=issued_assets,json=issuedAssets,proto3" json:"issued_assets,omitempty"` +} + +func (x *IssuedAssetsResponse) Reset() { + *x = IssuedAssetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_qubic_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IssuedAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IssuedAssetsResponse) ProtoMessage() {} + +func (x *IssuedAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_qubic_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IssuedAssetsResponse.ProtoReflect.Descriptor instead. +func (*IssuedAssetsResponse) Descriptor() ([]byte, []int) { + return file_qubic_proto_rawDescGZIP(), []int{12} +} + +func (x *IssuedAssetsResponse) GetIssuedAssets() []*IssuedAsset { + if x != nil { + return x.IssuedAssets + } + return nil +} + +// Owned type OwnedAssetData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -676,7 +772,7 @@ type OwnedAssetData struct { func (x *OwnedAssetData) Reset() { *x = OwnedAssetData{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[11] + mi := &file_qubic_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -689,7 +785,7 @@ func (x *OwnedAssetData) String() string { func (*OwnedAssetData) ProtoMessage() {} func (x *OwnedAssetData) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[11] + mi := &file_qubic_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -702,7 +798,7 @@ func (x *OwnedAssetData) ProtoReflect() protoreflect.Message { // Deprecated: Use OwnedAssetData.ProtoReflect.Descriptor instead. func (*OwnedAssetData) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{11} + return file_qubic_proto_rawDescGZIP(), []int{13} } func (x *OwnedAssetData) GetOwnerIdentity() string { @@ -766,7 +862,7 @@ type OwnedAsset struct { func (x *OwnedAsset) Reset() { *x = OwnedAsset{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[12] + mi := &file_qubic_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -779,7 +875,7 @@ func (x *OwnedAsset) String() string { func (*OwnedAsset) ProtoMessage() {} func (x *OwnedAsset) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[12] + mi := &file_qubic_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -792,7 +888,7 @@ func (x *OwnedAsset) ProtoReflect() protoreflect.Message { // Deprecated: Use OwnedAsset.ProtoReflect.Descriptor instead. func (*OwnedAsset) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{12} + return file_qubic_proto_rawDescGZIP(), []int{14} } func (x *OwnedAsset) GetData() *OwnedAssetData { @@ -820,7 +916,7 @@ type OwnedAssetsRequest struct { func (x *OwnedAssetsRequest) Reset() { *x = OwnedAssetsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[13] + mi := &file_qubic_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -833,7 +929,7 @@ func (x *OwnedAssetsRequest) String() string { func (*OwnedAssetsRequest) ProtoMessage() {} func (x *OwnedAssetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[13] + mi := &file_qubic_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -846,7 +942,7 @@ func (x *OwnedAssetsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OwnedAssetsRequest.ProtoReflect.Descriptor instead. func (*OwnedAssetsRequest) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{13} + return file_qubic_proto_rawDescGZIP(), []int{15} } func (x *OwnedAssetsRequest) GetIdentity() string { @@ -867,7 +963,7 @@ type OwnedAssetsResponse struct { func (x *OwnedAssetsResponse) Reset() { *x = OwnedAssetsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[14] + mi := &file_qubic_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -880,7 +976,7 @@ func (x *OwnedAssetsResponse) String() string { func (*OwnedAssetsResponse) ProtoMessage() {} func (x *OwnedAssetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[14] + mi := &file_qubic_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -893,7 +989,7 @@ func (x *OwnedAssetsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OwnedAssetsResponse.ProtoReflect.Descriptor instead. func (*OwnedAssetsResponse) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{14} + return file_qubic_proto_rawDescGZIP(), []int{16} } func (x *OwnedAssetsResponse) GetOwnedAssets() []*OwnedAsset { @@ -903,6 +999,7 @@ func (x *OwnedAssetsResponse) GetOwnedAssets() []*OwnedAsset { return nil } +// Possessed type PossessedAssetData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -920,7 +1017,7 @@ type PossessedAssetData struct { func (x *PossessedAssetData) Reset() { *x = PossessedAssetData{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[15] + mi := &file_qubic_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -933,7 +1030,7 @@ func (x *PossessedAssetData) String() string { func (*PossessedAssetData) ProtoMessage() {} func (x *PossessedAssetData) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[15] + mi := &file_qubic_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -946,7 +1043,7 @@ func (x *PossessedAssetData) ProtoReflect() protoreflect.Message { // Deprecated: Use PossessedAssetData.ProtoReflect.Descriptor instead. func (*PossessedAssetData) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{15} + return file_qubic_proto_rawDescGZIP(), []int{17} } func (x *PossessedAssetData) GetPossessorIdentity() string { @@ -1010,7 +1107,7 @@ type PossessedAsset struct { func (x *PossessedAsset) Reset() { *x = PossessedAsset{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[16] + mi := &file_qubic_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1023,7 +1120,7 @@ func (x *PossessedAsset) String() string { func (*PossessedAsset) ProtoMessage() {} func (x *PossessedAsset) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[16] + mi := &file_qubic_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1036,7 +1133,7 @@ func (x *PossessedAsset) ProtoReflect() protoreflect.Message { // Deprecated: Use PossessedAsset.ProtoReflect.Descriptor instead. func (*PossessedAsset) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{16} + return file_qubic_proto_rawDescGZIP(), []int{18} } func (x *PossessedAsset) GetData() *PossessedAssetData { @@ -1064,7 +1161,7 @@ type PossessedAssetsRequest struct { func (x *PossessedAssetsRequest) Reset() { *x = PossessedAssetsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[17] + mi := &file_qubic_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1077,7 +1174,7 @@ func (x *PossessedAssetsRequest) String() string { func (*PossessedAssetsRequest) ProtoMessage() {} func (x *PossessedAssetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[17] + mi := &file_qubic_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1090,7 +1187,7 @@ func (x *PossessedAssetsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PossessedAssetsRequest.ProtoReflect.Descriptor instead. func (*PossessedAssetsRequest) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{17} + return file_qubic_proto_rawDescGZIP(), []int{19} } func (x *PossessedAssetsRequest) GetIdentity() string { @@ -1111,7 +1208,7 @@ type PossessedAssetsResponse struct { func (x *PossessedAssetsResponse) Reset() { *x = PossessedAssetsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_qubic_proto_msgTypes[18] + mi := &file_qubic_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1124,7 +1221,7 @@ func (x *PossessedAssetsResponse) String() string { func (*PossessedAssetsResponse) ProtoMessage() {} func (x *PossessedAssetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_qubic_proto_msgTypes[18] + mi := &file_qubic_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1137,7 +1234,7 @@ func (x *PossessedAssetsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PossessedAssetsResponse.ProtoReflect.Descriptor instead. func (*PossessedAssetsResponse) Descriptor() ([]byte, []int) { - return file_qubic_proto_rawDescGZIP(), []int{18} + return file_qubic_proto_rawDescGZIP(), []int{20} } func (x *PossessedAssetsResponse) GetPossessedAssets() []*PossessedAsset { @@ -1226,7 +1323,7 @@ var file_qubic_proto_rawDesc = []byte{ 0x6c, 0x61, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x6d, 0x65, - 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x11, 0x75, 0x6e, 0x69, 0x74, 0x4f, 0x66, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7b, 0x0a, 0x0b, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, @@ -1236,134 +1333,152 @@ var file_qubic_proto_rawDesc = []byte{ 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, - 0xb5, 0x02, 0x0a, 0x0e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x5f, 0x6f, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x47, - 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x22, 0x79, 0x0a, 0x0a, 0x4f, 0x77, 0x6e, 0x65, 0x64, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, - 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x71, - 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, - 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x22, 0x30, 0x0a, 0x12, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x22, 0x59, 0x0a, 0x13, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x6f, - 0x77, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, - 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, - 0xbe, 0x02, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, - 0x73, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x0e, 0x69, - 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, - 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x4f, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x6f, 0x77, - 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, - 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x22, 0x81, 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, - 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, + 0x31, 0x0a, 0x13, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x22, 0x5d, 0x0a, 0x14, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, + 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x52, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x73, + 0x12, 0x47, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x22, 0x79, 0x0a, 0x0a, 0x4f, 0x77, 0x6e, + 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x34, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, - 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x69, 0x0a, 0x17, 0x50, 0x6f, - 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, - 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, - 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x32, 0x9d, 0x06, 0x0a, 0x10, 0x51, 0x75, 0x62, 0x69, 0x63, 0x4c, - 0x69, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, - 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x10, 0x12, 0x0e, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x71, 0x75, 0x62, + 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x30, 0x0a, 0x12, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x59, 0x0a, 0x13, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, + 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x22, 0xbe, 0x02, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x73, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, + 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, + 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, + 0x0e, 0x69, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x69, 0x73, 0x73, 0x75, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, + 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x0b, + 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, + 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x32, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, + 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x34, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x69, 0x0a, 0x17, + 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x70, 0x6f, 0x73, 0x73, 0x65, + 0x73, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, + 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x0f, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x32, 0xa9, 0x07, 0x0a, 0x10, 0x51, 0x75, 0x62, 0x69, + 0x63, 0x4c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, - 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x71, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x62, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x2d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x28, 0x2e, 0x71, 0x75, 0x62, 0x69, - 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x74, 0x69, - 0x63, 0x6b, 0x2d, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x6c, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x2b, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, - 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x85, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4f, 0x77, 0x6e, - 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, - 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, - 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x7d, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x12, 0x95, 0x01, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, - 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2c, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, - 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, - 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x73, - 0x65, 0x73, 0x73, 0x65, 0x64, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2f, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2d, - 0x68, 0x74, 0x74, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x66, 0x2f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, + 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x62, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x2d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x28, 0x2e, 0x71, 0x75, + 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, + 0x62, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, + 0x74, 0x69, 0x63, 0x6b, 0x2d, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x6c, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x2b, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x89, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x71, 0x75, + 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, + 0x62, 0x2e, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x73, 0x73, 0x75, + 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x7d, 0x2f, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x64, 0x12, 0x85, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x64, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, + 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, + 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x7d, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x12, 0x95, 0x01, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, + 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x71, 0x75, 0x62, + 0x69, 0x63, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x65, 0x64, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2f, 0x71, 0x75, 0x62, 0x69, 0x63, 0x2d, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x66, 0x2f, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1378,7 +1493,7 @@ func file_qubic_proto_rawDescGZIP() []byte { return file_qubic_proto_rawDescData } -var file_qubic_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_qubic_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_qubic_proto_goTypes = []interface{}{ (*Balance)(nil), // 0: qubic.http.qubic.pb.Balance (*GetBalanceRequest)(nil), // 1: qubic.http.qubic.pb.GetBalanceRequest @@ -1391,15 +1506,17 @@ var file_qubic_proto_goTypes = []interface{}{ (*AssetInfo)(nil), // 8: qubic.http.qubic.pb.AssetInfo (*IssuedAssetData)(nil), // 9: qubic.http.qubic.pb.IssuedAssetData (*IssuedAsset)(nil), // 10: qubic.http.qubic.pb.IssuedAsset - (*OwnedAssetData)(nil), // 11: qubic.http.qubic.pb.OwnedAssetData - (*OwnedAsset)(nil), // 12: qubic.http.qubic.pb.OwnedAsset - (*OwnedAssetsRequest)(nil), // 13: qubic.http.qubic.pb.OwnedAssetsRequest - (*OwnedAssetsResponse)(nil), // 14: qubic.http.qubic.pb.OwnedAssetsResponse - (*PossessedAssetData)(nil), // 15: qubic.http.qubic.pb.PossessedAssetData - (*PossessedAsset)(nil), // 16: qubic.http.qubic.pb.PossessedAsset - (*PossessedAssetsRequest)(nil), // 17: qubic.http.qubic.pb.PossessedAssetsRequest - (*PossessedAssetsResponse)(nil), // 18: qubic.http.qubic.pb.PossessedAssetsResponse - (*emptypb.Empty)(nil), // 19: google.protobuf.Empty + (*IssuedAssetsRequest)(nil), // 11: qubic.http.qubic.pb.IssuedAssetsRequest + (*IssuedAssetsResponse)(nil), // 12: qubic.http.qubic.pb.IssuedAssetsResponse + (*OwnedAssetData)(nil), // 13: qubic.http.qubic.pb.OwnedAssetData + (*OwnedAsset)(nil), // 14: qubic.http.qubic.pb.OwnedAsset + (*OwnedAssetsRequest)(nil), // 15: qubic.http.qubic.pb.OwnedAssetsRequest + (*OwnedAssetsResponse)(nil), // 16: qubic.http.qubic.pb.OwnedAssetsResponse + (*PossessedAssetData)(nil), // 17: qubic.http.qubic.pb.PossessedAssetData + (*PossessedAsset)(nil), // 18: qubic.http.qubic.pb.PossessedAsset + (*PossessedAssetsRequest)(nil), // 19: qubic.http.qubic.pb.PossessedAssetsRequest + (*PossessedAssetsResponse)(nil), // 20: qubic.http.qubic.pb.PossessedAssetsResponse + (*emptypb.Empty)(nil), // 21: google.protobuf.Empty } var file_qubic_proto_depIdxs = []int32{ 0, // 0: qubic.http.qubic.pb.GetBalanceResponse.balance:type_name -> qubic.http.qubic.pb.Balance @@ -1407,31 +1524,34 @@ var file_qubic_proto_depIdxs = []int32{ 5, // 2: qubic.http.qubic.pb.GetBlockHeightResponse.block_height:type_name -> qubic.http.qubic.pb.TickInfo 9, // 3: qubic.http.qubic.pb.IssuedAsset.data:type_name -> qubic.http.qubic.pb.IssuedAssetData 8, // 4: qubic.http.qubic.pb.IssuedAsset.info:type_name -> qubic.http.qubic.pb.AssetInfo - 9, // 5: qubic.http.qubic.pb.OwnedAssetData.issued_asset:type_name -> qubic.http.qubic.pb.IssuedAssetData - 11, // 6: qubic.http.qubic.pb.OwnedAsset.data:type_name -> qubic.http.qubic.pb.OwnedAssetData - 8, // 7: qubic.http.qubic.pb.OwnedAsset.info:type_name -> qubic.http.qubic.pb.AssetInfo - 12, // 8: qubic.http.qubic.pb.OwnedAssetsResponse.owned_assets:type_name -> qubic.http.qubic.pb.OwnedAsset - 11, // 9: qubic.http.qubic.pb.PossessedAssetData.owned_asset:type_name -> qubic.http.qubic.pb.OwnedAssetData - 15, // 10: qubic.http.qubic.pb.PossessedAsset.data:type_name -> qubic.http.qubic.pb.PossessedAssetData - 8, // 11: qubic.http.qubic.pb.PossessedAsset.info:type_name -> qubic.http.qubic.pb.AssetInfo - 16, // 12: qubic.http.qubic.pb.PossessedAssetsResponse.possessed_assets:type_name -> qubic.http.qubic.pb.PossessedAsset - 1, // 13: qubic.http.qubic.pb.QubicLiveService.GetBalance:input_type -> qubic.http.qubic.pb.GetBalanceRequest - 3, // 14: qubic.http.qubic.pb.QubicLiveService.BroadcastTransaction:input_type -> qubic.http.qubic.pb.BroadcastTransactionRequest - 19, // 15: qubic.http.qubic.pb.QubicLiveService.GetTickInfo:input_type -> google.protobuf.Empty - 19, // 16: qubic.http.qubic.pb.QubicLiveService.GetBlockHeight:input_type -> google.protobuf.Empty - 13, // 17: qubic.http.qubic.pb.QubicLiveService.GetOwnedAssets:input_type -> qubic.http.qubic.pb.OwnedAssetsRequest - 17, // 18: qubic.http.qubic.pb.QubicLiveService.GetPossessedAssets:input_type -> qubic.http.qubic.pb.PossessedAssetsRequest - 2, // 19: qubic.http.qubic.pb.QubicLiveService.GetBalance:output_type -> qubic.http.qubic.pb.GetBalanceResponse - 4, // 20: qubic.http.qubic.pb.QubicLiveService.BroadcastTransaction:output_type -> qubic.http.qubic.pb.BroadcastTransactionResponse - 6, // 21: qubic.http.qubic.pb.QubicLiveService.GetTickInfo:output_type -> qubic.http.qubic.pb.GetTickInfoResponse - 7, // 22: qubic.http.qubic.pb.QubicLiveService.GetBlockHeight:output_type -> qubic.http.qubic.pb.GetBlockHeightResponse - 14, // 23: qubic.http.qubic.pb.QubicLiveService.GetOwnedAssets:output_type -> qubic.http.qubic.pb.OwnedAssetsResponse - 18, // 24: qubic.http.qubic.pb.QubicLiveService.GetPossessedAssets:output_type -> qubic.http.qubic.pb.PossessedAssetsResponse - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 10, // 5: qubic.http.qubic.pb.IssuedAssetsResponse.issued_assets:type_name -> qubic.http.qubic.pb.IssuedAsset + 9, // 6: qubic.http.qubic.pb.OwnedAssetData.issued_asset:type_name -> qubic.http.qubic.pb.IssuedAssetData + 13, // 7: qubic.http.qubic.pb.OwnedAsset.data:type_name -> qubic.http.qubic.pb.OwnedAssetData + 8, // 8: qubic.http.qubic.pb.OwnedAsset.info:type_name -> qubic.http.qubic.pb.AssetInfo + 14, // 9: qubic.http.qubic.pb.OwnedAssetsResponse.owned_assets:type_name -> qubic.http.qubic.pb.OwnedAsset + 13, // 10: qubic.http.qubic.pb.PossessedAssetData.owned_asset:type_name -> qubic.http.qubic.pb.OwnedAssetData + 17, // 11: qubic.http.qubic.pb.PossessedAsset.data:type_name -> qubic.http.qubic.pb.PossessedAssetData + 8, // 12: qubic.http.qubic.pb.PossessedAsset.info:type_name -> qubic.http.qubic.pb.AssetInfo + 18, // 13: qubic.http.qubic.pb.PossessedAssetsResponse.possessed_assets:type_name -> qubic.http.qubic.pb.PossessedAsset + 1, // 14: qubic.http.qubic.pb.QubicLiveService.GetBalance:input_type -> qubic.http.qubic.pb.GetBalanceRequest + 3, // 15: qubic.http.qubic.pb.QubicLiveService.BroadcastTransaction:input_type -> qubic.http.qubic.pb.BroadcastTransactionRequest + 21, // 16: qubic.http.qubic.pb.QubicLiveService.GetTickInfo:input_type -> google.protobuf.Empty + 21, // 17: qubic.http.qubic.pb.QubicLiveService.GetBlockHeight:input_type -> google.protobuf.Empty + 11, // 18: qubic.http.qubic.pb.QubicLiveService.GetIssuedAssets:input_type -> qubic.http.qubic.pb.IssuedAssetsRequest + 15, // 19: qubic.http.qubic.pb.QubicLiveService.GetOwnedAssets:input_type -> qubic.http.qubic.pb.OwnedAssetsRequest + 19, // 20: qubic.http.qubic.pb.QubicLiveService.GetPossessedAssets:input_type -> qubic.http.qubic.pb.PossessedAssetsRequest + 2, // 21: qubic.http.qubic.pb.QubicLiveService.GetBalance:output_type -> qubic.http.qubic.pb.GetBalanceResponse + 4, // 22: qubic.http.qubic.pb.QubicLiveService.BroadcastTransaction:output_type -> qubic.http.qubic.pb.BroadcastTransactionResponse + 6, // 23: qubic.http.qubic.pb.QubicLiveService.GetTickInfo:output_type -> qubic.http.qubic.pb.GetTickInfoResponse + 7, // 24: qubic.http.qubic.pb.QubicLiveService.GetBlockHeight:output_type -> qubic.http.qubic.pb.GetBlockHeightResponse + 12, // 25: qubic.http.qubic.pb.QubicLiveService.GetIssuedAssets:output_type -> qubic.http.qubic.pb.IssuedAssetsResponse + 16, // 26: qubic.http.qubic.pb.QubicLiveService.GetOwnedAssets:output_type -> qubic.http.qubic.pb.OwnedAssetsResponse + 20, // 27: qubic.http.qubic.pb.QubicLiveService.GetPossessedAssets:output_type -> qubic.http.qubic.pb.PossessedAssetsResponse + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_qubic_proto_init() } @@ -1573,7 +1693,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OwnedAssetData); i { + switch v := v.(*IssuedAssetsRequest); i { case 0: return &v.state case 1: @@ -1585,7 +1705,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OwnedAsset); i { + switch v := v.(*IssuedAssetsResponse); i { case 0: return &v.state case 1: @@ -1597,7 +1717,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OwnedAssetsRequest); i { + switch v := v.(*OwnedAssetData); i { case 0: return &v.state case 1: @@ -1609,7 +1729,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OwnedAssetsResponse); i { + switch v := v.(*OwnedAsset); i { case 0: return &v.state case 1: @@ -1621,7 +1741,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PossessedAssetData); i { + switch v := v.(*OwnedAssetsRequest); i { case 0: return &v.state case 1: @@ -1633,7 +1753,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PossessedAsset); i { + switch v := v.(*OwnedAssetsResponse); i { case 0: return &v.state case 1: @@ -1645,7 +1765,7 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PossessedAssetsRequest); i { + switch v := v.(*PossessedAssetData); i { case 0: return &v.state case 1: @@ -1657,6 +1777,30 @@ func file_qubic_proto_init() { } } file_qubic_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PossessedAsset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_qubic_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PossessedAssetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_qubic_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PossessedAssetsResponse); i { case 0: return &v.state @@ -1675,7 +1819,7 @@ func file_qubic_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_qubic_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/protobuff/qubic.pb.gw.go b/protobuff/qubic.pb.gw.go index 54445d9..8805b76 100644 --- a/protobuff/qubic.pb.gw.go +++ b/protobuff/qubic.pb.gw.go @@ -146,6 +146,58 @@ func local_request_QubicLiveService_GetBlockHeight_0(ctx context.Context, marsha } +func request_QubicLiveService_GetIssuedAssets_0(ctx context.Context, marshaler runtime.Marshaler, client QubicLiveServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IssuedAssetsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["identity"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "identity") + } + + protoReq.Identity, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "identity", err) + } + + msg, err := client.GetIssuedAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QubicLiveService_GetIssuedAssets_0(ctx context.Context, marshaler runtime.Marshaler, server QubicLiveServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IssuedAssetsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["identity"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "identity") + } + + protoReq.Identity, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "identity", err) + } + + msg, err := server.GetIssuedAssets(ctx, &protoReq) + return msg, metadata, err + +} + func request_QubicLiveService_GetOwnedAssets_0(ctx context.Context, marshaler runtime.Marshaler, client QubicLiveServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq OwnedAssetsRequest var metadata runtime.ServerMetadata @@ -356,6 +408,31 @@ func RegisterQubicLiveServiceHandlerServer(ctx context.Context, mux *runtime.Ser }) + mux.Handle("GET", pattern_QubicLiveService_GetIssuedAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/qubic.http.qubic.pb.QubicLiveService/GetIssuedAssets", runtime.WithHTTPPathPattern("/assets/{identity}/issued")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QubicLiveService_GetIssuedAssets_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_QubicLiveService_GetIssuedAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_QubicLiveService_GetOwnedAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -535,6 +612,28 @@ func RegisterQubicLiveServiceHandlerClient(ctx context.Context, mux *runtime.Ser }) + mux.Handle("GET", pattern_QubicLiveService_GetIssuedAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/qubic.http.qubic.pb.QubicLiveService/GetIssuedAssets", runtime.WithHTTPPathPattern("/assets/{identity}/issued")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QubicLiveService_GetIssuedAssets_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_QubicLiveService_GetIssuedAssets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_QubicLiveService_GetOwnedAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -591,6 +690,8 @@ var ( pattern_QubicLiveService_GetBlockHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"block-height"}, "")) + pattern_QubicLiveService_GetIssuedAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"assets", "identity", "issued"}, "")) + pattern_QubicLiveService_GetOwnedAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"assets", "identity", "owned"}, "")) pattern_QubicLiveService_GetPossessedAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"assets", "identity", "possessed"}, "")) @@ -605,6 +706,8 @@ var ( forward_QubicLiveService_GetBlockHeight_0 = runtime.ForwardResponseMessage + forward_QubicLiveService_GetIssuedAssets_0 = runtime.ForwardResponseMessage + forward_QubicLiveService_GetOwnedAssets_0 = runtime.ForwardResponseMessage forward_QubicLiveService_GetPossessedAssets_0 = runtime.ForwardResponseMessage diff --git a/protobuff/qubic.proto b/protobuff/qubic.proto index a9e836c..2d58058 100644 --- a/protobuff/qubic.proto +++ b/protobuff/qubic.proto @@ -47,17 +47,20 @@ message GetBlockHeightResponse { TickInfo block_height = 1; } +// Assets + message AssetInfo { uint32 tick = 1; uint32 universe_index = 2; } +//Issued message IssuedAssetData { string issuer_identity = 1; uint32 type = 2; string name = 3; int32 number_of_decimal_places = 4; - string unit_of_measurement = 5; + repeated int32 unit_of_measurement = 5; } message IssuedAsset { @@ -65,6 +68,15 @@ message IssuedAsset { AssetInfo info = 2; } +message IssuedAssetsRequest { + string identity = 1; +} + +message IssuedAssetsResponse { + repeated IssuedAsset issued_assets = 1; +} + +//Owned message OwnedAssetData { string owner_identity = 1; uint32 type = 2; @@ -88,6 +100,7 @@ message OwnedAssetsResponse { repeated OwnedAsset owned_assets = 1; } +//Possessed message PossessedAssetData { string possessor_identity = 1; uint32 type = 2; @@ -137,6 +150,12 @@ service QubicLiveService { }; }; + rpc GetIssuedAssets(IssuedAssetsRequest) returns (IssuedAssetsResponse) { + option (google.api.http) = { + get: "/assets/{identity}/issued" + }; + }; + rpc GetOwnedAssets(OwnedAssetsRequest) returns (OwnedAssetsResponse) { option (google.api.http) = { get: "/assets/{identity}/owned" diff --git a/protobuff/qubic_grpc.pb.go b/protobuff/qubic_grpc.pb.go index b960623..cf8e984 100644 --- a/protobuff/qubic_grpc.pb.go +++ b/protobuff/qubic_grpc.pb.go @@ -24,6 +24,7 @@ const ( QubicLiveService_BroadcastTransaction_FullMethodName = "/qubic.http.qubic.pb.QubicLiveService/BroadcastTransaction" QubicLiveService_GetTickInfo_FullMethodName = "/qubic.http.qubic.pb.QubicLiveService/GetTickInfo" QubicLiveService_GetBlockHeight_FullMethodName = "/qubic.http.qubic.pb.QubicLiveService/GetBlockHeight" + QubicLiveService_GetIssuedAssets_FullMethodName = "/qubic.http.qubic.pb.QubicLiveService/GetIssuedAssets" QubicLiveService_GetOwnedAssets_FullMethodName = "/qubic.http.qubic.pb.QubicLiveService/GetOwnedAssets" QubicLiveService_GetPossessedAssets_FullMethodName = "/qubic.http.qubic.pb.QubicLiveService/GetPossessedAssets" ) @@ -36,6 +37,7 @@ type QubicLiveServiceClient interface { BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) GetTickInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTickInfoResponse, error) GetBlockHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) + GetIssuedAssets(ctx context.Context, in *IssuedAssetsRequest, opts ...grpc.CallOption) (*IssuedAssetsResponse, error) GetOwnedAssets(ctx context.Context, in *OwnedAssetsRequest, opts ...grpc.CallOption) (*OwnedAssetsResponse, error) GetPossessedAssets(ctx context.Context, in *PossessedAssetsRequest, opts ...grpc.CallOption) (*PossessedAssetsResponse, error) } @@ -84,6 +86,15 @@ func (c *qubicLiveServiceClient) GetBlockHeight(ctx context.Context, in *emptypb return out, nil } +func (c *qubicLiveServiceClient) GetIssuedAssets(ctx context.Context, in *IssuedAssetsRequest, opts ...grpc.CallOption) (*IssuedAssetsResponse, error) { + out := new(IssuedAssetsResponse) + err := c.cc.Invoke(ctx, QubicLiveService_GetIssuedAssets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *qubicLiveServiceClient) GetOwnedAssets(ctx context.Context, in *OwnedAssetsRequest, opts ...grpc.CallOption) (*OwnedAssetsResponse, error) { out := new(OwnedAssetsResponse) err := c.cc.Invoke(ctx, QubicLiveService_GetOwnedAssets_FullMethodName, in, out, opts...) @@ -110,6 +121,7 @@ type QubicLiveServiceServer interface { BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) GetTickInfo(context.Context, *emptypb.Empty) (*GetTickInfoResponse, error) GetBlockHeight(context.Context, *emptypb.Empty) (*GetBlockHeightResponse, error) + GetIssuedAssets(context.Context, *IssuedAssetsRequest) (*IssuedAssetsResponse, error) GetOwnedAssets(context.Context, *OwnedAssetsRequest) (*OwnedAssetsResponse, error) GetPossessedAssets(context.Context, *PossessedAssetsRequest) (*PossessedAssetsResponse, error) mustEmbedUnimplementedQubicLiveServiceServer() @@ -131,6 +143,9 @@ func (UnimplementedQubicLiveServiceServer) GetTickInfo(context.Context, *emptypb func (UnimplementedQubicLiveServiceServer) GetBlockHeight(context.Context, *emptypb.Empty) (*GetBlockHeightResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeight not implemented") } +func (UnimplementedQubicLiveServiceServer) GetIssuedAssets(context.Context, *IssuedAssetsRequest) (*IssuedAssetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIssuedAssets not implemented") +} func (UnimplementedQubicLiveServiceServer) GetOwnedAssets(context.Context, *OwnedAssetsRequest) (*OwnedAssetsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOwnedAssets not implemented") } @@ -222,6 +237,24 @@ func _QubicLiveService_GetBlockHeight_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _QubicLiveService_GetIssuedAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IssuedAssetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QubicLiveServiceServer).GetIssuedAssets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: QubicLiveService_GetIssuedAssets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QubicLiveServiceServer).GetIssuedAssets(ctx, req.(*IssuedAssetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _QubicLiveService_GetOwnedAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OwnedAssetsRequest) if err := dec(in); err != nil { @@ -281,6 +314,10 @@ var QubicLiveService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetBlockHeight", Handler: _QubicLiveService_GetBlockHeight_Handler, }, + { + MethodName: "GetIssuedAssets", + Handler: _QubicLiveService_GetIssuedAssets_Handler, + }, { MethodName: "GetOwnedAssets", Handler: _QubicLiveService_GetOwnedAssets_Handler,