@ -195,32 +195,138 @@ func (m *GetFreeTokenResponse) GetTxId() []byte {
return nil
}
// StakingContractInfoRequest is the request to necessary info for stkaing.
type StakingContractInfoRequest struct {
// The account address
Address [ ] byte ` protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" `
XXX_NoUnkeyedLiteral struct { } ` json:"-" `
XXX_unrecognized [ ] byte ` json:"-" `
XXX_sizecache int32 ` json:"-" `
}
func ( m * StakingContractInfoRequest ) Reset ( ) { * m = StakingContractInfoRequest { } }
func ( m * StakingContractInfoRequest ) String ( ) string { return proto . CompactTextString ( m ) }
func ( * StakingContractInfoRequest ) ProtoMessage ( ) { }
func ( * StakingContractInfoRequest ) Descriptor ( ) ( [ ] byte , [ ] int ) {
return fileDescriptor_014de31d7ac8c57c , [ ] int { 4 }
}
func ( m * StakingContractInfoRequest ) XXX_Unmarshal ( b [ ] byte ) error {
return xxx_messageInfo_StakingContractInfoRequest . Unmarshal ( m , b )
}
func ( m * StakingContractInfoRequest ) XXX_Marshal ( b [ ] byte , deterministic bool ) ( [ ] byte , error ) {
return xxx_messageInfo_StakingContractInfoRequest . Marshal ( b , m , deterministic )
}
func ( m * StakingContractInfoRequest ) XXX_Merge ( src proto . Message ) {
xxx_messageInfo_StakingContractInfoRequest . Merge ( m , src )
}
func ( m * StakingContractInfoRequest ) XXX_Size ( ) int {
return xxx_messageInfo_StakingContractInfoRequest . Size ( m )
}
func ( m * StakingContractInfoRequest ) XXX_DiscardUnknown ( ) {
xxx_messageInfo_StakingContractInfoRequest . DiscardUnknown ( m )
}
var xxx_messageInfo_StakingContractInfoRequest proto . InternalMessageInfo
func ( m * StakingContractInfoRequest ) GetAddress ( ) [ ] byte {
if m != nil {
return m . Address
}
return nil
}
// StakingContractInfoResponse is the response of GetStakingContractInfo.
type StakingContractInfoResponse struct {
// Contract address.
ContractAddress string ` protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" `
// The balance of the staking account.
Balance [ ] byte ` protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty" `
// The nonce of the staking account.
Nonce uint64 ` protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty" `
XXX_NoUnkeyedLiteral struct { } ` json:"-" `
XXX_unrecognized [ ] byte ` json:"-" `
XXX_sizecache int32 ` json:"-" `
}
func ( m * StakingContractInfoResponse ) Reset ( ) { * m = StakingContractInfoResponse { } }
func ( m * StakingContractInfoResponse ) String ( ) string { return proto . CompactTextString ( m ) }
func ( * StakingContractInfoResponse ) ProtoMessage ( ) { }
func ( * StakingContractInfoResponse ) Descriptor ( ) ( [ ] byte , [ ] int ) {
return fileDescriptor_014de31d7ac8c57c , [ ] int { 5 }
}
func ( m * StakingContractInfoResponse ) XXX_Unmarshal ( b [ ] byte ) error {
return xxx_messageInfo_StakingContractInfoResponse . Unmarshal ( m , b )
}
func ( m * StakingContractInfoResponse ) XXX_Marshal ( b [ ] byte , deterministic bool ) ( [ ] byte , error ) {
return xxx_messageInfo_StakingContractInfoResponse . Marshal ( b , m , deterministic )
}
func ( m * StakingContractInfoResponse ) XXX_Merge ( src proto . Message ) {
xxx_messageInfo_StakingContractInfoResponse . Merge ( m , src )
}
func ( m * StakingContractInfoResponse ) XXX_Size ( ) int {
return xxx_messageInfo_StakingContractInfoResponse . Size ( m )
}
func ( m * StakingContractInfoResponse ) XXX_DiscardUnknown ( ) {
xxx_messageInfo_StakingContractInfoResponse . DiscardUnknown ( m )
}
var xxx_messageInfo_StakingContractInfoResponse proto . InternalMessageInfo
func ( m * StakingContractInfoResponse ) GetContractAddress ( ) string {
if m != nil {
return m . ContractAddress
}
return ""
}
func ( m * StakingContractInfoResponse ) GetBalance ( ) [ ] byte {
if m != nil {
return m . Balance
}
return nil
}
func ( m * StakingContractInfoResponse ) GetNonce ( ) uint64 {
if m != nil {
return m . Nonce
}
return 0
}
func init ( ) {
proto . RegisterType ( ( * FetchAccountStateRequest ) ( nil ) , "client.FetchAccountStateRequest" )
proto . RegisterType ( ( * FetchAccountStateResponse ) ( nil ) , "client.FetchAccountStateResponse" )
proto . RegisterType ( ( * GetFreeTokenRequest ) ( nil ) , "client.GetFreeTokenRequest" )
proto . RegisterType ( ( * GetFreeTokenResponse ) ( nil ) , "client.GetFreeTokenResponse" )
proto . RegisterType ( ( * StakingContractInfoRequest ) ( nil ) , "client.StakingContractInfoRequest" )
proto . RegisterType ( ( * StakingContractInfoResponse ) ( nil ) , "client.StakingContractInfoResponse" )
}
func init ( ) { proto . RegisterFile ( "client.proto" , fileDescriptor_014de31d7ac8c57c ) }
var fileDescriptor_014de31d7ac8c57c = [ ] byte {
// 229 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0xe2 , 0xe2 , 0x49 , 0xce , 0xc9 , 0x4c ,
0xcd , 0x2b , 0xd1 , 0x2b , 0x28 , 0xca , 0x2f , 0xc9 , 0x17 , 0x62 , 0x83 , 0xf0 , 0x94 , 0x4c , 0xb8 , 0x24 ,
0xdc , 0x52 , 0x4b , 0x92 , 0x33 , 0x1c , 0x93 , 0x93 , 0xf3 , 0x4b , 0xf3 , 0x4a , 0x82 , 0x4b , 0x12 , 0x4b ,
0x52 , 0x83 , 0x52 , 0x0b , 0x4b , 0x53 , 0x8b , 0x4b , 0x84 , 0x24 , 0xb8 , 0xd8 , 0x13 , 0x53 , 0x52 , 0x8a ,
0x52 , 0x8b , 0x8b , 0x25 , 0x18 , 0x15 , 0x18 , 0x35 , 0x78 , 0x82 , 0x60 , 0x5c , 0x25 , 0x6f , 0x2e , 0x49 ,
0x2c , 0xba , 0x8a , 0x0b , 0xf2 , 0xf3 , 0x8a , 0x53 , 0x41 , 0xda , 0x92 , 0x12 , 0x73 , 0x12 , 0xf3 , 0x92 ,
0x53 , 0x61 , 0xda , 0xa0 , 0x5c , 0x21 , 0x11 , 0x2e , 0xd6 , 0xbc , 0x7c , 0x90 , 0x38 , 0x93 , 0x02 , 0xa3 ,
0x06 , 0x4b , 0x10 , 0x84 , 0xa3 , 0xa4 , 0xcf , 0x25 , 0xec , 0x9e , 0x5a , 0xe2 , 0x56 , 0x94 , 0x9a , 0x1a ,
0x92 , 0x9f , 0x9d , 0x9a , 0x47 , 0xd8 , 0x76 , 0x2d , 0x2e , 0x11 , 0x54 , 0x0d , 0x50 , 0x8b , 0x85 , 0xb8 ,
0x58 , 0x4a , 0x2a , 0x3c , 0x53 , 0xa0 , 0xca , 0xc1 , 0x6c , 0xa3 , 0x1d , 0x8c , 0x5c , 0xbc , 0xce , 0x60 ,
0xaf , 0x06 , 0xa7 , 0x16 , 0x95 , 0x65 , 0x26 , 0xa7 , 0x0a , 0x45 , 0x71 , 0x09 , 0x62 , 0xb8 , 0x5d , 0x48 ,
0x41 , 0x0f , 0x1a , 0x3a , 0xb8 , 0x02 , 0x43 , 0x4a , 0x11 , 0x8f , 0x0a , 0x88 , 0xfd , 0x4a , 0x0c , 0x42 ,
0xde , 0x5c , 0x3c , 0xc8 , 0x2e , 0x13 , 0x92 , 0x86 , 0x69 , 0xc2 , 0xe2 , 0x41 , 0x29 , 0x19 , 0xec , 0x92 ,
0x30 , 0xc3 , 0x92 , 0xd8 , 0xc0 , 0x31 , 0x65 , 0x0c , 0x08 , 0x00 , 0x00 , 0xff , 0xff , 0xc6 , 0xd9 , 0x35 ,
0x0c , 0xb9 , 0x01 , 0x00 , 0x00 ,
// 302 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0x84 , 0x52 , 0x41 , 0x4f , 0xf2 , 0x40 ,
0x14 , 0xfc , 0xda , 0x0f , 0x31 , 0xbe , 0xd4 , 0xa8 , 0x2b , 0x31 , 0xb5 , 0x78 , 0xa8 , 0xeb , 0x05 , 0x3d ,
0x60 , 0xa2 , 0xc6 , 0x3b , 0x21 , 0x81 , 0x10 , 0x6e , 0xad , 0x27 , 0x2f , 0x66 , 0xd9 , 0x3e , 0xb5 , 0x81 ,
0xec , 0x62 , 0xfb , 0x30 , 0xfc , 0x19 , 0xff , 0xab , 0xa1 , 0xdd , 0x35 , 0x35 , 0xb6 , 0x70 , 0xdb , 0x99 ,
0x7d , 0xf3 , 0x26 , 0x3b , 0xb3 , 0xe0 , 0xc9 , 0x45 , 0x8a , 0x8a , 0xfa , 0xcb , 0x4c , 0x93 , 0x66 , 0xed ,
0x12 , 0xf1 , 0x07 , 0xf0 , 0x47 , 0x48 , 0xf2 , 0x7d , 0x20 , 0xa5 , 0x5e , 0x29 , 0x8a , 0x49 , 0x10 , 0x46 ,
0xf8 , 0xb1 , 0xc2 , 0x9c , 0x98 , 0x0f , 0xfb , 0x22 , 0x49 , 0x32 , 0xcc , 0x73 , 0xdf , 0x09 , 0x9d , 0x9e ,
0x17 , 0x59 , 0xc8 , 0xa7 , 0x70 , 0x5e , 0xa3 , 0xca , 0x97 , 0x5a , 0xe5 , 0xb8 , 0x91 , 0xcd , 0xc4 , 0x42 ,
0x28 , 0x89 , 0x56 , 0x66 , 0x20 , 0xeb , 0xc0 , 0x9e , 0xd2 , 0x1b , 0xde , 0x0d , 0x9d , 0x5e , 0x2b , 0x2a ,
0x01 , 0xbf , 0x85 , 0xd3 , 0x31 , 0xd2 , 0x28 , 0x43 , 0x7c , 0xd2 , 0x73 , 0x54 , 0xbb , 0xdd , 0x6f , 0xa0 ,
0xf3 , 0x5b , 0x60 , 0x8c , 0x19 , 0xb4 , 0x68 , 0x3d , 0x49 , 0xcc , 0x78 , 0x71 , 0xe6 , 0x8f , 0x10 , 0xc4 ,
0x24 , 0xe6 , 0xa9 , 0x7a , 0x1b , 0x6a , 0x45 , 0x99 , 0x90 , 0x34 , 0x51 , 0xaf , 0x7a , 0xb7 , 0xc7 , 0x1a ,
0xba , 0xb5 , 0x3a , 0x63 , 0x75 , 0x0d , 0xc7 , 0xd2 , 0xf0 , 0x2f , 0xd5 , 0x0d , 0x07 , 0xd1 , 0x91 , 0xe5 ,
0x07 , 0x25 , 0x5d , 0x8d , 0xc3 , 0x6d , 0x88 , 0xe3 , 0x7f , 0x25 , 0x8e , 0xbb , 0x2f , 0x17 , 0x0e , 0x87 ,
0x45 , 0x39 , 0x31 , 0x66 , 0x9f , 0xa9 , 0x44 , 0xf6 , 0x0c , 0x27 , 0x7f , 0xd2 , 0x66 , 0x61 , 0xdf , 0xf4 ,
0xd9 , 0x54 , 0x5f , 0x70 , 0xb9 , 0x65 , 0xa2 , 0x7c , 0x06 , 0xff , 0xc7 , 0xa6 , 0xe0 , 0x55 , 0xb3 , 0x64 ,
0x5d , 0x2b , 0xaa , 0xa9 , 0x24 , 0xb8 , 0xa8 , 0xbf , 0xfc , 0x59 , 0x26 , 0xe1 , 0x6c , 0x8c , 0x54 , 0x93 ,
0x1b , 0xe3 , 0x56 , 0xd9 , 0x5c , 0x46 , 0x70 , 0xb5 , 0x75 , 0xc6 , 0x9a , 0xcc , 0xda , 0xc5 , 0x07 , 0xbe ,
0xff , 0x0e , 0x00 , 0x00 , 0xff , 0xff , 0xe9 , 0x3e , 0x0b , 0x3e , 0xd0 , 0x02 , 0x00 , 0x00 ,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -237,6 +343,7 @@ const _ = grpc.SupportPackageIsVersion4
type ClientServiceClient interface {
FetchAccountState ( ctx context . Context , in * FetchAccountStateRequest , opts ... grpc . CallOption ) ( * FetchAccountStateResponse , error )
GetFreeToken ( ctx context . Context , in * GetFreeTokenRequest , opts ... grpc . CallOption ) ( * GetFreeTokenResponse , error )
GetStakingContractInfo ( ctx context . Context , in * StakingContractInfoRequest , opts ... grpc . CallOption ) ( * StakingContractInfoResponse , error )
}
type clientServiceClient struct {
@ -265,10 +372,20 @@ func (c *clientServiceClient) GetFreeToken(ctx context.Context, in *GetFreeToken
return out , nil
}
func ( c * clientServiceClient ) GetStakingContractInfo ( ctx context . Context , in * StakingContractInfoRequest , opts ... grpc . CallOption ) ( * StakingContractInfoResponse , error ) {
out := new ( StakingContractInfoResponse )
err := c . cc . Invoke ( ctx , "/client.ClientService/GetStakingContractInfo" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// ClientServiceServer is the server API for ClientService service.
type ClientServiceServer interface {
FetchAccountState ( context . Context , * FetchAccountStateRequest ) ( * FetchAccountStateResponse , error )
GetFreeToken ( context . Context , * GetFreeTokenRequest ) ( * GetFreeTokenResponse , error )
GetStakingContractInfo ( context . Context , * StakingContractInfoRequest ) ( * StakingContractInfoResponse , error )
}
func RegisterClientServiceServer ( s * grpc . Server , srv ClientServiceServer ) {
@ -311,6 +428,24 @@ func _ClientService_GetFreeToken_Handler(srv interface{}, ctx context.Context, d
return interceptor ( ctx , in , info , handler )
}
func _ClientService_GetStakingContractInfo_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( StakingContractInfoRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ClientServiceServer ) . GetStakingContractInfo ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/client.ClientService/GetStakingContractInfo" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ClientServiceServer ) . GetStakingContractInfo ( ctx , req . ( * StakingContractInfoRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
var _ClientService_serviceDesc = grpc . ServiceDesc {
ServiceName : "client.ClientService" ,
HandlerType : ( * ClientServiceServer ) ( nil ) ,
@ -323,6 +458,10 @@ var _ClientService_serviceDesc = grpc.ServiceDesc{
MethodName : "GetFreeToken" ,
Handler : _ClientService_GetFreeToken_Handler ,
} ,
{
MethodName : "GetStakingContractInfo" ,
Handler : _ClientService_GetStakingContractInfo_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "client.proto" ,