You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
2.9 KiB
132 lines
2.9 KiB
syntax = "proto3";
|
|
|
|
package walletSystem.v1;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
option go_package = "wallet-system/api/walletSystem/v1;v1";
|
|
|
|
// The greeting service definition.
|
|
service Wallet {
|
|
// GenerateAddress Generate wallet address
|
|
rpc GenerateAddress (GenerateAddressRequest) returns (WalletReply) {
|
|
option (google.api.http) = {
|
|
post:"/wallet/generateAddress",
|
|
body:"*",
|
|
};
|
|
}
|
|
// SignatureTrc20Grpc GrpcTrc20 Wallet Signature
|
|
rpc SignatureTrc20Grpc (SignatureTrc20Request) returns (SignatureTrc20Reply) {
|
|
option (google.api.http) = {
|
|
post:"/wallet/signatureTrc20Grpc",
|
|
body:"*",
|
|
};
|
|
}
|
|
// GetAllAddress Check all wallet addresses
|
|
rpc GetAllAddress (WalletRequest) returns (WalletReply) {
|
|
option (google.api.http) = {
|
|
post:"/wallet/allAddress",
|
|
body:"*",
|
|
};
|
|
}
|
|
// GetAllAddressAndPrivateKey Query all private keys
|
|
rpc GetAllAddressAndPrivateKey (WalletRequest) returns (WalletKeyReply) {
|
|
option (google.api.http) = {
|
|
post:"/wallet/allAddressAndPrivateKey",
|
|
body:"*",
|
|
};
|
|
}
|
|
// GetPrivateKeyByAddress Query private key through wallet address
|
|
rpc GetPrivateKeyByAddress (GetPrivateKeyByAddressRequest) returns (WalletPKeysReply) {
|
|
option (google.api.http) = {
|
|
post:"/wallet/privateKeyByAddress",
|
|
body:"*",
|
|
};
|
|
}
|
|
// DeleteAddress Clean all wallets
|
|
rpc DeleteAddress (WalletRequest) returns (WalletReply) {
|
|
option (google.api.http) = {
|
|
post:"/wallet/allDeleteAddress",
|
|
body:"*",
|
|
};
|
|
}
|
|
// WalletApprove Wallet authorization
|
|
rpc WalletApprove(WalletApproveRequest)returns(WalletApproveReply){
|
|
option (google.api.http) = {
|
|
post:"/wallet/walletApprove",
|
|
body:"*",
|
|
};
|
|
}
|
|
}
|
|
|
|
message WalletApproveRequest{
|
|
string from = 1;
|
|
string to = 2;
|
|
string contract = 3;
|
|
uint32 amount = 4;
|
|
string trcCheck = 5;
|
|
string tokenId = 6;
|
|
uint32 feeLimit = 7;
|
|
}
|
|
|
|
message WalletApproveReply{
|
|
uint32 code = 1;
|
|
bytes data = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message WalletRequest {
|
|
}
|
|
|
|
message GetPrivateKeyByAddressRequest {
|
|
string address = 1;
|
|
}
|
|
|
|
message GenerateAddressRequest {
|
|
string wallet = 1;
|
|
uint32 number = 2;
|
|
}
|
|
|
|
message SignatureTrc20Request {
|
|
string from = 1;
|
|
string to = 2;
|
|
string contract = 3;
|
|
uint32 amount = 4;
|
|
string trcCheck = 5;
|
|
string tokenId = 6;
|
|
uint32 feeLimit = 7;
|
|
}
|
|
|
|
message SignatureTrc20Reply {
|
|
uint32 code = 1;
|
|
Data data = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message Data {
|
|
bool Result = 1;
|
|
string TxId = 2;
|
|
}
|
|
|
|
message WalletReply {
|
|
uint32 code = 1;
|
|
repeated string data = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message WalletKeyReply {
|
|
uint32 code = 1;
|
|
repeated Keys data = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message Keys {
|
|
string key =1;
|
|
bytes value =2;
|
|
}
|
|
|
|
message WalletPKeysReply {
|
|
uint32 code = 1;
|
|
string data = 2;
|
|
string message = 3;
|
|
}
|