| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.27.1
- // protoc v3.19.3
- // source: walletServer.proto
- package service
- import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- )
- const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
- )
- type TransferRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 转账id,供业务层识别
- Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // 链网络名称,"eth" 或 "tron"
- Coin string `protobuf:"bytes,3,opt,name=coin,proto3" json:"coin,omitempty"` // 转账的币种,eth / trx / usdt / usdc
- From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"` // 转账的发起地址
- To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` // 代币的接收地址
- // amount单位是实际精度,
- // 如:eth的精度是18,转账金额为: "12.345678",传递的参数amount为: "12345678000000000000"
- // trx/usdt/usdc精度是6,转账余额为: "1.21",传递的参数amount为: "1210000"
- Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` // 转账的金额
- }
- func (x *TransferRequest) Reset() {
- *x = TransferRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_walletServer_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *TransferRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*TransferRequest) ProtoMessage() {}
- func (x *TransferRequest) ProtoReflect() protoreflect.Message {
- mi := &file_walletServer_proto_msgTypes[0]
- 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 TransferRequest.ProtoReflect.Descriptor instead.
- func (*TransferRequest) Descriptor() ([]byte, []int) {
- return file_walletServer_proto_rawDescGZIP(), []int{0}
- }
- func (x *TransferRequest) GetId() string {
- if x != nil {
- return x.Id
- }
- return ""
- }
- func (x *TransferRequest) GetNetwork() string {
- if x != nil {
- return x.Network
- }
- return ""
- }
- func (x *TransferRequest) GetCoin() string {
- if x != nil {
- return x.Coin
- }
- return ""
- }
- func (x *TransferRequest) GetFrom() string {
- if x != nil {
- return x.From
- }
- return ""
- }
- func (x *TransferRequest) GetTo() string {
- if x != nil {
- return x.To
- }
- return ""
- }
- func (x *TransferRequest) GetAmount() string {
- if x != nil {
- return x.Amount
- }
- return ""
- }
- type TransferResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
- Req *TransferRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` // 转账请求详情
- Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 响应码, 成功是200
- Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // 响应描述信息
- TxHash string `protobuf:"bytes,4,opt,name=txHash,proto3" json:"txHash,omitempty"` // 交易发到链上的交易hash,业务层应该检测该hash的是否上链,上链才代表着转账成功
- }
- func (x *TransferResponse) Reset() {
- *x = TransferResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_walletServer_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
- func (x *TransferResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*TransferResponse) ProtoMessage() {}
- func (x *TransferResponse) ProtoReflect() protoreflect.Message {
- mi := &file_walletServer_proto_msgTypes[1]
- 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 TransferResponse.ProtoReflect.Descriptor instead.
- func (*TransferResponse) Descriptor() ([]byte, []int) {
- return file_walletServer_proto_rawDescGZIP(), []int{1}
- }
- func (x *TransferResponse) GetReq() *TransferRequest {
- if x != nil {
- return x.Req
- }
- return nil
- }
- func (x *TransferResponse) GetCode() string {
- if x != nil {
- return x.Code
- }
- return ""
- }
- func (x *TransferResponse) GetMsg() string {
- if x != nil {
- return x.Msg
- }
- return ""
- }
- func (x *TransferResponse) GetTxHash() string {
- if x != nil {
- return x.TxHash
- }
- return ""
- }
- var File_walletServer_proto protoreflect.FileDescriptor
- var file_walletServer_proto_rawDesc = []byte{
- 0x0a, 0x12, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x8b, 0x01,
- 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
- 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x63,
- 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12,
- 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66,
- 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x10, 0x54,
- 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x2a, 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x03, 0x72, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63,
- 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
- 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73,
- 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x32, 0x51, 0x0a, 0x0c, 0x57, 0x61, 0x6c,
- 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x08, 0x54, 0x72, 0x61,
- 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
- 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
- 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x33, 0x0a, 0x12,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76,
- 0x65, 0x72, 0x42, 0x11, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
- 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x0a, 0x2e, 0x2e, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
- }
- var (
- file_walletServer_proto_rawDescOnce sync.Once
- file_walletServer_proto_rawDescData = file_walletServer_proto_rawDesc
- )
- func file_walletServer_proto_rawDescGZIP() []byte {
- file_walletServer_proto_rawDescOnce.Do(func() {
- file_walletServer_proto_rawDescData = protoimpl.X.CompressGZIP(file_walletServer_proto_rawDescData)
- })
- return file_walletServer_proto_rawDescData
- }
- var file_walletServer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
- var file_walletServer_proto_goTypes = []interface{}{
- (*TransferRequest)(nil), // 0: service.TransferRequest
- (*TransferResponse)(nil), // 1: service.TransferResponse
- }
- var file_walletServer_proto_depIdxs = []int32{
- 0, // 0: service.TransferResponse.req:type_name -> service.TransferRequest
- 0, // 1: service.WalletServer.Transfer:input_type -> service.TransferRequest
- 1, // 2: service.WalletServer.Transfer:output_type -> service.TransferResponse
- 2, // [2:3] is the sub-list for method output_type
- 1, // [1:2] is the sub-list for method input_type
- 1, // [1:1] is the sub-list for extension type_name
- 1, // [1:1] is the sub-list for extension extendee
- 0, // [0:1] is the sub-list for field type_name
- }
- func init() { file_walletServer_proto_init() }
- func file_walletServer_proto_init() {
- if File_walletServer_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_walletServer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TransferRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_walletServer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TransferResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_walletServer_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 2,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_walletServer_proto_goTypes,
- DependencyIndexes: file_walletServer_proto_depIdxs,
- MessageInfos: file_walletServer_proto_msgTypes,
- }.Build()
- File_walletServer_proto = out.File
- file_walletServer_proto_rawDesc = nil
- file_walletServer_proto_goTypes = nil
- file_walletServer_proto_depIdxs = nil
- }
|