Commit 0e07951f authored by vicotor's avatar vicotor

update proto

parent 8f577bdc
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: bufbuild
repository: protovalidate
commit: 63bb56e204954558946a641ef0d68910
version: v1 version: v1
deps:
- buf.build/bufbuild/protovalidate
breaking: breaking:
use: use:
- FILE - FILE
......
...@@ -22,6 +22,52 @@ const ( ...@@ -22,6 +22,52 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
type WalletType int32
const (
WalletType_WALLET_SPOT WalletType = 0
WalletType_WALLET_PERP WalletType = 1
)
// Enum value maps for WalletType.
var (
WalletType_name = map[int32]string{
0: "WALLET_SPOT",
1: "WALLET_PERP",
}
WalletType_value = map[string]int32{
"WALLET_SPOT": 0,
"WALLET_PERP": 1,
}
)
func (x WalletType) Enum() *WalletType {
p := new(WalletType)
*p = x
return p
}
func (x WalletType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (WalletType) Descriptor() protoreflect.EnumDescriptor {
return file_nebula_v1_account_proto_enumTypes[0].Descriptor()
}
func (WalletType) Type() protoreflect.EnumType {
return &file_nebula_v1_account_proto_enumTypes[0]
}
func (x WalletType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use WalletType.Descriptor instead.
func (WalletType) EnumDescriptor() ([]byte, []int) {
return file_nebula_v1_account_proto_rawDescGZIP(), []int{0}
}
// define account message. // define account message.
type Account struct { type Account struct {
state protoimpl.MessageState state protoimpl.MessageState
...@@ -130,9 +176,10 @@ type Wallet struct { ...@@ -130,9 +176,10 @@ type Wallet struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Coin string `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin,omitempty"` Coin string `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin,omitempty"`
Balance []byte `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` Type WalletType `protobuf:"varint,2,opt,name=type,proto3,enum=exchain.nebula.v1.WalletType" json:"type,omitempty"`
FrozenBalance []byte `protobuf:"bytes,3,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"` Balance []byte `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"`
FrozenBalance []byte `protobuf:"bytes,4,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"`
} }
func (x *Wallet) Reset() { func (x *Wallet) Reset() {
...@@ -174,6 +221,13 @@ func (x *Wallet) GetCoin() string { ...@@ -174,6 +221,13 @@ func (x *Wallet) GetCoin() string {
return "" return ""
} }
func (x *Wallet) GetType() WalletType {
if x != nil {
return x.Type
}
return WalletType_WALLET_SPOT
}
func (x *Wallet) GetBalance() []byte { func (x *Wallet) GetBalance() []byte {
if x != nil { if x != nil {
return x.Balance return x.Balance
...@@ -208,27 +262,33 @@ var file_nebula_v1_account_proto_rawDesc = []byte{ ...@@ -208,27 +262,33 @@ var file_nebula_v1_account_proto_rawDesc = []byte{
0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e,
0x76, 0x31, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65,
0x74, 0x73, 0x22, 0x5d, 0x0a, 0x06, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x06, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x12, 0x0a,
0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x69,
0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x6e, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x0c, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x72, 0x1d, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61,
0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04,
0x28, 0x0c, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
0x65, 0x42, 0xd5, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25,
0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x41, 0x63, 0x63, 0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x42, 0x61,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x2a, 0x2e, 0x0a, 0x0a, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x54,
0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x5f, 0x53, 0x50,
0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x4f, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x5f, 0x50,
0x67, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x65, 0x62, 0x45, 0x52, 0x50, 0x10, 0x01, 0x42, 0xd5, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78,
0x75, 0x6c, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x4e, 0x58, 0xaa, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x76, 0x31, 0x42,
0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x63, 0x68,
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65, 0x61, 0x69, 0x6e, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x65,
0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f,
0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x4e, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2f, 0x76, 0x31,
0x65, 0x62, 0x75, 0x6c, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x4e, 0x58, 0xaa,
0x33, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61,
0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x4e, 0x65,
0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69,
0x6e, 0x5c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x78, 0x63, 0x68, 0x61, 0x69,
0x6e, 0x3a, 0x3a, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
...@@ -243,20 +303,23 @@ func file_nebula_v1_account_proto_rawDescGZIP() []byte { ...@@ -243,20 +303,23 @@ func file_nebula_v1_account_proto_rawDescGZIP() []byte {
return file_nebula_v1_account_proto_rawDescData return file_nebula_v1_account_proto_rawDescData
} }
var file_nebula_v1_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_nebula_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_nebula_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_nebula_v1_account_proto_goTypes = []interface{}{ var file_nebula_v1_account_proto_goTypes = []interface{}{
(*Account)(nil), // 0: exchain.nebula.v1.Account (WalletType)(0), // 0: exchain.nebula.v1.WalletType
(*WalletList)(nil), // 1: exchain.nebula.v1.WalletList (*Account)(nil), // 1: exchain.nebula.v1.Account
(*Wallet)(nil), // 2: exchain.nebula.v1.Wallet (*WalletList)(nil), // 2: exchain.nebula.v1.WalletList
(*Wallet)(nil), // 3: exchain.nebula.v1.Wallet
} }
var file_nebula_v1_account_proto_depIdxs = []int32{ var file_nebula_v1_account_proto_depIdxs = []int32{
1, // 0: exchain.nebula.v1.Account.wallets:type_name -> exchain.nebula.v1.WalletList 2, // 0: exchain.nebula.v1.Account.wallets:type_name -> exchain.nebula.v1.WalletList
2, // 1: exchain.nebula.v1.WalletList.wallets:type_name -> exchain.nebula.v1.Wallet 3, // 1: exchain.nebula.v1.WalletList.wallets:type_name -> exchain.nebula.v1.Wallet
2, // [2:2] is the sub-list for method output_type 0, // 2: exchain.nebula.v1.Wallet.type:type_name -> exchain.nebula.v1.WalletType
2, // [2:2] is the sub-list for method input_type 3, // [3:3] is the sub-list for method output_type
2, // [2:2] is the sub-list for extension type_name 3, // [3:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension extendee 3, // [3:3] is the sub-list for extension type_name
0, // [0:2] is the sub-list for field type_name 3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
} }
func init() { file_nebula_v1_account_proto_init() } func init() { file_nebula_v1_account_proto_init() }
...@@ -307,13 +370,14 @@ func file_nebula_v1_account_proto_init() { ...@@ -307,13 +370,14 @@ func file_nebula_v1_account_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_nebula_v1_account_proto_rawDesc, RawDescriptor: file_nebula_v1_account_proto_rawDesc,
NumEnums: 0, NumEnums: 1,
NumMessages: 3, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_nebula_v1_account_proto_goTypes, GoTypes: file_nebula_v1_account_proto_goTypes,
DependencyIndexes: file_nebula_v1_account_proto_depIdxs, DependencyIndexes: file_nebula_v1_account_proto_depIdxs,
EnumInfos: file_nebula_v1_account_proto_enumTypes,
MessageInfos: file_nebula_v1_account_proto_msgTypes, MessageInfos: file_nebula_v1_account_proto_msgTypes,
}.Build() }.Build()
File_nebula_v1_account_proto = out.File File_nebula_v1_account_proto = out.File
......
...@@ -22,8 +22,14 @@ message WalletList { ...@@ -22,8 +22,14 @@ message WalletList {
repeated Wallet wallets = 1; repeated Wallet wallets = 1;
} }
enum WalletType {
WALLET_SPOT = 0;
WALLET_PERP = 1;
}
message Wallet { message Wallet {
string coin = 1; string coin = 1;
bytes balance = 2; WalletType type = 2;
bytes frozen_balance = 3; bytes balance = 3;
bytes frozen_balance = 4;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment