From efa0951a0b69ec562da60988a3ff31c41d769517 Mon Sep 17 00:00:00 2001 From: astaphobia Date: Tue, 6 Aug 2019 16:39:08 +0800 Subject: [PATCH 1/3] add accountType and accountAddress as rqeuest fields --- model/transaction.proto | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/model/transaction.proto b/model/transaction.proto index 406c8af..9a21a8f 100644 --- a/model/transaction.proto +++ b/model/transaction.proto @@ -55,27 +55,26 @@ message ProofOfOwnership { bytes signature = 5; } + +//------------ +// P2P Content +//------------ + +// GetTransactionRequest return model.Transaction message GetTransactionRequest { // Fetch Transaction by its ID int64 ID = 1; } +// GetTransactions return GetTransactionsResponse message GetTransactionsRequest { // Transactions set limit to be fetched uint32 Limit = 1; // Transactions set offset to be fetched uint64 Offset = 2; + string AccountAddress = 3; + string AccountType = 4; } - -message PostTransactionRequest { - // Signed transaction bytes - bytes TransactionBytes = 1; -} - -message PostTransactionResponse { - Transaction Transaction = 1; -} - message GetTransactionsResponse { // Number of transactions in total uint64 Total = 1; @@ -85,14 +84,17 @@ message GetTransactionsResponse { repeated Transaction Transactions = 3; } -// SendTransaction request in p2pCommunication service -message SendTransactionRequest { +// PostTransactionRequest return PostTransactionResponse +message PostTransactionRequest { + // Signed transaction bytes bytes TransactionBytes = 1; } +message PostTransactionResponse { + Transaction Transaction = 1; +} -// TODO: Currently not yet used. Should we delete it? -message PostUnconfirmedTransactionRequest { - Transaction Transaction = 1; - uint32 ArrivalTimestamp = 2; - int64 FeePerByte = 3; +// SendTransactionRequest request in p2pCommunication service +message SendTransactionRequest { + bytes TransactionBytes = 1; } + From da5a3e07fa87c8c76eff1c23fa96c9df5be715b2 Mon Sep 17 00:00:00 2001 From: astaphobia Date: Fri, 9 Aug 2019 11:07:12 +0800 Subject: [PATCH 2/3] remove accountType from GetTransactionsRequest --- documentation.swagger.json | 7 ++++++- model/transaction.proto | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/documentation.swagger.json b/documentation.swagger.json index 5795edd..cd82a33 100644 --- a/documentation.swagger.json +++ b/documentation.swagger.json @@ -11,7 +11,7 @@ ], "swagger": "2.0", "info": { - "title": "service/accountBalance.proto", + "title": "service/account.proto", "version": "version not set" }, "paths": { @@ -452,6 +452,11 @@ "description": "Transactions set offset to be fetched.", "name": "Offset", "in": "query" + }, + { + "type": "string", + "name": "AccountAddress", + "in": "query" } ], "responses": { diff --git a/model/transaction.proto b/model/transaction.proto index 551475e..32b4ecd 100644 --- a/model/transaction.proto +++ b/model/transaction.proto @@ -78,7 +78,6 @@ message GetTransactionsRequest { // Transactions set offset to be fetched uint64 Offset = 2; string AccountAddress = 3; - string AccountType = 4; } message GetTransactionsResponse { // Number of transactions in total From d3c0f7dcf7dce82b5a466fbaff069a93f6b2c6e0 Mon Sep 17 00:00:00 2001 From: astaphobia Date: Fri, 9 Aug 2019 11:19:54 +0800 Subject: [PATCH 3/3] fix conflict --- documentation.swagger.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/documentation.swagger.json b/documentation.swagger.json index ab122ca..79c962e 100644 --- a/documentation.swagger.json +++ b/documentation.swagger.json @@ -879,6 +879,14 @@ "type": "string", "format": "int64" }, + "RecipientAccountID": { + "type": "string", + "format": "byte" + }, + "SenderAccountID": { + "type": "string", + "format": "byte" + }, "TransactionBytes": { "type": "string", "format": "byte"