Skip to content
Snippets Groups Projects
Commit 58933c9a authored by Dmitriy Gerasimov's avatar Dmitriy Gerasimov
Browse files

[+] Defined dap address format

parent f60848a4
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "dap_math_ops.h" #include "dap_math_ops.h"
#define DAP_CHAIN_HASH_SIZE 64 #define DAP_CHAIN_HASH_SIZE 64
#define DAP_CHAIN_ADDR_HASH_SIZE 32
typedef union dap_chain_hash{ typedef union dap_chain_hash{
uint8_t data[DAP_CHAIN_HASH_SIZE]; uint8_t data[DAP_CHAIN_HASH_SIZE];
...@@ -44,3 +45,9 @@ typedef union dap_chain_sig_type{ ...@@ -44,3 +45,9 @@ typedef union dap_chain_sig_type{
uint16_t raw; uint16_t raw;
} dap_chain_sig_type_t; } 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;
...@@ -36,8 +36,6 @@ typedef struct dap_chain_tx_out{ ...@@ -36,8 +36,6 @@ typedef struct dap_chain_tx_out{
struct { struct {
dap_chain_tx_item_type_t type:8; /// @param type @brief Transaction item type 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 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 } 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; } DAP_ALIGN_PACKED dap_chain_tx_out_t;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment