Commit 085af494 authored by vicotor's avatar vicotor

add tx

parent a5b55c73
...@@ -8,38 +8,40 @@ import "crypter/v1/resource.proto"; ...@@ -8,38 +8,40 @@ import "crypter/v1/resource.proto";
message BatchSignRequest { message BatchSignRequest {
string id = 1; repeated bytes privk = 1;
repeated bytes privk = 2; repeated bytes data = 2;
repeated bytes data = 3; CryptType crypt_type = 3;
CryptType crypt_type = 4;
} }
message BatchSignResponse { message BatchSignResponse {
string id = 1; repeated bytes signature = 1;
repeated bytes signature = 2;
} }
message BatchVerifyRequest { message BatchVerifyRequest {
string id = 1; repeated bytes pubkey = 1;
repeated bytes pubkey = 2; repeated bytes signature = 2;
repeated bytes signature = 3; CryptType crypt_type = 3;
CryptType crypt_type = 4;
} }
message BatchVerifyResponse { message BatchVerifyResponse {
string id = 1; repeated bool verified = 1;
repeated bool verified = 2;
} }
message BatchRecoverRequest { message BatchRecoverRequest {
string id = 1; repeated bytes data = 1;
repeated bytes data = 2; repeated bytes signature = 2;
repeated bytes signature = 3; CryptType crypt_type = 3;
CryptType crypt_type = 4;
} }
message BatchRecoverResponse { message BatchRecoverResponse {
string id = 1; repeated bytes pubkey = 1;
repeated bytes pubkey = 2; }
message BatchRecoverTxRequest {
repeated EthTx raw_tx = 1;
}
message BatchRecoverTxResponse {
repeated RethTx recover_tx = 1;
} }
...@@ -5,4 +5,13 @@ package crypter.v1; ...@@ -5,4 +5,13 @@ package crypter.v1;
enum CryptType { enum CryptType {
CRYPT_TYPE_INVALID = 0; CRYPT_TYPE_INVALID = 0;
CRYPT_TYPE_SECP256K1 = 1; CRYPT_TYPE_SECP256K1 = 1;
}
message EthTx {
bytes rlp_data = 1;
}
message RethTx {
bytes from = 1;
bytes rlp_data = 2;
} }
\ No newline at end of file
...@@ -11,4 +11,5 @@ service CrypterService { ...@@ -11,4 +11,5 @@ service CrypterService {
rpc BatchSign(BatchSignRequest) returns (BatchSignResponse) {} rpc BatchSign(BatchSignRequest) returns (BatchSignResponse) {}
rpc BatchVerify(BatchVerifyRequest) returns (BatchVerifyResponse) {} rpc BatchVerify(BatchVerifyRequest) returns (BatchVerifyResponse) {}
rpc BatchRecover(BatchRecoverRequest) returns (BatchRecoverResponse) {} rpc BatchRecover(BatchRecoverRequest) returns (BatchRecoverResponse) {}
rpc BatchRecoverTx(BatchRecoverTxRequest) returns (BatchRecoverTxResponse) {}
} }
syntax = "proto3"; syntax = "proto3";
package txchecker.v1; package txchecker.v1;
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