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

[+] public key TX item type, "extra" section in CryptoNote transaction

[+] signature TX item type , "Tx suffix" in CryptoNote transaction
parent 5c3959fa
Branches bugs-2791-3
No related tags found
No related merge requests found
......@@ -38,6 +38,8 @@ set(DAP_CHAIN_HEADERS
dap_chain_section_tx.h
dap_chain_section_tx_in.h
dap_chain_section_tx_out.h
dap_chain_section_tx_pkey.h
dap_chain_section_tx_sig.h
dap_hash.h
dap_hash_fusion.h
dap_hash_keccak.h
......
......@@ -21,3 +21,4 @@
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dap_chain_block_txs.h"
......@@ -44,6 +44,7 @@ typedef enum dap_chain_hash_kind {
typedef union dap_chain_sig_type{
enum {
SIG_TYPE_NEWHOPE = 0x0000,
SIG_TYPE_KEY_IMAGE = 0xf000, /// @brief key image for anonymous transaction
SIG_TYPE_MULTI = 0xffff /// @brief Has inside subset of different signatures and sign composed with all of them
} type: 16;
......
......@@ -26,8 +26,10 @@
#include "dap_chain_section.h"
typedef enum dap_chain_tx_item_type{
TX_ITEM_TYPE_IN = 0x00,
TX_ITEM_TYPE_OUT = 0x10,
TX_ITEM_TYPE_IN = 0x00, /// @brief Transaction inputs
TX_ITEM_TYPE_OUT = 0x10, /// @brief Transaction outputs
TX_ITEM_TYPE_PKEY = 0x20,
TX_ITEM_TYPE_SIG = 0x30,
} dap_chain_tx_item_type_t;
/**
......
/*
* Authors:
* Dmitriy A. Gearasimov <kahovski@gmail.com>
* DeM Labs Inc. https://demlabs.net
* DeM Labs Open source community https://github.com/demlabsinc
* Copyright (c) 2017-2018
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include "dap_common.h"
#include "dap_chain_common.h"
#include "dap_chain_section_tx.h"
/**
* @struct dap_chain_tx_pkey
* @brief TX item with one of the transaction's public keys
*/
typedef struct dap_chain_tx_pkey{
struct {
dap_chain_tx_item_type_t type:8; /// @param type @brief Transaction item type
dap_chain_sig_type_t sig_type; /// Signature type
uint32_t sig_size; /// Signature size
} header; /// Only header's hash is used for verification
uint32_t seq_no; /// Sequence number, out of the header so could be changed during reorganization
uint8_t pkey[]; /// @param sig @brief raw pkey dat
} DAP_ALIGN_PACKED dap_chain_tx_pkey_t;
/*
* Authors:
* Dmitriy A. Gearasimov <kahovski@gmail.com>
* DeM Labs Inc. https://demlabs.net
* DeM Labs Open source community https://github.com/demlabsinc
* Copyright (c) 2017-2018
* All rights reserved.
This file is part of DAP (Deus Applications Prototypes) the open source project
DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DAP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include "dap_common.h"
#include "dap_chain_common.h"
#include "dap_chain_section_tx.h"
/**
* @struct dap_chain_tx_sig
* @brief Section with set of transaction signatures
*/
typedef struct dap_chain_tx_sig{
struct {
dap_chain_tx_item_type_t type:8; /// @param type @brief Transaction item type
dap_chain_sig_type_t sig_type; /// Signature type
uint32_t sig_size; /// Signature size
} header; /// Only header's hash is used for verification
uint8_t sig[]; /// @param sig @brief raw signature data
} DAP_ALIGN_PACKED dap_chain_tx_sig_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