diff --git a/release/go/spacemesh/v2alpha1/tx.pb.go b/release/go/spacemesh/v2alpha1/tx.pb.go index e3876315..e807e050 100644 --- a/release/go/spacemesh/v2alpha1/tx.pb.go +++ b/release/go/spacemesh/v2alpha1/tx.pb.go @@ -7,7 +7,7 @@ package spacemeshv2alpha1 import ( - _ "google.golang.org/genproto/googleapis/rpc/status" + status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,6 +21,70 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// TransactionState is the "journey" of a tx from mempool to block inclusion to +// mesh to STF processing. To know whether or not the tx actually succeeded, +// and its side effects, check tx_state. +type TransactionState int32 + +const ( + TransactionState_TRANSACTION_STATE_UNSPECIFIED TransactionState = 0 // default state + TransactionState_TRANSACTION_STATE_REJECTED TransactionState = 1 // rejected from mempool due to, e.g., invalid syntax + TransactionState_TRANSACTION_STATE_INSUFFICIENT_FUNDS TransactionState = 2 // rejected from mempool by funds check + TransactionState_TRANSACTION_STATE_CONFLICTING TransactionState = 3 // rejected from mempool due to conflicting counter + TransactionState_TRANSACTION_STATE_MEMPOOL TransactionState = 4 // in mempool but not on the mesh yet + TransactionState_TRANSACTION_STATE_MESH TransactionState = 5 // submitted to the mesh + TransactionState_TRANSACTION_STATE_PROCESSED TransactionState = 6 // processed by STF; check Receipt for success or failure +) + +// Enum value maps for TransactionState. +var ( + TransactionState_name = map[int32]string{ + 0: "TRANSACTION_STATE_UNSPECIFIED", + 1: "TRANSACTION_STATE_REJECTED", + 2: "TRANSACTION_STATE_INSUFFICIENT_FUNDS", + 3: "TRANSACTION_STATE_CONFLICTING", + 4: "TRANSACTION_STATE_MEMPOOL", + 5: "TRANSACTION_STATE_MESH", + 6: "TRANSACTION_STATE_PROCESSED", + } + TransactionState_value = map[string]int32{ + "TRANSACTION_STATE_UNSPECIFIED": 0, + "TRANSACTION_STATE_REJECTED": 1, + "TRANSACTION_STATE_INSUFFICIENT_FUNDS": 2, + "TRANSACTION_STATE_CONFLICTING": 3, + "TRANSACTION_STATE_MEMPOOL": 4, + "TRANSACTION_STATE_MESH": 5, + "TRANSACTION_STATE_PROCESSED": 6, + } +) + +func (x TransactionState) Enum() *TransactionState { + p := new(TransactionState) + *p = x + return p +} + +func (x TransactionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionState) Descriptor() protoreflect.EnumDescriptor { + return file_spacemesh_v2alpha1_tx_proto_enumTypes[0].Descriptor() +} + +func (TransactionState) Type() protoreflect.EnumType { + return &file_spacemesh_v2alpha1_tx_proto_enumTypes[0] +} + +func (x TransactionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionState.Descriptor instead. +func (TransactionState) EnumDescriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{0} +} + type TransactionV1_TransactionType int32 const ( @@ -66,11 +130,11 @@ func (x TransactionV1_TransactionType) String() string { } func (TransactionV1_TransactionType) Descriptor() protoreflect.EnumDescriptor { - return file_spacemesh_v2alpha1_tx_proto_enumTypes[0].Descriptor() + return file_spacemesh_v2alpha1_tx_proto_enumTypes[1].Descriptor() } func (TransactionV1_TransactionType) Type() protoreflect.EnumType { - return &file_spacemesh_v2alpha1_tx_proto_enumTypes[0] + return &file_spacemesh_v2alpha1_tx_proto_enumTypes[1] } func (x TransactionV1_TransactionType) Number() protoreflect.EnumNumber { @@ -82,6 +146,58 @@ func (TransactionV1_TransactionType) EnumDescriptor() ([]byte, []int) { return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{5, 0} } +type TransactionResult_Status int32 + +const ( + TransactionResult_TRANSACTION_STATUS_UNSPECIFIED TransactionResult_Status = 0 + TransactionResult_TRANSACTION_STATUS_SUCCESS TransactionResult_Status = 1 + TransactionResult_TRANSACTION_STATUS_FAILURE TransactionResult_Status = 2 + TransactionResult_TRANSACTION_STATUS_INVALID TransactionResult_Status = 3 +) + +// Enum value maps for TransactionResult_Status. +var ( + TransactionResult_Status_name = map[int32]string{ + 0: "TRANSACTION_STATUS_UNSPECIFIED", + 1: "TRANSACTION_STATUS_SUCCESS", + 2: "TRANSACTION_STATUS_FAILURE", + 3: "TRANSACTION_STATUS_INVALID", + } + TransactionResult_Status_value = map[string]int32{ + "TRANSACTION_STATUS_UNSPECIFIED": 0, + "TRANSACTION_STATUS_SUCCESS": 1, + "TRANSACTION_STATUS_FAILURE": 2, + "TRANSACTION_STATUS_INVALID": 3, + } +) + +func (x TransactionResult_Status) Enum() *TransactionResult_Status { + p := new(TransactionResult_Status) + *p = x + return p +} + +func (x TransactionResult_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionResult_Status) Descriptor() protoreflect.EnumDescriptor { + return file_spacemesh_v2alpha1_tx_proto_enumTypes[2].Descriptor() +} + +func (TransactionResult_Status) Type() protoreflect.EnumType { + return &file_spacemesh_v2alpha1_tx_proto_enumTypes[2] +} + +func (x TransactionResult_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionResult_Status.Descriptor instead. +func (TransactionResult_Status) EnumDescriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{7, 0} +} + type Transaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -577,183 +693,1078 @@ func (x *Nonce) GetCounter() uint64 { return 0 } -var File_spacemesh_v2alpha1_tx_proto protoreflect.FileDescriptor +type TransactionResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -var file_spacemesh_v2alpha1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x0b, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x02, 0x76, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x0b, - 0x0a, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x22, 0x48, 0x0a, 0x0c, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x73, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x22, 0x86, 0x02, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x04, - 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, - 0x73, 0x65, 0x6e, 0x64, 0x12, 0x56, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x73, - 0x69, 0x67, 0x5f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, 0x53, 0x0a, 0x0f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, - 0x48, 0x00, 0x52, 0x0d, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, - 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xb6, 0x05, - 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, - 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x47, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, - 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, - 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, - 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x43, - 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, - 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x01, 0x12, - 0x25, 0x0a, 0x21, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, - 0x50, 0x41, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, - 0x45, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x53, 0x50, 0x41, 0x57, 0x4e, 0x10, - 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, - 0x53, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, - 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x50, 0x41, 0x57, 0x4e, 0x10, 0x05, 0x12, 0x28, 0x0a, 0x24, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x53, - 0x50, 0x41, 0x57, 0x4e, 0x10, 0x06, 0x22, 0x21, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0xd6, 0x01, 0x0a, 0x16, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, - 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, - 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x73, 0x68, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, - 0x58, 0xaa, 0x02, 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x32, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x53, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, - 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + Status TransactionResult_Status `protobuf:"varint,1,opt,name=status,proto3,enum=spacemesh.v2alpha1.TransactionResult_Status" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + GasConsumed uint64 `protobuf:"varint,3,opt,name=gas_consumed,json=gasConsumed,proto3" json:"gas_consumed,omitempty"` // in units of gas + Fee uint64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` // in smidge + Block []byte `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"` + Layer uint32 `protobuf:"varint,6,opt,name=layer,proto3" json:"layer,omitempty"` + TouchedAddresses []string `protobuf:"bytes,7,rep,name=touched_addresses,json=touchedAddresses,proto3" json:"touched_addresses,omitempty"` } -var ( - file_spacemesh_v2alpha1_tx_proto_rawDescOnce sync.Once - file_spacemesh_v2alpha1_tx_proto_rawDescData = file_spacemesh_v2alpha1_tx_proto_rawDesc -) +func (x *TransactionResult) Reset() { + *x = TransactionResult{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func file_spacemesh_v2alpha1_tx_proto_rawDescGZIP() []byte { - file_spacemesh_v2alpha1_tx_proto_rawDescOnce.Do(func() { - file_spacemesh_v2alpha1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_spacemesh_v2alpha1_tx_proto_rawDescData) - }) - return file_spacemesh_v2alpha1_tx_proto_rawDescData +func (x *TransactionResult) String() string { + return protoimpl.X.MessageStringOf(x) } -var file_spacemesh_v2alpha1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_spacemesh_v2alpha1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_spacemesh_v2alpha1_tx_proto_goTypes = []interface{}{ - (TransactionV1_TransactionType)(0), // 0: spacemesh.v2alpha1.TransactionV1.TransactionType - (*Transaction)(nil), // 1: spacemesh.v2alpha1.Transaction - (*ContentsSend)(nil), // 2: spacemesh.v2alpha1.ContentsSend - (*ContentsSingleSigSpawn)(nil), // 3: spacemesh.v2alpha1.ContentsSingleSigSpawn - (*ContentsMultiSigSpawn)(nil), // 4: spacemesh.v2alpha1.ContentsMultiSigSpawn - (*TransactionContents)(nil), // 5: spacemesh.v2alpha1.TransactionContents - (*TransactionV1)(nil), // 6: spacemesh.v2alpha1.TransactionV1 - (*Nonce)(nil), // 7: spacemesh.v2alpha1.Nonce +func (*TransactionResult) ProtoMessage() {} + +func (x *TransactionResult) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var file_spacemesh_v2alpha1_tx_proto_depIdxs = []int32{ - 6, // 0: spacemesh.v2alpha1.Transaction.v1:type_name -> spacemesh.v2alpha1.TransactionV1 - 2, // 1: spacemesh.v2alpha1.TransactionContents.send:type_name -> spacemesh.v2alpha1.ContentsSend - 3, // 2: spacemesh.v2alpha1.TransactionContents.single_sig_spawn:type_name -> spacemesh.v2alpha1.ContentsSingleSigSpawn - 4, // 3: spacemesh.v2alpha1.TransactionContents.multi_sig_spawn:type_name -> spacemesh.v2alpha1.ContentsMultiSigSpawn - 7, // 4: spacemesh.v2alpha1.TransactionV1.nonce:type_name -> spacemesh.v2alpha1.Nonce - 0, // 5: spacemesh.v2alpha1.TransactionV1.type:type_name -> spacemesh.v2alpha1.TransactionV1.TransactionType - 5, // 6: spacemesh.v2alpha1.TransactionV1.contents:type_name -> spacemesh.v2alpha1.TransactionContents - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + +// Deprecated: Use TransactionResult.ProtoReflect.Descriptor instead. +func (*TransactionResult) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{7} } -func init() { file_spacemesh_v2alpha1_tx_proto_init() } -func file_spacemesh_v2alpha1_tx_proto_init() { - if File_spacemesh_v2alpha1_tx_proto != nil { - return +func (x *TransactionResult) GetStatus() TransactionResult_Status { + if x != nil { + return x.Status } - if !protoimpl.UnsafeEnabled { - file_spacemesh_v2alpha1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_spacemesh_v2alpha1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContentsSend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return TransactionResult_TRANSACTION_STATUS_UNSPECIFIED +} + +func (x *TransactionResult) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *TransactionResult) GetGasConsumed() uint64 { + if x != nil { + return x.GasConsumed + } + return 0 +} + +func (x *TransactionResult) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionResult) GetBlock() []byte { + if x != nil { + return x.Block + } + return nil +} + +func (x *TransactionResult) GetLayer() uint32 { + if x != nil { + return x.Layer + } + return 0 +} + +func (x *TransactionResult) GetTouchedAddresses() []string { + if x != nil { + return x.TouchedAddresses + } + return nil +} + +type TransactionStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartLayer uint32 `protobuf:"varint,1,opt,name=start_layer,json=startLayer,proto3" json:"start_layer,omitempty"` // Required: starting layer for transaction streaming. + EndLayer *uint32 `protobuf:"varint,2,opt,name=end_layer,json=endLayer,proto3,oneof" json:"end_layer,omitempty"` // Ending layer for transaction streaming. + Txid [][]byte `protobuf:"bytes,3,rep,name=txid,proto3" json:"txid,omitempty"` // Filter: specific transaction IDs. + Principal *string `protobuf:"bytes,4,opt,name=principal,proto3,oneof" json:"principal,omitempty"` // Filter by principal address + Watch bool `protobuf:"varint,5,opt,name=watch,proto3" json:"watch,omitempty"` // Continue watching for new transactions. +} + +func (x *TransactionStreamRequest) Reset() { + *x = TransactionStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionStreamRequest) ProtoMessage() {} + +func (x *TransactionStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_spacemesh_v2alpha1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContentsSingleSigSpawn); i { - case 0: - return &v.state + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionStreamRequest.ProtoReflect.Descriptor instead. +func (*TransactionStreamRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *TransactionStreamRequest) GetStartLayer() uint32 { + if x != nil { + return x.StartLayer + } + return 0 +} + +func (x *TransactionStreamRequest) GetEndLayer() uint32 { + if x != nil && x.EndLayer != nil { + return *x.EndLayer + } + return 0 +} + +func (x *TransactionStreamRequest) GetTxid() [][]byte { + if x != nil { + return x.Txid + } + return nil +} + +func (x *TransactionStreamRequest) GetPrincipal() string { + if x != nil && x.Principal != nil { + return *x.Principal + } + return "" +} + +func (x *TransactionStreamRequest) GetWatch() bool { + if x != nil { + return x.Watch + } + return false +} + +type TransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartLayer *uint32 `protobuf:"varint,1,opt,name=start_layer,json=startLayer,proto3,oneof" json:"start_layer,omitempty"` // Starting layer for transactions. + EndLayer *uint32 `protobuf:"varint,2,opt,name=end_layer,json=endLayer,proto3,oneof" json:"end_layer,omitempty"` // Ending layer for transactions. + Txid [][]byte `protobuf:"bytes,3,rep,name=txid,proto3" json:"txid,omitempty"` // Filter: specific transaction IDs to filter. + Principal *string `protobuf:"bytes,4,opt,name=principal,proto3,oneof" json:"principal,omitempty"` // Filter by principal address + Offset uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` // Adjusts the starting point for data retrieval. + Limit uint64 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` // Specifies maximum number of items to fetch. + IncludeState bool `protobuf:"varint,7,opt,name=include_state,json=includeState,proto3" json:"include_state,omitempty"` // Whether to include transaction state in response. + IncludeResult bool `protobuf:"varint,8,opt,name=include_result,json=includeResult,proto3" json:"include_result,omitempty"` // Whether to include result of transactions in response. +} + +func (x *TransactionRequest) Reset() { + *x = TransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionRequest) ProtoMessage() {} + +func (x *TransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionRequest.ProtoReflect.Descriptor instead. +func (*TransactionRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *TransactionRequest) GetStartLayer() uint32 { + if x != nil && x.StartLayer != nil { + return *x.StartLayer + } + return 0 +} + +func (x *TransactionRequest) GetEndLayer() uint32 { + if x != nil && x.EndLayer != nil { + return *x.EndLayer + } + return 0 +} + +func (x *TransactionRequest) GetTxid() [][]byte { + if x != nil { + return x.Txid + } + return nil +} + +func (x *TransactionRequest) GetPrincipal() string { + if x != nil && x.Principal != nil { + return *x.Principal + } + return "" +} + +func (x *TransactionRequest) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *TransactionRequest) GetLimit() uint64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *TransactionRequest) GetIncludeState() bool { + if x != nil { + return x.IncludeState + } + return false +} + +func (x *TransactionRequest) GetIncludeResult() bool { + if x != nil { + return x.IncludeResult + } + return false +} + +type TransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tx *Transaction `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + TxResult *TransactionResult `protobuf:"bytes,2,opt,name=tx_result,json=txResult,proto3" json:"tx_result,omitempty"` + TxState TransactionState `protobuf:"varint,3,opt,name=tx_state,json=txState,proto3,enum=spacemesh.v2alpha1.TransactionState" json:"tx_state,omitempty"` +} + +func (x *TransactionResponse) Reset() { + *x = TransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionResponse) ProtoMessage() {} + +func (x *TransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead. +func (*TransactionResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *TransactionResponse) GetTx() *Transaction { + if x != nil { + return x.Tx + } + return nil +} + +func (x *TransactionResponse) GetTxResult() *TransactionResult { + if x != nil { + return x.TxResult + } + return nil +} + +func (x *TransactionResponse) GetTxState() TransactionState { + if x != nil { + return x.TxState + } + return TransactionState_TRANSACTION_STATE_UNSPECIFIED +} + +type TransactionList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Transactions []*TransactionResponse `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` +} + +func (x *TransactionList) Reset() { + *x = TransactionList{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionList) ProtoMessage() {} + +func (x *TransactionList) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionList.ProtoReflect.Descriptor instead. +func (*TransactionList) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *TransactionList) GetTransactions() []*TransactionResponse { + if x != nil { + return x.Transactions + } + return nil +} + +type ParseTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // signed binary transaction + Verify bool `protobuf:"varint,2,opt,name=verify,proto3" json:"verify,omitempty"` // if true signature verification will be executed +} + +func (x *ParseTransactionRequest) Reset() { + *x = ParseTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParseTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParseTransactionRequest) ProtoMessage() {} + +func (x *ParseTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParseTransactionRequest.ProtoReflect.Descriptor instead. +func (*ParseTransactionRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *ParseTransactionRequest) GetTransaction() []byte { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *ParseTransactionRequest) GetVerify() bool { + if x != nil { + return x.Verify + } + return false +} + +type ParseTransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Tx *Transaction `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"` +} + +func (x *ParseTransactionResponse) Reset() { + *x = ParseTransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParseTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParseTransactionResponse) ProtoMessage() {} + +func (x *ParseTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParseTransactionResponse.ProtoReflect.Descriptor instead. +func (*ParseTransactionResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{13} +} + +func (x *ParseTransactionResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *ParseTransactionResponse) GetTx() *Transaction { + if x != nil { + return x.Tx + } + return nil +} + +type SubmitTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // signed binary transaction +} + +func (x *SubmitTransactionRequest) Reset() { + *x = SubmitTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitTransactionRequest) ProtoMessage() {} + +func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead. +func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *SubmitTransactionRequest) GetTransaction() []byte { + if x != nil { + return x.Transaction + } + return nil +} + +type SubmitTransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + TxId []byte `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` +} + +func (x *SubmitTransactionResponse) Reset() { + *x = SubmitTransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubmitTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitTransactionResponse) ProtoMessage() {} + +func (x *SubmitTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubmitTransactionResponse.ProtoReflect.Descriptor instead. +func (*SubmitTransactionResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{15} +} + +func (x *SubmitTransactionResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *SubmitTransactionResponse) GetTxId() []byte { + if x != nil { + return x.TxId + } + return nil +} + +type EstimateGasRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Transaction []byte `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // signed binary transaction +} + +func (x *EstimateGasRequest) Reset() { + *x = EstimateGasRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EstimateGasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EstimateGasRequest) ProtoMessage() {} + +func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EstimateGasRequest.ProtoReflect.Descriptor instead. +func (*EstimateGasRequest) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{16} +} + +func (x *EstimateGasRequest) GetTransaction() []byte { + if x != nil { + return x.Transaction + } + return nil +} + +type EstimateGasResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + RecommendedMaxGas uint64 `protobuf:"varint,2,opt,name=recommended_max_gas,json=recommendedMaxGas,proto3" json:"recommended_max_gas,omitempty"` +} + +func (x *EstimateGasResponse) Reset() { + *x = EstimateGasResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EstimateGasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EstimateGasResponse) ProtoMessage() {} + +func (x *EstimateGasResponse) ProtoReflect() protoreflect.Message { + mi := &file_spacemesh_v2alpha1_tx_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EstimateGasResponse.ProtoReflect.Descriptor instead. +func (*EstimateGasResponse) Descriptor() ([]byte, []int) { + return file_spacemesh_v2alpha1_tx_proto_rawDescGZIP(), []int{17} +} + +func (x *EstimateGasResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *EstimateGasResponse) GetRecommendedMaxGas() uint64 { + if x != nil { + return x.RecommendedMaxGas + } + return 0 +} + +var File_spacemesh_v2alpha1_tx_proto protoreflect.FileDescriptor + +var file_spacemesh_v2alpha1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x0b, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x02, 0x76, 0x31, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x0b, + 0x0a, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x22, 0x48, 0x0a, 0x0c, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x22, 0x86, 0x02, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x04, + 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, + 0x73, 0x65, 0x6e, 0x64, 0x12, 0x56, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x73, + 0x69, 0x67, 0x5f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, 0x12, 0x53, 0x0a, 0x0f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, 0x6e, + 0x48, 0x00, 0x52, 0x0d, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x69, 0x67, 0x53, 0x70, 0x61, 0x77, + 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xb6, 0x05, + 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x47, 0x61, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, + 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, + 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, + 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x43, + 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, + 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x01, 0x12, + 0x25, 0x0a, 0x21, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, + 0x50, 0x41, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, + 0x45, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x53, 0x50, 0x41, 0x57, 0x4e, 0x10, + 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, + 0x53, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, + 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x50, 0x41, 0x57, 0x4e, 0x10, 0x05, 0x12, 0x28, 0x0a, 0x24, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x53, 0x45, 0x4c, 0x46, 0x53, + 0x50, 0x41, 0x57, 0x4e, 0x10, 0x06, 0x22, 0x21, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x22, 0x90, 0x03, 0x0a, 0x11, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x44, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x03, 0x66, 0x65, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x74, 0x6f, 0x75, + 0x63, 0x68, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x8c, 0x01, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x03, 0x22, 0xc6, 0x01, 0x0a, + 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, + 0x64, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x08, 0x65, 0x6e, 0x64, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x78, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, + 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x77, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, + 0x64, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0xb9, 0x02, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0b, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x4c, 0x61, 0x79, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x70, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x22, 0xcb, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x02, 0x74, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x74, 0x78, 0x12, 0x42, 0x0a, 0x09, 0x74, 0x78, + 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x74, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3f, + 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x24, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x07, 0x74, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x5e, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x53, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x22, 0x77, 0x0a, 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x02, + 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x74, 0x78, 0x22, 0x3c, 0x0a, + 0x18, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x19, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x12, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x71, 0x0a, 0x13, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x11, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x4d, 0x61, + 0x78, 0x47, 0x61, 0x73, 0x2a, 0xfe, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x46, + 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, + 0x4c, 0x49, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4d, + 0x45, 0x4d, 0x50, 0x4f, 0x4f, 0x4c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x45, + 0x53, 0x48, 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, + 0x53, 0x45, 0x44, 0x10, 0x06, 0x32, 0x7d, 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x2c, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x32, 0xaa, 0x03, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x26, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x6d, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x70, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5e, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x12, 0x26, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x12, 0x53, 0x70, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, + 0x12, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, + 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, + 0x3a, 0x3a, 0x56, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_spacemesh_v2alpha1_tx_proto_rawDescOnce sync.Once + file_spacemesh_v2alpha1_tx_proto_rawDescData = file_spacemesh_v2alpha1_tx_proto_rawDesc +) + +func file_spacemesh_v2alpha1_tx_proto_rawDescGZIP() []byte { + file_spacemesh_v2alpha1_tx_proto_rawDescOnce.Do(func() { + file_spacemesh_v2alpha1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_spacemesh_v2alpha1_tx_proto_rawDescData) + }) + return file_spacemesh_v2alpha1_tx_proto_rawDescData +} + +var file_spacemesh_v2alpha1_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_spacemesh_v2alpha1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_spacemesh_v2alpha1_tx_proto_goTypes = []interface{}{ + (TransactionState)(0), // 0: spacemesh.v2alpha1.TransactionState + (TransactionV1_TransactionType)(0), // 1: spacemesh.v2alpha1.TransactionV1.TransactionType + (TransactionResult_Status)(0), // 2: spacemesh.v2alpha1.TransactionResult.Status + (*Transaction)(nil), // 3: spacemesh.v2alpha1.Transaction + (*ContentsSend)(nil), // 4: spacemesh.v2alpha1.ContentsSend + (*ContentsSingleSigSpawn)(nil), // 5: spacemesh.v2alpha1.ContentsSingleSigSpawn + (*ContentsMultiSigSpawn)(nil), // 6: spacemesh.v2alpha1.ContentsMultiSigSpawn + (*TransactionContents)(nil), // 7: spacemesh.v2alpha1.TransactionContents + (*TransactionV1)(nil), // 8: spacemesh.v2alpha1.TransactionV1 + (*Nonce)(nil), // 9: spacemesh.v2alpha1.Nonce + (*TransactionResult)(nil), // 10: spacemesh.v2alpha1.TransactionResult + (*TransactionStreamRequest)(nil), // 11: spacemesh.v2alpha1.TransactionStreamRequest + (*TransactionRequest)(nil), // 12: spacemesh.v2alpha1.TransactionRequest + (*TransactionResponse)(nil), // 13: spacemesh.v2alpha1.TransactionResponse + (*TransactionList)(nil), // 14: spacemesh.v2alpha1.TransactionList + (*ParseTransactionRequest)(nil), // 15: spacemesh.v2alpha1.ParseTransactionRequest + (*ParseTransactionResponse)(nil), // 16: spacemesh.v2alpha1.ParseTransactionResponse + (*SubmitTransactionRequest)(nil), // 17: spacemesh.v2alpha1.SubmitTransactionRequest + (*SubmitTransactionResponse)(nil), // 18: spacemesh.v2alpha1.SubmitTransactionResponse + (*EstimateGasRequest)(nil), // 19: spacemesh.v2alpha1.EstimateGasRequest + (*EstimateGasResponse)(nil), // 20: spacemesh.v2alpha1.EstimateGasResponse + (*status.Status)(nil), // 21: google.rpc.Status +} +var file_spacemesh_v2alpha1_tx_proto_depIdxs = []int32{ + 8, // 0: spacemesh.v2alpha1.Transaction.v1:type_name -> spacemesh.v2alpha1.TransactionV1 + 4, // 1: spacemesh.v2alpha1.TransactionContents.send:type_name -> spacemesh.v2alpha1.ContentsSend + 5, // 2: spacemesh.v2alpha1.TransactionContents.single_sig_spawn:type_name -> spacemesh.v2alpha1.ContentsSingleSigSpawn + 6, // 3: spacemesh.v2alpha1.TransactionContents.multi_sig_spawn:type_name -> spacemesh.v2alpha1.ContentsMultiSigSpawn + 9, // 4: spacemesh.v2alpha1.TransactionV1.nonce:type_name -> spacemesh.v2alpha1.Nonce + 1, // 5: spacemesh.v2alpha1.TransactionV1.type:type_name -> spacemesh.v2alpha1.TransactionV1.TransactionType + 7, // 6: spacemesh.v2alpha1.TransactionV1.contents:type_name -> spacemesh.v2alpha1.TransactionContents + 2, // 7: spacemesh.v2alpha1.TransactionResult.status:type_name -> spacemesh.v2alpha1.TransactionResult.Status + 3, // 8: spacemesh.v2alpha1.TransactionResponse.tx:type_name -> spacemesh.v2alpha1.Transaction + 10, // 9: spacemesh.v2alpha1.TransactionResponse.tx_result:type_name -> spacemesh.v2alpha1.TransactionResult + 0, // 10: spacemesh.v2alpha1.TransactionResponse.tx_state:type_name -> spacemesh.v2alpha1.TransactionState + 13, // 11: spacemesh.v2alpha1.TransactionList.transactions:type_name -> spacemesh.v2alpha1.TransactionResponse + 21, // 12: spacemesh.v2alpha1.ParseTransactionResponse.status:type_name -> google.rpc.Status + 3, // 13: spacemesh.v2alpha1.ParseTransactionResponse.tx:type_name -> spacemesh.v2alpha1.Transaction + 21, // 14: spacemesh.v2alpha1.SubmitTransactionResponse.status:type_name -> google.rpc.Status + 21, // 15: spacemesh.v2alpha1.EstimateGasResponse.status:type_name -> google.rpc.Status + 11, // 16: spacemesh.v2alpha1.TransactionStreamService.Stream:input_type -> spacemesh.v2alpha1.TransactionStreamRequest + 12, // 17: spacemesh.v2alpha1.TransactionService.List:input_type -> spacemesh.v2alpha1.TransactionRequest + 15, // 18: spacemesh.v2alpha1.TransactionService.ParseTransaction:input_type -> spacemesh.v2alpha1.ParseTransactionRequest + 17, // 19: spacemesh.v2alpha1.TransactionService.SubmitTransaction:input_type -> spacemesh.v2alpha1.SubmitTransactionRequest + 19, // 20: spacemesh.v2alpha1.TransactionService.EstimateGas:input_type -> spacemesh.v2alpha1.EstimateGasRequest + 13, // 21: spacemesh.v2alpha1.TransactionStreamService.Stream:output_type -> spacemesh.v2alpha1.TransactionResponse + 14, // 22: spacemesh.v2alpha1.TransactionService.List:output_type -> spacemesh.v2alpha1.TransactionList + 16, // 23: spacemesh.v2alpha1.TransactionService.ParseTransaction:output_type -> spacemesh.v2alpha1.ParseTransactionResponse + 18, // 24: spacemesh.v2alpha1.TransactionService.SubmitTransaction:output_type -> spacemesh.v2alpha1.SubmitTransactionResponse + 20, // 25: spacemesh.v2alpha1.TransactionService.EstimateGas:output_type -> spacemesh.v2alpha1.EstimateGasResponse + 21, // [21:26] is the sub-list for method output_type + 16, // [16:21] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_spacemesh_v2alpha1_tx_proto_init() } +func file_spacemesh_v2alpha1_tx_proto_init() { + if File_spacemesh_v2alpha1_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_spacemesh_v2alpha1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentsSend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentsSingleSigSpawn); i { + case 0: + return &v.state case 1: return &v.sizeCache case 2: @@ -810,6 +1821,138 @@ func file_spacemesh_v2alpha1_tx_proto_init() { return nil } } + file_spacemesh_v2alpha1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransactionList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateGasRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spacemesh_v2alpha1_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EstimateGasResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_spacemesh_v2alpha1_tx_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Transaction_V1)(nil), @@ -819,15 +1962,17 @@ func file_spacemesh_v2alpha1_tx_proto_init() { (*TransactionContents_SingleSigSpawn)(nil), (*TransactionContents_MultiSigSpawn)(nil), } + file_spacemesh_v2alpha1_tx_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_spacemesh_v2alpha1_tx_proto_msgTypes[9].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spacemesh_v2alpha1_tx_proto_rawDesc, - NumEnums: 1, - NumMessages: 7, + NumEnums: 3, + NumMessages: 18, NumExtensions: 0, - NumServices: 0, + NumServices: 2, }, GoTypes: file_spacemesh_v2alpha1_tx_proto_goTypes, DependencyIndexes: file_spacemesh_v2alpha1_tx_proto_depIdxs, diff --git a/release/go/spacemesh/v2alpha1/tx.pb.gw.go b/release/go/spacemesh/v2alpha1/tx.pb.gw.go new file mode 100644 index 00000000..b8158f54 --- /dev/null +++ b/release/go/spacemesh/v2alpha1/tx.pb.gw.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: spacemesh/v2alpha1/tx.proto + +/* +Package spacemeshv2alpha1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package spacemeshv2alpha1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_TransactionStreamService_Stream_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionStreamServiceClient, req *http.Request, pathParams map[string]string) (TransactionStreamService_StreamClient, runtime.ServerMetadata, error) { + var protoReq TransactionStreamRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.Stream(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_TransactionService_List_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TransactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TransactionService_List_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TransactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.List(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TransactionService_ParseTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ParseTransactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ParseTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TransactionService_ParseTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ParseTransactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ParseTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TransactionService_SubmitTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitTransactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SubmitTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TransactionService_SubmitTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitTransactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SubmitTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TransactionService_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EstimateGasRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateGas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TransactionService_EstimateGas_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EstimateGasRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateGas(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTransactionStreamServiceHandlerServer registers the http handlers for service TransactionStreamService to "mux". +// UnaryRPC :call TransactionStreamServiceServer 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 RegisterTransactionStreamServiceHandlerFromEndpoint instead. +func RegisterTransactionStreamServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionStreamServiceServer) error { + + mux.Handle("POST", pattern_TransactionStreamService_Stream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + return nil +} + +// RegisterTransactionServiceHandlerServer registers the http handlers for service TransactionService to "mux". +// UnaryRPC :call TransactionServiceServer 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 RegisterTransactionServiceHandlerFromEndpoint instead. +func RegisterTransactionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServiceServer) error { + + mux.Handle("POST", pattern_TransactionService_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/List", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/List")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TransactionService_List_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TransactionService_ParseTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/ParseTransaction", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/ParseTransaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TransactionService_ParseTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_ParseTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TransactionService_SubmitTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/SubmitTransaction", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/SubmitTransaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TransactionService_SubmitTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_SubmitTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TransactionService_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/EstimateGas", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/EstimateGas")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TransactionService_EstimateGas_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_EstimateGas_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterTransactionStreamServiceHandlerFromEndpoint is same as RegisterTransactionStreamServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterTransactionStreamServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, 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) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterTransactionStreamServiceHandler(ctx, mux, conn) +} + +// RegisterTransactionStreamServiceHandler registers the http handlers for service TransactionStreamService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTransactionStreamServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTransactionStreamServiceHandlerClient(ctx, mux, NewTransactionStreamServiceClient(conn)) +} + +// RegisterTransactionStreamServiceHandlerClient registers the http handlers for service TransactionStreamService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionStreamServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionStreamServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TransactionStreamServiceClient" to call the correct interceptors. +func RegisterTransactionStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionStreamServiceClient) error { + + mux.Handle("POST", pattern_TransactionStreamService_Stream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionStreamService/Stream", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionStreamService/Stream")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TransactionStreamService_Stream_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionStreamService_Stream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_TransactionStreamService_Stream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.TransactionStreamService", "Stream"}, "")) +) + +var ( + forward_TransactionStreamService_Stream_0 = runtime.ForwardResponseStream +) + +// RegisterTransactionServiceHandlerFromEndpoint is same as RegisterTransactionServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterTransactionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, 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) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterTransactionServiceHandler(ctx, mux, conn) +} + +// RegisterTransactionServiceHandler registers the http handlers for service TransactionService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTransactionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTransactionServiceHandlerClient(ctx, mux, NewTransactionServiceClient(conn)) +} + +// RegisterTransactionServiceHandlerClient registers the http handlers for service TransactionService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TransactionServiceClient" to call the correct interceptors. +func RegisterTransactionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionServiceClient) error { + + mux.Handle("POST", pattern_TransactionService_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/List", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/List")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TransactionService_List_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TransactionService_ParseTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/ParseTransaction", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/ParseTransaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TransactionService_ParseTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_ParseTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TransactionService_SubmitTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/SubmitTransaction", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/SubmitTransaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TransactionService_SubmitTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_SubmitTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TransactionService_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v2alpha1.TransactionService/EstimateGas", runtime.WithHTTPPathPattern("/spacemesh.v2alpha1.TransactionService/EstimateGas")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TransactionService_EstimateGas_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TransactionService_EstimateGas_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_TransactionService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.TransactionService", "List"}, "")) + + pattern_TransactionService_ParseTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.TransactionService", "ParseTransaction"}, "")) + + pattern_TransactionService_SubmitTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.TransactionService", "SubmitTransaction"}, "")) + + pattern_TransactionService_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"spacemesh.v2alpha1.TransactionService", "EstimateGas"}, "")) +) + +var ( + forward_TransactionService_List_0 = runtime.ForwardResponseMessage + + forward_TransactionService_ParseTransaction_0 = runtime.ForwardResponseMessage + + forward_TransactionService_SubmitTransaction_0 = runtime.ForwardResponseMessage + + forward_TransactionService_EstimateGas_0 = runtime.ForwardResponseMessage +) diff --git a/release/go/spacemesh/v2alpha1/tx_grpc.pb.go b/release/go/spacemesh/v2alpha1/tx_grpc.pb.go new file mode 100644 index 00000000..70d492c7 --- /dev/null +++ b/release/go/spacemesh/v2alpha1/tx_grpc.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: spacemesh/v2alpha1/tx.proto + +package spacemeshv2alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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 + +const ( + TransactionStreamService_Stream_FullMethodName = "/spacemesh.v2alpha1.TransactionStreamService/Stream" +) + +// TransactionStreamServiceClient is the client API for TransactionStreamService 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. +type TransactionStreamServiceClient interface { + Stream(ctx context.Context, in *TransactionStreamRequest, opts ...grpc.CallOption) (TransactionStreamService_StreamClient, error) +} + +type transactionStreamServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTransactionStreamServiceClient(cc grpc.ClientConnInterface) TransactionStreamServiceClient { + return &transactionStreamServiceClient{cc} +} + +func (c *transactionStreamServiceClient) Stream(ctx context.Context, in *TransactionStreamRequest, opts ...grpc.CallOption) (TransactionStreamService_StreamClient, error) { + stream, err := c.cc.NewStream(ctx, &TransactionStreamService_ServiceDesc.Streams[0], TransactionStreamService_Stream_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &transactionStreamServiceStreamClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type TransactionStreamService_StreamClient interface { + Recv() (*TransactionResponse, error) + grpc.ClientStream +} + +type transactionStreamServiceStreamClient struct { + grpc.ClientStream +} + +func (x *transactionStreamServiceStreamClient) Recv() (*TransactionResponse, error) { + m := new(TransactionResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TransactionStreamServiceServer is the server API for TransactionStreamService service. +// All implementations should embed UnimplementedTransactionStreamServiceServer +// for forward compatibility +type TransactionStreamServiceServer interface { + Stream(*TransactionStreamRequest, TransactionStreamService_StreamServer) error +} + +// UnimplementedTransactionStreamServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTransactionStreamServiceServer struct { +} + +func (UnimplementedTransactionStreamServiceServer) Stream(*TransactionStreamRequest, TransactionStreamService_StreamServer) error { + return status.Errorf(codes.Unimplemented, "method Stream not implemented") +} + +// UnsafeTransactionStreamServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TransactionStreamServiceServer will +// result in compilation errors. +type UnsafeTransactionStreamServiceServer interface { + mustEmbedUnimplementedTransactionStreamServiceServer() +} + +func RegisterTransactionStreamServiceServer(s grpc.ServiceRegistrar, srv TransactionStreamServiceServer) { + s.RegisterService(&TransactionStreamService_ServiceDesc, srv) +} + +func _TransactionStreamService_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(TransactionStreamRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TransactionStreamServiceServer).Stream(m, &transactionStreamServiceStreamServer{stream}) +} + +type TransactionStreamService_StreamServer interface { + Send(*TransactionResponse) error + grpc.ServerStream +} + +type transactionStreamServiceStreamServer struct { + grpc.ServerStream +} + +func (x *transactionStreamServiceStreamServer) Send(m *TransactionResponse) error { + return x.ServerStream.SendMsg(m) +} + +// TransactionStreamService_ServiceDesc is the grpc.ServiceDesc for TransactionStreamService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TransactionStreamService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "spacemesh.v2alpha1.TransactionStreamService", + HandlerType: (*TransactionStreamServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Stream", + Handler: _TransactionStreamService_Stream_Handler, + ServerStreams: true, + }, + }, + Metadata: "spacemesh/v2alpha1/tx.proto", +} + +const ( + TransactionService_List_FullMethodName = "/spacemesh.v2alpha1.TransactionService/List" + TransactionService_ParseTransaction_FullMethodName = "/spacemesh.v2alpha1.TransactionService/ParseTransaction" + TransactionService_SubmitTransaction_FullMethodName = "/spacemesh.v2alpha1.TransactionService/SubmitTransaction" + TransactionService_EstimateGas_FullMethodName = "/spacemesh.v2alpha1.TransactionService/EstimateGas" +) + +// TransactionServiceClient is the client API for TransactionService 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. +type TransactionServiceClient interface { + List(ctx context.Context, in *TransactionRequest, opts ...grpc.CallOption) (*TransactionList, error) + ParseTransaction(ctx context.Context, in *ParseTransactionRequest, opts ...grpc.CallOption) (*ParseTransactionResponse, error) + SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionResponse, error) + EstimateGas(ctx context.Context, in *EstimateGasRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) +} + +type transactionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTransactionServiceClient(cc grpc.ClientConnInterface) TransactionServiceClient { + return &transactionServiceClient{cc} +} + +func (c *transactionServiceClient) List(ctx context.Context, in *TransactionRequest, opts ...grpc.CallOption) (*TransactionList, error) { + out := new(TransactionList) + err := c.cc.Invoke(ctx, TransactionService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionServiceClient) ParseTransaction(ctx context.Context, in *ParseTransactionRequest, opts ...grpc.CallOption) (*ParseTransactionResponse, error) { + out := new(ParseTransactionResponse) + err := c.cc.Invoke(ctx, TransactionService_ParseTransaction_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionServiceClient) SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*SubmitTransactionResponse, error) { + out := new(SubmitTransactionResponse) + err := c.cc.Invoke(ctx, TransactionService_SubmitTransaction_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionServiceClient) EstimateGas(ctx context.Context, in *EstimateGasRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error) { + out := new(EstimateGasResponse) + err := c.cc.Invoke(ctx, TransactionService_EstimateGas_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TransactionServiceServer is the server API for TransactionService service. +// All implementations should embed UnimplementedTransactionServiceServer +// for forward compatibility +type TransactionServiceServer interface { + List(context.Context, *TransactionRequest) (*TransactionList, error) + ParseTransaction(context.Context, *ParseTransactionRequest) (*ParseTransactionResponse, error) + SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionResponse, error) + EstimateGas(context.Context, *EstimateGasRequest) (*EstimateGasResponse, error) +} + +// UnimplementedTransactionServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTransactionServiceServer struct { +} + +func (UnimplementedTransactionServiceServer) List(context.Context, *TransactionRequest) (*TransactionList, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedTransactionServiceServer) ParseTransaction(context.Context, *ParseTransactionRequest) (*ParseTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ParseTransaction not implemented") +} +func (UnimplementedTransactionServiceServer) SubmitTransaction(context.Context, *SubmitTransactionRequest) (*SubmitTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTransaction not implemented") +} +func (UnimplementedTransactionServiceServer) EstimateGas(context.Context, *EstimateGasRequest) (*EstimateGasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateGas not implemented") +} + +// UnsafeTransactionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TransactionServiceServer will +// result in compilation errors. +type UnsafeTransactionServiceServer interface { + mustEmbedUnimplementedTransactionServiceServer() +} + +func RegisterTransactionServiceServer(s grpc.ServiceRegistrar, srv TransactionServiceServer) { + s.RegisterService(&TransactionService_ServiceDesc, srv) +} + +func _TransactionService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TransactionService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServiceServer).List(ctx, req.(*TransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TransactionService_ParseTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServiceServer).ParseTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TransactionService_ParseTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServiceServer).ParseTransaction(ctx, req.(*ParseTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TransactionService_SubmitTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServiceServer).SubmitTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TransactionService_SubmitTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServiceServer).SubmitTransaction(ctx, req.(*SubmitTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TransactionService_EstimateGas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EstimateGasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServiceServer).EstimateGas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TransactionService_EstimateGas_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServiceServer).EstimateGas(ctx, req.(*EstimateGasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TransactionService_ServiceDesc is the grpc.ServiceDesc for TransactionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TransactionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "spacemesh.v2alpha1.TransactionService", + HandlerType: (*TransactionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _TransactionService_List_Handler, + }, + { + MethodName: "ParseTransaction", + Handler: _TransactionService_ParseTransaction_Handler, + }, + { + MethodName: "SubmitTransaction", + Handler: _TransactionService_SubmitTransaction_Handler, + }, + { + MethodName: "EstimateGas", + Handler: _TransactionService_EstimateGas_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "spacemesh/v2alpha1/tx.proto", +} diff --git a/spacemesh/v2alpha1/tx.proto b/spacemesh/v2alpha1/tx.proto index 79d0f4a9..850d5679 100644 --- a/spacemesh/v2alpha1/tx.proto +++ b/spacemesh/v2alpha1/tx.proto @@ -59,4 +59,101 @@ message TransactionV1 { message Nonce { uint64 counter = 1; +} + +// TransactionState is the "journey" of a tx from mempool to block inclusion to +// mesh to STF processing. To know whether or not the tx actually succeeded, +// and its side effects, check tx_state. +enum TransactionState { + TRANSACTION_STATE_UNSPECIFIED = 0; // default state + TRANSACTION_STATE_REJECTED = 1; // rejected from mempool due to, e.g., invalid syntax + TRANSACTION_STATE_INSUFFICIENT_FUNDS = 2; // rejected from mempool by funds check + TRANSACTION_STATE_CONFLICTING = 3; // rejected from mempool due to conflicting counter + TRANSACTION_STATE_MEMPOOL = 4; // in mempool but not on the mesh yet + TRANSACTION_STATE_MESH = 5; // submitted to the mesh + TRANSACTION_STATE_PROCESSED = 6; // processed by STF; check Receipt for success or failure +} + +message TransactionResult { + enum Status { + TRANSACTION_STATUS_UNSPECIFIED = 0; + TRANSACTION_STATUS_SUCCESS = 1; + TRANSACTION_STATUS_FAILURE = 2; + TRANSACTION_STATUS_INVALID = 3; + } + Status status = 1; + string message = 2; + uint64 gas_consumed = 3; // in units of gas + uint64 fee = 4; // in smidge + bytes block = 5; + uint32 layer = 6; + repeated string touched_addresses = 7; +} + +message TransactionStreamRequest { + uint32 start_layer = 1; // Required: starting layer for transaction streaming. + optional uint32 end_layer = 2; // Ending layer for transaction streaming. + repeated bytes txid = 3; // Filter: specific transaction IDs. + optional string principal = 4; // Filter by principal address + bool watch = 5; // Continue watching for new transactions. +} + +service TransactionStreamService { + rpc Stream(TransactionStreamRequest) returns (stream TransactionResponse); +} + +message TransactionRequest { + optional uint32 start_layer = 1; // Starting layer for transactions. + optional uint32 end_layer = 2; // Ending layer for transactions. + repeated bytes txid = 3; // Filter: specific transaction IDs to filter. + optional string principal = 4; // Filter by principal address + uint64 offset = 5; // Adjusts the starting point for data retrieval. + uint64 limit = 6; // Specifies maximum number of items to fetch. + bool include_state = 7; // Whether to include transaction state in response. + bool include_result = 8; // Whether to include result of transactions in response. +} + +message TransactionResponse { + Transaction tx = 1; + TransactionResult tx_result = 2; + TransactionState tx_state = 3; +} + +message TransactionList { + repeated TransactionResponse transactions = 1; +} + +message ParseTransactionRequest { + bytes transaction = 1; // signed binary transaction + bool verify = 2; // if true signature verification will be executed +} + +message ParseTransactionResponse { + google.rpc.Status status = 1; + Transaction tx = 2; +} + +message SubmitTransactionRequest { + bytes transaction = 1; // signed binary transaction +} + +message SubmitTransactionResponse { + google.rpc.Status status = 1; + bytes tx_id = 2; +} + +message EstimateGasRequest { + bytes transaction = 1; // signed binary transaction +} + +message EstimateGasResponse { + google.rpc.Status status = 1; + uint64 recommended_max_gas = 2; +} + +service TransactionService { + rpc List(TransactionRequest) returns (TransactionList); + rpc ParseTransaction(ParseTransactionRequest) returns (ParseTransactionResponse); + rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionResponse); + rpc EstimateGas(EstimateGasRequest) returns (EstimateGasResponse); } \ No newline at end of file