From 621481ed9e4b72818e1f713090918bb33e0c3e0a Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 20 Nov 2023 13:35:06 +0400 Subject: [PATCH] Separate message for new lease --- proto/waves/events/events.proto | 4 ++-- proto/waves/invoke_script_result.proto | 2 +- proto/waves/node/grpc/accounts_api.proto | 2 +- proto/waves/transaction.proto | 18 +++++++-------- proto/waves/transaction_state_snapshot.proto | 23 +++++++++----------- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/proto/waves/events/events.proto b/proto/waves/events/events.proto index 393b1ab..53f0107 100644 --- a/proto/waves/events/events.proto +++ b/proto/waves/events/events.proto @@ -99,8 +99,8 @@ message StateUpdate { message DataEntryUpdate { bytes address = 1; - DataTransactionData.DataEntry data_entry = 2; - DataTransactionData.DataEntry data_entry_before = 10; + DataEntry data_entry = 2; + DataEntry data_entry_before = 10; } message AssetStateUpdate { diff --git a/proto/waves/invoke_script_result.proto b/proto/waves/invoke_script_result.proto index 0af37c1..8018a8a 100644 --- a/proto/waves/invoke_script_result.proto +++ b/proto/waves/invoke_script_result.proto @@ -85,7 +85,7 @@ message InvokeScriptResult { InvokeScriptResult stateChanges = 4; } - repeated DataTransactionData.DataEntry data = 1; + repeated DataEntry data = 1; repeated Payment transfers = 2; repeated Issue issues = 3; repeated Reissue reissues = 4; diff --git a/proto/waves/node/grpc/accounts_api.proto b/proto/waves/node/grpc/accounts_api.proto index 718ef1d..c7938e1 100644 --- a/proto/waves/node/grpc/accounts_api.proto +++ b/proto/waves/node/grpc/accounts_api.proto @@ -49,7 +49,7 @@ message BalanceResponse { message DataEntryResponse { bytes address = 1; - DataTransactionData.DataEntry entry = 2; + DataEntry entry = 2; } message ScriptData { diff --git a/proto/waves/transaction.proto b/proto/waves/transaction.proto index 07c106c..9978f74 100644 --- a/proto/waves/transaction.proto +++ b/proto/waves/transaction.proto @@ -66,17 +66,17 @@ message CreateAliasTransactionData { string alias = 1; }; -message DataTransactionData { - message DataEntry { - string key = 1; - oneof value { - int64 int_value = 10; - bool bool_value = 11; - bytes binary_value = 12; - string string_value = 13; - }; +message DataEntry { + string key = 1; + oneof value { + int64 int_value = 10; + bool bool_value = 11; + bytes binary_value = 12; + string string_value = 13; }; +}; +message DataTransactionData { repeated DataEntry data = 1; }; diff --git a/proto/waves/transaction_state_snapshot.proto b/proto/waves/transaction_state_snapshot.proto index 48065ed..cf55ad0 100644 --- a/proto/waves/transaction_state_snapshot.proto +++ b/proto/waves/transaction_state_snapshot.proto @@ -33,21 +33,18 @@ message TransactionStateSnapshot { int64 out = 3; } - message LeaseState { + message NewLease { bytes lease_id = 1; - oneof status { - Active active = 21; - Cancelled cancelled = 22; - } - message Active { - int64 amount = 1; - bytes sender = 2; - bytes recipient = 3; - } - message Cancelled {} + bytes sender_public_key = 2; + bytes recipient_address = 3; + int64 amount = 4; } - message AssetStatic { + message CancelledLease { + bytes lease_id = 1; + } + + message NewAsset { bytes asset_id = 1; bytes issuer_public_key = 2; int32 decimals = 3; @@ -90,7 +87,7 @@ message TransactionStateSnapshot { message AccountData { bytes address = 1; - repeated DataTransactionData.DataEntry entries = 2; + repeated DataEntry entries = 2; } message Sponsorship {