From 58933c9a72e7deda5bda32332f17ee20eb6fa5a6 Mon Sep 17 00:00:00 2001
From: Dmitriy Gerasimov <dm@cifercom.com>
Date: Sun, 14 Jan 2018 22:27:29 +0700
Subject: [PATCH] [+] Defined dap address format

---
 dap_chain_common.h         | 7 +++++++
 dap_chain_section_tx_out.h | 4 +---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dap_chain_common.h b/dap_chain_common.h
index ec0a7b710b..b9a9c8cfc8 100644
--- a/dap_chain_common.h
+++ b/dap_chain_common.h
@@ -29,6 +29,7 @@
 #include "dap_math_ops.h"
 
 #define DAP_CHAIN_HASH_SIZE 64
+#define DAP_CHAIN_ADDR_HASH_SIZE 32
 
 typedef union dap_chain_hash{
     uint8_t data[DAP_CHAIN_HASH_SIZE];
@@ -44,3 +45,9 @@ typedef union dap_chain_sig_type{
     uint16_t raw;
 } dap_chain_sig_type_t;
 
+typedef struct dap_chain_addr{
+    dap_chain_sig_type_t sig_type;
+    uint8_t hash[DAP_CHAIN_ADDR_HASH_SIZE];
+    uint64_t checksum;
+} dap_chain_addr_t;
+
diff --git a/dap_chain_section_tx_out.h b/dap_chain_section_tx_out.h
index 9c90d70a26..c46b767005 100644
--- a/dap_chain_section_tx_out.h
+++ b/dap_chain_section_tx_out.h
@@ -36,8 +36,6 @@ typedef struct dap_chain_tx_out{
     struct {
         dap_chain_tx_item_type_t type:8; ///           @param    type            @brief  Transaction item type
         uint64_t value; ///                       @param    value           @brief  Number of Datoshis ( DAP/10^9 ) to be transfered
-        dap_chain_sig_type_t sig_type:16; ///     @param    sig_type        @brief  Signature type
-        uint32_t sig_size; ///                    @param    sig_size        @brief  Signature size
     } header; /// Only header's hash is used for verification
-    uint8_t sig[]; /// @param sig @brief raw signatura dat
+    dap_chain_addr_t addr; ////
 } DAP_ALIGN_PACKED dap_chain_tx_out_t;
-- 
GitLab