From 8ad511a1a96c09000d4ee9a2b7d8d69eae3824a2 Mon Sep 17 00:00:00 2001 From: Heng Zhang Date: Tue, 20 Mar 2018 21:56:34 +0800 Subject: [PATCH 1/3] add GetAccontByAddress. --- api/api.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/api.proto b/api/api.proto index f31dc42b900..30830fcfa32 100644 --- a/api/api.proto +++ b/api/api.proto @@ -20,6 +20,10 @@ service Wallet { }; + rpc GetAccountByAddress (BytesMessage) returns (Account) { + + }; + rpc ListAccounts (EmptyMessage) returns (AccountList) { }; @@ -106,3 +110,6 @@ message EmptyMessage { message NumberMessage { int64 num = 1; } +message BytesMessage { + bytes num = 1; +} \ No newline at end of file From f8fb26545a84bb7e33e470993c286c823635b007 Mon Sep 17 00:00:00 2001 From: sasaxie Date: Tue, 20 Mar 2018 22:21:20 +0800 Subject: [PATCH 2/3] rename PongMessage.to -> PongMessage.from --- core/Discover.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Discover.proto b/core/Discover.proto index 5087456d11e..ed8d00cb0d0 100644 --- a/core/Discover.proto +++ b/core/Discover.proto @@ -58,7 +58,7 @@ message PingMessage { } message PongMessage { - Endpoint to = 1; + Endpoint from = 1; int32 echo = 2; int64 timestamp = 3; } From db26d7b473aa7dacbd025c27b743c707f9c70ac6 Mon Sep 17 00:00:00 2001 From: Heng Zhang Date: Wed, 21 Mar 2018 10:43:40 +0800 Subject: [PATCH 3/3] add change getBalance to GetAcconts. --- api/api.proto | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/api/api.proto b/api/api.proto index 30830fcfa32..aa50632d1b4 100644 --- a/api/api.proto +++ b/api/api.proto @@ -9,9 +9,10 @@ option java_outer_classname = "GrpcAPI"; //Specify the class name of the generat service Wallet { - rpc GetBalance (Account) returns (Account) { + rpc GetAccount (Account) returns (Account) { }; + rpc CreateTransaction (TransferContract) returns (Transaction) { }; @@ -20,10 +21,6 @@ service Wallet { }; - rpc GetAccountByAddress (BytesMessage) returns (Account) { - - }; - rpc ListAccounts (EmptyMessage) returns (AccountList) { }; @@ -109,7 +106,4 @@ message EmptyMessage { } message NumberMessage { int64 num = 1; -} -message BytesMessage { - bytes num = 1; } \ No newline at end of file