walletServer.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.27.1
  4. // protoc v3.19.3
  5. // source: walletServer.proto
  6. package service
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. )
  13. const (
  14. // Verify that this generated code is sufficiently up-to-date.
  15. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  16. // Verify that runtime/protoimpl is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  18. )
  19. type TransferRequest struct {
  20. state protoimpl.MessageState
  21. sizeCache protoimpl.SizeCache
  22. unknownFields protoimpl.UnknownFields
  23. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 转账id,供业务层识别
  24. Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // 链网络名称,"eth" 或 "tron"
  25. Coin string `protobuf:"bytes,3,opt,name=coin,proto3" json:"coin,omitempty"` // 转账的币种,eth / trx / usdt / usdc
  26. From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` // 转账的发起地址
  27. To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` // 代币的接收地址
  28. // amount单位是实际精度,
  29. // 如:eth的精度是18,转账金额为: "12.345678",传递的参数amount为: "12345678000000000000"
  30. // trx/usdt/usdc精度是6,转账余额为: "1.21",传递的参数amount为: "1210000"
  31. Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` // 转账的金额
  32. }
  33. func (x *TransferRequest) Reset() {
  34. *x = TransferRequest{}
  35. if protoimpl.UnsafeEnabled {
  36. mi := &file_walletServer_proto_msgTypes[0]
  37. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  38. ms.StoreMessageInfo(mi)
  39. }
  40. }
  41. func (x *TransferRequest) String() string {
  42. return protoimpl.X.MessageStringOf(x)
  43. }
  44. func (*TransferRequest) ProtoMessage() {}
  45. func (x *TransferRequest) ProtoReflect() protoreflect.Message {
  46. mi := &file_walletServer_proto_msgTypes[0]
  47. if protoimpl.UnsafeEnabled && x != nil {
  48. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  49. if ms.LoadMessageInfo() == nil {
  50. ms.StoreMessageInfo(mi)
  51. }
  52. return ms
  53. }
  54. return mi.MessageOf(x)
  55. }
  56. // Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.
  57. func (*TransferRequest) Descriptor() ([]byte, []int) {
  58. return file_walletServer_proto_rawDescGZIP(), []int{0}
  59. }
  60. func (x *TransferRequest) GetId() string {
  61. if x != nil {
  62. return x.Id
  63. }
  64. return ""
  65. }
  66. func (x *TransferRequest) GetNetwork() string {
  67. if x != nil {
  68. return x.Network
  69. }
  70. return ""
  71. }
  72. func (x *TransferRequest) GetCoin() string {
  73. if x != nil {
  74. return x.Coin
  75. }
  76. return ""
  77. }
  78. func (x *TransferRequest) GetFrom() string {
  79. if x != nil {
  80. return x.From
  81. }
  82. return ""
  83. }
  84. func (x *TransferRequest) GetTo() string {
  85. if x != nil {
  86. return x.To
  87. }
  88. return ""
  89. }
  90. func (x *TransferRequest) GetAmount() string {
  91. if x != nil {
  92. return x.Amount
  93. }
  94. return ""
  95. }
  96. type TransferResponse struct {
  97. state protoimpl.MessageState
  98. sizeCache protoimpl.SizeCache
  99. unknownFields protoimpl.UnknownFields
  100. Req *TransferRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` // 转账请求详情
  101. Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 响应码, 成功是200
  102. Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // 响应描述信息
  103. TxHash string `protobuf:"bytes,4,opt,name=txHash,proto3" json:"txHash,omitempty"` // 交易发到链上的交易hash,业务层应该检测该hash的是否上链,上链才代表着转账成功
  104. }
  105. func (x *TransferResponse) Reset() {
  106. *x = TransferResponse{}
  107. if protoimpl.UnsafeEnabled {
  108. mi := &file_walletServer_proto_msgTypes[1]
  109. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  110. ms.StoreMessageInfo(mi)
  111. }
  112. }
  113. func (x *TransferResponse) String() string {
  114. return protoimpl.X.MessageStringOf(x)
  115. }
  116. func (*TransferResponse) ProtoMessage() {}
  117. func (x *TransferResponse) ProtoReflect() protoreflect.Message {
  118. mi := &file_walletServer_proto_msgTypes[1]
  119. if protoimpl.UnsafeEnabled && x != nil {
  120. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  121. if ms.LoadMessageInfo() == nil {
  122. ms.StoreMessageInfo(mi)
  123. }
  124. return ms
  125. }
  126. return mi.MessageOf(x)
  127. }
  128. // Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead.
  129. func (*TransferResponse) Descriptor() ([]byte, []int) {
  130. return file_walletServer_proto_rawDescGZIP(), []int{1}
  131. }
  132. func (x *TransferResponse) GetReq() *TransferRequest {
  133. if x != nil {
  134. return x.Req
  135. }
  136. return nil
  137. }
  138. func (x *TransferResponse) GetCode() string {
  139. if x != nil {
  140. return x.Code
  141. }
  142. return ""
  143. }
  144. func (x *TransferResponse) GetMsg() string {
  145. if x != nil {
  146. return x.Msg
  147. }
  148. return ""
  149. }
  150. func (x *TransferResponse) GetTxHash() string {
  151. if x != nil {
  152. return x.TxHash
  153. }
  154. return ""
  155. }
  156. var File_walletServer_proto protoreflect.FileDescriptor
  157. var file_walletServer_proto_rawDesc = []byte{
  158. 0x0a, 0x12, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70,
  159. 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x8b, 0x01,
  160. 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
  161. 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
  162. 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01,
  163. 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x63,
  164. 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12,
  165. 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66,
  166. 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
  167. 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20,
  168. 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x10, 0x54,
  169. 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
  170. 0x2a, 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73,
  171. 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52,
  172. 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x03, 0x72, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63,
  173. 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
  174. 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73,
  175. 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
  176. 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x32, 0x51, 0x0a, 0x0c, 0x57, 0x61, 0x6c,
  177. 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x08, 0x54, 0x72, 0x61,
  178. 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
  179. 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
  180. 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
  181. 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x33, 0x0a, 0x12,
  182. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76,
  183. 0x65, 0x72, 0x42, 0x11, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
  184. 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x0a, 0x2e, 0x2e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
  185. 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  186. }
  187. var (
  188. file_walletServer_proto_rawDescOnce sync.Once
  189. file_walletServer_proto_rawDescData = file_walletServer_proto_rawDesc
  190. )
  191. func file_walletServer_proto_rawDescGZIP() []byte {
  192. file_walletServer_proto_rawDescOnce.Do(func() {
  193. file_walletServer_proto_rawDescData = protoimpl.X.CompressGZIP(file_walletServer_proto_rawDescData)
  194. })
  195. return file_walletServer_proto_rawDescData
  196. }
  197. var file_walletServer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  198. var file_walletServer_proto_goTypes = []interface{}{
  199. (*TransferRequest)(nil), // 0: service.TransferRequest
  200. (*TransferResponse)(nil), // 1: service.TransferResponse
  201. }
  202. var file_walletServer_proto_depIdxs = []int32{
  203. 0, // 0: service.TransferResponse.req:type_name -> service.TransferRequest
  204. 0, // 1: service.WalletServer.Transfer:input_type -> service.TransferRequest
  205. 1, // 2: service.WalletServer.Transfer:output_type -> service.TransferResponse
  206. 2, // [2:3] is the sub-list for method output_type
  207. 1, // [1:2] is the sub-list for method input_type
  208. 1, // [1:1] is the sub-list for extension type_name
  209. 1, // [1:1] is the sub-list for extension extendee
  210. 0, // [0:1] is the sub-list for field type_name
  211. }
  212. func init() { file_walletServer_proto_init() }
  213. func file_walletServer_proto_init() {
  214. if File_walletServer_proto != nil {
  215. return
  216. }
  217. if !protoimpl.UnsafeEnabled {
  218. file_walletServer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  219. switch v := v.(*TransferRequest); i {
  220. case 0:
  221. return &v.state
  222. case 1:
  223. return &v.sizeCache
  224. case 2:
  225. return &v.unknownFields
  226. default:
  227. return nil
  228. }
  229. }
  230. file_walletServer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  231. switch v := v.(*TransferResponse); i {
  232. case 0:
  233. return &v.state
  234. case 1:
  235. return &v.sizeCache
  236. case 2:
  237. return &v.unknownFields
  238. default:
  239. return nil
  240. }
  241. }
  242. }
  243. type x struct{}
  244. out := protoimpl.TypeBuilder{
  245. File: protoimpl.DescBuilder{
  246. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  247. RawDescriptor: file_walletServer_proto_rawDesc,
  248. NumEnums: 0,
  249. NumMessages: 2,
  250. NumExtensions: 0,
  251. NumServices: 1,
  252. },
  253. GoTypes: file_walletServer_proto_goTypes,
  254. DependencyIndexes: file_walletServer_proto_depIdxs,
  255. MessageInfos: file_walletServer_proto_msgTypes,
  256. }.Build()
  257. File_walletServer_proto = out.File
  258. file_walletServer_proto_rawDesc = nil
  259. file_walletServer_proto_goTypes = nil
  260. file_walletServer_proto_depIdxs = nil
  261. }