diff --git a/www/grpc/buf/grpc-md.tmpl b/www/grpc/buf/grpc-md.tmpl
index f8db08e84..b6d7871e8 100644
--- a/www/grpc/buf/grpc-md.tmpl
+++ b/www/grpc/buf/grpc-md.tmpl
@@ -3,7 +3,8 @@ title: GRPC API Reference
weight: 1
---
-Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication.
+Each node in the Pactus network can be configured to use the
+[gRPC](https://grpc.io/) protocol for communication.
Here you can find the list of all gRPC methods and messages.
All the amounts and values in gRPC endpoints are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain.
diff --git a/www/grpc/buf/json-rpc-md.tmpl b/www/grpc/buf/json-rpc-md.tmpl
index 2446bb5d8..f5c5ba617 100644
--- a/www/grpc/buf/json-rpc-md.tmpl
+++ b/www/grpc/buf/json-rpc-md.tmpl
@@ -3,7 +3,8 @@ title: JSON-RPC API Reference
weight: 2
---
-Each node in the Pactus network can be configured to use the [JSON-RPC](https://www.jsonrpc.org/specification) protocol for communication.
+Each node in the Pactus network can be configured to use the
+[JSON-RPC](https://www.jsonrpc.org/specification) protocol for communication.
Here, you can find the list of all JSON-RPC methods and messages.
All the amounts and values in JSON-RPC endpoints are in NanoPAC units,
diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md
index 4b5c9d707..e0f510061 100644
--- a/www/grpc/gen/docs/grpc.md
+++ b/www/grpc/gen/docs/grpc.md
@@ -3,7 +3,8 @@ title: GRPC API Reference
weight: 1
---
-Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication.
+Each node in the Pactus network can be configured to use the
+[gRPC](https://grpc.io/) protocol for communication.
Here you can find the list of all gRPC methods and messages.
All the amounts and values in gRPC endpoints are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain.
diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md
index bbeea73e6..42f2d6eba 100644
--- a/www/grpc/gen/docs/json-rpc.md
+++ b/www/grpc/gen/docs/json-rpc.md
@@ -3,7 +3,8 @@ title: JSON-RPC API Reference
weight: 2
---
-Each node in the Pactus network can be configured to use the [JSON-RPC](https://www.jsonrpc.org/specification) protocol for communication.
+Each node in the Pactus network can be configured to use the
+[JSON-RPC](https://www.jsonrpc.org/specification) protocol for communication.
Here, you can find the list of all JSON-RPC methods and messages.
All the amounts and values in JSON-RPC endpoints are in NanoPAC units,
@@ -275,7 +276,7 @@ parameters.
instances[].votes[].type |
- string |
+ numeric |
(Enum)The type of the vote.
Available values:
@@ -2040,7 +2041,7 @@ address.
payload_type |
- string |
+ numeric |
(Enum)The type of transactions to retrieve from the transaction pool. 0 means all
types.
@@ -2114,7 +2115,7 @@ types.
|
txs[].payload_type |
- string |
+ numeric |
(Enum)The type of transaction payload.
Available values:
@@ -3199,7 +3200,7 @@ public key.
|
address_type |
- string |
+ numeric |
(Enum)The type of address to generate.
Available values:
diff --git a/www/grpc/gen/go/blockchain.pb.go b/www/grpc/gen/go/blockchain.pb.go
index 43d26b616..a751b96f2 100644
--- a/www/grpc/gen/go/blockchain.pb.go
+++ b/www/grpc/gen/go/blockchain.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.33.0
+// protoc-gen-go v1.35.2
// protoc (unknown)
// source: blockchain.proto
@@ -142,11 +142,9 @@ type GetAccountRequest struct {
func (x *GetAccountRequest) Reset() {
*x = GetAccountRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetAccountRequest) String() string {
@@ -157,7 +155,7 @@ func (*GetAccountRequest) ProtoMessage() {}
func (x *GetAccountRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -191,11 +189,9 @@ type GetAccountResponse struct {
func (x *GetAccountResponse) Reset() {
*x = GetAccountResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetAccountResponse) String() string {
@@ -206,7 +202,7 @@ func (*GetAccountResponse) ProtoMessage() {}
func (x *GetAccountResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -237,11 +233,9 @@ type GetValidatorAddressesRequest struct {
func (x *GetValidatorAddressesRequest) Reset() {
*x = GetValidatorAddressesRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorAddressesRequest) String() string {
@@ -252,7 +246,7 @@ func (*GetValidatorAddressesRequest) ProtoMessage() {}
func (x *GetValidatorAddressesRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -279,11 +273,9 @@ type GetValidatorAddressesResponse struct {
func (x *GetValidatorAddressesResponse) Reset() {
*x = GetValidatorAddressesResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorAddressesResponse) String() string {
@@ -294,7 +286,7 @@ func (*GetValidatorAddressesResponse) ProtoMessage() {}
func (x *GetValidatorAddressesResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -328,11 +320,9 @@ type GetValidatorRequest struct {
func (x *GetValidatorRequest) Reset() {
*x = GetValidatorRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorRequest) String() string {
@@ -343,7 +333,7 @@ func (*GetValidatorRequest) ProtoMessage() {}
func (x *GetValidatorRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -377,11 +367,9 @@ type GetValidatorByNumberRequest struct {
func (x *GetValidatorByNumberRequest) Reset() {
*x = GetValidatorByNumberRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorByNumberRequest) String() string {
@@ -392,7 +380,7 @@ func (*GetValidatorByNumberRequest) ProtoMessage() {}
func (x *GetValidatorByNumberRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -426,11 +414,9 @@ type GetValidatorResponse struct {
func (x *GetValidatorResponse) Reset() {
*x = GetValidatorResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorResponse) String() string {
@@ -441,7 +427,7 @@ func (*GetValidatorResponse) ProtoMessage() {}
func (x *GetValidatorResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -475,11 +461,9 @@ type GetPublicKeyRequest struct {
func (x *GetPublicKeyRequest) Reset() {
*x = GetPublicKeyRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetPublicKeyRequest) String() string {
@@ -490,7 +474,7 @@ func (*GetPublicKeyRequest) ProtoMessage() {}
func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -524,11 +508,9 @@ type GetPublicKeyResponse struct {
func (x *GetPublicKeyResponse) Reset() {
*x = GetPublicKeyResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetPublicKeyResponse) String() string {
@@ -539,7 +521,7 @@ func (*GetPublicKeyResponse) ProtoMessage() {}
func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -575,11 +557,9 @@ type GetBlockRequest struct {
func (x *GetBlockRequest) Reset() {
*x = GetBlockRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockRequest) String() string {
@@ -590,7 +570,7 @@ func (*GetBlockRequest) ProtoMessage() {}
func (x *GetBlockRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -644,11 +624,9 @@ type GetBlockResponse struct {
func (x *GetBlockResponse) Reset() {
*x = GetBlockResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockResponse) String() string {
@@ -659,7 +637,7 @@ func (*GetBlockResponse) ProtoMessage() {}
func (x *GetBlockResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -735,11 +713,9 @@ type GetBlockHashRequest struct {
func (x *GetBlockHashRequest) Reset() {
*x = GetBlockHashRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockHashRequest) String() string {
@@ -750,7 +726,7 @@ func (*GetBlockHashRequest) ProtoMessage() {}
func (x *GetBlockHashRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -784,11 +760,9 @@ type GetBlockHashResponse struct {
func (x *GetBlockHashResponse) Reset() {
*x = GetBlockHashResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockHashResponse) String() string {
@@ -799,7 +773,7 @@ func (*GetBlockHashResponse) ProtoMessage() {}
func (x *GetBlockHashResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -833,11 +807,9 @@ type GetBlockHeightRequest struct {
func (x *GetBlockHeightRequest) Reset() {
*x = GetBlockHeightRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockHeightRequest) String() string {
@@ -848,7 +820,7 @@ func (*GetBlockHeightRequest) ProtoMessage() {}
func (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -882,11 +854,9 @@ type GetBlockHeightResponse struct {
func (x *GetBlockHeightResponse) Reset() {
*x = GetBlockHeightResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockHeightResponse) String() string {
@@ -897,7 +867,7 @@ func (*GetBlockHeightResponse) ProtoMessage() {}
func (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -928,11 +898,9 @@ type GetBlockchainInfoRequest struct {
func (x *GetBlockchainInfoRequest) Reset() {
*x = GetBlockchainInfoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockchainInfoRequest) String() string {
@@ -943,7 +911,7 @@ func (*GetBlockchainInfoRequest) ProtoMessage() {}
func (x *GetBlockchainInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -988,11 +956,9 @@ type GetBlockchainInfoResponse struct {
func (x *GetBlockchainInfoResponse) Reset() {
*x = GetBlockchainInfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetBlockchainInfoResponse) String() string {
@@ -1003,7 +969,7 @@ func (*GetBlockchainInfoResponse) ProtoMessage() {}
func (x *GetBlockchainInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1097,11 +1063,9 @@ type GetConsensusInfoRequest struct {
func (x *GetConsensusInfoRequest) Reset() {
*x = GetConsensusInfoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetConsensusInfoRequest) String() string {
@@ -1112,7 +1076,7 @@ func (*GetConsensusInfoRequest) ProtoMessage() {}
func (x *GetConsensusInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1141,11 +1105,9 @@ type GetConsensusInfoResponse struct {
func (x *GetConsensusInfoResponse) Reset() {
*x = GetConsensusInfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetConsensusInfoResponse) String() string {
@@ -1156,7 +1118,7 @@ func (*GetConsensusInfoResponse) ProtoMessage() {}
func (x *GetConsensusInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1198,11 +1160,9 @@ type GetTxPoolContentRequest struct {
func (x *GetTxPoolContentRequest) Reset() {
*x = GetTxPoolContentRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTxPoolContentRequest) String() string {
@@ -1213,7 +1173,7 @@ func (*GetTxPoolContentRequest) ProtoMessage() {}
func (x *GetTxPoolContentRequest) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1247,11 +1207,9 @@ type GetTxPoolContentResponse struct {
func (x *GetTxPoolContentResponse) Reset() {
*x = GetTxPoolContentResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTxPoolContentResponse) String() string {
@@ -1262,7 +1220,7 @@ func (*GetTxPoolContentResponse) ProtoMessage() {}
func (x *GetTxPoolContentResponse) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1314,11 +1272,9 @@ type ValidatorInfo struct {
func (x *ValidatorInfo) Reset() {
*x = ValidatorInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidatorInfo) String() string {
@@ -1329,7 +1285,7 @@ func (*ValidatorInfo) ProtoMessage() {}
func (x *ValidatorInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1434,11 +1390,9 @@ type AccountInfo struct {
func (x *AccountInfo) Reset() {
*x = AccountInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AccountInfo) String() string {
@@ -1449,7 +1403,7 @@ func (*AccountInfo) ProtoMessage() {}
func (x *AccountInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1519,11 +1473,9 @@ type BlockHeaderInfo struct {
func (x *BlockHeaderInfo) Reset() {
*x = BlockHeaderInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BlockHeaderInfo) String() string {
@@ -1534,7 +1486,7 @@ func (*BlockHeaderInfo) ProtoMessage() {}
func (x *BlockHeaderInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1604,11 +1556,9 @@ type CertificateInfo struct {
func (x *CertificateInfo) Reset() {
*x = CertificateInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CertificateInfo) String() string {
@@ -1619,7 +1569,7 @@ func (*CertificateInfo) ProtoMessage() {}
func (x *CertificateInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1691,11 +1641,9 @@ type VoteInfo struct {
func (x *VoteInfo) Reset() {
*x = VoteInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *VoteInfo) String() string {
@@ -1706,7 +1654,7 @@ func (*VoteInfo) ProtoMessage() {}
func (x *VoteInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1784,11 +1732,9 @@ type ConsensusInfo struct {
func (x *ConsensusInfo) Reset() {
*x = ConsensusInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConsensusInfo) String() string {
@@ -1799,7 +1745,7 @@ func (*ConsensusInfo) ProtoMessage() {}
func (x *ConsensusInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1867,11 +1813,9 @@ type ProposalInfo struct {
func (x *ProposalInfo) Reset() {
*x = ProposalInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_blockchain_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_blockchain_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ProposalInfo) String() string {
@@ -1882,7 +1826,7 @@ func (*ProposalInfo) ProtoMessage() {}
func (x *ProposalInfo) ProtoReflect() protoreflect.Message {
mi := &file_blockchain_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2215,7 +2159,7 @@ func file_blockchain_proto_rawDescGZIP() []byte {
var file_blockchain_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_blockchain_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
-var file_blockchain_proto_goTypes = []interface{}{
+var file_blockchain_proto_goTypes = []any{
(BlockVerbosity)(0), // 0: pactus.BlockVerbosity
(VoteType)(0), // 1: pactus.VoteType
(*GetAccountRequest)(nil), // 2: pactus.GetAccountRequest
@@ -2298,344 +2242,6 @@ func file_blockchain_proto_init() {
return
}
file_transaction_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_blockchain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAccountRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAccountResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorAddressesRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorAddressesResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorByNumberRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetPublicKeyRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetPublicKeyResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockHashRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockHashResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockHeightRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockHeightResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockchainInfoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBlockchainInfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetConsensusInfoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetConsensusInfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTxPoolContentRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTxPoolContentResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidatorInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AccountInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BlockHeaderInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CertificateInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*VoteInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConsensusInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_blockchain_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ProposalInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
diff --git a/www/grpc/gen/go/blockchain.pb.gw.go b/www/grpc/gen/go/blockchain.pb.gw.go
index 55461048a..b5124a06a 100644
--- a/www/grpc/gen/go/blockchain.pb.gw.go
+++ b/www/grpc/gen/go/blockchain.pb.gw.go
@@ -359,6 +359,7 @@ func local_request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler
// UnaryRPC :call BlockchainServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlockchainHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServer) error {
mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -617,21 +618,21 @@ func RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux,
// RegisterBlockchainHandlerFromEndpoint is same as RegisterBlockchainHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBlockchainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
@@ -649,7 +650,7 @@ func RegisterBlockchainHandler(ctx context.Context, mux *runtime.ServeMux, conn
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "BlockchainClient" to call the correct interceptors.
+// "BlockchainClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterBlockchainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainClient) error {
mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/blockchain_grpc.pb.go b/www/grpc/gen/go/blockchain_grpc.pb.go
index 6bd37d5f6..e78ae8cba 100644
--- a/www/grpc/gen/go/blockchain_grpc.pb.go
+++ b/www/grpc/gen/go/blockchain_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: blockchain.proto
@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
Blockchain_GetBlock_FullMethodName = "/pactus.Blockchain/GetBlock"
@@ -35,6 +35,8 @@ const (
// BlockchainClient is the client API for Blockchain service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Blockchain service defines RPC methods for interacting with the blockchain.
type BlockchainClient interface {
// GetBlock retrieves information about a block based on the provided request
// parameters.
@@ -74,8 +76,9 @@ func NewBlockchainClient(cc grpc.ClientConnInterface) BlockchainClient {
}
func (c *blockchainClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBlockResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetBlock_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetBlock_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -83,8 +86,9 @@ func (c *blockchainClient) GetBlock(ctx context.Context, in *GetBlockRequest, op
}
func (c *blockchainClient) GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBlockHashResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetBlockHash_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetBlockHash_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -92,8 +96,9 @@ func (c *blockchainClient) GetBlockHash(ctx context.Context, in *GetBlockHashReq
}
func (c *blockchainClient) GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBlockHeightResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetBlockHeight_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetBlockHeight_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -101,8 +106,9 @@ func (c *blockchainClient) GetBlockHeight(ctx context.Context, in *GetBlockHeigh
}
func (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBlockchainInfoResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetBlockchainInfo_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetBlockchainInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -110,8 +116,9 @@ func (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *GetBlockch
}
func (c *blockchainClient) GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetConsensusInfoResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetConsensusInfo_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetConsensusInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -119,8 +126,9 @@ func (c *blockchainClient) GetConsensusInfo(ctx context.Context, in *GetConsensu
}
func (c *blockchainClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAccountResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetAccount_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -128,8 +136,9 @@ func (c *blockchainClient) GetAccount(ctx context.Context, in *GetAccountRequest
}
func (c *blockchainClient) GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValidatorResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetValidator_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetValidator_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -137,8 +146,9 @@ func (c *blockchainClient) GetValidator(ctx context.Context, in *GetValidatorReq
}
func (c *blockchainClient) GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValidatorResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetValidatorByNumber_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetValidatorByNumber_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -146,8 +156,9 @@ func (c *blockchainClient) GetValidatorByNumber(ctx context.Context, in *GetVali
}
func (c *blockchainClient) GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValidatorAddressesResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetValidatorAddresses_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetValidatorAddresses_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -155,8 +166,9 @@ func (c *blockchainClient) GetValidatorAddresses(ctx context.Context, in *GetVal
}
func (c *blockchainClient) GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPublicKeyResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetPublicKey_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetPublicKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -164,8 +176,9 @@ func (c *blockchainClient) GetPublicKey(ctx context.Context, in *GetPublicKeyReq
}
func (c *blockchainClient) GetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetTxPoolContentResponse)
- err := c.cc.Invoke(ctx, Blockchain_GetTxPoolContent_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Blockchain_GetTxPoolContent_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -174,7 +187,9 @@ func (c *blockchainClient) GetTxPoolContent(ctx context.Context, in *GetTxPoolCo
// BlockchainServer is the server API for Blockchain service.
// All implementations should embed UnimplementedBlockchainServer
-// for forward compatibility
+// for forward compatibility.
+//
+// Blockchain service defines RPC methods for interacting with the blockchain.
type BlockchainServer interface {
// GetBlock retrieves information about a block based on the provided request
// parameters.
@@ -205,9 +220,12 @@ type BlockchainServer interface {
GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error)
}
-// UnimplementedBlockchainServer should be embedded to have forward compatible implementations.
-type UnimplementedBlockchainServer struct {
-}
+// UnimplementedBlockchainServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedBlockchainServer struct{}
func (UnimplementedBlockchainServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented")
@@ -242,6 +260,7 @@ func (UnimplementedBlockchainServer) GetPublicKey(context.Context, *GetPublicKey
func (UnimplementedBlockchainServer) GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTxPoolContent not implemented")
}
+func (UnimplementedBlockchainServer) testEmbeddedByValue() {}
// UnsafeBlockchainServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BlockchainServer will
@@ -251,6 +270,13 @@ type UnsafeBlockchainServer interface {
}
func RegisterBlockchainServer(s grpc.ServiceRegistrar, srv BlockchainServer) {
+ // If the following call pancis, it indicates UnimplementedBlockchainServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Blockchain_ServiceDesc, srv)
}
diff --git a/www/grpc/gen/go/network.pb.go b/www/grpc/gen/go/network.pb.go
index 4b216a6dd..dcbb39f24 100644
--- a/www/grpc/gen/go/network.pb.go
+++ b/www/grpc/gen/go/network.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.33.0
+// protoc-gen-go v1.35.2
// protoc (unknown)
// source: network.proto
@@ -32,11 +32,9 @@ type GetNetworkInfoRequest struct {
func (x *GetNetworkInfoRequest) Reset() {
*x = GetNetworkInfoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetNetworkInfoRequest) String() string {
@@ -47,7 +45,7 @@ func (*GetNetworkInfoRequest) ProtoMessage() {}
func (x *GetNetworkInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -87,11 +85,9 @@ type GetNetworkInfoResponse struct {
func (x *GetNetworkInfoResponse) Reset() {
*x = GetNetworkInfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetNetworkInfoResponse) String() string {
@@ -102,7 +98,7 @@ func (*GetNetworkInfoResponse) ProtoMessage() {}
func (x *GetNetworkInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -154,11 +150,9 @@ type GetNodeInfoRequest struct {
func (x *GetNodeInfoRequest) Reset() {
*x = GetNodeInfoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetNodeInfoRequest) String() string {
@@ -169,7 +163,7 @@ func (*GetNodeInfoRequest) ProtoMessage() {}
func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -216,11 +210,9 @@ type GetNodeInfoResponse struct {
func (x *GetNodeInfoResponse) Reset() {
*x = GetNodeInfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetNodeInfoResponse) String() string {
@@ -231,7 +223,7 @@ func (*GetNodeInfoResponse) ProtoMessage() {}
func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -367,11 +359,9 @@ type PeerInfo struct {
func (x *PeerInfo) Reset() {
*x = PeerInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PeerInfo) String() string {
@@ -382,7 +372,7 @@ func (*PeerInfo) ProtoMessage() {}
func (x *PeerInfo) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -532,11 +522,9 @@ type ConnectionInfo struct {
func (x *ConnectionInfo) Reset() {
*x = ConnectionInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectionInfo) String() string {
@@ -547,7 +535,7 @@ func (*ConnectionInfo) ProtoMessage() {}
func (x *ConnectionInfo) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -603,11 +591,9 @@ type MetricInfo struct {
func (x *MetricInfo) Reset() {
*x = MetricInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *MetricInfo) String() string {
@@ -618,7 +604,7 @@ func (*MetricInfo) ProtoMessage() {}
func (x *MetricInfo) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -682,11 +668,9 @@ type CounterInfo struct {
func (x *CounterInfo) Reset() {
*x = CounterInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_network_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_network_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CounterInfo) String() string {
@@ -697,7 +681,7 @@ func (*CounterInfo) ProtoMessage() {}
func (x *CounterInfo) ProtoReflect() protoreflect.Message {
mi := &file_network_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -887,7 +871,7 @@ func file_network_proto_rawDescGZIP() []byte {
}
var file_network_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
-var file_network_proto_goTypes = []interface{}{
+var file_network_proto_goTypes = []any{
(*GetNetworkInfoRequest)(nil), // 0: pactus.GetNetworkInfoRequest
(*GetNetworkInfoResponse)(nil), // 1: pactus.GetNetworkInfoResponse
(*GetNodeInfoRequest)(nil), // 2: pactus.GetNodeInfoRequest
@@ -927,104 +911,6 @@ func file_network_proto_init() {
if File_network_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNetworkInfoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNetworkInfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNodeInfoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNodeInfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PeerInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectionInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MetricInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_network_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CounterInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
diff --git a/www/grpc/gen/go/network.pb.gw.go b/www/grpc/gen/go/network.pb.gw.go
index 47aac6294..3c9d06405 100644
--- a/www/grpc/gen/go/network.pb.gw.go
+++ b/www/grpc/gen/go/network.pb.gw.go
@@ -89,6 +89,7 @@ func local_request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.
// UnaryRPC :call NetworkServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkServer) error {
mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -147,21 +148,21 @@ func RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
// RegisterNetworkHandlerFromEndpoint is same as RegisterNetworkHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNetworkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
@@ -179,7 +180,7 @@ func RegisterNetworkHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NetworkClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NetworkClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "NetworkClient" to call the correct interceptors.
+// "NetworkClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterNetworkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkClient) error {
mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/network_grpc.pb.go b/www/grpc/gen/go/network_grpc.pb.go
index f74a0f3bc..51cba8b78 100644
--- a/www/grpc/gen/go/network_grpc.pb.go
+++ b/www/grpc/gen/go/network_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: network.proto
@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
Network_GetNetworkInfo_FullMethodName = "/pactus.Network/GetNetworkInfo"
@@ -26,6 +26,8 @@ const (
// NetworkClient is the client API for Network service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Network service provides RPCs for retrieving information about the network.
type NetworkClient interface {
// GetNetworkInfo retrieves information about the overall network.
GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error)
@@ -42,8 +44,9 @@ func NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient {
}
func (c *networkClient) GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetNetworkInfoResponse)
- err := c.cc.Invoke(ctx, Network_GetNetworkInfo_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Network_GetNetworkInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -51,8 +54,9 @@ func (c *networkClient) GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRe
}
func (c *networkClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetNodeInfoResponse)
- err := c.cc.Invoke(ctx, Network_GetNodeInfo_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Network_GetNodeInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -61,7 +65,9 @@ func (c *networkClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest,
// NetworkServer is the server API for Network service.
// All implementations should embed UnimplementedNetworkServer
-// for forward compatibility
+// for forward compatibility.
+//
+// Network service provides RPCs for retrieving information about the network.
type NetworkServer interface {
// GetNetworkInfo retrieves information about the overall network.
GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error)
@@ -69,9 +75,12 @@ type NetworkServer interface {
GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error)
}
-// UnimplementedNetworkServer should be embedded to have forward compatible implementations.
-type UnimplementedNetworkServer struct {
-}
+// UnimplementedNetworkServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedNetworkServer struct{}
func (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNetworkInfo not implemented")
@@ -79,6 +88,7 @@ func (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInf
func (UnimplementedNetworkServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented")
}
+func (UnimplementedNetworkServer) testEmbeddedByValue() {}
// UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NetworkServer will
@@ -88,6 +98,13 @@ type UnsafeNetworkServer interface {
}
func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer) {
+ // If the following call pancis, it indicates UnimplementedNetworkServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Network_ServiceDesc, srv)
}
diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go
index 58e6a40c1..a7105f43f 100644
--- a/www/grpc/gen/go/transaction.pb.go
+++ b/www/grpc/gen/go/transaction.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.33.0
+// protoc-gen-go v1.35.2
// protoc (unknown)
// source: transaction.proto
@@ -148,11 +148,9 @@ type GetTransactionRequest struct {
func (x *GetTransactionRequest) Reset() {
*x = GetTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTransactionRequest) String() string {
@@ -163,7 +161,7 @@ func (*GetTransactionRequest) ProtoMessage() {}
func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -208,11 +206,9 @@ type GetTransactionResponse struct {
func (x *GetTransactionResponse) Reset() {
*x = GetTransactionResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTransactionResponse) String() string {
@@ -223,7 +219,7 @@ func (*GetTransactionResponse) ProtoMessage() {}
func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -275,11 +271,9 @@ type CalculateFeeRequest struct {
func (x *CalculateFeeRequest) Reset() {
*x = CalculateFeeRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CalculateFeeRequest) String() string {
@@ -290,7 +284,7 @@ func (*CalculateFeeRequest) ProtoMessage() {}
func (x *CalculateFeeRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -340,11 +334,9 @@ type CalculateFeeResponse struct {
func (x *CalculateFeeResponse) Reset() {
*x = CalculateFeeResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CalculateFeeResponse) String() string {
@@ -355,7 +347,7 @@ func (*CalculateFeeResponse) ProtoMessage() {}
func (x *CalculateFeeResponse) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -396,11 +388,9 @@ type BroadcastTransactionRequest struct {
func (x *BroadcastTransactionRequest) Reset() {
*x = BroadcastTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BroadcastTransactionRequest) String() string {
@@ -411,7 +401,7 @@ func (*BroadcastTransactionRequest) ProtoMessage() {}
func (x *BroadcastTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -445,11 +435,9 @@ type BroadcastTransactionResponse struct {
func (x *BroadcastTransactionResponse) Reset() {
*x = BroadcastTransactionResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BroadcastTransactionResponse) String() string {
@@ -460,7 +448,7 @@ func (*BroadcastTransactionResponse) ProtoMessage() {}
func (x *BroadcastTransactionResponse) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -505,11 +493,9 @@ type GetRawTransferTransactionRequest struct {
func (x *GetRawTransferTransactionRequest) Reset() {
*x = GetRawTransferTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetRawTransferTransactionRequest) String() string {
@@ -520,7 +506,7 @@ func (*GetRawTransferTransactionRequest) ProtoMessage() {}
func (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -602,11 +588,9 @@ type GetRawBondTransactionRequest struct {
func (x *GetRawBondTransactionRequest) Reset() {
*x = GetRawBondTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetRawBondTransactionRequest) String() string {
@@ -617,7 +601,7 @@ func (*GetRawBondTransactionRequest) ProtoMessage() {}
func (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -698,11 +682,9 @@ type GetRawUnbondTransactionRequest struct {
func (x *GetRawUnbondTransactionRequest) Reset() {
*x = GetRawUnbondTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetRawUnbondTransactionRequest) String() string {
@@ -713,7 +695,7 @@ func (*GetRawUnbondTransactionRequest) ProtoMessage() {}
func (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -772,11 +754,9 @@ type GetRawWithdrawTransactionRequest struct {
func (x *GetRawWithdrawTransactionRequest) Reset() {
*x = GetRawWithdrawTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetRawWithdrawTransactionRequest) String() string {
@@ -787,7 +767,7 @@ func (*GetRawWithdrawTransactionRequest) ProtoMessage() {}
func (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -858,11 +838,9 @@ type GetRawTransactionResponse struct {
func (x *GetRawTransactionResponse) Reset() {
*x = GetRawTransactionResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetRawTransactionResponse) String() string {
@@ -873,7 +851,7 @@ func (*GetRawTransactionResponse) ProtoMessage() {}
func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -918,11 +896,9 @@ type PayloadTransfer struct {
func (x *PayloadTransfer) Reset() {
*x = PayloadTransfer{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PayloadTransfer) String() string {
@@ -933,7 +909,7 @@ func (*PayloadTransfer) ProtoMessage() {}
func (x *PayloadTransfer) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -987,11 +963,9 @@ type PayloadBond struct {
func (x *PayloadBond) Reset() {
*x = PayloadBond{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PayloadBond) String() string {
@@ -1002,7 +976,7 @@ func (*PayloadBond) ProtoMessage() {}
func (x *PayloadBond) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1059,11 +1033,9 @@ type PayloadSortition struct {
func (x *PayloadSortition) Reset() {
*x = PayloadSortition{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PayloadSortition) String() string {
@@ -1074,7 +1046,7 @@ func (*PayloadSortition) ProtoMessage() {}
func (x *PayloadSortition) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1115,11 +1087,9 @@ type PayloadUnbond struct {
func (x *PayloadUnbond) Reset() {
*x = PayloadUnbond{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PayloadUnbond) String() string {
@@ -1130,7 +1100,7 @@ func (*PayloadUnbond) ProtoMessage() {}
func (x *PayloadUnbond) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1168,11 +1138,9 @@ type PayloadWithdraw struct {
func (x *PayloadWithdraw) Reset() {
*x = PayloadWithdraw{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PayloadWithdraw) String() string {
@@ -1183,7 +1151,7 @@ func (*PayloadWithdraw) ProtoMessage() {}
func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1257,11 +1225,9 @@ type TransactionInfo struct {
func (x *TransactionInfo) Reset() {
*x = TransactionInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_transaction_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_transaction_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TransactionInfo) String() string {
@@ -1272,7 +1238,7 @@ func (*TransactionInfo) ProtoMessage() {}
func (x *TransactionInfo) ProtoReflect() protoreflect.Message {
mi := &file_transaction_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1671,7 +1637,7 @@ func file_transaction_proto_rawDescGZIP() []byte {
var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
-var file_transaction_proto_goTypes = []interface{}{
+var file_transaction_proto_goTypes = []any{
(PayloadType)(0), // 0: pactus.PayloadType
(TransactionVerbosity)(0), // 1: pactus.TransactionVerbosity
(*GetTransactionRequest)(nil), // 2: pactus.GetTransactionRequest
@@ -1728,213 +1694,7 @@ func file_transaction_proto_init() {
if File_transaction_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_transaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTransactionResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CalculateFeeRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CalculateFeeResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BroadcastTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BroadcastTransactionResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRawTransferTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRawBondTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRawUnbondTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRawWithdrawTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRawTransactionResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PayloadTransfer); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PayloadBond); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PayloadSortition); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PayloadUnbond); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PayloadWithdraw); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_transaction_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TransactionInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_transaction_proto_msgTypes[16].OneofWrappers = []interface{}{
+ file_transaction_proto_msgTypes[16].OneofWrappers = []any{
(*TransactionInfo_Transfer)(nil),
(*TransactionInfo_Bond)(nil),
(*TransactionInfo_Sortition)(nil),
diff --git a/www/grpc/gen/go/transaction.pb.gw.go b/www/grpc/gen/go/transaction.pb.gw.go
index 1a859fee5..83467c5b1 100644
--- a/www/grpc/gen/go/transaction.pb.gw.go
+++ b/www/grpc/gen/go/transaction.pb.gw.go
@@ -287,6 +287,7 @@ func local_request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context,
// UnaryRPC :call TransactionServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransactionHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServer) error {
mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -470,21 +471,21 @@ func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux
// RegisterTransactionHandlerFromEndpoint is same as RegisterTransactionHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTransactionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
@@ -502,7 +503,7 @@ func RegisterTransactionHandler(ctx context.Context, mux *runtime.ServeMux, conn
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "TransactionClient" to call the correct interceptors.
+// "TransactionClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionClient) error {
mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/transaction_grpc.pb.go b/www/grpc/gen/go/transaction_grpc.pb.go
index d520786ca..aa41869d6 100644
--- a/www/grpc/gen/go/transaction_grpc.pb.go
+++ b/www/grpc/gen/go/transaction_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: transaction.proto
@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
Transaction_GetTransaction_FullMethodName = "/pactus.Transaction/GetTransaction"
@@ -31,6 +31,9 @@ const (
// TransactionClient is the client API for Transaction service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Transaction service defines various RPC methods for interacting with
+// transactions.
type TransactionClient interface {
// GetTransaction retrieves transaction details based on the provided request
// parameters.
@@ -59,8 +62,9 @@ func NewTransactionClient(cc grpc.ClientConnInterface) TransactionClient {
}
func (c *transactionClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetTransactionResponse)
- err := c.cc.Invoke(ctx, Transaction_GetTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_GetTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -68,8 +72,9 @@ func (c *transactionClient) GetTransaction(ctx context.Context, in *GetTransacti
}
func (c *transactionClient) CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CalculateFeeResponse)
- err := c.cc.Invoke(ctx, Transaction_CalculateFee_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_CalculateFee_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -77,8 +82,9 @@ func (c *transactionClient) CalculateFee(ctx context.Context, in *CalculateFeeRe
}
func (c *transactionClient) BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BroadcastTransactionResponse)
- err := c.cc.Invoke(ctx, Transaction_BroadcastTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_BroadcastTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -86,8 +92,9 @@ func (c *transactionClient) BroadcastTransaction(ctx context.Context, in *Broadc
}
func (c *transactionClient) GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetRawTransactionResponse)
- err := c.cc.Invoke(ctx, Transaction_GetRawTransferTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_GetRawTransferTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -95,8 +102,9 @@ func (c *transactionClient) GetRawTransferTransaction(ctx context.Context, in *G
}
func (c *transactionClient) GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetRawTransactionResponse)
- err := c.cc.Invoke(ctx, Transaction_GetRawBondTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_GetRawBondTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -104,8 +112,9 @@ func (c *transactionClient) GetRawBondTransaction(ctx context.Context, in *GetRa
}
func (c *transactionClient) GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetRawTransactionResponse)
- err := c.cc.Invoke(ctx, Transaction_GetRawUnbondTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_GetRawUnbondTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -113,8 +122,9 @@ func (c *transactionClient) GetRawUnbondTransaction(ctx context.Context, in *Get
}
func (c *transactionClient) GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetRawTransactionResponse)
- err := c.cc.Invoke(ctx, Transaction_GetRawWithdrawTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Transaction_GetRawWithdrawTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -123,7 +133,10 @@ func (c *transactionClient) GetRawWithdrawTransaction(ctx context.Context, in *G
// TransactionServer is the server API for Transaction service.
// All implementations should embed UnimplementedTransactionServer
-// for forward compatibility
+// for forward compatibility.
+//
+// Transaction service defines various RPC methods for interacting with
+// transactions.
type TransactionServer interface {
// GetTransaction retrieves transaction details based on the provided request
// parameters.
@@ -143,9 +156,12 @@ type TransactionServer interface {
GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error)
}
-// UnimplementedTransactionServer should be embedded to have forward compatible implementations.
-type UnimplementedTransactionServer struct {
-}
+// UnimplementedTransactionServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedTransactionServer struct{}
func (UnimplementedTransactionServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented")
@@ -168,6 +184,7 @@ func (UnimplementedTransactionServer) GetRawUnbondTransaction(context.Context, *
func (UnimplementedTransactionServer) GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRawWithdrawTransaction not implemented")
}
+func (UnimplementedTransactionServer) testEmbeddedByValue() {}
// UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TransactionServer will
@@ -177,6 +194,13 @@ type UnsafeTransactionServer interface {
}
func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer) {
+ // If the following call pancis, it indicates UnimplementedTransactionServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Transaction_ServiceDesc, srv)
}
diff --git a/www/grpc/gen/go/utils.pb.go b/www/grpc/gen/go/utils.pb.go
index b40c017b8..6af5a48b1 100644
--- a/www/grpc/gen/go/utils.pb.go
+++ b/www/grpc/gen/go/utils.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.33.0
+// protoc-gen-go v1.35.2
// protoc (unknown)
// source: utils.proto
@@ -34,11 +34,9 @@ type SignMessageWithPrivateKeyRequest struct {
func (x *SignMessageWithPrivateKeyRequest) Reset() {
*x = SignMessageWithPrivateKeyRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SignMessageWithPrivateKeyRequest) String() string {
@@ -49,7 +47,7 @@ func (*SignMessageWithPrivateKeyRequest) ProtoMessage() {}
func (x *SignMessageWithPrivateKeyRequest) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -90,11 +88,9 @@ type SignMessageWithPrivateKeyResponse struct {
func (x *SignMessageWithPrivateKeyResponse) Reset() {
*x = SignMessageWithPrivateKeyResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SignMessageWithPrivateKeyResponse) String() string {
@@ -105,7 +101,7 @@ func (*SignMessageWithPrivateKeyResponse) ProtoMessage() {}
func (x *SignMessageWithPrivateKeyResponse) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -143,11 +139,9 @@ type VerifyMessageRequest struct {
func (x *VerifyMessageRequest) Reset() {
*x = VerifyMessageRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *VerifyMessageRequest) String() string {
@@ -158,7 +152,7 @@ func (*VerifyMessageRequest) ProtoMessage() {}
func (x *VerifyMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -206,11 +200,9 @@ type VerifyMessageResponse struct {
func (x *VerifyMessageResponse) Reset() {
*x = VerifyMessageResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *VerifyMessageResponse) String() string {
@@ -221,7 +213,7 @@ func (*VerifyMessageResponse) ProtoMessage() {}
func (x *VerifyMessageResponse) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -255,11 +247,9 @@ type BLSPublicKeyAggregationRequest struct {
func (x *BLSPublicKeyAggregationRequest) Reset() {
*x = BLSPublicKeyAggregationRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BLSPublicKeyAggregationRequest) String() string {
@@ -270,7 +260,7 @@ func (*BLSPublicKeyAggregationRequest) ProtoMessage() {}
func (x *BLSPublicKeyAggregationRequest) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -306,11 +296,9 @@ type BLSPublicKeyAggregationResponse struct {
func (x *BLSPublicKeyAggregationResponse) Reset() {
*x = BLSPublicKeyAggregationResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BLSPublicKeyAggregationResponse) String() string {
@@ -321,7 +309,7 @@ func (*BLSPublicKeyAggregationResponse) ProtoMessage() {}
func (x *BLSPublicKeyAggregationResponse) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -362,11 +350,9 @@ type BLSSignatureAggregationRequest struct {
func (x *BLSSignatureAggregationRequest) Reset() {
*x = BLSSignatureAggregationRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BLSSignatureAggregationRequest) String() string {
@@ -377,7 +363,7 @@ func (*BLSSignatureAggregationRequest) ProtoMessage() {}
func (x *BLSSignatureAggregationRequest) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -411,11 +397,9 @@ type BLSSignatureAggregationResponse struct {
func (x *BLSSignatureAggregationResponse) Reset() {
*x = BLSSignatureAggregationResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_utils_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_utils_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BLSSignatureAggregationResponse) String() string {
@@ -426,7 +410,7 @@ func (*BLSSignatureAggregationResponse) ProtoMessage() {}
func (x *BLSSignatureAggregationResponse) ProtoReflect() protoreflect.Message {
mi := &file_utils_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -537,7 +521,7 @@ func file_utils_proto_rawDescGZIP() []byte {
}
var file_utils_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
-var file_utils_proto_goTypes = []interface{}{
+var file_utils_proto_goTypes = []any{
(*SignMessageWithPrivateKeyRequest)(nil), // 0: pactus.SignMessageWithPrivateKeyRequest
(*SignMessageWithPrivateKeyResponse)(nil), // 1: pactus.SignMessageWithPrivateKeyResponse
(*VerifyMessageRequest)(nil), // 2: pactus.VerifyMessageRequest
@@ -568,104 +552,6 @@ func file_utils_proto_init() {
if File_utils_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_utils_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SignMessageWithPrivateKeyRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SignMessageWithPrivateKeyResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*VerifyMessageRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*VerifyMessageResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BLSPublicKeyAggregationRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BLSPublicKeyAggregationResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BLSSignatureAggregationRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_utils_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BLSSignatureAggregationResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
diff --git a/www/grpc/gen/go/utils.pb.gw.go b/www/grpc/gen/go/utils.pb.gw.go
index 851a990c5..432ac389e 100644
--- a/www/grpc/gen/go/utils.pb.gw.go
+++ b/www/grpc/gen/go/utils.pb.gw.go
@@ -179,6 +179,7 @@ func local_request_Utils_BLSSignatureAggregation_0(ctx context.Context, marshale
// UnaryRPC :call UtilsServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUtilsHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUtilsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UtilsServer) error {
mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -287,21 +288,21 @@ func RegisterUtilsHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
// RegisterUtilsHandlerFromEndpoint is same as RegisterUtilsHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUtilsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
@@ -319,7 +320,7 @@ func RegisterUtilsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UtilsClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UtilsClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "UtilsClient" to call the correct interceptors.
+// "UtilsClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUtilsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UtilsClient) error {
mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/utils_grpc.pb.go b/www/grpc/gen/go/utils_grpc.pb.go
index 4502fd9d5..210089263 100644
--- a/www/grpc/gen/go/utils_grpc.pb.go
+++ b/www/grpc/gen/go/utils_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: utils.proto
@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
Utils_SignMessageWithPrivateKey_FullMethodName = "/pactus.Utils/SignMessageWithPrivateKey"
@@ -28,6 +28,9 @@ const (
// UtilsClient is the client API for Utils service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Utils service defines RPC methods for utility functions such as message
+// signing and verification.
type UtilsClient interface {
// SignMessageWithPrivateKey signs message with provided private key.
SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error)
@@ -48,8 +51,9 @@ func NewUtilsClient(cc grpc.ClientConnInterface) UtilsClient {
}
func (c *utilsClient) SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SignMessageWithPrivateKeyResponse)
- err := c.cc.Invoke(ctx, Utils_SignMessageWithPrivateKey_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Utils_SignMessageWithPrivateKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -57,8 +61,9 @@ func (c *utilsClient) SignMessageWithPrivateKey(ctx context.Context, in *SignMes
}
func (c *utilsClient) VerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(VerifyMessageResponse)
- err := c.cc.Invoke(ctx, Utils_VerifyMessage_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Utils_VerifyMessage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -66,8 +71,9 @@ func (c *utilsClient) VerifyMessage(ctx context.Context, in *VerifyMessageReques
}
func (c *utilsClient) BLSPublicKeyAggregation(ctx context.Context, in *BLSPublicKeyAggregationRequest, opts ...grpc.CallOption) (*BLSPublicKeyAggregationResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BLSPublicKeyAggregationResponse)
- err := c.cc.Invoke(ctx, Utils_BLSPublicKeyAggregation_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Utils_BLSPublicKeyAggregation_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -75,8 +81,9 @@ func (c *utilsClient) BLSPublicKeyAggregation(ctx context.Context, in *BLSPublic
}
func (c *utilsClient) BLSSignatureAggregation(ctx context.Context, in *BLSSignatureAggregationRequest, opts ...grpc.CallOption) (*BLSSignatureAggregationResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BLSSignatureAggregationResponse)
- err := c.cc.Invoke(ctx, Utils_BLSSignatureAggregation_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Utils_BLSSignatureAggregation_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -85,7 +92,10 @@ func (c *utilsClient) BLSSignatureAggregation(ctx context.Context, in *BLSSignat
// UtilsServer is the server API for Utils service.
// All implementations should embed UnimplementedUtilsServer
-// for forward compatibility
+// for forward compatibility.
+//
+// Utils service defines RPC methods for utility functions such as message
+// signing and verification.
type UtilsServer interface {
// SignMessageWithPrivateKey signs message with provided private key.
SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error)
@@ -97,9 +107,12 @@ type UtilsServer interface {
BLSSignatureAggregation(context.Context, *BLSSignatureAggregationRequest) (*BLSSignatureAggregationResponse, error)
}
-// UnimplementedUtilsServer should be embedded to have forward compatible implementations.
-type UnimplementedUtilsServer struct {
-}
+// UnimplementedUtilsServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedUtilsServer struct{}
func (UnimplementedUtilsServer) SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignMessageWithPrivateKey not implemented")
@@ -113,6 +126,7 @@ func (UnimplementedUtilsServer) BLSPublicKeyAggregation(context.Context, *BLSPub
func (UnimplementedUtilsServer) BLSSignatureAggregation(context.Context, *BLSSignatureAggregationRequest) (*BLSSignatureAggregationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BLSSignatureAggregation not implemented")
}
+func (UnimplementedUtilsServer) testEmbeddedByValue() {}
// UnsafeUtilsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UtilsServer will
@@ -122,6 +136,13 @@ type UnsafeUtilsServer interface {
}
func RegisterUtilsServer(s grpc.ServiceRegistrar, srv UtilsServer) {
+ // If the following call pancis, it indicates UnimplementedUtilsServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Utils_ServiceDesc, srv)
}
diff --git a/www/grpc/gen/go/wallet.pb.go b/www/grpc/gen/go/wallet.pb.go
index 5e869477b..0256b85d5 100644
--- a/www/grpc/gen/go/wallet.pb.go
+++ b/www/grpc/gen/go/wallet.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.33.0
+// protoc-gen-go v1.35.2
// protoc (unknown)
// source: wallet.proto
@@ -99,11 +99,9 @@ type AddressInfo struct {
func (x *AddressInfo) Reset() {
*x = AddressInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AddressInfo) String() string {
@@ -114,7 +112,7 @@ func (*AddressInfo) ProtoMessage() {}
func (x *AddressInfo) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -177,11 +175,9 @@ type HistoryInfo struct {
func (x *HistoryInfo) Reset() {
*x = HistoryInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *HistoryInfo) String() string {
@@ -192,7 +188,7 @@ func (*HistoryInfo) ProtoMessage() {}
func (x *HistoryInfo) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -256,11 +252,9 @@ type GetAddressHistoryRequest struct {
func (x *GetAddressHistoryRequest) Reset() {
*x = GetAddressHistoryRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetAddressHistoryRequest) String() string {
@@ -271,7 +265,7 @@ func (*GetAddressHistoryRequest) ProtoMessage() {}
func (x *GetAddressHistoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -312,11 +306,9 @@ type GetAddressHistoryResponse struct {
func (x *GetAddressHistoryResponse) Reset() {
*x = GetAddressHistoryResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetAddressHistoryResponse) String() string {
@@ -327,7 +319,7 @@ func (*GetAddressHistoryResponse) ProtoMessage() {}
func (x *GetAddressHistoryResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -367,11 +359,9 @@ type GetNewAddressRequest struct {
func (x *GetNewAddressRequest) Reset() {
*x = GetNewAddressRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetNewAddressRequest) String() string {
@@ -382,7 +372,7 @@ func (*GetNewAddressRequest) ProtoMessage() {}
func (x *GetNewAddressRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -439,11 +429,9 @@ type GetNewAddressResponse struct {
func (x *GetNewAddressResponse) Reset() {
*x = GetNewAddressResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetNewAddressResponse) String() string {
@@ -454,7 +442,7 @@ func (*GetNewAddressResponse) ProtoMessage() {}
func (x *GetNewAddressResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -499,11 +487,9 @@ type RestoreWalletRequest struct {
func (x *RestoreWalletRequest) Reset() {
*x = RestoreWalletRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RestoreWalletRequest) String() string {
@@ -514,7 +500,7 @@ func (*RestoreWalletRequest) ProtoMessage() {}
func (x *RestoreWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -562,11 +548,9 @@ type RestoreWalletResponse struct {
func (x *RestoreWalletResponse) Reset() {
*x = RestoreWalletResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RestoreWalletResponse) String() string {
@@ -577,7 +561,7 @@ func (*RestoreWalletResponse) ProtoMessage() {}
func (x *RestoreWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -613,11 +597,9 @@ type CreateWalletRequest struct {
func (x *CreateWalletRequest) Reset() {
*x = CreateWalletRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateWalletRequest) String() string {
@@ -628,7 +610,7 @@ func (*CreateWalletRequest) ProtoMessage() {}
func (x *CreateWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -669,11 +651,9 @@ type CreateWalletResponse struct {
func (x *CreateWalletResponse) Reset() {
*x = CreateWalletResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateWalletResponse) String() string {
@@ -684,7 +664,7 @@ func (*CreateWalletResponse) ProtoMessage() {}
func (x *CreateWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -718,11 +698,9 @@ type LoadWalletRequest struct {
func (x *LoadWalletRequest) Reset() {
*x = LoadWalletRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *LoadWalletRequest) String() string {
@@ -733,7 +711,7 @@ func (*LoadWalletRequest) ProtoMessage() {}
func (x *LoadWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -767,11 +745,9 @@ type LoadWalletResponse struct {
func (x *LoadWalletResponse) Reset() {
*x = LoadWalletResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *LoadWalletResponse) String() string {
@@ -782,7 +758,7 @@ func (*LoadWalletResponse) ProtoMessage() {}
func (x *LoadWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -816,11 +792,9 @@ type UnloadWalletRequest struct {
func (x *UnloadWalletRequest) Reset() {
*x = UnloadWalletRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UnloadWalletRequest) String() string {
@@ -831,7 +805,7 @@ func (*UnloadWalletRequest) ProtoMessage() {}
func (x *UnloadWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -865,11 +839,9 @@ type UnloadWalletResponse struct {
func (x *UnloadWalletResponse) Reset() {
*x = UnloadWalletResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UnloadWalletResponse) String() string {
@@ -880,7 +852,7 @@ func (*UnloadWalletResponse) ProtoMessage() {}
func (x *UnloadWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -915,11 +887,9 @@ type GetValidatorAddressRequest struct {
func (x *GetValidatorAddressRequest) Reset() {
*x = GetValidatorAddressRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorAddressRequest) String() string {
@@ -930,7 +900,7 @@ func (*GetValidatorAddressRequest) ProtoMessage() {}
func (x *GetValidatorAddressRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -965,11 +935,9 @@ type GetValidatorAddressResponse struct {
func (x *GetValidatorAddressResponse) Reset() {
*x = GetValidatorAddressResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetValidatorAddressResponse) String() string {
@@ -980,7 +948,7 @@ func (*GetValidatorAddressResponse) ProtoMessage() {}
func (x *GetValidatorAddressResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1018,11 +986,9 @@ type SignRawTransactionRequest struct {
func (x *SignRawTransactionRequest) Reset() {
*x = SignRawTransactionRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SignRawTransactionRequest) String() string {
@@ -1033,7 +999,7 @@ func (*SignRawTransactionRequest) ProtoMessage() {}
func (x *SignRawTransactionRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1083,11 +1049,9 @@ type SignRawTransactionResponse struct {
func (x *SignRawTransactionResponse) Reset() {
*x = SignRawTransactionResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SignRawTransactionResponse) String() string {
@@ -1098,7 +1062,7 @@ func (*SignRawTransactionResponse) ProtoMessage() {}
func (x *SignRawTransactionResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1139,11 +1103,9 @@ type GetTotalBalanceRequest struct {
func (x *GetTotalBalanceRequest) Reset() {
*x = GetTotalBalanceRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTotalBalanceRequest) String() string {
@@ -1154,7 +1116,7 @@ func (*GetTotalBalanceRequest) ProtoMessage() {}
func (x *GetTotalBalanceRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1190,11 +1152,9 @@ type GetTotalBalanceResponse struct {
func (x *GetTotalBalanceResponse) Reset() {
*x = GetTotalBalanceResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTotalBalanceResponse) String() string {
@@ -1205,7 +1165,7 @@ func (*GetTotalBalanceResponse) ProtoMessage() {}
func (x *GetTotalBalanceResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1252,11 +1212,9 @@ type SignMessageRequest struct {
func (x *SignMessageRequest) Reset() {
*x = SignMessageRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SignMessageRequest) String() string {
@@ -1267,7 +1225,7 @@ func (*SignMessageRequest) ProtoMessage() {}
func (x *SignMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1322,11 +1280,9 @@ type SignMessageResponse struct {
func (x *SignMessageResponse) Reset() {
*x = SignMessageResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SignMessageResponse) String() string {
@@ -1337,7 +1293,7 @@ func (*SignMessageResponse) ProtoMessage() {}
func (x *SignMessageResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1371,11 +1327,9 @@ type GetTotalStakeRequest struct {
func (x *GetTotalStakeRequest) Reset() {
*x = GetTotalStakeRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTotalStakeRequest) String() string {
@@ -1386,7 +1340,7 @@ func (*GetTotalStakeRequest) ProtoMessage() {}
func (x *GetTotalStakeRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1420,11 +1374,9 @@ type GetTotalStakeResponse struct {
func (x *GetTotalStakeResponse) Reset() {
*x = GetTotalStakeResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetTotalStakeResponse) String() string {
@@ -1435,7 +1387,7 @@ func (*GetTotalStakeResponse) ProtoMessage() {}
func (x *GetTotalStakeResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1477,11 +1429,9 @@ type GetAddressInfoRequest struct {
func (x *GetAddressInfoRequest) Reset() {
*x = GetAddressInfoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetAddressInfoRequest) String() string {
@@ -1492,7 +1442,7 @@ func (*GetAddressInfoRequest) ProtoMessage() {}
func (x *GetAddressInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1536,11 +1486,9 @@ type GetAddressInfoResponse struct {
func (x *GetAddressInfoResponse) Reset() {
*x = GetAddressInfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetAddressInfoResponse) String() string {
@@ -1551,7 +1499,7 @@ func (*GetAddressInfoResponse) ProtoMessage() {}
func (x *GetAddressInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1617,11 +1565,9 @@ type SetLabelRequest struct {
func (x *SetLabelRequest) Reset() {
*x = SetLabelRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SetLabelRequest) String() string {
@@ -1632,7 +1578,7 @@ func (*SetLabelRequest) ProtoMessage() {}
func (x *SetLabelRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1684,11 +1630,9 @@ type SetLabelResponse struct {
func (x *SetLabelResponse) Reset() {
*x = SetLabelResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SetLabelResponse) String() string {
@@ -1699,7 +1643,7 @@ func (*SetLabelResponse) ProtoMessage() {}
func (x *SetLabelResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1722,11 +1666,9 @@ type ListWalletRequest struct {
func (x *ListWalletRequest) Reset() {
*x = ListWalletRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[28]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ListWalletRequest) String() string {
@@ -1737,7 +1679,7 @@ func (*ListWalletRequest) ProtoMessage() {}
func (x *ListWalletRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[28]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1763,11 +1705,9 @@ type ListWalletResponse struct {
func (x *ListWalletResponse) Reset() {
*x = ListWalletResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[29]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ListWalletResponse) String() string {
@@ -1778,7 +1718,7 @@ func (*ListWalletResponse) ProtoMessage() {}
func (x *ListWalletResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[29]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1811,11 +1751,9 @@ type GetWalletInfoRequest struct {
func (x *GetWalletInfoRequest) Reset() {
*x = GetWalletInfoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[30]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetWalletInfoRequest) String() string {
@@ -1826,7 +1764,7 @@ func (*GetWalletInfoRequest) ProtoMessage() {}
func (x *GetWalletInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[30]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1864,11 +1802,9 @@ type GetWalletInfoResponse struct {
func (x *GetWalletInfoResponse) Reset() {
*x = GetWalletInfoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[31]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetWalletInfoResponse) String() string {
@@ -1879,7 +1815,7 @@ func (*GetWalletInfoResponse) ProtoMessage() {}
func (x *GetWalletInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[31]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1947,11 +1883,9 @@ type ListAddressRequest struct {
func (x *ListAddressRequest) Reset() {
*x = ListAddressRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[32]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ListAddressRequest) String() string {
@@ -1962,7 +1896,7 @@ func (*ListAddressRequest) ProtoMessage() {}
func (x *ListAddressRequest) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[32]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1995,11 +1929,9 @@ type ListAddressResponse struct {
func (x *ListAddressResponse) Reset() {
*x = ListAddressResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_wallet_proto_msgTypes[33]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_wallet_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ListAddressResponse) String() string {
@@ -2010,7 +1942,7 @@ func (*ListAddressResponse) ProtoMessage() {}
func (x *ListAddressResponse) ProtoReflect() protoreflect.Message {
mi := &file_wallet_proto_msgTypes[33]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2331,7 +2263,7 @@ func file_wallet_proto_rawDescGZIP() []byte {
var file_wallet_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 34)
-var file_wallet_proto_goTypes = []interface{}{
+var file_wallet_proto_goTypes = []any{
(AddressType)(0), // 0: pactus.AddressType
(*AddressInfo)(nil), // 1: pactus.AddressInfo
(*HistoryInfo)(nil), // 2: pactus.HistoryInfo
@@ -2418,416 +2350,6 @@ func file_wallet_proto_init() {
return
}
file_transaction_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_wallet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddressInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*HistoryInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAddressHistoryRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAddressHistoryResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNewAddressRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNewAddressResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RestoreWalletRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RestoreWalletResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateWalletRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateWalletResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*LoadWalletRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*LoadWalletResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UnloadWalletRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UnloadWalletResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorAddressRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetValidatorAddressResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SignRawTransactionRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SignRawTransactionResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTotalBalanceRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTotalBalanceResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SignMessageRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SignMessageResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTotalStakeRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTotalStakeResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAddressInfoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAddressInfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetLabelRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetLabelResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListWalletRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListWalletResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetWalletInfoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetWalletInfoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListAddressRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_wallet_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListAddressResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
diff --git a/www/grpc/gen/go/wallet.pb.gw.go b/www/grpc/gen/go/wallet.pb.gw.go
index 75c2adf7e..6fb0c111b 100644
--- a/www/grpc/gen/go/wallet.pb.gw.go
+++ b/www/grpc/gen/go/wallet.pb.gw.go
@@ -593,6 +593,7 @@ func local_request_Wallet_ListAddress_0(ctx context.Context, marshaler runtime.M
// UnaryRPC :call WalletServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error {
mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -1001,21 +1002,21 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
// RegisterWalletHandlerFromEndpoint is same as RegisterWalletHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWalletHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ conn, err := grpc.NewClient(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
@@ -1033,7 +1034,7 @@ func RegisterWalletHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "WalletClient" to call the correct interceptors.
+// "WalletClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletClient) error {
mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/wallet_grpc.pb.go b/www/grpc/gen/go/wallet_grpc.pb.go
index f49a75906..d20da693a 100644
--- a/www/grpc/gen/go/wallet_grpc.pb.go
+++ b/www/grpc/gen/go/wallet_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: wallet.proto
@@ -17,8 +17,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
Wallet_CreateWallet_FullMethodName = "/pactus.Wallet/CreateWallet"
@@ -42,6 +42,8 @@ const (
// WalletClient is the client API for Wallet service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Define the Wallet service with various RPC methods for wallet management.
type WalletClient interface {
// CreateWallet creates a new wallet with the specified parameters.
CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error)
@@ -87,8 +89,9 @@ func NewWalletClient(cc grpc.ClientConnInterface) WalletClient {
}
func (c *walletClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateWalletResponse)
- err := c.cc.Invoke(ctx, Wallet_CreateWallet_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_CreateWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -96,8 +99,9 @@ func (c *walletClient) CreateWallet(ctx context.Context, in *CreateWalletRequest
}
func (c *walletClient) RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RestoreWalletResponse)
- err := c.cc.Invoke(ctx, Wallet_RestoreWallet_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_RestoreWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -105,8 +109,9 @@ func (c *walletClient) RestoreWallet(ctx context.Context, in *RestoreWalletReque
}
func (c *walletClient) LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LoadWalletResponse)
- err := c.cc.Invoke(ctx, Wallet_LoadWallet_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_LoadWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -114,8 +119,9 @@ func (c *walletClient) LoadWallet(ctx context.Context, in *LoadWalletRequest, op
}
func (c *walletClient) UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UnloadWalletResponse)
- err := c.cc.Invoke(ctx, Wallet_UnloadWallet_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_UnloadWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -123,8 +129,9 @@ func (c *walletClient) UnloadWallet(ctx context.Context, in *UnloadWalletRequest
}
func (c *walletClient) GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetTotalBalanceResponse)
- err := c.cc.Invoke(ctx, Wallet_GetTotalBalance_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetTotalBalance_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -132,8 +139,9 @@ func (c *walletClient) GetTotalBalance(ctx context.Context, in *GetTotalBalanceR
}
func (c *walletClient) SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SignRawTransactionResponse)
- err := c.cc.Invoke(ctx, Wallet_SignRawTransaction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_SignRawTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -141,8 +149,9 @@ func (c *walletClient) SignRawTransaction(ctx context.Context, in *SignRawTransa
}
func (c *walletClient) GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValidatorAddressResponse)
- err := c.cc.Invoke(ctx, Wallet_GetValidatorAddress_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetValidatorAddress_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -150,8 +159,9 @@ func (c *walletClient) GetValidatorAddress(ctx context.Context, in *GetValidator
}
func (c *walletClient) GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetNewAddressResponse)
- err := c.cc.Invoke(ctx, Wallet_GetNewAddress_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetNewAddress_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -159,8 +169,9 @@ func (c *walletClient) GetNewAddress(ctx context.Context, in *GetNewAddressReque
}
func (c *walletClient) GetAddressHistory(ctx context.Context, in *GetAddressHistoryRequest, opts ...grpc.CallOption) (*GetAddressHistoryResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAddressHistoryResponse)
- err := c.cc.Invoke(ctx, Wallet_GetAddressHistory_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetAddressHistory_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -168,8 +179,9 @@ func (c *walletClient) GetAddressHistory(ctx context.Context, in *GetAddressHist
}
func (c *walletClient) SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SignMessageResponse)
- err := c.cc.Invoke(ctx, Wallet_SignMessage_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_SignMessage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -177,8 +189,9 @@ func (c *walletClient) SignMessage(ctx context.Context, in *SignMessageRequest,
}
func (c *walletClient) GetTotalStake(ctx context.Context, in *GetTotalStakeRequest, opts ...grpc.CallOption) (*GetTotalStakeResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetTotalStakeResponse)
- err := c.cc.Invoke(ctx, Wallet_GetTotalStake_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetTotalStake_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -186,8 +199,9 @@ func (c *walletClient) GetTotalStake(ctx context.Context, in *GetTotalStakeReque
}
func (c *walletClient) GetAddressInfo(ctx context.Context, in *GetAddressInfoRequest, opts ...grpc.CallOption) (*GetAddressInfoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAddressInfoResponse)
- err := c.cc.Invoke(ctx, Wallet_GetAddressInfo_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetAddressInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -195,8 +209,9 @@ func (c *walletClient) GetAddressInfo(ctx context.Context, in *GetAddressInfoReq
}
func (c *walletClient) SetAddressLabel(ctx context.Context, in *SetLabelRequest, opts ...grpc.CallOption) (*SetLabelResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SetLabelResponse)
- err := c.cc.Invoke(ctx, Wallet_SetAddressLabel_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_SetAddressLabel_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -204,8 +219,9 @@ func (c *walletClient) SetAddressLabel(ctx context.Context, in *SetLabelRequest,
}
func (c *walletClient) ListWallet(ctx context.Context, in *ListWalletRequest, opts ...grpc.CallOption) (*ListWalletResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListWalletResponse)
- err := c.cc.Invoke(ctx, Wallet_ListWallet_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_ListWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -213,8 +229,9 @@ func (c *walletClient) ListWallet(ctx context.Context, in *ListWalletRequest, op
}
func (c *walletClient) GetWalletInfo(ctx context.Context, in *GetWalletInfoRequest, opts ...grpc.CallOption) (*GetWalletInfoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetWalletInfoResponse)
- err := c.cc.Invoke(ctx, Wallet_GetWalletInfo_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_GetWalletInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -222,8 +239,9 @@ func (c *walletClient) GetWalletInfo(ctx context.Context, in *GetWalletInfoReque
}
func (c *walletClient) ListAddress(ctx context.Context, in *ListAddressRequest, opts ...grpc.CallOption) (*ListAddressResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListAddressResponse)
- err := c.cc.Invoke(ctx, Wallet_ListAddress_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Wallet_ListAddress_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -232,7 +250,9 @@ func (c *walletClient) ListAddress(ctx context.Context, in *ListAddressRequest,
// WalletServer is the server API for Wallet service.
// All implementations should embed UnimplementedWalletServer
-// for forward compatibility
+// for forward compatibility.
+//
+// Define the Wallet service with various RPC methods for wallet management.
type WalletServer interface {
// CreateWallet creates a new wallet with the specified parameters.
CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error)
@@ -269,9 +289,12 @@ type WalletServer interface {
ListAddress(context.Context, *ListAddressRequest) (*ListAddressResponse, error)
}
-// UnimplementedWalletServer should be embedded to have forward compatible implementations.
-type UnimplementedWalletServer struct {
-}
+// UnimplementedWalletServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedWalletServer struct{}
func (UnimplementedWalletServer) CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented")
@@ -321,6 +344,7 @@ func (UnimplementedWalletServer) GetWalletInfo(context.Context, *GetWalletInfoRe
func (UnimplementedWalletServer) ListAddress(context.Context, *ListAddressRequest) (*ListAddressResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAddress not implemented")
}
+func (UnimplementedWalletServer) testEmbeddedByValue() {}
// UnsafeWalletServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WalletServer will
@@ -330,6 +354,13 @@ type UnsafeWalletServer interface {
}
func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer) {
+ // If the following call pancis, it indicates UnimplementedWalletServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Wallet_ServiceDesc, srv)
}
| |