diff --git a/docs/assets/bitprim_logo_orange.png b/docs/assets/bitprim_logo_orange.png new file mode 100644 index 0000000..f527101 Binary files /dev/null and b/docs/assets/bitprim_logo_orange.png differ diff --git a/docs/blank.md b/docs/blank.md new file mode 100644 index 0000000..c409365 --- /dev/null +++ b/docs/blank.md @@ -0,0 +1 @@ +## Test \ No newline at end of file diff --git a/docs/developer_guide/c++/C---interface.md b/docs/developer_guide/c++/C---interface.md new file mode 100644 index 0000000..03f4f46 --- /dev/null +++ b/docs/developer_guide/c++/C---interface.md @@ -0,0 +1,35 @@ +Bitprim's C++ interface is the base layer of the platform, the lowest abstraction level available. It's a fork of the Satoshi/reference implementation with several improvements, the main of them being modularization. Being monolithic, the reference client is harder to change, not only because a change ripples across the whole system, but also because it's not possible to mix and match different module implementations. + +## Package diagram + +--- + +If we were to view the Bitprim projects as UML packages, their dependencies would look like this \(some projects omitted for simplicity\): + +## ![](assets/bitprim_package_diagram.png)Which is the main responsibility/functionality for each package? + +--- + +* **secp256k1**: Implementation of the standard of the same name which deals with ellyptic curves cryptography. +* **bitprim-core**: Basic Bitcoin utilities \(encryption, wallet, math\) to be reused by all projects. +* **bitprim-consensus**: An implementation of Satoshi's algorithm for agreeing on a course of action \(achieving consensus\) between nodes in a network. +* **bitprim-database**: Defines how to store and manipulate Bitcoin transactions. +* **bitprim-network**: P2P communication rules between nodes in the Bitcoin network. +* **bitprim-protocol**: Defines payload structure and lower level communication details. +* **bitprim-blockchain**: Interface for accessing the Bitcoin public ledger, a.k.a. blockchain, in which all transactions are linked between them. +* **bitprim-node**: The highest level of abstraction: a full node in the Bitcoin network; it can query the blockchain in many ways and insert blocks as well. + +## Exploring the public interface for each package + +--- + +All packages follow the same structure: At the top level of their source tree, they have an **include** directory. Inside it, there's a single .hpp file which \#includes all the public headers for the package for convenience. Then, inside the include directory, all the public headers for the library reside. These represent the public interface, i.e. those classes meant to be consumed by other packages or programs built on top of the package. + +For example, for [bitprim-node](https://github.com/bitprim/bitprim-node): + +![](assets/2017-06-28-010231_1920x1080_scrot.png)Taking a look inside [full\_node.hpp](https://github.com/bitprim/bitprim-node/blob/master/include/bitcoin/node/full_node.hpp), we can see in its public methods how an instance of a full node can be consumed: + +![](assets/2017-06-28-010906_1920x1080_scrot.png) + +There's a constructor which receives a configuration object \(see [configuration.hpp](https://github.com/bitprim/bitprim-node/blob/master/include/bitcoin/node/configuration.hpp)\), a destructor, and more interestingly, functions for starting, running, stopping and closing the node. Some have callbacks \(start and run\), which the user will have to implement to handle the associated events asynchronously. Examples of how to do this can be seen in Bitprim projects which use the node package: [bitprim-client](https://github.com/bitprim/bitprim-client) and [bitprim-server](https://github.com/bitprim/bitprim-server). + diff --git a/docs/developer_guide/c++/assets/2017-06-28-010231_1920x1080_scrot.png b/docs/developer_guide/c++/assets/2017-06-28-010231_1920x1080_scrot.png new file mode 100644 index 0000000..d25a54d Binary files /dev/null and b/docs/developer_guide/c++/assets/2017-06-28-010231_1920x1080_scrot.png differ diff --git a/docs/developer_guide/c++/assets/2017-06-28-010906_1920x1080_scrot.png b/docs/developer_guide/c++/assets/2017-06-28-010906_1920x1080_scrot.png new file mode 100644 index 0000000..9cc36f4 Binary files /dev/null and b/docs/developer_guide/c++/assets/2017-06-28-010906_1920x1080_scrot.png differ diff --git a/docs/developer_guide/c++/assets/bitprim_package_diagram.png b/docs/developer_guide/c++/assets/bitprim_package_diagram.png new file mode 100644 index 0000000..7b5c887 Binary files /dev/null and b/docs/developer_guide/c++/assets/bitprim_package_diagram.png differ diff --git a/docs/developer_guide/c/C-interface.md b/docs/developer_guide/c/C-interface.md new file mode 100644 index 0000000..73bc866 --- /dev/null +++ b/docs/developer_guide/c/C-interface.md @@ -0,0 +1,56 @@ +Bitprim's C interface, the [bitprim-node-cint](https://github.com/bitprim/bitprim-node-cint) project, is built on top of the C++ interface. Asides from allowing a C library or program to consume all the Bitprim functionality, it can act as the base to create bindings for many current popular programming languages, such as Javascript, C\#, Golang, Java and Python. All of these languages can interface easily with C, but not with C++. + +Granted, the Object Oriented paradigm is lost when transitioning to C, but it can be "recovered" when implementing a binding in an object oriented language such as C\#. In such a context, classes can be built in order to give application programmers a friendlier interface for integrating Bitcoin in their projects, bridging the gap created by C/C++'s inherent complexity. + +Therefore, Bitprim's interface is not really meant to be consumed directly, but as the basis for a higher level binding in another language. To make this task easier, most functions will receive a parameter which will wrap the implicit object \(this\), so that OOP can be preserved in the binding if possible. + +## Resource management + +--- + +To avoid memory leaks, all C functions which allocate memory that must be released by the user are clearly documented as such. When implementing a binding on top of the C interface, it is advisable to use the [RAII idiom](https://www.hackcraft.net/raii/) whenever possible to relieve the application programmer from the burden of manual memory management. + +## Basic structure - memory management + +--- + +Since this is C we're dealing with, there is nothing beyond a set of functions and some user defined types, but there is [a structure](https://github.com/bitprim/bitprim-node-cint/tree/master/include/bitprim/nodecint) nevertheless. The main "entry point" for the interface are the functions from [executor\_c.h](https://github.com/bitprim/bitprim-node-cint/blob/master/include/bitprim/nodecint/executor_c.h) and the types defined in [primitives.h](https://github.com/bitprim/bitprim-node-cint/blob/master/include/bitprim/nodecint/primitives.h). To start consuming node functionality, the first step is calling one of these functions: + +```c +executor_t executor_construct(char const* path, FILE* sout, FILE* serr); + +executor_t executor_construct_fd(char const* path, int sout_fd, int serr_fd); +``` + +Any function with the **construct** suffix will create an object in dynamic memory, which will have to be released by calling the associated **destruct**: + +```c +void executor_destruct(executor_t exec); +``` + +This pattern will be seen with many other types; whenever an object is created by the user with a construct function, it will need to be released with destruct as soon as it is no longer needed. + +Another case is when a function needs to create an object for returning it. For example, if we wanted to fetch the transaction history for a specific Bitcoin address, we could use the fetch\_history function: + +```c +void fetch_history(executor_t exec, payment_address_t address, size_t limit, size_t from_height, + history_fetch_handler_t handler); +``` + +There's another concept in play here: a pointer to function acting as a callback. Looking at the definition for history\_fetch\_handler\_t in primitives.h: + +```c +typedef void (*history_fetch_handler_t)(int error, history_compact_list_t history); +``` + +The second parameter, history, is created dynamically, and therefore must be released by the user, even if he didn't create it. This has to be done this way because there is no way for the C interface to know when the user is done using history. Therefore, it is up to him/her to call history\__compact\_\_list_\_destruct\(history\)._ + +The remaining header files follow these conventions; transaction.h contains functions for manipulating a transaction object, block.h for blocks, and so on. Keep in mind that objects must be destroyed manually. + +## API documentation + +--- + +[Detailed documentation](api.md) + + diff --git a/docs/developer_guide/c/api.md b/docs/developer_guide/c/api.md new file mode 100644 index 0000000..59d5c5b --- /dev/null +++ b/docs/developer_guide/c/api.md @@ -0,0 +1,1901 @@ +# Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`enum `[`point_kind`](#primitives_8h_1a4de8699f33816d833b0d9a69fb08fc8a) | 0 = output, 1 = spend +`public void `[`block_destruct`](#block_8h_1ac0c31d7ecb4f682fac067a179cc468d1)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Release the memory held by a block object. +`public int `[`block_is_valid`](#block_8h_1af7395388b4f83298636e05de96b8bb7f)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Determine if a block is valid. +`public `[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` `[`block_header`](#block_8h_1aa644a0753e3d370f683883aecc37a199)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Get the block's header. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`block_hash`](#block_8h_1a30cfad237bdb5bebe5fd7e3b48f3d410)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Get the block's hash. +`public size_t `[`block_transaction_count`](#block_8h_1a7efc8cd7a41f4dfe6286629ab9ebe59b)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Get the block's transaction count. +`public `[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` `[`block_transaction_nth`](#block_8h_1a0732e73992d9c4c4789fc54f39e8747a)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t n)` | Get the block's n-th transaction. +`public size_t `[`block_serialized_size`](#block_8h_1a5b8666350465a4501cb3e8002085a2b1)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,uint32_t version)` | Get the block's serialized size. +`public uint64_t `[`block_subsidy`](#block_8h_1a6c9f4dca5ff1fc402d405e4216a82d86)`(size_t height)` | Get the block subsidy (miner_reward = block_subsidy + transaction_fees) +`public uint64_t `[`block_fees`](#block_8h_1a0ee8cfa6d663b50aff057932efb0eeaa)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Get the block's total transaction fees (miner_reward = block_subsidy + transaction_fees) +`public uint64_t `[`block_claim`](#block_8h_1a4a1d431723d6e90f80894bb6b6a9c213)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Get the block's claim. +`public uint64_t `[`block_reward`](#block_8h_1af91de8cf3d009d9bb291f3fdac1c35dd)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` | Get the block's miner reward (miner_reward = block_subsidy + transaction_fees) +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`block_generate_merkle_root`](#block_8h_1accd9987fa1b37396e047f6e8b2251c12)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Generate a Merkle root for a block. +`public size_t `[`block_signature_operations`](#block_8h_1a0095ecbd424497725258918fc0c07acc)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Get the block's signature operations count. +`public size_t `[`block_signature_operations_bip16_active`](#block_8h_1adbc5bcd535157b8fca7e9869db80d68d)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,int bip16_active)` | Get the block's BIP0016 signature operations count. +`public size_t `[`block_total_inputs`](#block_8h_1aded82b46e51e35812902beec2e60c508)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,int with_coinbase)` | Get the block's input count. +`public int `[`block_is_extra_coinbases`](#block_8h_1acda164be7d985af0e920396fd5dbf438)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Determine if a block has extra coinbases. +`public int `[`block_is_final`](#block_8h_1aa3b0657e9a9141472d62e61b6ff7800a)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` | Determine if a block is final. +`public int `[`block_is_distinct_transaction_set`](#block_8h_1a2a7648c49fb07ad150013289522e9a62)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Determine if a block contains a distinct transaction set. +`public int `[`block_is_valid_coinbase_claim`](#block_8h_1a18fb299820f406654184facc727f6359)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` | Determine if a block contains a valid coinbase claim. +`public int `[`block_is_valid_coinbase_script`](#block_8h_1aa8e9758dd0e41b4ebcf0daef7cb50af2)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` | Determine if a block contains a valid coinbase script. +`public int `[`block_is_internal_double_spend`](#block_8h_1a7c4a0d1bd346fe47a8f0022427b47b9c)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Determine if a block contains an internal double spend. +`public int `[`block_is_valid_merkle_root`](#block_8h_1ae3e37f3180a5403625db8bdbe6d105ee)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` | Determine if a block has a valid Merkle root. +`public `[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` `[`compact_block_header`](#compact__block_8h_1a8cf34d1187d38c7d6201453289a19d5c)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` | Get compact block header. +`public int `[`compact_block_is_valid`](#compact__block_8h_1accb0d739d132cbed90dc3495886a05b0)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` | Determine if a compact block is valid. +`public size_t `[`compact_block_serialized_size`](#compact__block_8h_1aa96e45a0eb41a7d8bcfe03340d8e502b)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block,uint32_t version)` | Get a compact block's serialized size. +`public size_t `[`compact_block_transaction_count`](#compact__block_8h_1ae0785b7c6e06c6cb188c94fa0da5b98c)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` | Get the compact block's transaction count. +`public `[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` `[`compact_block_transaction_nth`](#compact__block_8h_1ad271eeb9ab8a4148a4065e380cb8213b)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block,size_t n)` | Get a compact block's n-th transaction. +`public uint64_t `[`compact_block_nonce`](#compact__block_8h_1aebea00334de2af9b07f9e6a9acd333d7)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` | Get compact block's nonce. +`public void `[`compact_block_destruct`](#compact__block_8h_1ace80b5f64b9e64e7c53c65d98a3cae4c)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` | Release memory held by compact block instance. +`public void `[`compact_block_reset`](#compact__block_8h_1a24b85a581e03ba42eafbe80f276bf01a)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` | Reset compact block. +`public `[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` `[`executor_construct`](#executor__c_8h_1aed246db742bdb2aeee6842a8743ea094)`(char const * path,FILE * sout,FILE * serr)` | Creates an executor instance, which controls a node in the network. +`public `[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` `[`executor_construct_fd`](#executor__c_8h_1ad9e4e0f23310637271e442585696de0c)`(char const * path,int sout_fd,int serr_fd)` | Creates an executor instance, which controls a node in the network. +`public void `[`executor_destruct`](#executor__c_8h_1a963f4bbda682b0bdf66d73a374a1ac89)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` | Destroys an executor instance (it only releases memory) +`public void `[`executor_run`](#executor__c_8h_1a53815abff7a75a5c963b342f8aa2f8bf)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`run_handler_t`](#primitives_8h_1a042c0a527cc2744c80e2565a7b7beb9e)` handler)` | After [executor_initchain()](#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6) has been called, the node can be started using this function. This is an asynchronous function, hence the callback parameter. +`public int `[`executor_run_wait`](#executor__c_8h_1abd814e409c84aac34363c21452cabd58)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` | After [executor_initchain()](#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6) has been called, the node can be started using this function. This is a synchronous function, so it will block until node has started running. +`public int `[`executor_initchain`](#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` | Initializes the chain for this node. It only creates the structure; the blockchain won't be synced. +`public void `[`executor_stop`](#executor__c_8h_1a80a0e1814db0a389e0ae7ba1a43c78e8)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` | Stops execution of the node. +`public void `[`fetch_last_height`](#executor__c_8h_1a83a045615b9be929f3331ef5302ec772)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`last_height_fetch_handler_t`](#primitives_8h_1a7319bd077428255061dc7c773ebc0cc4)` handler)` | Get the current blockchain height. +`public int `[`get_last_height`](#executor__c_8h_1a791b814d3928a00faa6138ea2d33c5b9)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t * height)` | Get the current blockchain height. This is the synchronous version of [fetch_last_height()](#executor__c_8h_1a83a045615b9be929f3331ef5302ec772), so it will block until height is retrieved from the network, or an error occurs. +`public void `[`fetch_block_height`](#executor__c_8h_1a903aec1424b51b8810273cf5642b70d0)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_height_fetch_handler_t`](#primitives_8h_1a7f26119f3693225e3698e80e8d7e64c9)` handler)` | Given a block, get its height in the blockchain. +`public int `[`get_block_height`](#executor__c_8h_1a0c140100f1eefa4dc6707e93568fdcc1)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,size_t * height)` | Given a block, get its height in the blockchain. This is the synchronous version of [fetch_block_height()](#executor__c_8h_1a903aec1424b51b8810273cf5642b70d0), so it will block until height is retrieved from the network, or an error occurs. +`public void `[`fetch_block_header_by_height`](#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`block_header_fetch_handler_t`](#primitives_8h_1a175320d3fdee884d5b1daba1f51af6cf)` handler)` | Given a height in the blockchain, retrieve its block's header. +`public int `[`get_block_header_by_height`](#executor__c_8h_1a2b2cb61fd05544b98a8829c6fc357a06)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` * header,size_t * ret_height)` | Given a height in the blockchain, retrieve its block's header. This is the synchronous version of [fetch_block_header_by_height()](#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b), so it will block until the header is retrieved from the network, or an error occurs. +`public void `[`fetch_block_header_by_hash`](#executor__c_8h_1a660eb713c231f3daa2a1cfb5fbfa4bd4)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_header_fetch_handler_t`](#primitives_8h_1a175320d3fdee884d5b1daba1f51af6cf)` handler)` | Given a block hash, retrieve its header. +`public int `[`get_block_header_by_hash`](#executor__c_8h_1a21e7310364624f505d7e16190fe1fa3c)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` * header,size_t * ret_height)` | Given a block hash, retrieve its header. This is the synchronous version of [fetch_block_header_by_height()](#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b), so it will block until the header is retrieved from the network, or an error occurs. +`public void `[`fetch_block_by_height`](#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`block_fetch_handler_t`](#primitives_8h_1a8c1fb1e052b08b1188d614222a9de9b2)` handler)` | Given a block's height, retrieve the block. +`public int `[`get_block_by_height`](#executor__c_8h_1a1887b7fb6d869838e66afd19a09b50d2)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` * block,size_t * ret_height)` | Given a block's height, retrieve the block. This is the synchronous version of [fetch_block_by_height()](#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3), so it will block until the block is retrieved from the network, or an error occurs. +`public void `[`fetch_block_by_hash`](#executor__c_8h_1a0e2e7826e0ed92f46f06fb7c50d0b5e2)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_fetch_handler_t`](#primitives_8h_1a8c1fb1e052b08b1188d614222a9de9b2)` handler)` | Given a block's hash, retrieve the block. +`public int `[`get_block_by_hash`](#executor__c_8h_1a13e08557af5950a19019e4ff55791d12)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` * block,size_t * ret_height)` | Given a block's hash, retrieve the block. This is the synchronous version of [fetch_block_by_height()](#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3), so it will block until the block is retrieved from the network, or an error occurs. +`public void `[`fetch_merkle_block_by_height`](#executor__c_8h_1a8133807dfb7628a247f191608976c47b)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`merkle_block_fetch_handler_t`](#primitives_8h_1aff6e1e0990f9e15ea36d9a1ce64890ff)` handler)` | Given a Merkle block's height, retrieve the block. +`public void `[`fetch_merkle_block_by_hash`](#executor__c_8h_1aca145cfaa6db94792255beef98e57b94)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`merkle_block_fetch_handler_t`](#primitives_8h_1aff6e1e0990f9e15ea36d9a1ce64890ff)` handler)` | Given a Merkle block's hash, retrieve the block. +`public void `[`fetch_compact_block_by_height`](#executor__c_8h_1a553b3ba0d2df8d9c3cc0d544f570d976)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`compact_block_fetch_handler_t`](#primitives_8h_1ae4895924faf7b39c24a050618ebf6c51)` handler)` | Given a compact block's height, retrieve the block. +`public void `[`fetch_compact_block_by_hash`](#executor__c_8h_1a7a2060ab5f19214db5431646c98a09b8)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`compact_block_fetch_handler_t`](#primitives_8h_1ae4895924faf7b39c24a050618ebf6c51)` handler)` | Given a compact block's hash, retrieve the block. +`public void `[`fetch_transaction`](#executor__c_8h_1a99a0cbcfe63b6381c738d21bd7826b3d)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,int require_confirmed,`[`transaction_fetch_handler_t`](#primitives_8h_1ae0808043043d84636e3a2e3c754b8fd6)` handler)` | Given a transaction hash, retrieve it (optionally requiring it to be confirmed) +`public int `[`get_transaction`](#executor__c_8h_1a7f74db96f0bd243d3568c771896d3a24)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,int require_confirmed,`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` * transaction,size_t * ret_height,size_t * index)` | Given a transaction's hash, retrieve it This is the synchronous version of [fetch_transaction()](#executor__c_8h_1a99a0cbcfe63b6381c738d21bd7826b3d), so it will block until the transaction is retrieved from the network, or an error occurs. +`public void `[`fetch_transaction_position`](#executor__c_8h_1a699c29f962fa7c4302ee04b21cf82a9a)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,int require_confirmed,`[`transaction_index_fetch_handler_t`](#primitives_8h_1a83733f3195e3e03a0d9f4cc822b48a3d)` handler)` | Given a transaction hash, retrieve its position inside the block (optionally requiring it to be confirmed) +`public void `[`fetch_output`](#executor__c_8h_1afcc2cb87a88aabb6a712435cee9abc9a)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,uint32_t index,int require_confirmed,`[`output_fetch_handler_t`](#primitives_8h_1aefbd8dfda0d008880de7c60bcf23dde9)` handler)` | Given an output hash, retrieve it (optionally requiring it to be confirmed) +`public int `[`get_output`](#executor__c_8h_1a8d35fe3911046137e8cace26f8a3c938)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,uint32_t index,int require_confirmed,`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` * output)` | Given an output's hash, retrieve it This is the synchronous version of [fetch_output()](#executor__c_8h_1afcc2cb87a88aabb6a712435cee9abc9a), so it will block until the output is retrieved from the network, or an error occurs. +`public void `[`fetch_spend`](#executor__c_8h_1a4966f126f69c313903cbf0f46be79f9d)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` outpoint,`[`spend_fetch_handler_t`](#primitives_8h_1aae597f1c61dc1dc585f5425375300ce3)` handler)` | Given an output point, retrieve its spend. +`public void `[`fetch_history`](#executor__c_8h_1a6ca41df13a8c7d67781d3a6005841ba6)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` address,size_t limit,size_t from_height,`[`history_fetch_handler_t`](#primitives_8h_1aee0367afd480cf2771d49690c567c25a)` handler)` | Given a payment address, a starting height and an entry limit, retrieve its transaction history. +`public int `[`get_history`](#executor__c_8h_1a1760fe0ef7ec0479230bf77ca7a2ea21)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` address,size_t limit,size_t from_height,`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` * out_history)` | Given a payment address, a starting height and an entry limit, retrieve its transaction history This is the synchronous version of [fetch_history()](#executor__c_8h_1a6ca41df13a8c7d67781d3a6005841ba6), so it will block until the history is retrieved from the network, or an error occurs. +`public `[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` `[`hex_to_tx`](#executor__c_8h_1a8af262d3a75ff3da484cbbccac8a987a)`(char const * tx_hex)` | Converts a raw transaction hex string to a transaction object. +`public void `[`validate_tx`](#executor__c_8h_1a26fae1c08f21b9f8097e944ebc8ebcc4)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` tx,`[`validate_tx_handler_t`](#primitives_8h_1a4a5ad506c3c92b9308072dcc1815ec17)` handler)` | Validates a new transaction (has not been added to the blockchain yet) +`public `[`long_hash_t`](#primitives_8h_1a15a7913e47813e6707bf348da7203f1a)` `[`wallet_mnemonics_to_seed`](#executor__c_8h_1abfdab2c4350be9e094478db62f440547)`(`[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` mnemonics)` | Convert a set of keywords/mnemonics to an HD wallet seed. +`public void `[`long_hash_destroy`](#executor__c_8h_1a636893dd40262d359bde53923e0a5d1c)`(`[`long_hash_t`](#primitives_8h_1a15a7913e47813e6707bf348da7203f1a)` ptr)` | Release the memory held by a long hash object. +`public void `[`header_destruct`](#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Releases memory held by the header object. +`public int `[`header_is_valid`](#header_8h_1adaabb8aadd2c899fc4c7361532b1fd8e)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Determine if the header is valid. +`public uint32_t `[`header_version`](#header_8h_1a59dc1762a22e8a9ee84c66e20660767b)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get header version. +`public void `[`header_set_version`](#header_8h_1af95ba2aea724401b648863129ab40a02)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t version)` | Set a header's version. +`public uint32_t `[`header_timestamp`](#header_8h_1aa72c883fde1a10067725e0772c6e687f)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get header timestamp. +`public void `[`header_set_timestamp`](#header_8h_1a29d0a46719548d37c95fc4e1a456353a)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t timestamp)` | Set header timestamp. +`public uint32_t `[`header_bits`](#header_8h_1a6a505d7f8f1137fe68b6b096ed35a15a)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get header bits. +`public void `[`header_set_bits`](#header_8h_1ad9acf477b496b3d6d632b70483dfad81)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t bits)` | Set header bits. +`public uint32_t `[`header_nonce`](#header_8h_1acb3466f0d21884c5ba4c272571440610)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get header nonce. +`public void `[`header_set_nonce`](#header_8h_1ab4dd1bb2ed0a537cf237e7dc82184d0c)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t nonce)` | Set header nonce +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`header_previous_block_hash`](#header_8h_1ac048f31bf04639f83e5be544adf9b977)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get previous block hash. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`header_merkle`](#header_8h_1af0f199ca6fed2c5cc37fedfe5dd86b47)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get header Merkle. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`header_hash`](#header_8h_1a625887dacbb1b408e292e0ff6a5638fc)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` | Get header hash. +`public `[`point_kind_t`](#primitives_8h_1a6f08d747fe788aa53ad4e70e58230078)` `[`history_compact_get_point_kind`](#history__compact_8h_1ad821d566985946fe24bc56f95d3a89c2)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` | Get the entry's point kind. +`public `[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` `[`history_compact_get_point`](#history__compact_8h_1a86510b343ae158fb7ceefbdbdb92a304)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` | Get the entry's point. +`public uint32_t `[`history_compact_get_height`](#history__compact_8h_1abbe2e7a92e48a0a32b261bcdfd723f07)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` | Get the height of history entry in the blockchain. +`public uint64_t `[`history_compact_get_value_or_previous_checksum`](#history__compact_8h_1a3421ce4d489fbda735d8de833bd1e090)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` | Get the entry's value. +`public void `[`history_compact_list_destruct`](#history__compact__list_8h_1aec9ce8654f6d88baf7deab18764e9b52)`(`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` history_compact_list)` | Release memory held by a history compact list instance. +`public size_t `[`history_compact_list_count`](#history__compact__list_8h_1a9e3ccd8686469993bb94a73ceb3bac65)`(`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` history_compact_list)` | Get the amount of entries in the list. +`public `[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` `[`history_compact_list_nth`](#history__compact__list_8h_1ad202250e8072936b89cb9381034c05a7)`(`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` history_list,size_t n)` | Get the list's n-th entry. +`public void `[`input_destruct`](#input_8h_1a07e22ee2679bf79e657229c161e6c669)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` | Release the memory held by an input instance. +`public int `[`input_is_valid`](#input_8h_1a2403b0b3e70fc82976302dce797feeb8)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` | Determine if an input is valid. +`public int `[`input_is_final`](#input_8h_1ad4c90e8e665df2478bbe2861cf16f3ce)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` | Determine if an input is final. +`public size_t `[`input_serialized_size`](#input_8h_1ac5ce4f197473b950042053bc378311e1)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input,int wire)` | Get the input's serialized size. +`public uint32_t `[`input_sequence`](#input_8h_1a17ca854ca78275acddea0a46bcf241f9)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` | Get the input's sequence number. +`public size_t `[`input_signature_operations`](#input_8h_1a6112eeed9ced97e9b8a65535d259b455)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input,int bip16_active)` | Get the input's signature operations count. +`public `[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` `[`input_script`](#input_8h_1a5962a64778d3825861968bd7b93f37ca)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` | Get input script. +`public `[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` `[`input_previous_output`](#input_8h_1a6117fe1c39f484f7fef1d76df61cb514)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` | Get the input's previous output. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`merkle_block_hash_nth`](#merkle__block_8h_1ae8c9b3a6d6573a51ab7908ae8dd82f78)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block,size_t n)` | Get the block's n-th hash. +`public `[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` `[`merkle_block_header`](#merkle__block_8h_1ad4ee91f14e5bab50b388c5438ad59698)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` | Get Merkle block header. +`public int `[`merkle_block_is_valid`](#merkle__block_8h_1ab0176f1b613f53a57476828a302a4178)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` | Determine if a Merkle block is valid. +`public size_t `[`merkle_block_hash_count`](#merkle__block_8h_1acb42d10ee086d6093266b98840da6c6b)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` | Get Merkle block hash count. +`public size_t `[`merkle_block_serialized_size`](#merkle__block_8h_1afb2d66d2e76d8e409b736cd7d0383302)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block,uint32_t version)` | Get Merkle block serialized size. +`public size_t `[`merkle_block_total_transaction_count`](#merkle__block_8h_1afb0c146c7501223601376a6144c953d6)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` | Get Merkle block transaction count. +`public void `[`merkle_block_destruct`](#merkle__block_8h_1af871439cfb75225e78af8e3454a20ca3)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` | Release memory held by Merkle block instance. +`public void `[`merkle_block_reset`](#merkle__block_8h_1a45c8fca631807d31b893cff090e480e0)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` | Reset Merkle block. +`public void `[`output_destruct`](#output_8h_1a974f0d91520ed93250bcd56e2d921590)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | Release memory held by an output instance. +`public int `[`output_is_valid`](#output_8h_1a0d68a3cfb17807c9a72c5e36a5ee15ce)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | Determine if an output is valid. +`public size_t `[`output_serialized_size`](#output_8h_1a24adac96e97aa036e0336b309c71fd39)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output,int wire)` | Get the output's serialized size. +`public uint64_t `[`output_value`](#output_8h_1ab6f944581267dbc41e2fa251f2ff7546)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | Get the output's value. +`public size_t `[`output_signature_operations`](#output_8h_1a4cbbc9de86c223a7f473c18e8a86f305)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | Get the output signature operations count. +`public `[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` `[`output_script`](#output_8h_1a8d1f20140cb6d480fbfe0e2622fa5065)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | : Get the output's script +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`output_get_hash`](#output_8h_1aabd1bd7f280dc40de4e81b3470bb1ab4)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | Get output hash. +`public uint32_t `[`output_get_index`](#output_8h_1a0c90a1cb8f51f0a7451a965582a677fb)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` | Get the output's index. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`output_point_get_hash`](#output__point_8h_1ac9f315a515685375a2b015f2afe17eef)`(`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` output)` | Get the output point's hash. +`public `[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` `[`output_point_construct`](#output__point_8h_1aeb7c309b991761bff5cdc4c5cdcbad1e)`()` | Create an empty output point. +`public uint32_t `[`output_point_get_index`](#output__point_8h_1a496394e7491a75771b40d85c400665c2)`(`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` output)` | Get output point index inside the point. Starts at 0 (zero) with the first one. +`public void `[`output_point_destruct`](#output__point_8h_1a4ae2358a29f31e9a0351585fbf61b993)`(`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` output)` | Release memory held by output point. +`public char const * `[`payment_address_encoded`](#payment__address_8h_1a51b00cfb74d43f59cf2ca2e735a2f7f1)`(`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` payment_address)` | Encode a payment address. +`public `[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` `[`payment_address_construct_from_string`](#payment__address_8h_1a266e2071493b7ed6c7ff9bc9eb80b8fb)`(char const * address)` | Create a payment address from a string. +`public uint8_t `[`version`](#payment__address_8h_1a20d1238557cc4df561e5b09816ea9450)`(`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` payment_address)` | Get payment address version. +`public void `[`payment_address_destruct`](#payment__address_8h_1a4b3dbd5712e7c6569c02763e0dfe4baa)`(`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` payment_address)` | Release memory held by payment address instance. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`point_get_hash`](#point_8h_1a2a624b2b8a7f329d9962b7a1924e12ab)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` | Get point hash. +`public int `[`point_is_valid`](#point_8h_1aa3224fcebb1829ab9916069c4473859c)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` | Determine if point is valid. +`public uint32_t `[`point_get_index`](#point_8h_1a3fc9f37c57e85b06b0f5b4c6c16ba212)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` | Get point index. +`public uint64_t `[`point_get_checksum`](#point_8h_1a643229ebf5215c2068cee98d0e15fc7c)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` | Get point checksum. +`public `[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` `[`point_list_nth`](#point__list_8h_1a81e77050195c59f9d6a618fe8e3f77e1)`(`[`point_list_t`](#primitives_8h_1a58aa9400b0e0aaa34d6b5a1a2666bb29)` point_list,size_t n)` | Get the list's n-th point. +`public size_t `[`point_list_count`](#point__list_8h_1a235ce31f8d2e130a3cbb998f7cf9f459)`(`[`point_list_t`](#primitives_8h_1a58aa9400b0e0aaa34d6b5a1a2666bb29)` point_list)` | Get point list count. +`public void `[`point_list_destruct`](#point__list_8h_1a06f5db8b275deb99ba1c3a31e60e86a2)`(`[`point_list_t`](#primitives_8h_1a58aa9400b0e0aaa34d6b5a1a2666bb29)` point_list)` | Release memory held by point list instance. +`public void `[`script_destruct`](#script_8h_1a594a6462fb996f38aa6f7b6f54b0c9e0)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` | Release memory held by a script instance. +`public int `[`script_is_valid`](#script_8h_1ac13f89765de02c5e08a39d8f76c1ad2f)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` | Determine if a script is valid. +`public int `[`script_is_valid_operations`](#script_8h_1afe1d83cba0d1d005d285882eeacc06a3)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` | Determine if the script operations are valid. +`public size_t `[`script_satoshi_content_size`](#script_8h_1a022d8a549bdde964bc1c00a77d50f2d0)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` | Get the script Satoshi content size. +`public size_t `[`script_serialized_size`](#script_8h_1ac7d8b5cbb37e481721fd5dffd58fbc4d)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,bool prefix)` | Get script serialized size. +`public char const * `[`script_to_string`](#script_8h_1a16eafae91b17dc195dee2fc03b9219f4)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,uint32_t active_forks)` | Get script string representation. +`public size_t `[`script_sigops`](#script_8h_1ab8814aa7853426f6ed6b3de848a27c83)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,bool embedded)` | Get script signature operations (sigops) count. +`public size_t `[`script_embedded_sigops`](#script_8h_1a490c2ea9b3c053eb1048a3a90b8eefea)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` prevout_script)` | Get script embedded signature operations (sigops) count. +`public void `[`transaction_destruct`](#transaction_8h_1ad32fc27899d84318a183ecf152967570)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Release memory held by transaction instance. +`public int `[`transaction_is_valid`](#transaction_8h_1ad25670d899126e24ab1d156ac967a4df)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine if a transaction is valid. +`public uint32_t `[`transaction_version`](#transaction_8h_1ac2ab82b5e4ce6a7fbe0b253274849c34)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction version. +`public void `[`transaction_set_version`](#transaction_8h_1a3a5951371c882dc42d49e1a87ccb7401)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,uint32_t version)` | Set transaction version. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`transaction_hash`](#transaction_8h_1a0e6db5b986bbc034483d319f1221b37c)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction hash. +`public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`transaction_hash_sighash_type`](#transaction_8h_1a922f312aad666746d25921814a6f1272)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,uint32_t sighash_type)` | Get transaction sighash by type. +`public uint32_t `[`transaction_locktime`](#transaction_8h_1a2c606bb46d54f237d9e19075e8336b4e)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction locktime. +`public size_t `[`transaction_serialized_size`](#transaction_8h_1a742cb6b1ef15066f58ea808292888977)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,int wire)` | Get transaction serialized size. +`public uint64_t `[`transaction_fees`](#transaction_8h_1a18e73484e57bb57571c2496f2fb361da)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction fees. +`public size_t `[`transaction_signature_operations`](#transaction_8h_1a2a51456f9e148f42c5dd84e1eca4e119)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction signature operations count. +`public size_t `[`transaction_signature_operations_bip16_active`](#transaction_8h_1a56c17116d7235f6ebec6e25ffdcdbc0b)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,int bip16_active)` | Get transaction BIP0016 signature operations count. +`public uint64_t `[`transaction_total_input_value`](#transaction_8h_1a72a7d67b3a88aea60275c6a4279e3150)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get the sum of the transaction input values. +`public uint64_t `[`transaction_total_output_value`](#transaction_8h_1aa3b36997f594a4967808e166173becae)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get the sum of the transaction output values. +`public int `[`transaction_is_coinbase`](#transaction_8h_1a7a16bc0444fe445d5e690deb5b26783b)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine if a transaction is coinbase. +`public int `[`transaction_is_null_non_coinbase`](#transaction_8h_1a9133115f7971f603ebe3d579f290a098)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine if a transaction is null and not coinnase. +`public int `[`transaction_is_oversized_coinbase`](#transaction_8h_1a202ed448323427c2bd2bf570da7755f6)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine if a transaction is oversized coinbase. +`public int `[`transaction_is_immature`](#transaction_8h_1af59c2b852425cc6defb83564ac93d930)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t target_height)` | Determine if a transaction is immature. +`public int `[`transaction_is_overspent`](#transaction_8h_1a9f0a7d2da797716141c12b17ea961409)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine if a transaction is overspent. +`public int `[`transaction_is_double_spend`](#transaction_8h_1abeb082da354f1794b20bde7c59fdeecb)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,int include_unconfirmed)` | Determine if a transaction is double spent. +`public int `[`transaction_is_missing_previous_outputs`](#transaction_8h_1a6aa8bd4e08e142f6a14a4ab702dc8f69)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine whether transaction is missing previous outputs. +`public int `[`transaction_is_final`](#transaction_8h_1a516abef95a61b04e9275caaac85a1632)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t block_height,uint32_t block_time)` | Determine if a transaction is final. +`public int `[`transaction_is_locktime_conflict`](#transaction_8h_1a4e24096bfbadeea91e45715186137e7f)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Determine if a transaction incurs in a locktime conflict. +`public size_t `[`transaction_output_count`](#transaction_8h_1a44ce3dcf50895f79b005c4ffd2820358)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction output count. +`public `[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` `[`transaction_output_nth`](#transaction_8h_1ab85fba65372d0078afedcc839ed50d46)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t n)` | Get the transaction's n-th output. +`public size_t `[`transaction_input_count`](#transaction_8h_1ae6ce6c6592b7a4666592f23050bf51c9)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` | Get transaction input count. +`public `[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` `[`transaction_input_nth`](#transaction_8h_1a58617f586abf033ed1cdaf77e087d538)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t n)` | Get n-th transaction input. +`public `[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` `[`word_list_construct`](#word__list_8h_1ac30529cbf0ce5a79d53add1f61c0c90d)`()` | Create a new word list instance. +`public void `[`word_list_add_word`](#word__list_8h_1af359d913e1eb715be21608dbb90ee558)`(`[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` word_list,const char * word)` | Add a word to the word list +`public void `[`word_list_destruct`](#word__list_8h_1a47d1b62e1dc307bac37279d213920436)`(`[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` word_list)` | Release memory held by word list object. + +## Members + +#### `enum `[`point_kind`](#primitives_8h_1a4de8699f33816d833b0d9a69fb08fc8a) {#primitives_8h_1a4de8699f33816d833b0d9a69fb08fc8a} + +0 = output, 1 = spend + + Values | Descriptions +--------------------------------|--------------------------------------------- +output | +spend | + +#### `public void `[`block_destruct`](#block_8h_1ac0c31d7ecb4f682fac067a179cc468d1)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1ac0c31d7ecb4f682fac067a179cc468d1} + +Release the memory held by a block object. + +#### Parameters +* `block` Handle to a block instance + +#### `public int `[`block_is_valid`](#block_8h_1af7395388b4f83298636e05de96b8bb7f)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1af7395388b4f83298636e05de96b8bb7f} + +Determine if a block is valid. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +True (non zero) iif the block is valid + +#### `public `[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` `[`block_header`](#block_8h_1aa644a0753e3d370f683883aecc37a199)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1aa644a0753e3d370f683883aecc37a199} + +Get the block's header. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +Handle to the block's header. Must be released by calling [header_destruct()](#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682) + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`block_hash`](#block_8h_1a30cfad237bdb5bebe5fd7e3b48f3d410)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a30cfad237bdb5bebe5fd7e3b48f3d410} + +Get the block's hash. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +Block hash as a byte array. Must be released by calling delete[] + +#### `public size_t `[`block_transaction_count`](#block_8h_1a7efc8cd7a41f4dfe6286629ab9ebe59b)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a7efc8cd7a41f4dfe6286629ab9ebe59b} + +Get the block's transaction count. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +The amount of transactions that comprise the block + +#### `public `[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` `[`block_transaction_nth`](#block_8h_1a0732e73992d9c4c4789fc54f39e8747a)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t n)` {#block_8h_1a0732e73992d9c4c4789fc54f39e8747a} + +Get the block's n-th transaction. + +#### Parameters +* `block` Handle to a block instance + +* `n` Index to the desired transaction. Starts at zero (0) for the first one + +#### Returns +Handle to the selected transaction. Must be released by calling [transaction_destruct()](#transaction_8h_1ad32fc27899d84318a183ecf152967570) + +#### `public size_t `[`block_serialized_size`](#block_8h_1a5b8666350465a4501cb3e8002085a2b1)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,uint32_t version)` {#block_8h_1a5b8666350465a4501cb3e8002085a2b1} + +Get the block's serialized size. + +#### Parameters +* `block` Handle to a block instance + +* `version` The protocol version as a 32-bit integer + +#### Returns +The block's serialized size + +#### `public uint64_t `[`block_subsidy`](#block_8h_1a6c9f4dca5ff1fc402d405e4216a82d86)`(size_t height)` {#block_8h_1a6c9f4dca5ff1fc402d405e4216a82d86} + +Get the block subsidy (miner_reward = block_subsidy + transaction_fees) + +#### Parameters +* `height` The block's height + +#### Returns +The block's subsidy + +#### `public uint64_t `[`block_fees`](#block_8h_1a0ee8cfa6d663b50aff057932efb0eeaa)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a0ee8cfa6d663b50aff057932efb0eeaa} + +Get the block's total transaction fees (miner_reward = block_subsidy + transaction_fees) + +#### Parameters +* `block` Handle to a block instance + +#### Returns +The block's total transaction fees + +#### `public uint64_t `[`block_claim`](#block_8h_1a4a1d431723d6e90f80894bb6b6a9c213)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a4a1d431723d6e90f80894bb6b6a9c213} + +Get the block's claim. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +The block's claim + +#### `public uint64_t `[`block_reward`](#block_8h_1af91de8cf3d009d9bb291f3fdac1c35dd)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` {#block_8h_1af91de8cf3d009d9bb291f3fdac1c35dd} + +Get the block's miner reward (miner_reward = block_subsidy + transaction_fees) + +#### Parameters +* `block` Handle to a block instance + +* `height` The block's height + +#### Returns +The block's miner reward + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`block_generate_merkle_root`](#block_8h_1accd9987fa1b37396e047f6e8b2251c12)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1accd9987fa1b37396e047f6e8b2251c12} + +Generate a Merkle root for a block. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +The new Merkle root's hash. Must be released by calling delete[] + +#### `public size_t `[`block_signature_operations`](#block_8h_1a0095ecbd424497725258918fc0c07acc)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a0095ecbd424497725258918fc0c07acc} + +Get the block's signature operations count. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +Amount of block signature operations + +#### `public size_t `[`block_signature_operations_bip16_active`](#block_8h_1adbc5bcd535157b8fca7e9869db80d68d)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,int bip16_active)` {#block_8h_1adbc5bcd535157b8fca7e9869db80d68d} + +Get the block's BIP0016 signature operations count. + +#### Parameters +* `block` Handle to a block instance + +* `bip16_active` If true (non zero), don't consider inactive operations for the total count + +#### Returns +Amount of BIP0016 block signature operations + +#### `public size_t `[`block_total_inputs`](#block_8h_1aded82b46e51e35812902beec2e60c508)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,int with_coinbase)` {#block_8h_1aded82b46e51e35812902beec2e60c508} + +Get the block's input count. + +#### Parameters +* `block` Handle to a block instance + +* `with_coinbase` If true (non zero), count coinbase inputs + +#### Returns +Amount of inputs owned by the transaction + +#### `public int `[`block_is_extra_coinbases`](#block_8h_1acda164be7d985af0e920396fd5dbf438)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1acda164be7d985af0e920396fd5dbf438} + +Determine if a block has extra coinbases. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +True (non zero) iif the block has extra coinbases + +#### `public int `[`block_is_final`](#block_8h_1aa3b0657e9a9141472d62e61b6ff7800a)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` {#block_8h_1aa3b0657e9a9141472d62e61b6ff7800a} + +Determine if a block is final. + +#### Parameters +* `block` Handle to a block instance + +* `height` Block height + +#### Returns +True (non zero) iif the block is final + +#### `public int `[`block_is_distinct_transaction_set`](#block_8h_1a2a7648c49fb07ad150013289522e9a62)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a2a7648c49fb07ad150013289522e9a62} + +Determine if a block contains a distinct transaction set. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +True (non zero) iif the block contains a distinct transaction set + +#### `public int `[`block_is_valid_coinbase_claim`](#block_8h_1a18fb299820f406654184facc727f6359)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` {#block_8h_1a18fb299820f406654184facc727f6359} + +Determine if a block contains a valid coinbase claim. + +#### Parameters +* `block` Handle to a block instance + +* `height` Block height + +#### Returns +True (non zero) iif the block contains a valid coinbase claim + +#### `public int `[`block_is_valid_coinbase_script`](#block_8h_1aa8e9758dd0e41b4ebcf0daef7cb50af2)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block,size_t height)` {#block_8h_1aa8e9758dd0e41b4ebcf0daef7cb50af2} + +Determine if a block contains a valid coinbase script. + +#### Parameters +* `block` Handle to a block instance + +* `height` Block height + +#### Returns +True (non zero) iif the block contains a valid coinbase script + +#### `public int `[`block_is_internal_double_spend`](#block_8h_1a7c4a0d1bd346fe47a8f0022427b47b9c)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1a7c4a0d1bd346fe47a8f0022427b47b9c} + +Determine if a block contains an internal double spend. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +True (non zero) iif the block contains an internal double spend + +#### `public int `[`block_is_valid_merkle_root`](#block_8h_1ae3e37f3180a5403625db8bdbe6d105ee)`(`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` block)` {#block_8h_1ae3e37f3180a5403625db8bdbe6d105ee} + +Determine if a block has a valid Merkle root. + +#### Parameters +* `block` Handle to a block instance + +#### Returns +True (non zero) iif the block has a valid Merkle root + +#### `public `[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` `[`compact_block_header`](#compact__block_8h_1a8cf34d1187d38c7d6201453289a19d5c)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` {#compact__block_8h_1a8cf34d1187d38c7d6201453289a19d5c} + +Get compact block header. + +#### Parameters +* `block` Handle to a compact block instance + +#### Returns +Handle to the compact block's header. Must be released by calling [header_destruct()](#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682) + +#### `public int `[`compact_block_is_valid`](#compact__block_8h_1accb0d739d132cbed90dc3495886a05b0)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` {#compact__block_8h_1accb0d739d132cbed90dc3495886a05b0} + +Determine if a compact block is valid. + +#### Parameters +* `block` Handle to a compact block instance + +#### Returns +True (non zero) iif the compact block is valid + +#### `public size_t `[`compact_block_serialized_size`](#compact__block_8h_1aa96e45a0eb41a7d8bcfe03340d8e502b)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block,uint32_t version)` {#compact__block_8h_1aa96e45a0eb41a7d8bcfe03340d8e502b} + +Get a compact block's serialized size. + +#### Parameters +* `block` Handle to a compact block instance + +* `version` Protocol version + +#### Returns +The compact block's serialized size + +#### `public size_t `[`compact_block_transaction_count`](#compact__block_8h_1ae0785b7c6e06c6cb188c94fa0da5b98c)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` {#compact__block_8h_1ae0785b7c6e06c6cb188c94fa0da5b98c} + +Get the compact block's transaction count. + +#### Parameters +* `block` Handle to a compact block instance + +#### Returns +Amount of transactions that comprise the compact block + +#### `public `[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` `[`compact_block_transaction_nth`](#compact__block_8h_1ad271eeb9ab8a4148a4065e380cb8213b)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block,size_t n)` {#compact__block_8h_1ad271eeb9ab8a4148a4065e380cb8213b} + +Get a compact block's n-th transaction. + +#### Parameters +* `block` Handle to a compact block instance + +* `n` Index to the transaction inside the block. Starts at 0 (zero) for the first one + +#### Returns +Handle to the n-th transaction. Must be released by calling [transaction_destruct()](#transaction_8h_1ad32fc27899d84318a183ecf152967570) + +#### `public uint64_t `[`compact_block_nonce`](#compact__block_8h_1aebea00334de2af9b07f9e6a9acd333d7)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` {#compact__block_8h_1aebea00334de2af9b07f9e6a9acd333d7} + +Get compact block's nonce. + +#### Parameters +* `block` Handle to a compact block instance + +#### Returns +Compact block's nonce + +#### `public void `[`compact_block_destruct`](#compact__block_8h_1ace80b5f64b9e64e7c53c65d98a3cae4c)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` {#compact__block_8h_1ace80b5f64b9e64e7c53c65d98a3cae4c} + +Release memory held by compact block instance. + +#### Parameters +* `block` Handle to a compact block instance + +#### `public void `[`compact_block_reset`](#compact__block_8h_1a24b85a581e03ba42eafbe80f276bf01a)`(`[`compact_block_t`](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad)` block)` {#compact__block_8h_1a24b85a581e03ba42eafbe80f276bf01a} + +Reset compact block. + +#### Parameters +* `block` Handle to a compact block instance + +#### `public `[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` `[`executor_construct`](#executor__c_8h_1aed246db742bdb2aeee6842a8743ea094)`(char const * path,FILE * sout,FILE * serr)` {#executor__c_8h_1aed246db742bdb2aeee6842a8743ea094} + +Creates an executor instance, which controls a node in the network. + +#### Parameters +* `path` Points to node configuration file + +* `sout` FILE* to where standard output will be redirected + +* `serr` FILE* to which standard error output will be redirected + +#### Returns +A new executor instance. Must be released manually by calling [executor_destruct()](#executor__c_8h_1a963f4bbda682b0bdf66d73a374a1ac89) + +#### `public `[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` `[`executor_construct_fd`](#executor__c_8h_1ad9e4e0f23310637271e442585696de0c)`(char const * path,int sout_fd,int serr_fd)` {#executor__c_8h_1ad9e4e0f23310637271e442585696de0c} + +Creates an executor instance, which controls a node in the network. + +#### Parameters +* `path` Points to node configuration file + +* `sout_fd` File descriptor to where standard output will be redirected + +* `serr_fd` File descriptor to which standard error output will be redirected + +#### Returns +A new executor instance. Must be released manually by calling [executor_destruct()](#executor__c_8h_1a963f4bbda682b0bdf66d73a374a1ac89) + +#### `public void `[`executor_destruct`](#executor__c_8h_1a963f4bbda682b0bdf66d73a374a1ac89)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` {#executor__c_8h_1a963f4bbda682b0bdf66d73a374a1ac89} + +Destroys an executor instance (it only releases memory) + +#### Parameters +* `exec` Handle to executor instance + +#### `public void `[`executor_run`](#executor__c_8h_1a53815abff7a75a5c963b342f8aa2f8bf)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`run_handler_t`](#primitives_8h_1a042c0a527cc2744c80e2565a7b7beb9e)` handler)` {#executor__c_8h_1a53815abff7a75a5c963b342f8aa2f8bf} + +After [executor_initchain()](#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6) has been called, the node can be started using this function. This is an asynchronous function, hence the callback parameter. + +#### Parameters +* `exec` Handle to executor instance + +* `handler` Callback which will be invoked when the node starts running. It must point to a C function matching the signature defined by run_handler_t + +**See also**: [run_handler_t](#primitives_8h_1a042c0a527cc2744c80e2565a7b7beb9e) + +#### `public int `[`executor_run_wait`](#executor__c_8h_1abd814e409c84aac34363c21452cabd58)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` {#executor__c_8h_1abd814e409c84aac34363c21452cabd58} + +After [executor_initchain()](#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6) has been called, the node can be started using this function. This is a synchronous function, so it will block until node has started running. + +#### Parameters +* `exec` Handle to executor instance + +#### Returns +Error code. Zero for success, non zero for error. + +#### `public int `[`executor_initchain`](#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` {#executor__c_8h_1a5edfd9a2012e7345e9908a6d80baeaf6} + +Initializes the chain for this node. It only creates the structure; the blockchain won't be synced. + +#### Parameters +* `exec` Handle to executor instance + +#### Returns +Error code. Zero for success, non zero for error. + +#### `public void `[`executor_stop`](#executor__c_8h_1a80a0e1814db0a389e0ae7ba1a43c78e8)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec)` {#executor__c_8h_1a80a0e1814db0a389e0ae7ba1a43c78e8} + +Stops execution of the node. + +#### Parameters +* `exec` Handle to executor instance + +#### `public void `[`fetch_last_height`](#executor__c_8h_1a83a045615b9be929f3331ef5302ec772)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`last_height_fetch_handler_t`](#primitives_8h_1a7319bd077428255061dc7c773ebc0cc4)` handler)` {#executor__c_8h_1a83a045615b9be929f3331ef5302ec772} + +Get the current blockchain height. + +#### Parameters +* `exec` Handle to executor instance + +* `handler` Callback which will be invoked when the blockchain height is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by last_height_fetch_handler_t + +**See also**: [last_height_fetch_handler_t](#primitives_8h_1a7319bd077428255061dc7c773ebc0cc4) + +#### `public int `[`get_last_height`](#executor__c_8h_1a791b814d3928a00faa6138ea2d33c5b9)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t * height)` {#executor__c_8h_1a791b814d3928a00faa6138ea2d33c5b9} + +Get the current blockchain height. This is the synchronous version of [fetch_last_height()](#executor__c_8h_1a83a045615b9be929f3331ef5302ec772), so it will block until height is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `height` Current blockchain height + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_block_height`](#executor__c_8h_1a903aec1424b51b8810273cf5642b70d0)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_height_fetch_handler_t`](#primitives_8h_1a7f26119f3693225e3698e80e8d7e64c9)` handler)` {#executor__c_8h_1a903aec1424b51b8810273cf5642b70d0} + +Given a block, get its height in the blockchain. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` Block hash, which univocally identifies a single block, as an array of bytes + +* `handler` Callback which will be invoked when the block height is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by block_height_fetch_handler_t + +**See also**: [block_height_fetch_handler_t](#primitives_8h_1a7f26119f3693225e3698e80e8d7e64c9) + +#### `public int `[`get_block_height`](#executor__c_8h_1a0c140100f1eefa4dc6707e93568fdcc1)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,size_t * height)` {#executor__c_8h_1a0c140100f1eefa4dc6707e93568fdcc1} + +Given a block, get its height in the blockchain. This is the synchronous version of [fetch_block_height()](#executor__c_8h_1a903aec1424b51b8810273cf5642b70d0), so it will block until height is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` Block hash, which univocally identifies a single block, as an array of bytes + +* `height` Block height + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_block_header_by_height`](#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`block_header_fetch_handler_t`](#primitives_8h_1a175320d3fdee884d5b1daba1f51af6cf)` handler)` {#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b} + +Given a height in the blockchain, retrieve its block's header. + +#### Parameters +* `exec` Handle to executor instance + +* `height` The height which identifies the desired block + +* `handler` Callback which will be invoked when the block header is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by block_header_fetch_handler_t + +**See also**: [block_header_fetch_handler_t](#primitives_8h_1a175320d3fdee884d5b1daba1f51af6cf) + +#### `public int `[`get_block_header_by_height`](#executor__c_8h_1a2b2cb61fd05544b98a8829c6fc357a06)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` * header,size_t * ret_height)` {#executor__c_8h_1a2b2cb61fd05544b98a8829c6fc357a06} + +Given a height in the blockchain, retrieve its block's header. This is the synchronous version of [fetch_block_header_by_height()](#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b), so it will block until the header is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `height` The height which identifies the desired block + +* `header` The block's header. It must be released by calling [header_destruct()](#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682) + +* `ret_height` The block's height + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_block_header_by_hash`](#executor__c_8h_1a660eb713c231f3daa2a1cfb5fbfa4bd4)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_header_fetch_handler_t`](#primitives_8h_1a175320d3fdee884d5b1daba1f51af6cf)` handler)` {#executor__c_8h_1a660eb713c231f3daa2a1cfb5fbfa4bd4} + +Given a block hash, retrieve its header. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired block + +* `handler` Callback which will be invoked when the block header is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by block_header_fetch_handler_t + +**See also**: [block_header_fetch_handler_t](#primitives_8h_1a175320d3fdee884d5b1daba1f51af6cf) + +#### `public int `[`get_block_header_by_hash`](#executor__c_8h_1a21e7310364624f505d7e16190fe1fa3c)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` * header,size_t * ret_height)` {#executor__c_8h_1a21e7310364624f505d7e16190fe1fa3c} + +Given a block hash, retrieve its header. This is the synchronous version of [fetch_block_header_by_height()](#executor__c_8h_1ae4d491f18285c2b31b6261683ef5679b), so it will block until the header is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired block + +* `header` Block header + +* `ret_height` Block height + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_block_by_height`](#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`block_fetch_handler_t`](#primitives_8h_1a8c1fb1e052b08b1188d614222a9de9b2)` handler)` {#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3} + +Given a block's height, retrieve the block. + +#### Parameters +* `exec` Handle to executor instance + +* `height` The height which identifies the desired block + +* `handler` Callback which will be invoked when the block is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by block_fetch_handler_t + +**See also**: [block_fetch_handler_t](#primitives_8h_1a8c1fb1e052b08b1188d614222a9de9b2) + +#### `public int `[`get_block_by_height`](#executor__c_8h_1a1887b7fb6d869838e66afd19a09b50d2)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` * block,size_t * ret_height)` {#executor__c_8h_1a1887b7fb6d869838e66afd19a09b50d2} + +Given a block's height, retrieve the block. This is the synchronous version of [fetch_block_by_height()](#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3), so it will block until the block is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `height` The height which identifies the desired block + +* `block` Block + +* `ret_height` Block height + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_block_by_hash`](#executor__c_8h_1a0e2e7826e0ed92f46f06fb7c50d0b5e2)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_fetch_handler_t`](#primitives_8h_1a8c1fb1e052b08b1188d614222a9de9b2)` handler)` {#executor__c_8h_1a0e2e7826e0ed92f46f06fb7c50d0b5e2} + +Given a block's hash, retrieve the block. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired block + +* `handler` Callback which will be invoked when the block is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by block_fetch_handler_t + +**See also**: [block_fetch_handler_t](#primitives_8h_1a8c1fb1e052b08b1188d614222a9de9b2) + +#### `public int `[`get_block_by_hash`](#executor__c_8h_1a13e08557af5950a19019e4ff55791d12)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`block_t`](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4)` * block,size_t * ret_height)` {#executor__c_8h_1a13e08557af5950a19019e4ff55791d12} + +Given a block's hash, retrieve the block. This is the synchronous version of [fetch_block_by_height()](#executor__c_8h_1a1ce9ccf736baf9f52e26093e7787f7a3), so it will block until the block is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired block + +* `block` Handle to block. Must be released by calling [block_destruct()](#block_8h_1ac0c31d7ecb4f682fac067a179cc468d1) + +* `ret_height` Block height + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_merkle_block_by_height`](#executor__c_8h_1a8133807dfb7628a247f191608976c47b)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`merkle_block_fetch_handler_t`](#primitives_8h_1aff6e1e0990f9e15ea36d9a1ce64890ff)` handler)` {#executor__c_8h_1a8133807dfb7628a247f191608976c47b} + +Given a Merkle block's height, retrieve the block. + +#### Parameters +* `exec` Handle to executor instance + +* `height` The height which identifies the desired block + +* `handler` Callback which will be invoked when the block is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by merkle_block_fetch_handler_t + +**See also**: [merkle_block_fetch_handler_t](#primitives_8h_1aff6e1e0990f9e15ea36d9a1ce64890ff) + +#### `public void `[`fetch_merkle_block_by_hash`](#executor__c_8h_1aca145cfaa6db94792255beef98e57b94)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`merkle_block_fetch_handler_t`](#primitives_8h_1aff6e1e0990f9e15ea36d9a1ce64890ff)` handler)` {#executor__c_8h_1aca145cfaa6db94792255beef98e57b94} + +Given a Merkle block's hash, retrieve the block. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired block + +* `handler` Callback which will be invoked when the block is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by merkle_block_fetch_handler_t + +**See also**: [merkle_block_fetch_handler_t](#primitives_8h_1aff6e1e0990f9e15ea36d9a1ce64890ff) + +#### `public void `[`fetch_compact_block_by_height`](#executor__c_8h_1a553b3ba0d2df8d9c3cc0d544f570d976)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,size_t height,`[`compact_block_fetch_handler_t`](#primitives_8h_1ae4895924faf7b39c24a050618ebf6c51)` handler)` {#executor__c_8h_1a553b3ba0d2df8d9c3cc0d544f570d976} + +Given a compact block's height, retrieve the block. + +#### Parameters +* `exec` Handle to executor instance + +* `height` The height which identifies the desired block + +* `handler` Callback which will be invoked when the block is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by compact_block_fetch_handler_t + +**See also**: [compact_block_fetch_handler_t](#primitives_8h_1ae4895924faf7b39c24a050618ebf6c51) + +#### `public void `[`fetch_compact_block_by_hash`](#executor__c_8h_1a7a2060ab5f19214db5431646c98a09b8)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,`[`compact_block_fetch_handler_t`](#primitives_8h_1ae4895924faf7b39c24a050618ebf6c51)` handler)` {#executor__c_8h_1a7a2060ab5f19214db5431646c98a09b8} + +Given a compact block's hash, retrieve the block. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired block + +* `handler` Callback which will be invoked when the block is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by compact_block_fetch_handler_t + +**See also**: [compact_block_fetch_handler_t](#primitives_8h_1ae4895924faf7b39c24a050618ebf6c51) + +#### `public void `[`fetch_transaction`](#executor__c_8h_1a99a0cbcfe63b6381c738d21bd7826b3d)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,int require_confirmed,`[`transaction_fetch_handler_t`](#primitives_8h_1ae0808043043d84636e3a2e3c754b8fd6)` handler)` {#executor__c_8h_1a99a0cbcfe63b6381c738d21bd7826b3d} + +Given a transaction hash, retrieve it (optionally requiring it to be confirmed) + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired transaction + +* `require_confirmed` If this is set to true (non zero), the transaction will only be fetched if it has already been confirmed + +* `handler` Callback which will be invoked when the transaction is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by transaction_fetch_handler_t + +**See also**: [transaction_fetch_handler_t](#primitives_8h_1ae0808043043d84636e3a2e3c754b8fd6) + +#### `public int `[`get_transaction`](#executor__c_8h_1a7f74db96f0bd243d3568c771896d3a24)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,int require_confirmed,`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` * transaction,size_t * ret_height,size_t * index)` {#executor__c_8h_1a7f74db96f0bd243d3568c771896d3a24} + +Given a transaction's hash, retrieve it This is the synchronous version of [fetch_transaction()](#executor__c_8h_1a99a0cbcfe63b6381c738d21bd7826b3d), so it will block until the transaction is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired transaction + +* `require_confirmed` If this is set to true (non zero), the transaction will only be fetched if it has already been confirmed + +* `transaction` Block + +* `ret_height` Block height + +* `index` Transaction index inside the block (zero-based, i.e. the first one is zero) + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_transaction_position`](#executor__c_8h_1a699c29f962fa7c4302ee04b21cf82a9a)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,int require_confirmed,`[`transaction_index_fetch_handler_t`](#primitives_8h_1a83733f3195e3e03a0d9f4cc822b48a3d)` handler)` {#executor__c_8h_1a699c29f962fa7c4302ee04b21cf82a9a} + +Given a transaction hash, retrieve its position inside the block (optionally requiring it to be confirmed) + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired transaction + +* `require_confirmed` If this is set to true (non zero), the transaction will only be fetched if it has already been confirmed + +* `handler` Callback which will be invoked when the transaction position is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by transaction_index_fetch_handler_t + +**See also**: [transaction_index_fetch_handler_t](#primitives_8h_1a83733f3195e3e03a0d9f4cc822b48a3d) + +#### `public void `[`fetch_output`](#executor__c_8h_1afcc2cb87a88aabb6a712435cee9abc9a)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,uint32_t index,int require_confirmed,`[`output_fetch_handler_t`](#primitives_8h_1aefbd8dfda0d008880de7c60bcf23dde9)` handler)` {#executor__c_8h_1afcc2cb87a88aabb6a712435cee9abc9a} + +Given an output hash, retrieve it (optionally requiring it to be confirmed) + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the output's transaction + +* `index` The index which identifies the output among the transaction's other outputs + +* `require_confirmed` If this is set to true (non zero), the output will only be fetched if it has already been confirmed + +* `handler` Callback which will be invoked when the output is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by output_fetch_handler_t + +**See also**: [output_fetch_handler_t](#primitives_8h_1aefbd8dfda0d008880de7c60bcf23dde9) + +#### `public int `[`get_output`](#executor__c_8h_1a8d35fe3911046137e8cace26f8a3c938)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` hash,uint32_t index,int require_confirmed,`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` * output)` {#executor__c_8h_1a8d35fe3911046137e8cace26f8a3c938} + +Given an output's hash, retrieve it This is the synchronous version of [fetch_output()](#executor__c_8h_1afcc2cb87a88aabb6a712435cee9abc9a), so it will block until the output is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `hash` The hash which identifies the desired output + +* `index` The index which identifies the output among the transaction's other outputs + +* `require_confirmed` If this is set to true (non zero), the output will only be fetched if it has already been confirmed + +* `output` Handle to output. Must be released by calling [output_destruct()](#output_8h_1a974f0d91520ed93250bcd56e2d921590) + +#### Returns +Error code. Zero for success, non zero for error + +#### `public void `[`fetch_spend`](#executor__c_8h_1a4966f126f69c313903cbf0f46be79f9d)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` outpoint,`[`spend_fetch_handler_t`](#primitives_8h_1aae597f1c61dc1dc585f5425375300ce3)` handler)` {#executor__c_8h_1a4966f126f69c313903cbf0f46be79f9d} + +Given an output point, retrieve its spend. + +#### Parameters +* `exec` Handle to executor instance + +* `outpoint` The output point whose spend we wish to retrieve + +* `handler` Callback which will be invoked when the spend is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by spend_fetch_handler_t + +**See also**: [spend_fetch_handler_t](#primitives_8h_1aae597f1c61dc1dc585f5425375300ce3) + +#### `public void `[`fetch_history`](#executor__c_8h_1a6ca41df13a8c7d67781d3a6005841ba6)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` address,size_t limit,size_t from_height,`[`history_fetch_handler_t`](#primitives_8h_1aee0367afd480cf2771d49690c567c25a)` handler)` {#executor__c_8h_1a6ca41df13a8c7d67781d3a6005841ba6} + +Given a payment address, a starting height and an entry limit, retrieve its transaction history. + +#### Parameters +* `exec` Handle to executor instance + +* `address` Payment address whose history we want to fetch + +* `limit` Maximum entries to fetch + +* `from_height` Starting blockchain height for the history + +* `handler` Callback which will be invoked when the history is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by history_fetch_handler_t + +**See also**: [history_fetch_handler_t](#primitives_8h_1aee0367afd480cf2771d49690c567c25a) + +#### `public int `[`get_history`](#executor__c_8h_1a1760fe0ef7ec0479230bf77ca7a2ea21)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` address,size_t limit,size_t from_height,`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` * out_history)` {#executor__c_8h_1a1760fe0ef7ec0479230bf77ca7a2ea21} + +Given a payment address, a starting height and an entry limit, retrieve its transaction history This is the synchronous version of [fetch_history()](#executor__c_8h_1a6ca41df13a8c7d67781d3a6005841ba6), so it will block until the history is retrieved from the network, or an error occurs. + +#### Parameters +* `exec` Handle to executor instance + +* `address` Payment address whose history we want to fetch + +* `limit` Maximum entries to fetch + +* `from_height` Starting blockchain height for the history + +* `out_history` Handle to history. Must be released by calling [history_compact_list_destruct()](#history__compact__list_8h_1aec9ce8654f6d88baf7deab18764e9b52) + +#### Returns +Error code. Zero for success, non zero for error + +#### `public `[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` `[`hex_to_tx`](#executor__c_8h_1a8af262d3a75ff3da484cbbccac8a987a)`(char const * tx_hex)` {#executor__c_8h_1a8af262d3a75ff3da484cbbccac8a987a} + +Converts a raw transaction hex string to a transaction object. + +#### Parameters +* `tx_hex` Raw transaction hex string + +#### Returns +Handle to new transaction object built from the hex string. Must be released by calling [transaction_destruct()](#transaction_8h_1ad32fc27899d84318a183ecf152967570) + +#### `public void `[`validate_tx`](#executor__c_8h_1a26fae1c08f21b9f8097e944ebc8ebcc4)`(`[`executor_t`](#primitives_8h_1a383e6acdb0d5f5df837fc1838b71fc51)` exec,`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` tx,`[`validate_tx_handler_t`](#primitives_8h_1a4a5ad506c3c92b9308072dcc1815ec17)` handler)` {#executor__c_8h_1a26fae1c08f21b9f8097e944ebc8ebcc4} + +Validates a new transaction (has not been added to the blockchain yet) + +#### Parameters +* `exec` Handle to executor instance + +* `tx` Transaction to validate + +* `handler` Callback which will be invoked when the history is retrieved from the network, or retrieval fails. This parameter must point to a C function matching the signature defined by validate_tx_handler_t + +**See also**: [validate_tx_handler_t](#primitives_8h_1a4a5ad506c3c92b9308072dcc1815ec17) + +#### `public `[`long_hash_t`](#primitives_8h_1a15a7913e47813e6707bf348da7203f1a)` `[`wallet_mnemonics_to_seed`](#executor__c_8h_1abfdab2c4350be9e094478db62f440547)`(`[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` mnemonics)` {#executor__c_8h_1abfdab2c4350be9e094478db62f440547} + +Convert a set of keywords/mnemonics to an HD wallet seed. + +#### Parameters +* `mnemonics` List of keywords/mnemonics + +#### Returns +Handle to long_hash object containing the seed. Must be released by calling [long_hash_destroy()](#executor__c_8h_1a636893dd40262d359bde53923e0a5d1c) + +#### `public void `[`long_hash_destroy`](#executor__c_8h_1a636893dd40262d359bde53923e0a5d1c)`(`[`long_hash_t`](#primitives_8h_1a15a7913e47813e6707bf348da7203f1a)` ptr)` {#executor__c_8h_1a636893dd40262d359bde53923e0a5d1c} + +Release the memory held by a long hash object. + +#### Parameters +* `ptr` Handle to long hash object + +#### `public void `[`header_destruct`](#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682} + +Releases memory held by the header object. + +#### Parameters +* `header` Handle to the header instance + +#### `public int `[`header_is_valid`](#header_8h_1adaabb8aadd2c899fc4c7361532b1fd8e)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1adaabb8aadd2c899fc4c7361532b1fd8e} + +Determine if the header is valid. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +True (non zero) iif the header is valid + +#### `public uint32_t `[`header_version`](#header_8h_1a59dc1762a22e8a9ee84c66e20660767b)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1a59dc1762a22e8a9ee84c66e20660767b} + +Get header version. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +Header version + +#### `public void `[`header_set_version`](#header_8h_1af95ba2aea724401b648863129ab40a02)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t version)` {#header_8h_1af95ba2aea724401b648863129ab40a02} + +Set a header's version. + +#### Parameters +* `header` Handle to a header instance + +* `version` New version value + +#### `public uint32_t `[`header_timestamp`](#header_8h_1aa72c883fde1a10067725e0772c6e687f)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1aa72c883fde1a10067725e0772c6e687f} + +Get header timestamp. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +Header timestamp + +#### `public void `[`header_set_timestamp`](#header_8h_1a29d0a46719548d37c95fc4e1a456353a)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t timestamp)` {#header_8h_1a29d0a46719548d37c95fc4e1a456353a} + +Set header timestamp. + +#### Parameters +* `header` Handle to a header instance + +* `timestamp` New header timestamp value + +#### `public uint32_t `[`header_bits`](#header_8h_1a6a505d7f8f1137fe68b6b096ed35a15a)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1a6a505d7f8f1137fe68b6b096ed35a15a} + +Get header bits. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +Header bits + +#### `public void `[`header_set_bits`](#header_8h_1ad9acf477b496b3d6d632b70483dfad81)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t bits)` {#header_8h_1ad9acf477b496b3d6d632b70483dfad81} + +Set header bits. + +#### Parameters +* `header` Handle to a header instance + +* `bits` New header bits value + +#### `public uint32_t `[`header_nonce`](#header_8h_1acb3466f0d21884c5ba4c272571440610)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1acb3466f0d21884c5ba4c272571440610} + +Get header nonce. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +Header nonce + +#### `public void `[`header_set_nonce`](#header_8h_1ab4dd1bb2ed0a537cf237e7dc82184d0c)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header,uint32_t nonce)` {#header_8h_1ab4dd1bb2ed0a537cf237e7dc82184d0c} + +Set header nonce +#### Parameters +* `header` Handle to a header instance + +* `nonce` New header nonce value + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`header_previous_block_hash`](#header_8h_1ac048f31bf04639f83e5be544adf9b977)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1ac048f31bf04639f83e5be544adf9b977} + +Get previous block hash. + +#### Parameters +* `header` Handle to a header instance + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`header_merkle`](#header_8h_1af0f199ca6fed2c5cc37fedfe5dd86b47)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1af0f199ca6fed2c5cc37fedfe5dd86b47} + +Get header Merkle. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +Header Merkle hash. Must be released by calling delete[] + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`header_hash`](#header_8h_1a625887dacbb1b408e292e0ff6a5638fc)`(`[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` header)` {#header_8h_1a625887dacbb1b408e292e0ff6a5638fc} + +Get header hash. + +#### Parameters +* `header` Handle to a header instance + +#### Returns +Header hash as byte array. Must be released by calling delete[] + +#### `public `[`point_kind_t`](#primitives_8h_1a6f08d747fe788aa53ad4e70e58230078)` `[`history_compact_get_point_kind`](#history__compact_8h_1ad821d566985946fe24bc56f95d3a89c2)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` {#history__compact_8h_1ad821d566985946fe24bc56f95d3a89c2} + +Get the entry's point kind. + +#### Parameters +* `history` Handle to a history entry instance + +#### Returns +Entry's point kind + +#### `public `[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` `[`history_compact_get_point`](#history__compact_8h_1a86510b343ae158fb7ceefbdbdb92a304)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` {#history__compact_8h_1a86510b343ae158fb7ceefbdbdb92a304} + +Get the entry's point. + +#### Parameters +* `history` Handle to a history entry instance + +#### Returns +Entry's point + +#### `public uint32_t `[`history_compact_get_height`](#history__compact_8h_1abbe2e7a92e48a0a32b261bcdfd723f07)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` {#history__compact_8h_1abbe2e7a92e48a0a32b261bcdfd723f07} + +Get the height of history entry in the blockchain. + +#### Parameters +* `history` Handle to a history entry instance + +#### Returns +Entry height in the blockchain + +#### `public uint64_t `[`history_compact_get_value_or_previous_checksum`](#history__compact_8h_1a3421ce4d489fbda735d8de833bd1e090)`(`[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` history)` {#history__compact_8h_1a3421ce4d489fbda735d8de833bd1e090} + +Get the entry's value. + +#### Parameters +* `history` Handle to a history entry instance + +#### Returns +Entry value, which can be a Satoshi value if point kind is output, or the previous entry's checksum if point kind is spend + +#### `public void `[`history_compact_list_destruct`](#history__compact__list_8h_1aec9ce8654f6d88baf7deab18764e9b52)`(`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` history_compact_list)` {#history__compact__list_8h_1aec9ce8654f6d88baf7deab18764e9b52} + +Release memory held by a history compact list instance. + +#### Parameters +* `history_compact_list` Handle to a history compact list instance + +#### `public size_t `[`history_compact_list_count`](#history__compact__list_8h_1a9e3ccd8686469993bb94a73ceb3bac65)`(`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` history_compact_list)` {#history__compact__list_8h_1a9e3ccd8686469993bb94a73ceb3bac65} + +Get the amount of entries in the list. + +#### Parameters +* `history_compact_list` Handle to a history compact list instance + +#### Returns +Entry count + +#### `public `[`history_compact_t`](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d)` `[`history_compact_list_nth`](#history__compact__list_8h_1ad202250e8072936b89cb9381034c05a7)`(`[`history_compact_list_t`](#primitives_8h_1aa9b635e04d3d0e124549cbef8b147638)` history_list,size_t n)` {#history__compact__list_8h_1ad202250e8072936b89cb9381034c05a7} + +Get the list's n-th entry. + +#### Parameters +* `history_list` Handle to a history compact list instance + +* `n` Index for selecting an entry. Starts at 0 (zero) for the first one + +#### Returns +Handle to a history compact entry. Must be released by calling history_compact_destruct() + +#### `public void `[`input_destruct`](#input_8h_1a07e22ee2679bf79e657229c161e6c669)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` {#input_8h_1a07e22ee2679bf79e657229c161e6c669} + +Release the memory held by an input instance. + +#### Parameters +* `input` Handle to an input instance + +#### `public int `[`input_is_valid`](#input_8h_1a2403b0b3e70fc82976302dce797feeb8)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` {#input_8h_1a2403b0b3e70fc82976302dce797feeb8} + +Determine if an input is valid. + +#### Parameters +* `input` Handle to an input instance + +#### Returns +True (non zero) iif the input is valid + +#### `public int `[`input_is_final`](#input_8h_1ad4c90e8e665df2478bbe2861cf16f3ce)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` {#input_8h_1ad4c90e8e665df2478bbe2861cf16f3ce} + +Determine if an input is final. + +#### Parameters +* `input` Handle to an input instance + +#### Returns +True (non zero) iif the input is final + +#### `public size_t `[`input_serialized_size`](#input_8h_1ac5ce4f197473b950042053bc378311e1)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input,int wire)` {#input_8h_1ac5ce4f197473b950042053bc378311e1} + +Get the input's serialized size. + +#### Parameters +* `input` Handle to an input instance + +* `wire` Deprecated; currently ignored + +#### Returns +Input's serialized size + +#### `public uint32_t `[`input_sequence`](#input_8h_1a17ca854ca78275acddea0a46bcf241f9)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` {#input_8h_1a17ca854ca78275acddea0a46bcf241f9} + +Get the input's sequence number. + +#### Parameters +* `input` Handle to an input instance + +#### Returns +The input's sequence number + +#### `public size_t `[`input_signature_operations`](#input_8h_1a6112eeed9ced97e9b8a65535d259b455)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input,int bip16_active)` {#input_8h_1a6112eeed9ced97e9b8a65535d259b455} + +Get the input's signature operations count. + +#### Parameters +* `input` Handle to an input instance + +* `bip16_active` If true (non zero), consider only active operations + +#### Returns +Signature operations count + +#### `public `[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` `[`input_script`](#input_8h_1a5962a64778d3825861968bd7b93f37ca)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` {#input_8h_1a5962a64778d3825861968bd7b93f37ca} + +Get input script. + +#### Parameters +* `input` Handle to an input instance + +#### Returns +Handle to input script. Must be released by calling [script_destruct()](#script_8h_1a594a6462fb996f38aa6f7b6f54b0c9e0) + +#### `public `[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` `[`input_previous_output`](#input_8h_1a6117fe1c39f484f7fef1d76df61cb514)`(`[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` input)` {#input_8h_1a6117fe1c39f484f7fef1d76df61cb514} + +Get the input's previous output. + +#### Parameters +* `input` Handle to an input instance + +#### Returns +Handle to input's previous output. Must be released by calling output_point_destruct + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`merkle_block_hash_nth`](#merkle__block_8h_1ae8c9b3a6d6573a51ab7908ae8dd82f78)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block,size_t n)` {#merkle__block_8h_1ae8c9b3a6d6573a51ab7908ae8dd82f78} + +Get the block's n-th hash. + +#### Parameters +* `block` Handle to a Merkle block instance + +* `n` Index for selecting hash + +#### Returns +Handle to Merkle block's n-th hash. Must be released by calling delete[] + +#### `public `[`header_t`](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8)` `[`merkle_block_header`](#merkle__block_8h_1ad4ee91f14e5bab50b388c5438ad59698)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` {#merkle__block_8h_1ad4ee91f14e5bab50b388c5438ad59698} + +Get Merkle block header. + +#### Parameters +* `block` Handle to a Merkle block instance + +#### Returns +Handle to Merkle block header. Must be released by calling [header_destruct()](#header_8h_1a1d1d3fc9341337e1bddd2681fdfed682) + +#### `public int `[`merkle_block_is_valid`](#merkle__block_8h_1ab0176f1b613f53a57476828a302a4178)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` {#merkle__block_8h_1ab0176f1b613f53a57476828a302a4178} + +Determine if a Merkle block is valid. + +#### Parameters +* `block` Handle to a Merkle block instance + +#### Returns +True (non zero) iif the Merkle block is valid + +#### `public size_t `[`merkle_block_hash_count`](#merkle__block_8h_1acb42d10ee086d6093266b98840da6c6b)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` {#merkle__block_8h_1acb42d10ee086d6093266b98840da6c6b} + +Get Merkle block hash count. + +#### Parameters +* `block` Handle to a Merkle block instance + +#### Returns +The Merkle block hash count + +#### `public size_t `[`merkle_block_serialized_size`](#merkle__block_8h_1afb2d66d2e76d8e409b736cd7d0383302)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block,uint32_t version)` {#merkle__block_8h_1afb2d66d2e76d8e409b736cd7d0383302} + +Get Merkle block serialized size. + +#### Parameters +* `block` Handle to a Merkle block instance + +* `version` Protocol version + +#### Returns +The Merkle block serialized size + +#### `public size_t `[`merkle_block_total_transaction_count`](#merkle__block_8h_1afb0c146c7501223601376a6144c953d6)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` {#merkle__block_8h_1afb0c146c7501223601376a6144c953d6} + +Get Merkle block transaction count. + +#### Parameters +* `block` Handle to a Merkle block instance + +#### Returns +Merkle block transaction count + +#### `public void `[`merkle_block_destruct`](#merkle__block_8h_1af871439cfb75225e78af8e3454a20ca3)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` {#merkle__block_8h_1af871439cfb75225e78af8e3454a20ca3} + +Release memory held by Merkle block instance. + +#### Parameters +* `block` Handle to a Merkle block instance + +#### `public void `[`merkle_block_reset`](#merkle__block_8h_1a45c8fca631807d31b893cff090e480e0)`(`[`merkle_block_t`](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9)` block)` {#merkle__block_8h_1a45c8fca631807d31b893cff090e480e0} + +Reset Merkle block. + +#### Parameters +* `block` Handle to a Merkle block instance + +#### `public void `[`output_destruct`](#output_8h_1a974f0d91520ed93250bcd56e2d921590)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1a974f0d91520ed93250bcd56e2d921590} + +Release memory held by an output instance. + +#### Parameters +* `output` Handle to an output instance + +#### `public int `[`output_is_valid`](#output_8h_1a0d68a3cfb17807c9a72c5e36a5ee15ce)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1a0d68a3cfb17807c9a72c5e36a5ee15ce} + +Determine if an output is valid. + +#### Parameters +* `output` Handle to an output instance + +#### Returns +True (non zero) iif the output is valid + +#### `public size_t `[`output_serialized_size`](#output_8h_1a24adac96e97aa036e0336b309c71fd39)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output,int wire)` {#output_8h_1a24adac96e97aa036e0336b309c71fd39} + +Get the output's serialized size. + +#### Parameters +* `output` Handle to an output instance + +* `wire` Deprecated; currently ignored + +#### Returns +The output's serialized size + +#### `public uint64_t `[`output_value`](#output_8h_1ab6f944581267dbc41e2fa251f2ff7546)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1ab6f944581267dbc41e2fa251f2ff7546} + +Get the output's value. + +#### Parameters +* `output` Handle to an output instance + +#### Returns +The output's value + +#### `public size_t `[`output_signature_operations`](#output_8h_1a4cbbc9de86c223a7f473c18e8a86f305)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1a4cbbc9de86c223a7f473c18e8a86f305} + +Get the output signature operations count. + +#### Parameters +* `output` Handle to an output instance + +#### Returns +Amount of signature operations in the output + +#### `public `[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` `[`output_script`](#output_8h_1a8d1f20140cb6d480fbfe0e2622fa5065)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1a8d1f20140cb6d480fbfe0e2622fa5065} + +: Get the output's script + +#### Parameters +* `output` Handle to an output instance + +#### Returns +Handle to the output script instance. Must be released by calling script_destruct + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`output_get_hash`](#output_8h_1aabd1bd7f280dc40de4e81b3470bb1ab4)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1aabd1bd7f280dc40de4e81b3470bb1ab4} + +Get output hash. + +#### Parameters +* `output` Handle to an output instance + +#### Returns +The output hash as a byte array. Must be released by calling delete[] + +#### `public uint32_t `[`output_get_index`](#output_8h_1a0c90a1cb8f51f0a7451a965582a677fb)`(`[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` output)` {#output_8h_1a0c90a1cb8f51f0a7451a965582a677fb} + +Get the output's index. + +#### Parameters +* `output` Handle to an output instance + +#### Returns +Output index + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`output_point_get_hash`](#output__point_8h_1ac9f315a515685375a2b015f2afe17eef)`(`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` output)` {#output__point_8h_1ac9f315a515685375a2b015f2afe17eef} + +Get the output point's hash. + +#### Parameters +* `output` Handle to an output point instance + +#### Returns +Point hash as byte array. Must be released by calling delete[] + +#### `public `[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` `[`output_point_construct`](#output__point_8h_1aeb7c309b991761bff5cdc4c5cdcbad1e)`()` {#output__point_8h_1aeb7c309b991761bff5cdc4c5cdcbad1e} + +Create an empty output point. + +#### Returns +Handle to new output point instance. Must be released by calling outpout_point_destruct() + +#### `public uint32_t `[`output_point_get_index`](#output__point_8h_1a496394e7491a75771b40d85c400665c2)`(`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` output)` {#output__point_8h_1a496394e7491a75771b40d85c400665c2} + +Get output point index inside the point. Starts at 0 (zero) with the first one. + +#### Parameters +* `output` Handle to an output point instance + +#### Returns +Output point index + +#### `public void `[`output_point_destruct`](#output__point_8h_1a4ae2358a29f31e9a0351585fbf61b993)`(`[`output_point_t`](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074)` output)` {#output__point_8h_1a4ae2358a29f31e9a0351585fbf61b993} + +Release memory held by output point. + +#### Parameters +* `output` Handle to an output point instance + +#### `public char const * `[`payment_address_encoded`](#payment__address_8h_1a51b00cfb74d43f59cf2ca2e735a2f7f1)`(`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` payment_address)` {#payment__address_8h_1a51b00cfb74d43f59cf2ca2e735a2f7f1} + +Encode a payment address. + +#### Parameters +* `payment_address` Handle to a payment address instance + +#### Returns +Encoded payment address + +#### `public `[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` `[`payment_address_construct_from_string`](#payment__address_8h_1a266e2071493b7ed6c7ff9bc9eb80b8fb)`(char const * address)` {#payment__address_8h_1a266e2071493b7ed6c7ff9bc9eb80b8fb} + +Create a payment address from a string. + +#### Parameters +* `address` String representing a payment address + +#### Returns +Handle to encoded payment address. Must be released by calling [payment_address_destruct()](#payment__address_8h_1a4b3dbd5712e7c6569c02763e0dfe4baa) + +#### `public uint8_t `[`version`](#payment__address_8h_1a20d1238557cc4df561e5b09816ea9450)`(`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` payment_address)` {#payment__address_8h_1a20d1238557cc4df561e5b09816ea9450} + +Get payment address version. + +#### Parameters +* `payment_address` Handle to a payment address instance + +#### Returns +Payment address version + +#### `public void `[`payment_address_destruct`](#payment__address_8h_1a4b3dbd5712e7c6569c02763e0dfe4baa)`(`[`payment_address_t`](#primitives_8h_1acc9e0ae61a6bf90f01911484e4ede07b)` payment_address)` {#payment__address_8h_1a4b3dbd5712e7c6569c02763e0dfe4baa} + +Release memory held by payment address instance. + +#### Parameters +* `payment_address` Handle to a payment address instance + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`point_get_hash`](#point_8h_1a2a624b2b8a7f329d9962b7a1924e12ab)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` {#point_8h_1a2a624b2b8a7f329d9962b7a1924e12ab} + +Get point hash. + +#### Parameters +* `point` Handle to point instance + +#### Returns +Point hash as byte array. Must be released by calling delete[] + +#### `public int `[`point_is_valid`](#point_8h_1aa3224fcebb1829ab9916069c4473859c)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` {#point_8h_1aa3224fcebb1829ab9916069c4473859c} + +Determine if point is valid. + +#### Parameters +* `point` Handle to point instance + +#### Returns +True (non zero) iif point is valid + +#### `public uint32_t `[`point_get_index`](#point_8h_1a3fc9f37c57e85b06b0f5b4c6c16ba212)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` {#point_8h_1a3fc9f37c57e85b06b0f5b4c6c16ba212} + +Get point index. + +#### Parameters +* `point` Handle to point instance + +#### Returns +Point index + +#### `public uint64_t `[`point_get_checksum`](#point_8h_1a643229ebf5215c2068cee98d0e15fc7c)`(`[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` point)` {#point_8h_1a643229ebf5215c2068cee98d0e15fc7c} + +Get point checksum. + +#### Parameters +* `point` Handle to point instance + +#### Returns +Point checksum + +#### `public `[`point_t`](#primitives_8h_1af6e7950f472a081d958eb8519843d38b)` `[`point_list_nth`](#point__list_8h_1a81e77050195c59f9d6a618fe8e3f77e1)`(`[`point_list_t`](#primitives_8h_1a58aa9400b0e0aaa34d6b5a1a2666bb29)` point_list,size_t n)` {#point__list_8h_1a81e77050195c59f9d6a618fe8e3f77e1} + +Get the list's n-th point. + +#### Parameters +* `point_list` Handle to a point list instance + +* `n` Index for the selected point. Starts at 0 (zero) with the first one + +#### Returns +Handle to selected point instance. Must be released with point_destruct() + +#### `public size_t `[`point_list_count`](#point__list_8h_1a235ce31f8d2e130a3cbb998f7cf9f459)`(`[`point_list_t`](#primitives_8h_1a58aa9400b0e0aaa34d6b5a1a2666bb29)` point_list)` {#point__list_8h_1a235ce31f8d2e130a3cbb998f7cf9f459} + +Get point list count. + +#### Parameters +* `point_list` Handle to a point list instance + +#### Returns +Point list count + +#### `public void `[`point_list_destruct`](#point__list_8h_1a06f5db8b275deb99ba1c3a31e60e86a2)`(`[`point_list_t`](#primitives_8h_1a58aa9400b0e0aaa34d6b5a1a2666bb29)` point_list)` {#point__list_8h_1a06f5db8b275deb99ba1c3a31e60e86a2} + +Release memory held by point list instance. + +#### Parameters +* `point_list` Handle to a point list instance + +#### `public void `[`script_destruct`](#script_8h_1a594a6462fb996f38aa6f7b6f54b0c9e0)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` {#script_8h_1a594a6462fb996f38aa6f7b6f54b0c9e0} + +Release memory held by a script instance. + +#### Parameters +* `script` Handle to a script instance + +#### `public int `[`script_is_valid`](#script_8h_1ac13f89765de02c5e08a39d8f76c1ad2f)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` {#script_8h_1ac13f89765de02c5e08a39d8f76c1ad2f} + +Determine if a script is valid. + +#### Parameters +* `script` Handle to a script instance + +#### Returns +True (non zero) iif the script is valid + +#### `public int `[`script_is_valid_operations`](#script_8h_1afe1d83cba0d1d005d285882eeacc06a3)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` {#script_8h_1afe1d83cba0d1d005d285882eeacc06a3} + +Determine if the script operations are valid. + +#### Parameters +* `script` Handle to a script instance + +#### Returns +True (non zero) iif the script operations are valid + +#### `public size_t `[`script_satoshi_content_size`](#script_8h_1a022d8a549bdde964bc1c00a77d50f2d0)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script)` {#script_8h_1a022d8a549bdde964bc1c00a77d50f2d0} + +Get the script Satoshi content size. + +#### Parameters +* `script` Handle to a script instance + +#### Returns +Script Satoshi content size + +#### `public size_t `[`script_serialized_size`](#script_8h_1ac7d8b5cbb37e481721fd5dffd58fbc4d)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,bool prefix)` {#script_8h_1ac7d8b5cbb37e481721fd5dffd58fbc4d} + +Get script serialized size. + +#### Parameters +* `script` Handle to a script instance + +* `prefix` If true, add prefix size to total size + +#### Returns +Script serialized size + +#### `public char const * `[`script_to_string`](#script_8h_1a16eafae91b17dc195dee2fc03b9219f4)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,uint32_t active_forks)` {#script_8h_1a16eafae91b17dc195dee2fc03b9219f4} + +Get script string representation. + +#### Parameters +* `script` Handle to a script instance + +* `active_forks` Active forks count + +#### Returns +Script string representation + +#### `public size_t `[`script_sigops`](#script_8h_1ab8814aa7853426f6ed6b3de848a27c83)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,bool embedded)` {#script_8h_1ab8814aa7853426f6ed6b3de848a27c83} + +Get script signature operations (sigops) count. + +#### Parameters +* `script` Handle to a script instance + +* `embedded` Tells whether to consider embedded sigops in the count or not + +#### Returns +Script sigops count + +#### `public size_t `[`script_embedded_sigops`](#script_8h_1a490c2ea9b3c053eb1048a3a90b8eefea)`(`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` script,`[`script_t`](#primitives_8h_1a14a6f2e8d8ccced8b9bf7844e22e4aef)` prevout_script)` {#script_8h_1a490c2ea9b3c053eb1048a3a90b8eefea} + +Get script embedded signature operations (sigops) count. + +#### Parameters +* `script` Handle to a script instance + +* `prevout_script` Handle to previous script instance + +#### Returns +Embedded signature operations count + +#### `public void `[`transaction_destruct`](#transaction_8h_1ad32fc27899d84318a183ecf152967570)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1ad32fc27899d84318a183ecf152967570} + +Release memory held by transaction instance. + +#### Parameters +* `transaction` Handle to transaction instance + +#### `public int `[`transaction_is_valid`](#transaction_8h_1ad25670d899126e24ab1d156ac967a4df)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1ad25670d899126e24ab1d156ac967a4df} + +Determine if a transaction is valid. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif a transaction is valid + +#### `public uint32_t `[`transaction_version`](#transaction_8h_1ac2ab82b5e4ce6a7fbe0b253274849c34)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1ac2ab82b5e4ce6a7fbe0b253274849c34} + +Get transaction version. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction version + +#### `public void `[`transaction_set_version`](#transaction_8h_1a3a5951371c882dc42d49e1a87ccb7401)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,uint32_t version)` {#transaction_8h_1a3a5951371c882dc42d49e1a87ccb7401} + +Set transaction version. + +#### Parameters +* `transaction` Handle to transaction instance + +* `version` New value for transaction version + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`transaction_hash`](#transaction_8h_1a0e6db5b986bbc034483d319f1221b37c)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a0e6db5b986bbc034483d319f1221b37c} + +Get transaction hash. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction hash as byte array. Must be released by calling delete[] + +#### `public `[`hash_t`](#primitives_8h_1aa0ccd30c9c9fb169daec5f65600e7c71)` `[`transaction_hash_sighash_type`](#transaction_8h_1a922f312aad666746d25921814a6f1272)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,uint32_t sighash_type)` {#transaction_8h_1a922f312aad666746d25921814a6f1272} + +Get transaction sighash by type. + +#### Parameters +* `transaction` Handle to transaction instance + +* `sighash_type` Sighash type + +#### Returns +Sighash as byte array. Must be released by calling delete[] + +#### `public uint32_t `[`transaction_locktime`](#transaction_8h_1a2c606bb46d54f237d9e19075e8336b4e)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a2c606bb46d54f237d9e19075e8336b4e} + +Get transaction locktime. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction locktime + +#### `public size_t `[`transaction_serialized_size`](#transaction_8h_1a742cb6b1ef15066f58ea808292888977)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,int wire)` {#transaction_8h_1a742cb6b1ef15066f58ea808292888977} + +Get transaction serialized size. + +#### Parameters +* `transaction` Handle to transaction instance + +* `wire` Deprecated; currently ignored + +#### Returns +Transaction serialized size + +#### `public uint64_t `[`transaction_fees`](#transaction_8h_1a18e73484e57bb57571c2496f2fb361da)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a18e73484e57bb57571c2496f2fb361da} + +Get transaction fees. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction fees + +#### `public size_t `[`transaction_signature_operations`](#transaction_8h_1a2a51456f9e148f42c5dd84e1eca4e119)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a2a51456f9e148f42c5dd84e1eca4e119} + +Get transaction signature operations count. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction signature operations count + +#### `public size_t `[`transaction_signature_operations_bip16_active`](#transaction_8h_1a56c17116d7235f6ebec6e25ffdcdbc0b)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,int bip16_active)` {#transaction_8h_1a56c17116d7235f6ebec6e25ffdcdbc0b} + +Get transaction BIP0016 signature operations count. + +#### Parameters +* `transaction` Handle to transaction instance + +* `bip16_active` If true, only consider active operations + +#### Returns +Transaction BIP0016 signature operations count + +#### `public uint64_t `[`transaction_total_input_value`](#transaction_8h_1a72a7d67b3a88aea60275c6a4279e3150)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a72a7d67b3a88aea60275c6a4279e3150} + +Get the sum of the transaction input values. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Sum of transaction input values + +#### `public uint64_t `[`transaction_total_output_value`](#transaction_8h_1aa3b36997f594a4967808e166173becae)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1aa3b36997f594a4967808e166173becae} + +Get the sum of the transaction output values. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Sum of transaction output values + +#### `public int `[`transaction_is_coinbase`](#transaction_8h_1a7a16bc0444fe445d5e690deb5b26783b)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a7a16bc0444fe445d5e690deb5b26783b} + +Determine if a transaction is coinbase. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif transaction is coinbase + +#### `public int `[`transaction_is_null_non_coinbase`](#transaction_8h_1a9133115f7971f603ebe3d579f290a098)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a9133115f7971f603ebe3d579f290a098} + +Determine if a transaction is null and not coinnase. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif the transaction is null and not coinbase + +#### `public int `[`transaction_is_oversized_coinbase`](#transaction_8h_1a202ed448323427c2bd2bf570da7755f6)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a202ed448323427c2bd2bf570da7755f6} + +Determine if a transaction is oversized coinbase. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif the transaction is oversized coinbase + +#### `public int `[`transaction_is_immature`](#transaction_8h_1af59c2b852425cc6defb83564ac93d930)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t target_height)` {#transaction_8h_1af59c2b852425cc6defb83564ac93d930} + +Determine if a transaction is immature. + +#### Parameters +* `transaction` Handle to transaction instance + +* `target_height` Target height + +#### Returns +True (non zero) iif the transaction is immature + +#### `public int `[`transaction_is_overspent`](#transaction_8h_1a9f0a7d2da797716141c12b17ea961409)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a9f0a7d2da797716141c12b17ea961409} + +Determine if a transaction is overspent. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif the transaction is overspent + +#### `public int `[`transaction_is_double_spend`](#transaction_8h_1abeb082da354f1794b20bde7c59fdeecb)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,int include_unconfirmed)` {#transaction_8h_1abeb082da354f1794b20bde7c59fdeecb} + +Determine if a transaction is double spent. + +#### Parameters +* `transaction` Handle to transaction instance + +* `include_unconfirmed` Tells whether to include unconfirmed outputs/inputs + +#### Returns +True (non zero) iif transaction is double spent + +#### `public int `[`transaction_is_missing_previous_outputs`](#transaction_8h_1a6aa8bd4e08e142f6a14a4ab702dc8f69)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a6aa8bd4e08e142f6a14a4ab702dc8f69} + +Determine whether transaction is missing previous outputs. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif transaction is missing previous outputs + +#### `public int `[`transaction_is_final`](#transaction_8h_1a516abef95a61b04e9275caaac85a1632)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t block_height,uint32_t block_time)` {#transaction_8h_1a516abef95a61b04e9275caaac85a1632} + +Determine if a transaction is final. + +#### Parameters +* `transaction` Handle to transaction instance + +* `block_height` Transaction block height + +* `block_time` Transaction block time + +#### Returns +True (non zero) iif the transaction is final + +#### `public int `[`transaction_is_locktime_conflict`](#transaction_8h_1a4e24096bfbadeea91e45715186137e7f)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a4e24096bfbadeea91e45715186137e7f} + +Determine if a transaction incurs in a locktime conflict. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +True (non zero) iif the transaction incurs in a locktime conflict + +#### `public size_t `[`transaction_output_count`](#transaction_8h_1a44ce3dcf50895f79b005c4ffd2820358)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1a44ce3dcf50895f79b005c4ffd2820358} + +Get transaction output count. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction output count + +#### `public `[`output_t`](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0)` `[`transaction_output_nth`](#transaction_8h_1ab85fba65372d0078afedcc839ed50d46)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t n)` {#transaction_8h_1ab85fba65372d0078afedcc839ed50d46} + +Get the transaction's n-th output. + +#### Parameters +* `transaction` Handle to transaction instance + +* `n` Index to select transaction output. Starts at 0 (zero) for the first one + +#### Returns +Handle to n-th transaction output. Must be released by calling [output_destruct()](#output_8h_1a974f0d91520ed93250bcd56e2d921590) + +#### `public size_t `[`transaction_input_count`](#transaction_8h_1ae6ce6c6592b7a4666592f23050bf51c9)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction)` {#transaction_8h_1ae6ce6c6592b7a4666592f23050bf51c9} + +Get transaction input count. + +#### Parameters +* `transaction` Handle to transaction instance + +#### Returns +Transaction input count + +#### `public `[`input_t`](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa)` `[`transaction_input_nth`](#transaction_8h_1a58617f586abf033ed1cdaf77e087d538)`(`[`transaction_t`](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995)` transaction,size_t n)` {#transaction_8h_1a58617f586abf033ed1cdaf77e087d538} + +Get n-th transaction input. + +#### Parameters +* `transaction` Handle to transaction instance + +* `n` Index to transaction input. Starts at 0 (zero) for the first one + +#### Returns +Transaction's n-th input + +#### `public `[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` `[`word_list_construct`](#word__list_8h_1ac30529cbf0ce5a79d53add1f61c0c90d)`()` {#word__list_8h_1ac30529cbf0ce5a79d53add1f61c0c90d} + +Create a new word list instance. + +#### Returns +Handle to new word list instance. Must be released by calling [word_list_destruct()](#word__list_8h_1a47d1b62e1dc307bac37279d213920436) + +#### `public void `[`word_list_add_word`](#word__list_8h_1af359d913e1eb715be21608dbb90ee558)`(`[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` word_list,const char * word)` {#word__list_8h_1af359d913e1eb715be21608dbb90ee558} + +Add a word to the word list +#### Parameters +* `word_list` Handle to a word list instance + +* `word` New word + +#### `public void `[`word_list_destruct`](#word__list_8h_1a47d1b62e1dc307bac37279d213920436)`(`[`word_list_t`](#primitives_8h_1a547ee5b6df76cdddedd5e12dea357036)` word_list)` {#word__list_8h_1a47d1b62e1dc307bac37279d213920436} + +Release memory held by word list object. + +#### Parameters +* `word_list` Handle to a word list instance + +Generated by [Moxygen](https://sourcey.com/moxygen) \ No newline at end of file diff --git a/docs/developer_guide/dotnet/assets/dotnet_interface.png b/docs/developer_guide/dotnet/assets/dotnet_interface.png new file mode 100644 index 0000000..ceb2c62 Binary files /dev/null and b/docs/developer_guide/dotnet/assets/dotnet_interface.png differ diff --git a/docs/developer_guide/dotnet/dotnet-Interface.md b/docs/developer_guide/dotnet/dotnet-Interface.md new file mode 100644 index 0000000..bceb5da --- /dev/null +++ b/docs/developer_guide/dotnet/dotnet-Interface.md @@ -0,0 +1,21 @@ +Bitprim's .NET interface is built on top of Bitprim's C interface, in this fashion: + +![](assets/dotnet_interface.png) + +On top of the raw C interface, a 1-1 binding is made in .NET, by using the [Platform Invoke mechanism](https://msdn.microsoft.com/en-us/library/55d3thsc.aspx?f=255&MSPPError=-2147217396), in order to separate access to the API from its usage; this avoids impedance mismatch by separating the marshalling aspects from the binding language idiosyncrasies. That is, the 1-1 interface takes care of marshalling, without changing the interface. Then, the idiomatic interface uses the higher level language tools and idioms in order to hide the complexity from the application programmer. + +It takes another programmer profile in order to tinker with the lower level interfaces or consume them directly, but that is also possible when working with this approach: 3 separate levels of abstraction for accessing the same functionality. + +The platform invoke mechanism was chosen in order to support as many operating systems as possible, because .NET Core does not support C++/CLI. + +## Basic structure + +--- + +See [the source in Github](https://github.com/bitprim/bitprim-cs/tree/master): + +* **idiomatic classes**: Object oriented abstractions over Bitcoin concepts: Chain, Transaction, Block, Header, and so on. The Executor class is responsible for handling node execution. +* **native classes**: These are all static classes, since each of these contains a set of DllImports of the native C functions. + + + diff --git a/docs/developer_guide/dotnet/dotnet-interface-details.md b/docs/developer_guide/dotnet/dotnet-interface-details.md new file mode 100644 index 0000000..9903764 --- /dev/null +++ b/docs/developer_guide/dotnet/dotnet-interface-details.md @@ -0,0 +1,2291 @@ +# Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`namespace `[`Bitprim`](#namespace_bitprim) | +`namespace `[`Bitprim::Logging`](#namespace_bitprim_1_1_logging) | +`namespace `[`Bitprim::Logging::LogProviders`](#namespace_bitprim_1_1_logging_1_1_log_providers) | +`class `[`Bitprim::Logging::LoggerExecutionWrapper::CallSiteExtension`](#class_bitprim_1_1_logging_1_1_logger_execution_wrapper_1_1_call_site_extension) | +`class `[`Constants`](#class_constants) | +`class `[`Bitprim::Logging::LogProviders::Log4NetLogProvider::Log4NetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1_1_log4_net_logger) | +`class `[`Bitprim::Logging::LogProviders::LoupeLogProvider::LoupeLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1_1_loupe_logger) | +`class `[`Bitprim::Logging::LogProviders::NLogLogProvider::NLogLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1_1_n_log_logger) | +`class `[`Bitprim::Logging::LogProvider::NoOpLogger`](#class_bitprim_1_1_logging_1_1_log_provider_1_1_no_op_logger) | +`class `[`Bitprim::Logging::LogProviders::SerilogLogProvider::SerilogLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1_1_serilog_logger) | + +# namespace `Bitprim` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`enum `[`CurrencyType`](#namespace_bitprim_1a3f533178085ca25f9713df9565ad8182) | +`enum `[`ErrorCode`](#namespace_bitprim_1a3a9a6bda5cf124c14b0cd5c459566186) | +`enum `[`NetworkType`](#namespace_bitprim_1a22160858220a577b3c9c38dc3c0142cd) | +`class `[`Bitprim::ApiCallResult`](#class_bitprim_1_1_api_call_result) | +`class `[`Bitprim::Binary`](#class_bitprim_1_1_binary) | Represents a binary filter. +`class `[`Bitprim::Block`](#class_bitprim_1_1_block) | Represents a full Bitcoin blockchain block. +`class `[`Bitprim::BlockReader`](#class_bitprim_1_1_block_reader) | Allows user to read a specific set of blocks from the blockchain. +`class `[`Bitprim::Chain`](#class_bitprim_1_1_chain) | Represents the Bitcoin blockchain; meant to offer its different interfaces (query, mining, network) +`class `[`Bitprim::DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result) | +`class `[`Bitprim::Executor`](#class_bitprim_1_1_executor) | Controls the execution of the [Bitprim](#namespace_bitprim) bitcoin node. +`class `[`Bitprim::GetBlockDataResult`](#class_bitprim_1_1_get_block_data_result) | +`class `[`Bitprim::GetBlockHashTimestampResult`](#class_bitprim_1_1_get_block_hash_timestamp_result) | +`class `[`Bitprim::GetBlockHeaderByHashTxSizeResult`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result) | +`class `[`Bitprim::GetTxDataResult`](#class_bitprim_1_1_get_tx_data_result) | +`class `[`Bitprim::Header`](#class_bitprim_1_1_header) | Represents a full Bitcoin blockchain block. +`class `[`Bitprim::HeaderReader`](#class_bitprim_1_1_header_reader) | Helper for reading the header for each block in a specific set of blocks. +`class `[`Bitprim::HistoryCompact`](#class_bitprim_1_1_history_compact) | [Output](#class_bitprim_1_1_output) points, values, and spends for a payment address. +`class `[`Bitprim::Input`](#class_bitprim_1_1_input) | Represents a [Transaction](#class_bitprim_1_1_transaction) input. +`class `[`Bitprim::MempoolTransaction`](#class_bitprim_1_1_mempool_transaction) | Represents an unconfirmed transaction. +`class `[`Bitprim::MerkleBlock`](#class_bitprim_1_1_merkle_block) | Merkle tree representation of a blockchain block. +`class `[`Bitprim::NativeBuffer`](#class_bitprim_1_1_native_buffer) | RAII wrapper for native memory. Guarantees that even if an exception is thrown, platform_free will be used to release it. Also, it prevents the user from forgetting to call platform_free. +`class `[`Bitprim::NativeString`](#class_bitprim_1_1_native_string) | RAII wrapper for native strings. Guarantees that even if an exception is thrown, platform_free will be used to release the native memory. Also, it prevents the user from forgetting to call platform_free. +`class `[`Bitprim::NodeSettings`](#class_bitprim_1_1_node_settings) | +`class `[`Bitprim::Output`](#class_bitprim_1_1_output) | Represents one of the outputs of a [Transaction](#class_bitprim_1_1_transaction). +`class `[`Bitprim::OutputPoint`](#class_bitprim_1_1_output_point) | [Transaction](#class_bitprim_1_1_transaction) hash and index pair representing one of the transaction outputs. +`class `[`Bitprim::PaymentAddress`](#class_bitprim_1_1_payment_address) | Represents a Bitcoin wallet address. +`class `[`Bitprim::Point`](#class_bitprim_1_1_point) | Represents one of the transaction inputs. It's a transaction hash and index pair. +`class `[`Bitprim::Script`](#class_bitprim_1_1_script) | Represents a transaction script. +`class `[`Bitprim::StealthCompact`](#class_bitprim_1_1_stealth_compact) | Stealth payment related data. +`class `[`Bitprim::TaskHelper`](#class_bitprim_1_1_task_helper) | +`class `[`Bitprim::Transaction`](#class_bitprim_1_1_transaction) | Represents a Bitcoin transaction. +`class `[`Bitprim::Validations`](#class_bitprim_1_1_validations) | +`struct `[`Bitprim::GetTxPositionResult`](#struct_bitprim_1_1_get_tx_position_result) | + +## Members + +#### `enum `[`CurrencyType`](#namespace_bitprim_1a3f533178085ca25f9713df9565ad8182) + + Values | Descriptions +--------------------------------|--------------------------------------------- +None | +Bitcoin | +BitcoinCash | +Litecoin | + +#### `enum `[`ErrorCode`](#namespace_bitprim_1a3a9a6bda5cf124c14b0cd5c459566186) + + Values | Descriptions +--------------------------------|--------------------------------------------- +Success | +Deprecated | +Unknown | +NotFound | +FileSystem | +NonStandard | +NotImplemented | +Oversubscribed | +ServiceStopped | +OperationFailed | +ResolveFailed | +NetworkUnreachable | +AddressInUse | +ListenFailed | +AcceptFailed | +BadStream | +ChannelTimeout | +AddressBlocked | +ChannelStopped | +PeerThrottling | +StoreBlockDuplicate | +StoreBlockInvalidHeight | +StoreBlockMissingParent | +DuplicateBlock | +OrphanBlock | +InvalidPreviousBlock | +InsufficientWork | +OrphanTransaction | +InsufficientFee | +DustyTransaction | +StaleChain | +InvalidProofOfWork | +FuturisticTimestamp | +CheckpointsFailed | +OldVersionBlock | +IncorrectProofOfWork | +TimestampTooEarly | +BlockSizeLimit | +EmptyBlock | +FirstNotCoinbase | +ExtraCoinbases | +InternalDuplicate | +BlockInternalDoubleSpend | +MerkleMismatch | +BlockLegacySigopLimit | +BlockNonFinal | +CoinbaseHeightMismatch | +CoinbaseValueLimit | +BlockEmbeddedSigopLimit | +EmptyTransaction | +PreviousOutputNull | +SpendOverflow | +InvalidCoinbaseScriptSize | +CoinbaseTransaction | +TransactionInternalDoubleSpend | +TransactionSizeLimit | +TransactionLegacySigopLimit | +TransactionNonFinal | +PrematureValidation | +UnspentDuplicate | +MissingPreviousOutput | +DoubleSpend | +CoinbaseMaturity | +SpendExceedsValue | +TransactionEmbeddedSigopLimit | +SequenceLocked | +InvalidScript | +InvalidScriptSize | +InvalidPushDataSize | +InvalidOperationCount | +InvalidStackSize | +InvalidStackScope | +InvalidScriptEmbed | +InvalidSignatureEncoding | +invalidSignatureLaxEncoding | +IncorrectSignature | +StackFalse | +OpDisabled | +OpReserved | +OpPushSize | +OpPushData | +OpIf | +OpNotIf | +OpElse | +OpEndIf | +OpVerify1 | +OpVerify2 | +OpReturn | +OpToAltStack | +OpFromAltStack | +OpDrop2 | +OpDup2 | +OpDup3 | +OpOver2 | +OpRot2 | +OpSwap2 | +OpIfDup | +OpDrop | +OpDup | +OpNip | +OpOver | +OpPick | +OpRoll | +OpRot | +OpSwap | +OpTuck | +OpSize | +OpEqual | +OpEqualVerify1 | +OpEqualVerify2 | +OpAdd1 | +OpSub1 | +OpNegate | +OpAbs | +OpNot | +OpNonZero | +OpAdd | +OpSub | +OpBoolAnd | +OpBoolOr | +OpNumEqual | +OpNumEqualVerify1 | +OpNumEqualVerify2 | +OpNumNotEqual | +OpLessThan | +OpGreaterThan | +OpLessThanOrEqual | +OpGreaterThanOrEqual | +OpMin | +OpMax | +OpWithin | +OpRipemd160 | +OpSha1 | +OpSha256 | +OpHash160 | +OpHash256 | +OpCodeSeperator | +OpCheckSigVerify1 | +OpCheckSig | +OpCheckMultisigVerify1 | +OpCheckMultisigVerify2 | +OpCheckMultisigVerify3 | +OpCheckMultisigVerify4 | +OpCheckMultisigVerify5 | +OpCheckMultisigVerify6 | +OpCheckMultisigVerify7 | +OpCheckMultisig | +OpCheckLocktimeVerify1 | +OpCheckLocktimeVerify2 | +OpCheckLocktimeVerify3 | +OpCheckLocktimeVerify4 | +OpCheckLocktimeVerify5 | +OpCheckLocktimeVerify6 | +OpCheckSequenceVerify1 | +OpCheckSequenceVerify2 | +OpCheckSequenceVerify3 | +OpCheckSequenceVerify4 | +OpCheckSequenceVerify5 | +OpCheckSequenceVerify6 | +OpCheckSequenceVerify7 | + +#### `enum `[`NetworkType`](#namespace_bitprim_1a22160858220a577b3c9c38dc3c0142cd) + + Values | Descriptions +--------------------------------|--------------------------------------------- +None | +Mainnet | +Testnet | +Regtest | + +# class `Bitprim::ApiCallResult` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} ErrorCode `[`ErrorCode`](#class_bitprim_1_1_api_call_result_1a848f2895e2539ab00461ef32f19aaee9) | +`{property} TResultData `[`Result`](#class_bitprim_1_1_api_call_result_1a8796a232b021151d3dd0da31f11c94c8) | + +## Members + +#### `{property} ErrorCode `[`ErrorCode`](#class_bitprim_1_1_api_call_result_1a848f2895e2539ab00461ef32f19aaee9) + +#### `{property} TResultData `[`Result`](#class_bitprim_1_1_api_call_result_1a8796a232b021151d3dd0da31f11c94c8) + +# class `Bitprim::Binary` + +``` +class Bitprim::Binary + : public IDisposable +``` + +Represents a binary filter. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} string `[`Encoded`](#class_bitprim_1_1_binary_1a348a5cb892a0ce13438ff51935a99729) | Filter representation as binary string. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_binary_1a82cf37ab828336a0f9d5069c74cbf473) | +`public inline `[`Binary`](#class_bitprim_1_1_binary_1aacca6d3c790c49a363fbd27641c99556)`()` | Create an empty binary object. +`public inline `[`Binary`](#class_bitprim_1_1_binary_1a6744d5e8c73ec3320c8cfd64b500a290)`(string hexString)` | Creates a binary filter from a binary string. +`public inline `[`Binary`](#class_bitprim_1_1_binary_1aebec751d8756b49f20eb7b1de47ee505)`(UInt64 bitsSize,byte [] blocks,UInt64 n)` | Creates a binary filter from an int array. + +## Members + +#### `{property} string `[`Encoded`](#class_bitprim_1_1_binary_1a348a5cb892a0ce13438ff51935a99729) + +Filter representation as binary string. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_binary_1a82cf37ab828336a0f9d5069c74cbf473) + +#### `public inline `[`Binary`](#class_bitprim_1_1_binary_1aacca6d3c790c49a363fbd27641c99556)`()` + +Create an empty binary object. + +#### `public inline `[`Binary`](#class_bitprim_1_1_binary_1a6744d5e8c73ec3320c8cfd64b500a290)`(string hexString)` + +Creates a binary filter from a binary string. + +#### Parameters +* `hexString` [Binary](#class_bitprim_1_1_binary) string. Example: '10111010101011011111000000001101' + +#### `public inline `[`Binary`](#class_bitprim_1_1_binary_1aebec751d8756b49f20eb7b1de47ee505)`(UInt64 bitsSize,byte [] blocks,UInt64 n)` + +Creates a binary filter from an int array. + +#### Parameters +* `bitsSize` Elements size + +* `blocks` Filter representation. Example: '[186,173,240,13]'. + +* `n` Array length in amount of elements. + +# class `Bitprim::Block` + +``` +class Bitprim::Block + : public IDisposable +``` + +Represents a full Bitcoin blockchain block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsDistinctTransactionSet`](#class_bitprim_1_1_block_1afe00a47b830014c432d79377a1fcf1cc) | Returns true iif all transactions in the block have a unique hash (i.e. no duplicates) +`{property} bool `[`IsExtraCoinbase`](#class_bitprim_1_1_block_1a87a47aa97c8ef31879f1d46fb5825721) | Returns true iif there is more than one coinbase transaction in the block. +`{property} bool `[`IsInternalDoubleSpend`](#class_bitprim_1_1_block_1a02b6dc463e369c4cc989482eb0a82290) | Returns true iif there is at least one double-spent transaction in this block +`{property} bool `[`IsValid`](#class_bitprim_1_1_block_1ab97c0f6e1a70608223c06a5267e65d3a) | Returns true iif the block is valid +`{property} bool `[`IsValidMerkleRoot`](#class_bitprim_1_1_block_1a962a4437dd4b5fdaae6e07248ea12d14) | Returns true iif the generated Merkle root equals the header's Merkle root. +`{property} byte [] `[`Hash`](#class_bitprim_1_1_block_1ad2bfcf76b735aa2c26838d32a03f6d48) | The block's hash as a 32 byte array. +`{property} byte [] `[`MerkleRoot`](#class_bitprim_1_1_block_1a12cd915f751441bc6f9c4c268a4fa349) | The block's Merkle root, as a 32 byte array. +`{property} `[`Header`](#class_bitprim_1_1_header)` `[`Header`](#class_bitprim_1_1_block_1a8e8c733200d3defbd8f71609f54a928d) | The block's header +`{property} string `[`Proof`](#class_bitprim_1_1_block_1a6f2f056f16e77fa4072a22caf3ea8ac1) | +`{property} UInt64 `[`Fees`](#class_bitprim_1_1_block_1a05b35dd6f0f40f631f09846992b8d2ea) | Miner fees included in the block's coinbase transaction. +`{property} UInt64 `[`Claim`](#class_bitprim_1_1_block_1a0d05159ba470f6392f0b21b7f2e7cb25) | Sum of coinbase outputs. +`{property} UInt64 `[`SignatureOperationsCount`](#class_bitprim_1_1_block_1a4731e46255eadfe9aeab1ca9595dfaa1) | Amount of signature operations in the block. +`{property} UInt64 `[`TransactionCount`](#class_bitprim_1_1_block_1a99e6bc147a2c5375cec10bc180793899) | The total amount of transactions that the block contains. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_block_1a9cf18b56ed584c02e3c361ded648712f) | +`public inline bool `[`IsFinal`](#class_bitprim_1_1_block_1a1811740e5097c938813f535aa6563e19)`(UInt64 height)` | Returns true iif every transaction in the block is final or not. +`public inline bool `[`IsValidCoinbaseClaim`](#class_bitprim_1_1_block_1a36bab07eeb6975e123d28d9f6bd2e268)`(UInt64 height)` | Given a block height, return true iif its coinbase claim is not higher than the deserved reward. +`public inline bool `[`IsValidCoinbaseScript`](#class_bitprim_1_1_block_1a700e460e6f249f175c719e874c085561)`(UInt64 height)` | Returns true iif the block's coinbase script is valid. +`public inline byte [] `[`ToData`](#class_bitprim_1_1_block_1a175982ee3e3e8fc96d00af710866838d)`(bool wire)` | Raw block data. +`public inline `[`Transaction`](#class_bitprim_1_1_transaction)` `[`GetNthTransaction`](#class_bitprim_1_1_block_1a4b82ec51f06d880ab179a22e6d27e515)`(UInt64 n)` | Given a position in the block, returns the corresponding transaction. +`public inline UInt64 `[`GetBlockReward`](#class_bitprim_1_1_block_1a65806245a063c53aa11fe46306a97578)`(UInt64 height)` | Reward = Subsidy + Fees, for the block at the given height. +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_block_1a0922fac15c8b25e31895bc4e014ae3bc)`(UInt32 version)` | [Block](#class_bitprim_1_1_block) size in bytes. +`public inline UInt64 `[`GetSignatureOperationsCount`](#class_bitprim_1_1_block_1a3b4c90d08441c351b6e4c016a0ad433f)`(bool bip16Active)` | Amount of signature operations in the block. +`public inline UInt64 `[`GetTotalInputs`](#class_bitprim_1_1_block_1a7dcaac2c475eb12f158f23fc1bba6808)`(bool withCoinbase)` | The sum of all inputs of all transactions in the block. + +## Members + +#### `{property} bool `[`IsDistinctTransactionSet`](#class_bitprim_1_1_block_1afe00a47b830014c432d79377a1fcf1cc) + +Returns true iif all transactions in the block have a unique hash (i.e. no duplicates) + +#### `{property} bool `[`IsExtraCoinbase`](#class_bitprim_1_1_block_1a87a47aa97c8ef31879f1d46fb5825721) + +Returns true iif there is more than one coinbase transaction in the block. + +#### `{property} bool `[`IsInternalDoubleSpend`](#class_bitprim_1_1_block_1a02b6dc463e369c4cc989482eb0a82290) + +Returns true iif there is at least one double-spent transaction in this block + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_block_1ab97c0f6e1a70608223c06a5267e65d3a) + +Returns true iif the block is valid + +#### `{property} bool `[`IsValidMerkleRoot`](#class_bitprim_1_1_block_1a962a4437dd4b5fdaae6e07248ea12d14) + +Returns true iif the generated Merkle root equals the header's Merkle root. + +#### `{property} byte [] `[`Hash`](#class_bitprim_1_1_block_1ad2bfcf76b735aa2c26838d32a03f6d48) + +The block's hash as a 32 byte array. + +#### `{property} byte [] `[`MerkleRoot`](#class_bitprim_1_1_block_1a12cd915f751441bc6f9c4c268a4fa349) + +The block's Merkle root, as a 32 byte array. + +#### `{property} `[`Header`](#class_bitprim_1_1_header)` `[`Header`](#class_bitprim_1_1_block_1a8e8c733200d3defbd8f71609f54a928d) + +The block's header + +#### `{property} string `[`Proof`](#class_bitprim_1_1_block_1a6f2f056f16e77fa4072a22caf3ea8ac1) + +#### `{property} UInt64 `[`Fees`](#class_bitprim_1_1_block_1a05b35dd6f0f40f631f09846992b8d2ea) + +Miner fees included in the block's coinbase transaction. + +#### `{property} UInt64 `[`Claim`](#class_bitprim_1_1_block_1a0d05159ba470f6392f0b21b7f2e7cb25) + +Sum of coinbase outputs. + +#### `{property} UInt64 `[`SignatureOperationsCount`](#class_bitprim_1_1_block_1a4731e46255eadfe9aeab1ca9595dfaa1) + +Amount of signature operations in the block. + +#### `{property} UInt64 `[`TransactionCount`](#class_bitprim_1_1_block_1a99e6bc147a2c5375cec10bc180793899) + +The total amount of transactions that the block contains. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_block_1a9cf18b56ed584c02e3c361ded648712f) + +#### `public inline bool `[`IsFinal`](#class_bitprim_1_1_block_1a1811740e5097c938813f535aa6563e19)`(UInt64 height)` + +Returns true iif every transaction in the block is final or not. + +#### Parameters +* `height` + +#### Returns + +#### `public inline bool `[`IsValidCoinbaseClaim`](#class_bitprim_1_1_block_1a36bab07eeb6975e123d28d9f6bd2e268)`(UInt64 height)` + +Given a block height, return true iif its coinbase claim is not higher than the deserved reward. + +#### Parameters +* `height` The height which identifies the block to examine + +#### Returns +True iif 1 if coinbase claim is not higher than the deserved reward. + +#### `public inline bool `[`IsValidCoinbaseScript`](#class_bitprim_1_1_block_1a700e460e6f249f175c719e874c085561)`(UInt64 height)` + +Returns true iif the block's coinbase script is valid. + +#### Parameters +* `height` The block's height. Identifies it univocally. + +#### Returns +True iif the block's coinbase script is valid. + +#### `public inline byte [] `[`ToData`](#class_bitprim_1_1_block_1a175982ee3e3e8fc96d00af710866838d)`(bool wire)` + +Raw block data. + +#### Parameters +* `wire` Iif true, include data size at the beginning. + +#### Returns +Byte array with block data. + +#### `public inline `[`Transaction`](#class_bitprim_1_1_transaction)` `[`GetNthTransaction`](#class_bitprim_1_1_block_1a4b82ec51f06d880ab179a22e6d27e515)`(UInt64 n)` + +Given a position in the block, returns the corresponding transaction. + +#### Parameters +* `n` Zero-based index + +#### Returns +Full transaction object + +#### `public inline UInt64 `[`GetBlockReward`](#class_bitprim_1_1_block_1a65806245a063c53aa11fe46306a97578)`(UInt64 height)` + +Reward = Subsidy + Fees, for the block at the given height. + +#### Parameters +* `height` [Block](#class_bitprim_1_1_block) height in the chain; identifies it univocally. + +#### Returns +UInt64 representation of the block's reward. + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_block_1a0922fac15c8b25e31895bc4e014ae3bc)`(UInt32 version)` + +[Block](#class_bitprim_1_1_block) size in bytes. + +#### Parameters +* `version` Protocol version. + +#### Returns +UInt64 representation of the block size in bytes. + +#### `public inline UInt64 `[`GetSignatureOperationsCount`](#class_bitprim_1_1_block_1a3b4c90d08441c351b6e4c016a0ad433f)`(bool bip16Active)` + +Amount of signature operations in the block. + +#### Parameters +* `bip16Active` Iif true, count bip16 active operations. + +#### Returns +The amount of signature operations in this block + +#### `public inline UInt64 `[`GetTotalInputs`](#class_bitprim_1_1_block_1a7dcaac2c475eb12f158f23fc1bba6808)`(bool withCoinbase)` + +The sum of all inputs of all transactions in the block. + +#### Parameters +* `withCoinbase` Iif true, consider coinbase transactions. + +#### Returns +UInt64 representation of the sum + +# class `Bitprim::BlockReader` + +``` +class Bitprim::BlockReader + : public IDisposable +``` + +Allows user to read a specific set of blocks from the blockchain. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_block_reader_1abc3a66acbadba275e8c53c9bb95414d0) | Return true iif all blocks in the specified set are valid +`{property} byte [] `[`StopHash`](#class_bitprim_1_1_block_reader_1a645f071f77d3bec92772d8d0fbf6728f) | Get or set on which block to stop reading. +`{property} HashList `[`StartHashes`](#class_bitprim_1_1_block_reader_1ae8994bb2e2da8bbd60646ecba426d3da) | Get or set the hashes that have to be read in order to start reading. +`public inline `[`BlockReader`](#class_bitprim_1_1_block_reader_1a2f3517010212c08923713744102191f8)`()` | +`public inline `[`BlockReader`](#class_bitprim_1_1_block_reader_1afe8436a6e4f16343654fcfea4709120c)`(HashList start,byte [] stop)` | +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_block_reader_1a610a7c455b51380ac5afc0ac623cd843)`(UInt32 version)` | The sum of the sizes of the read blocks. +`public inline void `[`Reset`](#class_bitprim_1_1_block_reader_1afb00b31f123c231a970b4cdf16e20d08)`()` | Go back to the beginning of the block set. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_block_reader_1abc3a66acbadba275e8c53c9bb95414d0) + +Return true iif all blocks in the specified set are valid + +#### `{property} byte [] `[`StopHash`](#class_bitprim_1_1_block_reader_1a645f071f77d3bec92772d8d0fbf6728f) + +Get or set on which block to stop reading. + +#### `{property} HashList `[`StartHashes`](#class_bitprim_1_1_block_reader_1ae8994bb2e2da8bbd60646ecba426d3da) + +Get or set the hashes that have to be read in order to start reading. + +#### `public inline `[`BlockReader`](#class_bitprim_1_1_block_reader_1a2f3517010212c08923713744102191f8)`()` + +#### `public inline `[`BlockReader`](#class_bitprim_1_1_block_reader_1afe8436a6e4f16343654fcfea4709120c)`(HashList start,byte [] stop)` + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_block_reader_1a610a7c455b51380ac5afc0ac623cd843)`(UInt32 version)` + +The sum of the sizes of the read blocks. + +#### Parameters +* `version` Protocol version to consider when calculating block size. + +#### Returns +UInt64 representation of the sum + +#### `public inline void `[`Reset`](#class_bitprim_1_1_block_reader_1afb00b31f123c231a970b4cdf16e20d08)`()` + +Go back to the beginning of the block set. + +# class `Bitprim::Chain` + +Represents the Bitcoin blockchain; meant to offer its different interfaces (query, mining, network) + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_chain_1a6ba45403dfc6b61b59c8849a9bf565f3) | +`{property} bool `[`IsStale`](#class_bitprim_1_1_chain_1a8b8851b7dd1cb47efdec3817277faaad) | Determine if the node is synchronized (i.e. has the latest copy of the blockchain/is at top height) +`public inline async Task< `[`ApiCallResult`](#class_bitprim_1_1_api_call_result)`< UInt64 > > `[`FetchBlockHeightAsync`](#class_bitprim_1_1_chain_1a05e73bd15a88afc5005319018e6dda39)`(byte [] blockHash)` | Given a block hash, it queries the chain asynchronously for the block's height. Return right away and uses a callback to return the result. +`public inline async Task< `[`ApiCallResult`](#class_bitprim_1_1_api_call_result)`< UInt64 > > `[`FetchLastHeightAsync`](#class_bitprim_1_1_chain_1aa99d17cc65a7b313b93513d92634bbd9)`()` | Gets the height of the highest block in the local copy of the blockchain, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Block`](#class_bitprim_1_1_block)` > > > `[`FetchBlockByHashAsync`](#class_bitprim_1_1_chain_1a4c912cb5da30ad7373f5869f37b66bbc)`(byte [] blockHash)` | Given a block hash, retrieve the full block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Block`](#class_bitprim_1_1_block)` > > > `[`FetchBlockByHeightAsync`](#class_bitprim_1_1_chain_1a07cf0ef0db61d176403b7107aad8cca0)`(UInt64 height)` | Given a block height, retrieve the full block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockHeaderByHashTxSizeResult`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result)` > > `[`FetchBlockHeaderByHashTxSizesAsync`](#class_bitprim_1_1_chain_1a16fbf9347d382e413596738050e477cc)`(byte [] blockHash)` | Given a block hash, retrieve block header, tx hashes and serialized block size, asynchronously. +`public inline async Task< `[`ApiCallResult](#class_bitprim_1_1_api_call_result)< [GetBlockHashTimestampResult`](#class_bitprim_1_1_get_block_hash_timestamp_result)` > > `[`FetchBlockByHeightHashTimestampAsync`](#class_bitprim_1_1_chain_1a0ed827e80a50f6ef1537f4e3323161ec)`(UInt64 height)` | Given a block height, retrieve only block hash and timestamp, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Header`](#class_bitprim_1_1_header)` > > > `[`FetchBlockHeaderByHashAsync`](#class_bitprim_1_1_chain_1a481afe875fea3bed18fdcc5f34881d24)`(byte [] blockHash)` | Given a block hash, get the header from the block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Header`](#class_bitprim_1_1_header)` > > > `[`FetchBlockHeaderByHeightAsync`](#class_bitprim_1_1_chain_1af8dde319dada6e5fc337110280e7ecdf)`(UInt64 height)` | Given a block height, get the header from the block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [MerkleBlock`](#class_bitprim_1_1_merkle_block)` > > > `[`FetchMerkleBlockByHashAsync`](#class_bitprim_1_1_chain_1a3065a220899aa4e7499e00c82a986800)`(byte [] blockHash)` | Given a block hash, get the merkle block from the block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [MerkleBlock`](#class_bitprim_1_1_merkle_block)` > > > `[`FetchMerkleBlockByHeightAsync`](#class_bitprim_1_1_chain_1a51960cb40096565cba29801ecef869ce)`(UInt64 height)` | Given a block height, get the merkle block from the block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult`](#class_bitprim_1_1_get_block_data_result)`< CompactBlock > > > `[`FetchCompactBlockByHash`](#class_bitprim_1_1_chain_1a7d2a96a34f4db98b4bb95f0945c8eb91)`(byte [] blockHash)` | Given a block hash, get the compact block from the block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult`](#class_bitprim_1_1_get_block_data_result)`< CompactBlock > > > `[`FetchCompactBlockByHeightAsync`](#class_bitprim_1_1_chain_1ab44be34165be4cd968eecd0b8aa0daba)`(UInt64 height)` | Given a block height, get the compact block from the block it identifies, asynchronously. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetTxDataResult`](#class_bitprim_1_1_get_tx_data_result)` > > `[`FetchTransactionAsync`](#class_bitprim_1_1_chain_1acd7a013b2d7dfb59a2be96c7e0fbe4ce)`(byte [] txHash,bool requireConfirmed)` | Get a transaction by its hash, asynchronously. +`public inline async Task< `[`ApiCallResult](#class_bitprim_1_1_api_call_result)< [GetTxPositionResult`](#struct_bitprim_1_1_get_tx_position_result)` > > `[`FetchTransactionPositionAsync`](#class_bitprim_1_1_chain_1a5dc1c0c121540d6f3fcdac769e5dfcbb)`(byte [] txHash,bool requireConfirmed)` | Given a transaction hash, it fetches the height and position inside the block, asynchronously. +`public inline async Task< `[`ApiCallResult](#class_bitprim_1_1_api_call_result)< [Point`](#class_bitprim_1_1_point)` > > `[`FetchSpendAsync`](#class_bitprim_1_1_chain_1aa6f96700ac465dfb8899f8199c65a372)`(`[`OutputPoint`](#class_bitprim_1_1_output_point)` outputPoint)` | Fetch the transaction input which spends the indicated output, asynchronously. +`public inline async Task< `[`DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result)`< HistoryCompactList > > `[`FetchHistoryAsync`](#class_bitprim_1_1_chain_1ab8077112761466c2e19eca51d3e5eadf)`(`[`PaymentAddress`](#class_bitprim_1_1_payment_address)` address,UInt64 limit,UInt64 fromHeight)` | Get a list of output points, values, and spends for a given payment address (asynchronously) +`public inline async Task< `[`DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result)`< HashList > > `[`FetchConfirmedTransactionsAsync`](#class_bitprim_1_1_chain_1affd9881e0c675e1e3202b33c697043e8)`(`[`PaymentAddress`](#class_bitprim_1_1_payment_address)` address,UInt64 limit,UInt64 fromHeight)` | Get a list of tx ids for a given payment address (asynchronously). Duplicates are already filtered out. +`public inline async Task< `[`DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result)`< StealthCompactList > > `[`FetchStealthAsync`](#class_bitprim_1_1_chain_1a9a39b99193848b3c051b8b4eb985e692)`(`[`Binary`](#class_bitprim_1_1_binary)` filter,UInt64 fromHeight)` | Get metadata on potential payment transactions by stealth filter. Given a filter and a height in the chain, it queries the chain for transactions matching the given filter. +`public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [HeaderReader`](#class_bitprim_1_1_header_reader)` > > `[`FetchBlockLocatorAsync`](#class_bitprim_1_1_chain_1ab76ad8f4fecec65e9934c38288f23f56)`(BlockIndexList indexes)` | Given a list of indexes, fetch a header reader for them, asynchronously +`public inline async Task< ErrorCode > `[`OrganizeBlockAsync`](#class_bitprim_1_1_chain_1ac98d25baa15b37a77a48becca57c4968)`(`[`Block`](#class_bitprim_1_1_block)` block)` | Given a block, organize it (async). +`public inline async Task< ErrorCode > `[`OrganizeTransactionAsync`](#class_bitprim_1_1_chain_1a23be64a1bbec23574fd616edede37111)`(`[`Transaction`](#class_bitprim_1_1_transaction)` transaction)` | Given a transaction, organize it (async). +`public inline async Task< `[`ApiCallResult`](#class_bitprim_1_1_api_call_result)`< string > > `[`ValidateTransactionAsync`](#class_bitprim_1_1_chain_1a233758a5d970628d399287a851795670)`(`[`Transaction`](#class_bitprim_1_1_transaction)` transaction)` | Determine if a transaction is valid for submission to the blockchain. +`public inline MempoolTransactionList `[`GetMempoolTransactions`](#class_bitprim_1_1_chain_1a44a0cd66999dde4914e1e013c582d731)`(`[`PaymentAddress`](#class_bitprim_1_1_payment_address)` address,bool useTestnetRules)` | + +## Members + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_chain_1a6ba45403dfc6b61b59c8849a9bf565f3) + +#### `{property} bool `[`IsStale`](#class_bitprim_1_1_chain_1a8b8851b7dd1cb47efdec3817277faaad) + +Determine if the node is synchronized (i.e. has the latest copy of the blockchain/is at top height) + +#### `public inline async Task< `[`ApiCallResult`](#class_bitprim_1_1_api_call_result)`< UInt64 > > `[`FetchBlockHeightAsync`](#class_bitprim_1_1_chain_1a05e73bd15a88afc5005319018e6dda39)`(byte [] blockHash)` + +Given a block hash, it queries the chain asynchronously for the block's height. Return right away and uses a callback to return the result. + +#### Parameters +* `blockHash` 32-byte array representation of the block hash. Identifies it univocally. + +#### `public inline async Task< `[`ApiCallResult`](#class_bitprim_1_1_api_call_result)`< UInt64 > > `[`FetchLastHeightAsync`](#class_bitprim_1_1_chain_1aa99d17cc65a7b313b93513d92634bbd9)`()` + +Gets the height of the highest block in the local copy of the blockchain, asynchronously. + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Block`](#class_bitprim_1_1_block)` > > > `[`FetchBlockByHashAsync`](#class_bitprim_1_1_chain_1a4c912cb5da30ad7373f5869f37b66bbc)`(byte [] blockHash)` + +Given a block hash, retrieve the full block it identifies, asynchronously. + +#### Parameters +* `blockHash` 32 bytes of the block hash + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Block`](#class_bitprim_1_1_block)` > > > `[`FetchBlockByHeightAsync`](#class_bitprim_1_1_chain_1a07cf0ef0db61d176403b7107aad8cca0)`(UInt64 height)` + +Given a block height, retrieve the full block it identifies, asynchronously. + +#### Parameters +* `height` [Block](#class_bitprim_1_1_block) height + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockHeaderByHashTxSizeResult`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result)` > > `[`FetchBlockHeaderByHashTxSizesAsync`](#class_bitprim_1_1_chain_1a16fbf9347d382e413596738050e477cc)`(byte [] blockHash)` + +Given a block hash, retrieve block header, tx hashes and serialized block size, asynchronously. + +#### Parameters +* `blockHash` 32 bytes of the block hash + +#### `public inline async Task< `[`ApiCallResult](#class_bitprim_1_1_api_call_result)< [GetBlockHashTimestampResult`](#class_bitprim_1_1_get_block_hash_timestamp_result)` > > `[`FetchBlockByHeightHashTimestampAsync`](#class_bitprim_1_1_chain_1a0ed827e80a50f6ef1537f4e3323161ec)`(UInt64 height)` + +Given a block height, retrieve only block hash and timestamp, asynchronously. + +#### Parameters +* `height` [Block](#class_bitprim_1_1_block) height + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Header`](#class_bitprim_1_1_header)` > > > `[`FetchBlockHeaderByHashAsync`](#class_bitprim_1_1_chain_1a481afe875fea3bed18fdcc5f34881d24)`(byte [] blockHash)` + +Given a block hash, get the header from the block it identifies, asynchronously. + +#### Parameters +* `blockHash` 32 bytes of the block hash + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Header`](#class_bitprim_1_1_header)` > > > `[`FetchBlockHeaderByHeightAsync`](#class_bitprim_1_1_chain_1af8dde319dada6e5fc337110280e7ecdf)`(UInt64 height)` + +Given a block height, get the header from the block it identifies, asynchronously. + +#### Parameters +* `height` [Block](#class_bitprim_1_1_block) height + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [MerkleBlock`](#class_bitprim_1_1_merkle_block)` > > > `[`FetchMerkleBlockByHashAsync`](#class_bitprim_1_1_chain_1a3065a220899aa4e7499e00c82a986800)`(byte [] blockHash)` + +Given a block hash, get the merkle block from the block it identifies, asynchronously. + +#### Parameters +* `blockHash` 32 bytes of the block hash + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [MerkleBlock`](#class_bitprim_1_1_merkle_block)` > > > `[`FetchMerkleBlockByHeightAsync`](#class_bitprim_1_1_chain_1a51960cb40096565cba29801ecef869ce)`(UInt64 height)` + +Given a block height, get the merkle block from the block it identifies, asynchronously. + +#### Parameters +* `height` Desired block height + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult`](#class_bitprim_1_1_get_block_data_result)`< CompactBlock > > > `[`FetchCompactBlockByHash`](#class_bitprim_1_1_chain_1a7d2a96a34f4db98b4bb95f0945c8eb91)`(byte [] blockHash)` + +Given a block hash, get the compact block from the block it identifies, asynchronously. + +#### Parameters +* `blockHash` 32 bytes of the block hash + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetBlockDataResult`](#class_bitprim_1_1_get_block_data_result)`< CompactBlock > > > `[`FetchCompactBlockByHeightAsync`](#class_bitprim_1_1_chain_1ab44be34165be4cd968eecd0b8aa0daba)`(UInt64 height)` + +Given a block height, get the compact block from the block it identifies, asynchronously. + +#### Parameters +* `height` Desired block height + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [GetTxDataResult`](#class_bitprim_1_1_get_tx_data_result)` > > `[`FetchTransactionAsync`](#class_bitprim_1_1_chain_1acd7a013b2d7dfb59a2be96c7e0fbe4ce)`(byte [] txHash,bool requireConfirmed)` + +Get a transaction by its hash, asynchronously. + +#### Parameters +* `txHash` 32 bytes of transaction hash + +* `requireConfirmed` True if the transaction must belong to a block + +#### `public inline async Task< `[`ApiCallResult](#class_bitprim_1_1_api_call_result)< [GetTxPositionResult`](#struct_bitprim_1_1_get_tx_position_result)` > > `[`FetchTransactionPositionAsync`](#class_bitprim_1_1_chain_1a5dc1c0c121540d6f3fcdac769e5dfcbb)`(byte [] txHash,bool requireConfirmed)` + +Given a transaction hash, it fetches the height and position inside the block, asynchronously. + +#### Parameters +* `txHash` 32 bytes of transaction hash + +* `requireConfirmed` True iif the transaction must belong to a block + +#### `public inline async Task< `[`ApiCallResult](#class_bitprim_1_1_api_call_result)< [Point`](#class_bitprim_1_1_point)` > > `[`FetchSpendAsync`](#class_bitprim_1_1_chain_1aa6f96700ac465dfb8899f8199c65a372)`(`[`OutputPoint`](#class_bitprim_1_1_output_point)` outputPoint)` + +Fetch the transaction input which spends the indicated output, asynchronously. + +#### Parameters +* `outputPoint` Tx hash and index pair where the output was spent. + +#### `public inline async Task< `[`DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result)`< HistoryCompactList > > `[`FetchHistoryAsync`](#class_bitprim_1_1_chain_1ab8077112761466c2e19eca51d3e5eadf)`(`[`PaymentAddress`](#class_bitprim_1_1_payment_address)` address,UInt64 limit,UInt64 fromHeight)` + +Get a list of output points, values, and spends for a given payment address (asynchronously) + +#### Parameters +* `address` Bitcoin payment address to search + +* `limit` Maximum amount of results to fetch + +* `fromHeight` Starting point to search for transactions + +#### `public inline async Task< `[`DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result)`< HashList > > `[`FetchConfirmedTransactionsAsync`](#class_bitprim_1_1_chain_1affd9881e0c675e1e3202b33c697043e8)`(`[`PaymentAddress`](#class_bitprim_1_1_payment_address)` address,UInt64 limit,UInt64 fromHeight)` + +Get a list of tx ids for a given payment address (asynchronously). Duplicates are already filtered out. + +#### Parameters +* `address` Bitcoin payment address to search + +* `limit` Maximum amount of results to fetch + +* `fromHeight` Starting point to search for transactions + +#### `public inline async Task< `[`DisposableApiCallResult`](#class_bitprim_1_1_disposable_api_call_result)`< StealthCompactList > > `[`FetchStealthAsync`](#class_bitprim_1_1_chain_1a9a39b99193848b3c051b8b4eb985e692)`(`[`Binary`](#class_bitprim_1_1_binary)` filter,UInt64 fromHeight)` + +Get metadata on potential payment transactions by stealth filter. Given a filter and a height in the chain, it queries the chain for transactions matching the given filter. + +#### Parameters +* `filter` Must be at least 8 bits in length. example "10101010" + +* `fromHeight` Starting height in the chain to search for transactions + +#### `public inline async Task< `[`DisposableApiCallResult](#class_bitprim_1_1_disposable_api_call_result)< [HeaderReader`](#class_bitprim_1_1_header_reader)` > > `[`FetchBlockLocatorAsync`](#class_bitprim_1_1_chain_1ab76ad8f4fecec65e9934c38288f23f56)`(BlockIndexList indexes)` + +Given a list of indexes, fetch a header reader for them, asynchronously + +#### Parameters +* `indexes` [Block](#class_bitprim_1_1_block) indexes + +#### `public inline async Task< ErrorCode > `[`OrganizeBlockAsync`](#class_bitprim_1_1_chain_1ac98d25baa15b37a77a48becca57c4968)`(`[`Block`](#class_bitprim_1_1_block)` block)` + +Given a block, organize it (async). + +#### Parameters +* `block` The block to organize + +#### `public inline async Task< ErrorCode > `[`OrganizeTransactionAsync`](#class_bitprim_1_1_chain_1a23be64a1bbec23574fd616edede37111)`(`[`Transaction`](#class_bitprim_1_1_transaction)` transaction)` + +Given a transaction, organize it (async). + +#### Parameters +* `transaction` The transaction to organize. + +#### `public inline async Task< `[`ApiCallResult`](#class_bitprim_1_1_api_call_result)`< string > > `[`ValidateTransactionAsync`](#class_bitprim_1_1_chain_1a233758a5d970628d399287a851795670)`(`[`Transaction`](#class_bitprim_1_1_transaction)` transaction)` + +Determine if a transaction is valid for submission to the blockchain. + +#### Parameters +* `transaction` [Transaction](#class_bitprim_1_1_transaction) to validate + +#### `public inline MempoolTransactionList `[`GetMempoolTransactions`](#class_bitprim_1_1_chain_1a44a0cd66999dde4914e1e013c582d731)`(`[`PaymentAddress`](#class_bitprim_1_1_payment_address)` address,bool useTestnetRules)` + +# class `Bitprim::DisposableApiCallResult` + +``` +class Bitprim::DisposableApiCallResult + : public IDisposable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} ErrorCode `[`ErrorCode`](#class_bitprim_1_1_disposable_api_call_result_1abd6d0781149b4db77a1ef5ac3c2e167c) | +`{property} TResultData `[`Result`](#class_bitprim_1_1_disposable_api_call_result_1ab1b9fdc66ec7701386eb7c81118a6dac) | + +## Members + +#### `{property} ErrorCode `[`ErrorCode`](#class_bitprim_1_1_disposable_api_call_result_1abd6d0781149b4db77a1ef5ac3c2e167c) + +#### `{property} TResultData `[`Result`](#class_bitprim_1_1_disposable_api_call_result_1ab1b9fdc66ec7701386eb7c81118a6dac) + +# class `Bitprim::Executor` + +``` +class Bitprim::Executor + : public IDisposable +``` + +Controls the execution of the [Bitprim](#namespace_bitprim) bitcoin node. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`UseTestnetRules`](#class_bitprim_1_1_executor_1a72721235e276a2022424254285a89859) | Returns true iif the current network is a testnet. +`{property} `[`Chain`](#class_bitprim_1_1_chain)` `[`Chain`](#class_bitprim_1_1_executor_1ac610ccf2aeb37d042c6de111dc4af3d8) | The node's query interface. Will be null until node starts running (i.e. Run or RunWait succeeded) +`{property} NetworkType `[`NetworkType`](#class_bitprim_1_1_executor_1aaa0cd4c024e384cd8d0f99daebada6cd) | The node's network. Won't be valid until node starts running (i.e. Run or RunWait succeeded) +`{property} bool `[`IsStopped`](#class_bitprim_1_1_executor_1aa3d8e0c57065dc536ae997cf3d46340f) | +`{property} bool `[`IsLoadConfigValid`](#class_bitprim_1_1_executor_1af8b481e884520c67c9d348c32f6adcbb) | +`public delegate bool `[`BlockHandler`](#class_bitprim_1_1_executor_1aa8f3a08638a1c8a977c780be93c5cdf9)`(ErrorCode e,UInt64 u,BlockList incoming,BlockList outgoing)` | +`public delegate bool `[`TransactionHandler`](#class_bitprim_1_1_executor_1af552875e00ecb97f9529b6892d5fa9ed)`(ErrorCode e,`[`Transaction`](#class_bitprim_1_1_transaction)` newTx)` | +`public inline `[`Executor`](#class_bitprim_1_1_executor_1ac689798a0303fa5e0b289b9601ff4a41)`(string configFile)` | Create executor. Does not init database or start execution yet. +`public inline `[`Executor`](#class_bitprim_1_1_executor_1a4a0a051ca72a1c4ab9b6fa066bda67a2)`(string configFile,IntPtr stdOut,IntPtr stdErr)` | //TODO See BIT-20 Create executor. Does not init database or start execution yet. +`public inline bool `[`InitChain`](#class_bitprim_1_1_executor_1a92769f0858fea0b489e9fea5fc49ad07)`()` | Initialize the local dabatase structure. +`public inline async Task< int > `[`RunAsync`](#class_bitprim_1_1_executor_1afc33e022d6b52ce8cde9a87e1ab54240)`()` | Starts running the node; blockchain starts synchronizing (downloading). The call returns right away, and the handler is invoked when the node actually starts running. +`public inline async Task< int > `[`InitAndRunAsync`](#class_bitprim_1_1_executor_1a699476f37e539c6e3558a3204aa5a386)`()` | Initialize if necessary and starts running the node; blockchain starts synchronizing (downloading). The call returns right away, and the handler is invoked when the node actually starts running. +`public inline void `[`Stop`](#class_bitprim_1_1_executor_1aac496e7361d58efefee7c4e09784085a)`()` | Stops the node; that includes all activies, such as synchronization and networking. +`public inline void `[`SubscribeToBlockChain`](#class_bitprim_1_1_executor_1a644be84a2244121e0e9a487f63430ed3)`(BlockHandler handler)` | Be notified (called back) when the local copy of the blockchain is reorganized. +`public inline void `[`SubscribeToTransaction`](#class_bitprim_1_1_executor_1a7470933138440e5abdd12a3c26b2dcae)`(TransactionHandler handler)` | Be notified (called back) when the local copy of the blockchain is updated at the transaction level. + +## Members + +#### `{property} bool `[`UseTestnetRules`](#class_bitprim_1_1_executor_1a72721235e276a2022424254285a89859) + +Returns true iif the current network is a testnet. + +#### `{property} `[`Chain`](#class_bitprim_1_1_chain)` `[`Chain`](#class_bitprim_1_1_executor_1ac610ccf2aeb37d042c6de111dc4af3d8) + +The node's query interface. Will be null until node starts running (i.e. Run or RunWait succeeded) + +#### `{property} NetworkType `[`NetworkType`](#class_bitprim_1_1_executor_1aaa0cd4c024e384cd8d0f99daebada6cd) + +The node's network. Won't be valid until node starts running (i.e. Run or RunWait succeeded) + +#### `{property} bool `[`IsStopped`](#class_bitprim_1_1_executor_1aa3d8e0c57065dc536ae997cf3d46340f) + +#### `{property} bool `[`IsLoadConfigValid`](#class_bitprim_1_1_executor_1af8b481e884520c67c9d348c32f6adcbb) + +#### `public delegate bool `[`BlockHandler`](#class_bitprim_1_1_executor_1aa8f3a08638a1c8a977c780be93c5cdf9)`(ErrorCode e,UInt64 u,BlockList incoming,BlockList outgoing)` + +#### `public delegate bool `[`TransactionHandler`](#class_bitprim_1_1_executor_1af552875e00ecb97f9529b6892d5fa9ed)`(ErrorCode e,`[`Transaction`](#class_bitprim_1_1_transaction)` newTx)` + +#### `public inline `[`Executor`](#class_bitprim_1_1_executor_1ac689798a0303fa5e0b289b9601ff4a41)`(string configFile)` + +Create executor. Does not init database or start execution yet. + +#### Parameters +* `configFile` Path to configuration file. + +#### `public inline `[`Executor`](#class_bitprim_1_1_executor_1a4a0a051ca72a1c4ab9b6fa066bda67a2)`(string configFile,IntPtr stdOut,IntPtr stdErr)` + +//TODO See BIT-20 Create executor. Does not init database or start execution yet. + +#### Parameters +* `configFile` Path to configuration file. + +* `stdOut` File descriptor for redirecting standard output. + +* `stdErr` File descriptor for redirecting standard error output. + +Create executor. Does not init database or start execution yet. + +#### Parameters +* `configFile` Path to configuration file. + +* `stdOut` Handle for redirecting standard output. + +* `stdErr` Handle for redirecting standard output. + +#### `public inline bool `[`InitChain`](#class_bitprim_1_1_executor_1a92769f0858fea0b489e9fea5fc49ad07)`()` + +Initialize the local dabatase structure. + +#### Returns +True iif local chain init succeeded + +#### `public inline async Task< int > `[`RunAsync`](#class_bitprim_1_1_executor_1afc33e022d6b52ce8cde9a87e1ab54240)`()` + +Starts running the node; blockchain starts synchronizing (downloading). The call returns right away, and the handler is invoked when the node actually starts running. + +#### Returns +Error code (0 = success) + +#### `public inline async Task< int > `[`InitAndRunAsync`](#class_bitprim_1_1_executor_1a699476f37e539c6e3558a3204aa5a386)`()` + +Initialize if necessary and starts running the node; blockchain starts synchronizing (downloading). The call returns right away, and the handler is invoked when the node actually starts running. + +#### Returns +Error code (0 = success) + +#### `public inline void `[`Stop`](#class_bitprim_1_1_executor_1aac496e7361d58efefee7c4e09784085a)`()` + +Stops the node; that includes all activies, such as synchronization and networking. + +#### `public inline void `[`SubscribeToBlockChain`](#class_bitprim_1_1_executor_1a644be84a2244121e0e9a487f63430ed3)`(BlockHandler handler)` + +Be notified (called back) when the local copy of the blockchain is reorganized. + +#### Parameters +* `handler` Callback which will be called when blocks are added or removed. The callback returns 3 parameters: + +* Height (UInt64): The chain height at which reorganization takes place + +* Incoming (Blocklist): Incoming blocks (added to the blockchain). + +* Outgoing (Blocklist): Outgoing blocks (removed from the blockchain). + +#### `public inline void `[`SubscribeToTransaction`](#class_bitprim_1_1_executor_1a7470933138440e5abdd12a3c26b2dcae)`(TransactionHandler handler)` + +Be notified (called back) when the local copy of the blockchain is updated at the transaction level. + +#### Parameters +* `handler` Callback which will be called when a transaction is added. + +# class `Bitprim::GetBlockDataResult` + +``` +class Bitprim::GetBlockDataResult + : public IDisposable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} TBlockData `[`BlockData`](#class_bitprim_1_1_get_block_data_result_1a013cfb30f8e30d5be5060e3d4a76e8ae) | +`public UInt64 `[`BlockHeight`](#class_bitprim_1_1_get_block_data_result_1a3e82b7c4369b77cbce73ee9a3706782c) | + +## Members + +#### `{property} TBlockData `[`BlockData`](#class_bitprim_1_1_get_block_data_result_1a013cfb30f8e30d5be5060e3d4a76e8ae) + +#### `public UInt64 `[`BlockHeight`](#class_bitprim_1_1_get_block_data_result_1a3e82b7c4369b77cbce73ee9a3706782c) + +# class `Bitprim::GetBlockHashTimestampResult` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} byte [] `[`BlockHash`](#class_bitprim_1_1_get_block_hash_timestamp_result_1a3127c5bd7f9a1933717fbb6776201686) | +`{property} DateTime `[`BlockTimestamp`](#class_bitprim_1_1_get_block_hash_timestamp_result_1a6c1886de6a464b741711eb3652c06048) | + +## Members + +#### `{property} byte [] `[`BlockHash`](#class_bitprim_1_1_get_block_hash_timestamp_result_1a3127c5bd7f9a1933717fbb6776201686) + +#### `{property} DateTime `[`BlockTimestamp`](#class_bitprim_1_1_get_block_hash_timestamp_result_1a6c1886de6a464b741711eb3652c06048) + +# class `Bitprim::GetBlockHeaderByHashTxSizeResult` + +``` +class Bitprim::GetBlockHeaderByHashTxSizeResult + : public IDisposable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} `[`GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Header`](#class_bitprim_1_1_header)` > `[`Block`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result_1a97201cdcf7cf4749ef689702548487bb) | +`{property} HashList `[`TransactionHashes`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result_1ab1345bebf999bf84b624d0f5e5056e33) | +`{property} UInt64 `[`SerializedBlockSize`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result_1a5f31bf3c48d635040732b6a4d2137a9d) | + +## Members + +#### `{property} `[`GetBlockDataResult](#class_bitprim_1_1_get_block_data_result)< [Header`](#class_bitprim_1_1_header)` > `[`Block`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result_1a97201cdcf7cf4749ef689702548487bb) + +#### `{property} HashList `[`TransactionHashes`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result_1ab1345bebf999bf84b624d0f5e5056e33) + +#### `{property} UInt64 `[`SerializedBlockSize`](#class_bitprim_1_1_get_block_header_by_hash_tx_size_result_1a5f31bf3c48d635040732b6a4d2137a9d) + +# class `Bitprim::GetTxDataResult` + +``` +class Bitprim::GetTxDataResult + : public IDisposable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} `[`Transaction`](#class_bitprim_1_1_transaction)` `[`Tx`](#class_bitprim_1_1_get_tx_data_result_1a4f036251320b983dd69f1248d551f0ad) | +`{property} `[`GetTxPositionResult`](#struct_bitprim_1_1_get_tx_position_result)` `[`TxPosition`](#class_bitprim_1_1_get_tx_data_result_1a949a8d7dd542949d78026f7c2aa4ec2d) | + +## Members + +#### `{property} `[`Transaction`](#class_bitprim_1_1_transaction)` `[`Tx`](#class_bitprim_1_1_get_tx_data_result_1a4f036251320b983dd69f1248d551f0ad) + +#### `{property} `[`GetTxPositionResult`](#struct_bitprim_1_1_get_tx_position_result)` `[`TxPosition`](#class_bitprim_1_1_get_tx_data_result_1a949a8d7dd542949d78026f7c2aa4ec2d) + +# class `Bitprim::Header` + +``` +class Bitprim::Header + : public IDisposable +``` + +Represents a full Bitcoin blockchain block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_header_1a8018db3ab9a37c742a0cc89cca654973) | Returns true if and only if the header conforms to the Bitcoin protocol format. +`{property} byte [] `[`Hash`](#class_bitprim_1_1_header_1a1d763bfd0a000b5b1d7a7285ffcd61d7) | [Block](#class_bitprim_1_1_block) hash in 32 byte array format. +`{property} byte [] `[`Merkle`](#class_bitprim_1_1_header_1a96282c190970dfc86a35294825d3c3e5) | Merkle root in 32 byte array format. +`{property} byte [] `[`PreviousBlockHash`](#class_bitprim_1_1_header_1aa48ea17b65f4177086ab174233c9ad1a) | Hash belonging to the immediately previous block in the blockchain, as a 32 byte array. This is all zeros for the first block, a.k.a. Genesis. +`{property} string `[`ProofString`](#class_bitprim_1_1_header_1a1756a2bc8e312654ad8f02e917db5045) | Hexadecimal string representation of the block's proof (which is a 256-bit number). +`{property} UInt32 `[`Bits`](#class_bitprim_1_1_header_1afacb1dc4ac2169c218801dc54cad37ca) | Difficulty threshold. +`{property} UInt32 `[`Nonce`](#class_bitprim_1_1_header_1ac6a6f369a44e845082240ddd86f202d9) | The nonce that allowed this block to be added to the blockchain. +`{property} UInt32 `[`Timestamp`](#class_bitprim_1_1_header_1a745d573ec4c70b1a67fca156faca6dfa) | [Block](#class_bitprim_1_1_block) timestamp in UNIX Epoch format (seconds since January 1st 1970) Assume UTC 0. +`{property} UInt32 `[`Version`](#class_bitprim_1_1_header_1a9189d2afec1ba7d21f10aa776d3ac490) | [Header](#class_bitprim_1_1_header) protocol version. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_header_1a8018db3ab9a37c742a0cc89cca654973) + +Returns true if and only if the header conforms to the Bitcoin protocol format. + +#### `{property} byte [] `[`Hash`](#class_bitprim_1_1_header_1a1d763bfd0a000b5b1d7a7285ffcd61d7) + +[Block](#class_bitprim_1_1_block) hash in 32 byte array format. + +#### `{property} byte [] `[`Merkle`](#class_bitprim_1_1_header_1a96282c190970dfc86a35294825d3c3e5) + +Merkle root in 32 byte array format. + +#### `{property} byte [] `[`PreviousBlockHash`](#class_bitprim_1_1_header_1aa48ea17b65f4177086ab174233c9ad1a) + +Hash belonging to the immediately previous block in the blockchain, as a 32 byte array. This is all zeros for the first block, a.k.a. Genesis. + +#### `{property} string `[`ProofString`](#class_bitprim_1_1_header_1a1756a2bc8e312654ad8f02e917db5045) + +Hexadecimal string representation of the block's proof (which is a 256-bit number). + +#### `{property} UInt32 `[`Bits`](#class_bitprim_1_1_header_1afacb1dc4ac2169c218801dc54cad37ca) + +Difficulty threshold. + +#### `{property} UInt32 `[`Nonce`](#class_bitprim_1_1_header_1ac6a6f369a44e845082240ddd86f202d9) + +The nonce that allowed this block to be added to the blockchain. + +#### `{property} UInt32 `[`Timestamp`](#class_bitprim_1_1_header_1a745d573ec4c70b1a67fca156faca6dfa) + +[Block](#class_bitprim_1_1_block) timestamp in UNIX Epoch format (seconds since January 1st 1970) Assume UTC 0. + +#### `{property} UInt32 `[`Version`](#class_bitprim_1_1_header_1a9189d2afec1ba7d21f10aa776d3ac490) + +[Header](#class_bitprim_1_1_header) protocol version. + +# class `Bitprim::HeaderReader` + +``` +class Bitprim::HeaderReader + : public IDisposable +``` + +Helper for reading the header for each block in a specific set of blocks. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_header_reader_1a3471f7b55cfb7695d79ca8e13cfcf0a0) | The block set is valid iif all its blocks are valid. +`{property} byte [] `[`StopHash`](#class_bitprim_1_1_header_reader_1a98cbc6c314c8ddb5472916b7fbefc4f7) | Stop at this block (include it in the set). +`{property} HashList `[`StartHashes`](#class_bitprim_1_1_header_reader_1a6f8d968aae0e6240dffbc554a2e8ba82) | Define when to start reading: Once these blocks are synced (include the newest one). +`public inline `[`HeaderReader`](#class_bitprim_1_1_header_reader_1aa4b325abd6a521e1949edea884778052)`()` | Create an empty reader. +`public inline `[`HeaderReader`](#class_bitprim_1_1_header_reader_1a2eee57e87b2ea5e3f609f949c71a707e)`(HashList start,byte [] stop)` | Create a reader with predefined start hashes and stop hash. +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_header_reader_1a77e3422d9b7b76a956924c3611e6e989)`(UInt32 version)` | The sum of the header sizes for this set. +`public inline void `[`Reset`](#class_bitprim_1_1_header_reader_1aa60467a083c4867ec266e611f13c580e)`()` | Go back to first block in the set. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_header_reader_1a3471f7b55cfb7695d79ca8e13cfcf0a0) + +The block set is valid iif all its blocks are valid. + +#### `{property} byte [] `[`StopHash`](#class_bitprim_1_1_header_reader_1a98cbc6c314c8ddb5472916b7fbefc4f7) + +Stop at this block (include it in the set). + +#### `{property} HashList `[`StartHashes`](#class_bitprim_1_1_header_reader_1a6f8d968aae0e6240dffbc554a2e8ba82) + +Define when to start reading: Once these blocks are synced (include the newest one). + +#### `public inline `[`HeaderReader`](#class_bitprim_1_1_header_reader_1aa4b325abd6a521e1949edea884778052)`()` + +Create an empty reader. + +#### `public inline `[`HeaderReader`](#class_bitprim_1_1_header_reader_1a2eee57e87b2ea5e3f609f949c71a707e)`(HashList start,byte [] stop)` + +Create a reader with predefined start hashes and stop hash. + +#### Parameters +* `start` When all of these blocks are synced, start reading. + +* `stop` Stop at this block. + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_header_reader_1a77e3422d9b7b76a956924c3611e6e989)`(UInt32 version)` + +The sum of the header sizes for this set. + +#### Parameters +* `version` Protocol version to consider when calculating header size. + +#### Returns +Sum of header sizes. + +#### `public inline void `[`Reset`](#class_bitprim_1_1_header_reader_1aa60467a083c4867ec266e611f13c580e)`()` + +Go back to first block in the set. + +# class `Bitprim::HistoryCompact` + +``` +class Bitprim::HistoryCompact + : public IDisposable +``` + +[Output](#class_bitprim_1_1_output) points, values, and spends for a payment address. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} `[`Point`](#class_bitprim_1_1_point)` `[`Point`](#class_bitprim_1_1_history_compact_1a5f18863c354bf692f1fe325b311654b0) | The point that identifies the History instance. +`{property} UInt32 `[`Height`](#class_bitprim_1_1_history_compact_1a41e320774dfb5a2ecb0d6c8617087d06) | Height of the block containing the [Point](#class_bitprim_1_1_point). +`{property} UInt64 `[`ValueOrChecksum`](#class_bitprim_1_1_history_compact_1ad00b564aafa4f603347d6e387bc654a6) | Varies depending on point_kind. + +## Members + +#### `{property} `[`Point`](#class_bitprim_1_1_point)` `[`Point`](#class_bitprim_1_1_history_compact_1a5f18863c354bf692f1fe325b311654b0) + +The point that identifies the History instance. + +#### `{property} UInt32 `[`Height`](#class_bitprim_1_1_history_compact_1a41e320774dfb5a2ecb0d6c8617087d06) + +Height of the block containing the [Point](#class_bitprim_1_1_point). + +#### `{property} UInt64 `[`ValueOrChecksum`](#class_bitprim_1_1_history_compact_1ad00b564aafa4f603347d6e387bc654a6) + +Varies depending on point_kind. + +# class `Bitprim::Input` + +``` +class Bitprim::Input + : public IDisposable +``` + +Represents a [Transaction](#class_bitprim_1_1_transaction) input. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsFinal`](#class_bitprim_1_1_input_1a51424ae4e6979cced244ba27bf563644) | Returns 1 iif sequence is equal to max_sequence. +`{property} bool `[`IsValid`](#class_bitprim_1_1_input_1aa45cc1562e08b08903f0c49af101edaf) | Returns false if and only if previous outputs or input script are invalid. +`{property} `[`OutputPoint`](#class_bitprim_1_1_output_point)` `[`PreviousOutput`](#class_bitprim_1_1_input_1a047409c5f428227e0aa235a2a8b85687) | Returns a reference to the previous output, as an [OutputPoint](#class_bitprim_1_1_output_point): a transaction hash and index pair. +`{property} `[`Script`](#class_bitprim_1_1_script)` `[`Script`](#class_bitprim_1_1_input_1a33808f7bd1eac8590448bebe1d7ddbde) | The input's script. +`{property} UInt32 `[`Sequence`](#class_bitprim_1_1_input_1ad4a1d451642e545c15a8d842092e5815) | Zero-based index for the input in the transaction's input set. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_input_1a265f01ce48cb932e89306bae4f9d2835) | +`public inline `[`Input`](#class_bitprim_1_1_input_1a978df7845edc1c18e44cc7f9e9ad0ee4)`()` | Create an empty input. +`public inline `[`Input`](#class_bitprim_1_1_input_1a6e5b9353656c7e4d94f3645e674e0442)`(`[`Output`](#class_bitprim_1_1_output)` previousOutput,`[`Script`](#class_bitprim_1_1_script)` script,UInt32 sequence)` | Create an input from a previous output, a script and a sequence number. +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_input_1af185363b5b7723afd29117dc629e55c0)`(bool wire)` | [Input](#class_bitprim_1_1_input) size in bytes. +`public inline UInt64 `[`GetSignatureOperationsCount`](#class_bitprim_1_1_input_1a7f34e170a185bda655ef1df84ec38b92)`(bool bip16Active)` | Total amount of sigops (signature operations) in the input script. + +## Members + +#### `{property} bool `[`IsFinal`](#class_bitprim_1_1_input_1a51424ae4e6979cced244ba27bf563644) + +Returns 1 iif sequence is equal to max_sequence. + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_input_1aa45cc1562e08b08903f0c49af101edaf) + +Returns false if and only if previous outputs or input script are invalid. + +#### `{property} `[`OutputPoint`](#class_bitprim_1_1_output_point)` `[`PreviousOutput`](#class_bitprim_1_1_input_1a047409c5f428227e0aa235a2a8b85687) + +Returns a reference to the previous output, as an [OutputPoint](#class_bitprim_1_1_output_point): a transaction hash and index pair. + +#### `{property} `[`Script`](#class_bitprim_1_1_script)` `[`Script`](#class_bitprim_1_1_input_1a33808f7bd1eac8590448bebe1d7ddbde) + +The input's script. + +#### `{property} UInt32 `[`Sequence`](#class_bitprim_1_1_input_1ad4a1d451642e545c15a8d842092e5815) + +Zero-based index for the input in the transaction's input set. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_input_1a265f01ce48cb932e89306bae4f9d2835) + +#### `public inline `[`Input`](#class_bitprim_1_1_input_1a978df7845edc1c18e44cc7f9e9ad0ee4)`()` + +Create an empty input. + +#### `public inline `[`Input`](#class_bitprim_1_1_input_1a6e5b9353656c7e4d94f3645e674e0442)`(`[`Output`](#class_bitprim_1_1_output)` previousOutput,`[`Script`](#class_bitprim_1_1_script)` script,UInt32 sequence)` + +Create an input from a previous output, a script and a sequence number. + +#### Parameters +* `previousOutput` The output to spend. + +* `script` [Input](#class_bitprim_1_1_input) script. + +* `sequence` Zero-based, indexes this input in the input set. + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_input_1af185363b5b7723afd29117dc629e55c0)`(bool wire)` + +[Input](#class_bitprim_1_1_input) size in bytes. + +#### Parameters +* `wire` Iif true, consider 4 extra bytes from wire field. + +#### Returns +Size in bytes. + +#### `public inline UInt64 `[`GetSignatureOperationsCount`](#class_bitprim_1_1_input_1a7f34e170a185bda655ef1df84ec38b92)`(bool bip16Active)` + +Total amount of sigops (signature operations) in the input script. + +#### Parameters +* `bip16Active` Iif true, count BIP 16 active sig ops + +#### Returns +Sigops count. + +# class `Bitprim::MempoolTransaction` + +Represents an unconfirmed transaction. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} string `[`Address`](#class_bitprim_1_1_mempool_transaction_1a61e4bbd9d8201c7ac14eb7a1f48350c1) | [Transaction](#class_bitprim_1_1_transaction) output address +`{property} string `[`Hash`](#class_bitprim_1_1_mempool_transaction_1aef304d5e820d9162a034c6efbd96f5e8) | [Transaction](#class_bitprim_1_1_transaction) hash (unique identifier) +`{property} string `[`PreviousOutputHash`](#class_bitprim_1_1_mempool_transaction_1a76cbffed7754634acee9ed314f5915ea) | Previous output transaction hash +`{property} string `[`PreviousOutputIndex`](#class_bitprim_1_1_mempool_transaction_1a5f31bb697115574c6c095145bd6479a2) | Previous output transaction index +`{property} string `[`Satoshis`](#class_bitprim_1_1_mempool_transaction_1a1235a85eaeb1c61f6e6ac09f7bd8dcc3) | Sum of output values in Satoshis +`{property} UInt64 `[`Index`](#class_bitprim_1_1_mempool_transaction_1a60b3549786221cc6e08492d430c0f132) | [Transaction](#class_bitprim_1_1_transaction) index +`{property} UInt64 `[`Timestamp`](#class_bitprim_1_1_mempool_transaction_1aa8aad1f71eae1b4f05594b037f8963af) | [Transaction](#class_bitprim_1_1_transaction) timestamp +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_mempool_transaction_1ac262d612648d499a6cb123667560eece) | + +## Members + +#### `{property} string `[`Address`](#class_bitprim_1_1_mempool_transaction_1a61e4bbd9d8201c7ac14eb7a1f48350c1) + +[Transaction](#class_bitprim_1_1_transaction) output address + +#### `{property} string `[`Hash`](#class_bitprim_1_1_mempool_transaction_1aef304d5e820d9162a034c6efbd96f5e8) + +[Transaction](#class_bitprim_1_1_transaction) hash (unique identifier) + +#### `{property} string `[`PreviousOutputHash`](#class_bitprim_1_1_mempool_transaction_1a76cbffed7754634acee9ed314f5915ea) + +Previous output transaction hash + +#### `{property} string `[`PreviousOutputIndex`](#class_bitprim_1_1_mempool_transaction_1a5f31bb697115574c6c095145bd6479a2) + +Previous output transaction index + +#### `{property} string `[`Satoshis`](#class_bitprim_1_1_mempool_transaction_1a1235a85eaeb1c61f6e6ac09f7bd8dcc3) + +Sum of output values in Satoshis + +#### `{property} UInt64 `[`Index`](#class_bitprim_1_1_mempool_transaction_1a60b3549786221cc6e08492d430c0f132) + +[Transaction](#class_bitprim_1_1_transaction) index + +#### `{property} UInt64 `[`Timestamp`](#class_bitprim_1_1_mempool_transaction_1aa8aad1f71eae1b4f05594b037f8963af) + +[Transaction](#class_bitprim_1_1_transaction) timestamp + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_mempool_transaction_1ac262d612648d499a6cb123667560eece) + +# class `Bitprim::MerkleBlock` + +``` +class Bitprim::MerkleBlock + : public IDisposable +``` + +Merkle tree representation of a blockchain block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_merkle_block_1af1579794d62800b1e7712c7eeb5400c3) | Returns true if and only if it the block contains txs hashes, and the header is valid. +`{property} `[`Header`](#class_bitprim_1_1_header)` `[`Header`](#class_bitprim_1_1_merkle_block_1a56bf0f704c9ba7e474922b1a2fc18f0b) | The block's header. +`{property} UInt64 `[`HashCount`](#class_bitprim_1_1_merkle_block_1a9d489bfd505f89564069460ae835cca6) | [Transaction](#class_bitprim_1_1_transaction) hashes list element count. +`{property} UInt64 `[`TotalTransactionCount`](#class_bitprim_1_1_merkle_block_1a91fc331d0290c174dd4609d5231e3df6) | Amount of transactions inside the block. +`public inline byte [] `[`GetNthHash`](#class_bitprim_1_1_merkle_block_1a787be0b2fd6fc5f291c0e425ae2c2b67)`(int n)` | Get the Nth transaction hash from the block. +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_merkle_block_1af770044cf3e054454d56cc4cd85765d0)`(UInt32 version)` | [Block](#class_bitprim_1_1_block) size in bytes (as a Merkle block, not as a full block). +`public inline void `[`Reset`](#class_bitprim_1_1_merkle_block_1aa98bfea570cfd6816d98559421d3f505)`()` | Delete all the data inside the block. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_merkle_block_1af1579794d62800b1e7712c7eeb5400c3) + +Returns true if and only if it the block contains txs hashes, and the header is valid. + +#### `{property} `[`Header`](#class_bitprim_1_1_header)` `[`Header`](#class_bitprim_1_1_merkle_block_1a56bf0f704c9ba7e474922b1a2fc18f0b) + +The block's header. + +#### `{property} UInt64 `[`HashCount`](#class_bitprim_1_1_merkle_block_1a9d489bfd505f89564069460ae835cca6) + +[Transaction](#class_bitprim_1_1_transaction) hashes list element count. + +#### `{property} UInt64 `[`TotalTransactionCount`](#class_bitprim_1_1_merkle_block_1a91fc331d0290c174dd4609d5231e3df6) + +Amount of transactions inside the block. + +#### `public inline byte [] `[`GetNthHash`](#class_bitprim_1_1_merkle_block_1a787be0b2fd6fc5f291c0e425ae2c2b67)`(int n)` + +Get the Nth transaction hash from the block. + +#### Parameters +* `n` Zerp-based index. + +#### Returns +[Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_merkle_block_1af770044cf3e054454d56cc4cd85765d0)`(UInt32 version)` + +[Block](#class_bitprim_1_1_block) size in bytes (as a Merkle block, not as a full block). + +#### Parameters +* `version` Protocol version to consider when calculating size. + +#### Returns +Size in bytes. + +#### `public inline void `[`Reset`](#class_bitprim_1_1_merkle_block_1aa98bfea570cfd6816d98559421d3f505)`()` + +Delete all the data inside the block. + +# class `Bitprim::NativeBuffer` + +``` +class Bitprim::NativeBuffer + : public IDisposable +``` + +RAII wrapper for native memory. Guarantees that even if an exception is thrown, platform_free will be used to release it. Also, it prevents the user from forgetting to call platform_free. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} IntPtr `[`NativePtr`](#class_bitprim_1_1_native_buffer_1af5e2a12866803d63e6ebce17391ed1e7) | +`public inline `[`NativeBuffer`](#class_bitprim_1_1_native_buffer_1a2858b61a12dd4a344055291a9ce947ae)`(IntPtr nativePtr)` | +`public inline byte [] `[`CopyToManagedArray`](#class_bitprim_1_1_native_buffer_1a20edd41586cd1a5582fd4e2ba48cce75)`(int arraySize)` | + +## Members + +#### `{property} IntPtr `[`NativePtr`](#class_bitprim_1_1_native_buffer_1af5e2a12866803d63e6ebce17391ed1e7) + +#### `public inline `[`NativeBuffer`](#class_bitprim_1_1_native_buffer_1a2858b61a12dd4a344055291a9ce947ae)`(IntPtr nativePtr)` + +#### `public inline byte [] `[`CopyToManagedArray`](#class_bitprim_1_1_native_buffer_1a20edd41586cd1a5582fd4e2ba48cce75)`(int arraySize)` + +# class `Bitprim::NativeString` + +``` +class Bitprim::NativeString + : public Bitprim.NativeBuffer +``` + +RAII wrapper for native strings. Guarantees that even if an exception is thrown, platform_free will be used to release the native memory. Also, it prevents the user from forgetting to call platform_free. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline `[`NativeString`](#class_bitprim_1_1_native_string_1a2cf067d18afd3c84006f77ca4089dc0b)`(IntPtr nativePtr)` | +`public override string `[`ToString`](#class_bitprim_1_1_native_string_1ad8b8bfd580eb2ef8789fcbb2dd72d201)`()` | + +## Members + +#### `public inline `[`NativeString`](#class_bitprim_1_1_native_string_1a2cf067d18afd3c84006f77ca4089dc0b)`(IntPtr nativePtr)` + +#### `public override string `[`ToString`](#class_bitprim_1_1_native_string_1ad8b8bfd580eb2ef8789fcbb2dd72d201)`()` + +# class `Bitprim::NodeSettings` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} CurrencyType `[`CurrencyType`](#class_bitprim_1_1_node_settings_1afca824023b908da53cbbfd01b1dca4fc) | + +## Members + +#### `{property} CurrencyType `[`CurrencyType`](#class_bitprim_1_1_node_settings_1afca824023b908da53cbbfd01b1dca4fc) + +# class `Bitprim::Output` + +``` +class Bitprim::Output + : public IDisposable +``` + +Represents one of the outputs of a [Transaction](#class_bitprim_1_1_transaction). + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_output_1a787e7f1f897f2970c666808dc10b2e18) | Returns false if and only if output is not found. +`{property} `[`Script`](#class_bitprim_1_1_script)` `[`Script`](#class_bitprim_1_1_output_1a482ee34dee529ef3751f57b376967099) | [Output](#class_bitprim_1_1_output) script. +`{property} UInt64 `[`Value`](#class_bitprim_1_1_output_1a6d99343413e43c096df4e8b36e04a70d) | Spend, in Satoshis. +`{property} UInt64 `[`SignatureOperationCount`](#class_bitprim_1_1_output_1a82549fe1b06952db62aee4bbfa52dc0f) | The amount of signature operations in the output script. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_output_1ad4d9c3eb131262fba8e97687f4c08b6a) | +`public inline `[`Output`](#class_bitprim_1_1_output_1aaa64429487aec9a987c5b944a9bed5d6)`()` | Create an empty output. +`public inline `[`Output`](#class_bitprim_1_1_output_1a2550a08df3ed832691624537845c114e)`(UInt64 value,`[`Script`](#class_bitprim_1_1_script)` script)` | Create an output from a value and a script. +`public inline `[`PaymentAddress`](#class_bitprim_1_1_payment_address)` `[`PaymentAddress`](#class_bitprim_1_1_output_1aad82ee12e358b7c75cedfbd7f868b918)`(bool useTestnetRules)` | +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_output_1a4b88b89c3080b561fda08264cc170918)`(bool wire)` | [Output](#class_bitprim_1_1_output) size in bytes. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_output_1a787e7f1f897f2970c666808dc10b2e18) + +Returns false if and only if output is not found. + +#### `{property} `[`Script`](#class_bitprim_1_1_script)` `[`Script`](#class_bitprim_1_1_output_1a482ee34dee529ef3751f57b376967099) + +[Output](#class_bitprim_1_1_output) script. + +#### `{property} UInt64 `[`Value`](#class_bitprim_1_1_output_1a6d99343413e43c096df4e8b36e04a70d) + +Spend, in Satoshis. + +#### `{property} UInt64 `[`SignatureOperationCount`](#class_bitprim_1_1_output_1a82549fe1b06952db62aee4bbfa52dc0f) + +The amount of signature operations in the output script. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_output_1ad4d9c3eb131262fba8e97687f4c08b6a) + +#### `public inline `[`Output`](#class_bitprim_1_1_output_1aaa64429487aec9a987c5b944a9bed5d6)`()` + +Create an empty output. + +#### `public inline `[`Output`](#class_bitprim_1_1_output_1a2550a08df3ed832691624537845c114e)`(UInt64 value,`[`Script`](#class_bitprim_1_1_script)` script)` + +Create an output from a value and a script. + +#### Parameters +* `value` In Satoshis. + +* `script` [Output](#class_bitprim_1_1_output) script. + +#### `public inline `[`PaymentAddress`](#class_bitprim_1_1_payment_address)` `[`PaymentAddress`](#class_bitprim_1_1_output_1aad82ee12e358b7c75cedfbd7f868b918)`(bool useTestnetRules)` + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_output_1a4b88b89c3080b561fda08264cc170918)`(bool wire)` + +[Output](#class_bitprim_1_1_output) size in bytes. + +#### Parameters +* `wire` If true, size will include size of 'uint32' for storing spender height. + +#### Returns +Size in bytes. + +# class `Bitprim::OutputPoint` + +``` +class Bitprim::OutputPoint + : public IDisposable +``` + +[Transaction](#class_bitprim_1_1_transaction) hash and index pair representing one of the transaction outputs. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} byte [] `[`Hash`](#class_bitprim_1_1_output_point_1a633f597c1dc5978be3fa61442ecf1304) | [Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. +`{property} UInt32 `[`Index`](#class_bitprim_1_1_output_point_1a599509fe9e21990c4fa6c3e7ac132e01) | [Transaction](#class_bitprim_1_1_transaction) index (zero-based). +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_output_point_1a0d223bbc27f0813aae961639d04fa0b1) | +`public inline `[`OutputPoint`](#class_bitprim_1_1_output_point_1a8a7e0600afba5d8588044c43313ef839)`()` | Create an empty output point. +`public inline `[`OutputPoint`](#class_bitprim_1_1_output_point_1ac8741426c93c781a0aefc96c97d229dd)`(byte [] pointHash,UInt32 index)` | Create an output point from a hash and index pair. + +## Members + +#### `{property} byte [] `[`Hash`](#class_bitprim_1_1_output_point_1a633f597c1dc5978be3fa61442ecf1304) + +[Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. + +#### `{property} UInt32 `[`Index`](#class_bitprim_1_1_output_point_1a599509fe9e21990c4fa6c3e7ac132e01) + +[Transaction](#class_bitprim_1_1_transaction) index (zero-based). + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_output_point_1a0d223bbc27f0813aae961639d04fa0b1) + +#### `public inline `[`OutputPoint`](#class_bitprim_1_1_output_point_1a8a7e0600afba5d8588044c43313ef839)`()` + +Create an empty output point. + +#### `public inline `[`OutputPoint`](#class_bitprim_1_1_output_point_1ac8741426c93c781a0aefc96c97d229dd)`(byte [] pointHash,UInt32 index)` + +Create an output point from a hash and index pair. + +#### Parameters +* `pointHash` +* `index` + +# class `Bitprim::PaymentAddress` + +``` +class Bitprim::PaymentAddress + : public IDisposable +``` + +Represents a Bitcoin wallet address. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_payment_address_1a820450637d2e497dffc15f6e6905cce6) | Returns true iif this is a valid Base58 address. +`{property} byte `[`Version`](#class_bitprim_1_1_payment_address_1ad785a31e82e3260d29a238856bfee4bd) | Address version. +`{property} string `[`Encoded`](#class_bitprim_1_1_payment_address_1ab01d95e4aa1c7bd59e4817dca4dc0888) | Human readable representation. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_payment_address_1a7613293266b7839dea0b8c6d86aa8002) | +`public inline `[`PaymentAddress`](#class_bitprim_1_1_payment_address_1ac7aba66544c8e97f631bbfa70983162e)`(string hexString)` | Create an address from its hex string representation. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_payment_address_1a820450637d2e497dffc15f6e6905cce6) + +Returns true iif this is a valid Base58 address. + +#### `{property} byte `[`Version`](#class_bitprim_1_1_payment_address_1ad785a31e82e3260d29a238856bfee4bd) + +Address version. + +#### `{property} string `[`Encoded`](#class_bitprim_1_1_payment_address_1ab01d95e4aa1c7bd59e4817dca4dc0888) + +Human readable representation. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_payment_address_1a7613293266b7839dea0b8c6d86aa8002) + +#### `public inline `[`PaymentAddress`](#class_bitprim_1_1_payment_address_1ac7aba66544c8e97f631bbfa70983162e)`(string hexString)` + +Create an address from its hex string representation. + +#### Parameters +* `hexString` + +# class `Bitprim::Point` + +Represents one of the transaction inputs. It's a transaction hash and index pair. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_point_1adefc84e6edb7fa3725f2180f544f180b) | Returns true if and only if this point is not null. +`{property} byte [] `[`Hash`](#class_bitprim_1_1_point_1a867ca6d798e69ab40d29cf493cf4143a) | [Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. +`{property} UInt32 `[`Index`](#class_bitprim_1_1_point_1a4ede31b4009d9671bd2177c1fbe7104a) | [Input](#class_bitprim_1_1_input) position in the transaction (zero-based). +`{property} UInt64 `[`Checksum`](#class_bitprim_1_1_point_1aaf47ce470cbe1d9c1aea175757cdf623) | This is used with [OutputPoint](#class_bitprim_1_1_output_point) identification within a set of history rows of the same address. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_point_1a8017dde6032feadab8acc32a7691cdd0) | + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_point_1adefc84e6edb7fa3725f2180f544f180b) + +Returns true if and only if this point is not null. + +#### `{property} byte [] `[`Hash`](#class_bitprim_1_1_point_1a867ca6d798e69ab40d29cf493cf4143a) + +[Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. + +#### `{property} UInt32 `[`Index`](#class_bitprim_1_1_point_1a4ede31b4009d9671bd2177c1fbe7104a) + +[Input](#class_bitprim_1_1_input) position in the transaction (zero-based). + +#### `{property} UInt64 `[`Checksum`](#class_bitprim_1_1_point_1aaf47ce470cbe1d9c1aea175757cdf623) + +This is used with [OutputPoint](#class_bitprim_1_1_output_point) identification within a set of history rows of the same address. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_point_1a8017dde6032feadab8acc32a7691cdd0) + +# class `Bitprim::Script` + +``` +class Bitprim::Script + : public IDisposable +``` + +Represents a transaction script. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsValid`](#class_bitprim_1_1_script_1aa6762b4acd4945c1b648ddd55802a430) | All script bytes are valid under some circumstance (e.g. coinbase). +`{property} bool `[`OperationsAreValid`](#class_bitprim_1_1_script_1a3047f3d01ea8e30a429c2004ae20e500) | [Script](#class_bitprim_1_1_script) validity is independent of individual operation validity. Operations are considered invalid if there is a trailing invalid/default op or if a push op has a size mismatch. +`{property} string `[`Type`](#class_bitprim_1_1_script_1ac3c48921a18d3864acbdf6937a8724a6) | [Script](#class_bitprim_1_1_script) type +`{property} UInt64 `[`SatoshiContentSize`](#class_bitprim_1_1_script_1a73ee4ba9eb69e6caae61756fd995427b) | Size in bytes. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_script_1a1532f7d9458f9766de2fc79a8213d1f9) | +`public inline byte [] `[`ToData`](#class_bitprim_1_1_script_1a51e7a2f14655e6431b21e39f7abedfa8)`(bool prefix)` | Raw script data +`public inline string `[`ToString`](#class_bitprim_1_1_script_1a7230eca6520c7b466e50ba9cdacf52c4)`(UInt32 activeForks)` | Translate operations in the script to a string. +`public inline UInt64 `[`GetEmbeddedSigOps`](#class_bitprim_1_1_script_1a41f6fc1d3554e6e0736eeb0e5622b89f)`(`[`Script`](#class_bitprim_1_1_script)` prevOutScript)` | Count the sigops in the embedded script using BIP16 rules. +`public inline UInt64 `[`GetSigOps`](#class_bitprim_1_1_script_1a9d37fa88a73f37692b612697fb327066)`(bool embedded)` | Amount of signature operations in the script. + +## Members + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_script_1aa6762b4acd4945c1b648ddd55802a430) + +All script bytes are valid under some circumstance (e.g. coinbase). + +#### `{property} bool `[`OperationsAreValid`](#class_bitprim_1_1_script_1a3047f3d01ea8e30a429c2004ae20e500) + +[Script](#class_bitprim_1_1_script) validity is independent of individual operation validity. Operations are considered invalid if there is a trailing invalid/default op or if a push op has a size mismatch. + +#### `{property} string `[`Type`](#class_bitprim_1_1_script_1ac3c48921a18d3864acbdf6937a8724a6) + +[Script](#class_bitprim_1_1_script) type + +#### `{property} UInt64 `[`SatoshiContentSize`](#class_bitprim_1_1_script_1a73ee4ba9eb69e6caae61756fd995427b) + +Size in bytes. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_script_1a1532f7d9458f9766de2fc79a8213d1f9) + +#### `public inline byte [] `[`ToData`](#class_bitprim_1_1_script_1a51e7a2f14655e6431b21e39f7abedfa8)`(bool prefix)` + +Raw script data + +#### Parameters +* `prefix` Tells whether to include script size in data + +#### Returns +Byte array with script data + +#### `public inline string `[`ToString`](#class_bitprim_1_1_script_1a7230eca6520c7b466e50ba9cdacf52c4)`(UInt32 activeForks)` + +Translate operations in the script to a string. + +#### Parameters +* `activeForks` Tells which rule is active. + +#### Returns +Human readable script. + +#### `public inline UInt64 `[`GetEmbeddedSigOps`](#class_bitprim_1_1_script_1a41f6fc1d3554e6e0736eeb0e5622b89f)`(`[`Script`](#class_bitprim_1_1_script)` prevOutScript)` + +Count the sigops in the embedded script using BIP16 rules. + +#### Parameters +* `prevOutScript` Reference to previous output script. + +#### Returns +Embedded sigops count. + +#### `public inline UInt64 `[`GetSigOps`](#class_bitprim_1_1_script_1a9d37fa88a73f37692b612697fb327066)`(bool embedded)` + +Amount of signature operations in the script. + +#### Parameters +* `embedded` Iif true, consider this an embedded script. + +#### Returns +Sigops count. + +# class `Bitprim::StealthCompact` + +``` +class Bitprim::StealthCompact + : public IDisposable +``` + +Stealth payment related data. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} byte [] `[`EphemeralPublicKeyHash`](#class_bitprim_1_1_stealth_compact_1a7e981961a1a1fa41520c08cddcb8e1a7) | 33 bytes. Includes the sign byte (0x02). +`{property} byte [] `[`PublicKeyHash`](#class_bitprim_1_1_stealth_compact_1a4b079e4ca2dd42c7dfcecedf58d1c1c1) | Public key hash in 32 bytes array format. +`{property} byte [] `[`TransactionHash`](#class_bitprim_1_1_stealth_compact_1acccf8d9a07b8463f074f4d1c872d3425) | [Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. + +## Members + +#### `{property} byte [] `[`EphemeralPublicKeyHash`](#class_bitprim_1_1_stealth_compact_1a7e981961a1a1fa41520c08cddcb8e1a7) + +33 bytes. Includes the sign byte (0x02). + +#### `{property} byte [] `[`PublicKeyHash`](#class_bitprim_1_1_stealth_compact_1a4b079e4ca2dd42c7dfcecedf58d1c1c1) + +Public key hash in 32 bytes array format. + +#### `{property} byte [] `[`TransactionHash`](#class_bitprim_1_1_stealth_compact_1acccf8d9a07b8463f074f4d1c872d3425) + +[Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. + +# class `Bitprim::TaskHelper` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Bitprim::Transaction` + +``` +class Bitprim::Transaction + : public IDisposable +``` + +Represents a Bitcoin transaction. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsCoinbase`](#class_bitprim_1_1_transaction_1ae3a362e097393cbf8c8087107ac202e5) | Returns true if and only if this is a coinbase transaction (i.e. generates new coins). +`{property} bool `[`IsLocktimeConflict`](#class_bitprim_1_1_transaction_1ad7b30b6fa7c3ddea8e0ab1541810ae7f) | Returns true if and only if the transaction is locked and every input is final, false otherwise. +`{property} bool `[`IsMissingPreviousOutputs`](#class_bitprim_1_1_transaction_1af10e0b3b68b2a6d2dac82c67fa0c1e23) | Returns true if and only if at least one of the previous outputs is invalid, false otherwise. +`{property} bool `[`IsNullNonCoinbase`](#class_bitprim_1_1_transaction_1a49c7429cd339e138f983102fb530a96a) | Return true if and only if the transaction is not coinbase and has a null previous output, false otherwise. +`{property} bool `[`IsOversizeCoinbase`](#class_bitprim_1_1_transaction_1a7ebc78d891b9f5e4d01e0acb6a2214d5) | Returns true if the transaction is coinbase and has an invalid script size on its first input. +`{property} bool `[`IsOverspent`](#class_bitprim_1_1_transaction_1a5cccf30e1c82353fe678c393eb80df71) | Returns true if transaction is not a coinbase, and the sum of its outputs is higher than the sum of its inputs, false otherwise. +`{property} bool `[`IsValid`](#class_bitprim_1_1_transaction_1a29b8a68de9c1828a6b540f5dc02508da) | Returns true if and only if this transaction is valid according to the protocol. +`{property} byte [] `[`Hash`](#class_bitprim_1_1_transaction_1a54d13bfb55819222e4f302e1f8de063c) | [Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. +`{property} InputList `[`Inputs`](#class_bitprim_1_1_transaction_1a33d098c55beee1bb9d7ff598ace272bc) | A list with all the transaction inputs. +`{property} OutputList `[`Outputs`](#class_bitprim_1_1_transaction_1a8f7202ac3b2839b02ea07197d88e0cfb) | A list with all the transaction outputs. +`{property} UInt32 `[`Locktime`](#class_bitprim_1_1_transaction_1a9049d57c642ab63763e906539db8f04a) | [Transaction](#class_bitprim_1_1_transaction) locktime. +`{property} UInt32 `[`Version`](#class_bitprim_1_1_transaction_1ae76b215e44e8e0a225dcca697b21002d) | [Transaction](#class_bitprim_1_1_transaction) protocol version. +`{property} UInt64 `[`Fees`](#class_bitprim_1_1_transaction_1a27c37d65dff9cae8fed5e6a684e641b7) | Fees to pay to the winning miner. +`{property} UInt64 `[`SignatureOperations`](#class_bitprim_1_1_transaction_1a9de1208d6409d511b3fa1b74d7020539) | Amount of signature operations in the transaction. +`{property} UInt64 `[`TotalInputValue`](#class_bitprim_1_1_transaction_1a291ada37f6535b154a7123ca3eb534ef) | Sum of every input value in the transaction. +`{property} UInt64 `[`TotalOutputValue`](#class_bitprim_1_1_transaction_1a48315105df2e9ddf66ded983200e0511) | Sum of every output value in the transaction. +`{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_transaction_1ae4213b4c3e5e4ab28371604d9f0a53cb) | +`public inline `[`Transaction`](#class_bitprim_1_1_transaction_1ab20ffd365084f400febcf58a9f2b7111)`()` | Create an empty tramsaction. +`public inline `[`Transaction`](#class_bitprim_1_1_transaction_1abf686e7c063404e2ae28dc5e4b2bf5d4)`(UInt32 version,string hexString)` | Create a transaction from its binary hex representation. +`public inline `[`Transaction`](#class_bitprim_1_1_transaction_1afd4417823dd268d17b2c1ded794a0183)`(UInt32 version,UInt32 locktime,InputList inputs,OutputList outputs)` | Create a transaction from its version, locktime, inputs and outputs (all its data). +`public inline byte [] `[`GetHashBySigHashType`](#class_bitprim_1_1_transaction_1aa6278991258a52cd285eb6c4d6fe4582)`(UInt32 sigHashType)` | 32 bytes transaction hash + 4 bytes signature hash type +`public inline bool `[`IsDoubleSpend`](#class_bitprim_1_1_transaction_1a5397d59e47283d0e7c204810a98b6f4e)`(bool includeUnconfirmed)` | Returns true if at least one of the previous outputs was already spent, false otherwise. +`public inline bool `[`IsFinal`](#class_bitprim_1_1_transaction_1ad014d272c29cbd0c464a215d022c4601)`(UInt64 blockHeight,UInt32 blockTime)` | Returns true if and only if the transaction is final, false otherwise. +`public inline bool `[`IsImmature`](#class_bitprim_1_1_transaction_1a4edf429fbd5515110dbdc4e426e0af02)`(UInt64 targetHeight)` | Returns true if and only if at least one of the inputs is not mature, false otherwise. +`public inline byte [] `[`ToData`](#class_bitprim_1_1_transaction_1a67c3525ef1013453c1bc85902edb2fc7)`(bool wire)` | Raw transaction data. +`public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_transaction_1ad10eaadf7083d1cc1dec7f89a4c482af)`(bool wire)` | [Transaction](#class_bitprim_1_1_transaction) size in bytes. +`public inline UInt64 `[`GetSignatureOperationsBip16Active`](#class_bitprim_1_1_transaction_1aff789aa4471796ddff33b26617188de9)`(bool bip16Active)` | Amount of signature operations in the transactions. + +## Members + +#### `{property} bool `[`IsCoinbase`](#class_bitprim_1_1_transaction_1ae3a362e097393cbf8c8087107ac202e5) + +Returns true if and only if this is a coinbase transaction (i.e. generates new coins). + +#### `{property} bool `[`IsLocktimeConflict`](#class_bitprim_1_1_transaction_1ad7b30b6fa7c3ddea8e0ab1541810ae7f) + +Returns true if and only if the transaction is locked and every input is final, false otherwise. + +#### `{property} bool `[`IsMissingPreviousOutputs`](#class_bitprim_1_1_transaction_1af10e0b3b68b2a6d2dac82c67fa0c1e23) + +Returns true if and only if at least one of the previous outputs is invalid, false otherwise. + +#### `{property} bool `[`IsNullNonCoinbase`](#class_bitprim_1_1_transaction_1a49c7429cd339e138f983102fb530a96a) + +Return true if and only if the transaction is not coinbase and has a null previous output, false otherwise. + +#### `{property} bool `[`IsOversizeCoinbase`](#class_bitprim_1_1_transaction_1a7ebc78d891b9f5e4d01e0acb6a2214d5) + +Returns true if the transaction is coinbase and has an invalid script size on its first input. + +#### `{property} bool `[`IsOverspent`](#class_bitprim_1_1_transaction_1a5cccf30e1c82353fe678c393eb80df71) + +Returns true if transaction is not a coinbase, and the sum of its outputs is higher than the sum of its inputs, false otherwise. + +#### `{property} bool `[`IsValid`](#class_bitprim_1_1_transaction_1a29b8a68de9c1828a6b540f5dc02508da) + +Returns true if and only if this transaction is valid according to the protocol. + +#### `{property} byte [] `[`Hash`](#class_bitprim_1_1_transaction_1a54d13bfb55819222e4f302e1f8de063c) + +[Transaction](#class_bitprim_1_1_transaction) hash in 32 byte array format. + +#### `{property} InputList `[`Inputs`](#class_bitprim_1_1_transaction_1a33d098c55beee1bb9d7ff598ace272bc) + +A list with all the transaction inputs. + +#### `{property} OutputList `[`Outputs`](#class_bitprim_1_1_transaction_1a8f7202ac3b2839b02ea07197d88e0cfb) + +A list with all the transaction outputs. + +#### `{property} UInt32 `[`Locktime`](#class_bitprim_1_1_transaction_1a9049d57c642ab63763e906539db8f04a) + +[Transaction](#class_bitprim_1_1_transaction) locktime. + +#### `{property} UInt32 `[`Version`](#class_bitprim_1_1_transaction_1ae76b215e44e8e0a225dcca697b21002d) + +[Transaction](#class_bitprim_1_1_transaction) protocol version. + +#### `{property} UInt64 `[`Fees`](#class_bitprim_1_1_transaction_1a27c37d65dff9cae8fed5e6a684e641b7) + +Fees to pay to the winning miner. + +#### `{property} UInt64 `[`SignatureOperations`](#class_bitprim_1_1_transaction_1a9de1208d6409d511b3fa1b74d7020539) + +Amount of signature operations in the transaction. + +#### `{property} UInt64 `[`TotalInputValue`](#class_bitprim_1_1_transaction_1a291ada37f6535b154a7123ca3eb534ef) + +Sum of every input value in the transaction. + +#### `{property} UInt64 `[`TotalOutputValue`](#class_bitprim_1_1_transaction_1a48315105df2e9ddf66ded983200e0511) + +Sum of every output value in the transaction. + +#### `{property} IntPtr `[`NativeInstance`](#class_bitprim_1_1_transaction_1ae4213b4c3e5e4ab28371604d9f0a53cb) + +#### `public inline `[`Transaction`](#class_bitprim_1_1_transaction_1ab20ffd365084f400febcf58a9f2b7111)`()` + +Create an empty tramsaction. + +#### `public inline `[`Transaction`](#class_bitprim_1_1_transaction_1abf686e7c063404e2ae28dc5e4b2bf5d4)`(UInt32 version,string hexString)` + +Create a transaction from its binary hex representation. + +#### Parameters +* `version` [Transaction](#class_bitprim_1_1_transaction) protocol version. + +* `hexString` Raw transaction in hex + +#### `public inline `[`Transaction`](#class_bitprim_1_1_transaction_1afd4417823dd268d17b2c1ded794a0183)`(UInt32 version,UInt32 locktime,InputList inputs,OutputList outputs)` + +Create a transaction from its version, locktime, inputs and outputs (all its data). + +#### Parameters +* `version` [Transaction](#class_bitprim_1_1_transaction) protocol version. + +* `locktime` [Transaction](#class_bitprim_1_1_transaction) locktime. + +* `inputs` A list with all the transaction inputs. + +* `outputs` A list with all the transaction outputs. + +#### `public inline byte [] `[`GetHashBySigHashType`](#class_bitprim_1_1_transaction_1aa6278991258a52cd285eb6c4d6fe4582)`(UInt32 sigHashType)` + +32 bytes transaction hash + 4 bytes signature hash type + +#### Parameters +* `sigHashType` Sighash type. + +#### Returns +Hash and sighash type. + +#### `public inline bool `[`IsDoubleSpend`](#class_bitprim_1_1_transaction_1a5397d59e47283d0e7c204810a98b6f4e)`(bool includeUnconfirmed)` + +Returns true if at least one of the previous outputs was already spent, false otherwise. + +#### Parameters +* `includeUnconfirmed` Iif true, consider unconfirmed transactions. + +#### Returns +True if and only if transaction is double spend. + +#### `public inline bool `[`IsFinal`](#class_bitprim_1_1_transaction_1ad014d272c29cbd0c464a215d022c4601)`(UInt64 blockHeight,UInt32 blockTime)` + +Returns true if and only if the transaction is final, false otherwise. + +#### Parameters +* `blockHeight` +* `blockTime` + +#### Returns + +#### `public inline bool `[`IsImmature`](#class_bitprim_1_1_transaction_1a4edf429fbd5515110dbdc4e426e0af02)`(UInt64 targetHeight)` + +Returns true if and only if at least one of the inputs is not mature, false otherwise. + +#### Parameters +* `targetHeight` + +#### Returns + +#### `public inline byte [] `[`ToData`](#class_bitprim_1_1_transaction_1a67c3525ef1013453c1bc85902edb2fc7)`(bool wire)` + +Raw transaction data. + +#### Parameters +* `wire` Iif true, include data size at the beginning. + +#### Returns +Byte array with transaction data. + +#### `public inline UInt64 `[`GetSerializedSize`](#class_bitprim_1_1_transaction_1ad10eaadf7083d1cc1dec7f89a4c482af)`(bool wire)` + +[Transaction](#class_bitprim_1_1_transaction) size in bytes. + +#### Parameters +* `wire` If and only if true, size will include size of 'uint32' for storing spender output height + +#### Returns +Size in bytes. + +#### `public inline UInt64 `[`GetSignatureOperationsBip16Active`](#class_bitprim_1_1_transaction_1aff789aa4471796ddff33b26617188de9)`(bool bip16Active)` + +Amount of signature operations in the transactions. + +#### Parameters +* `bip16Active` True if and only if BIP16 is active, false otherwise. + +#### Returns + +# class `Bitprim::Validations` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# struct `Bitprim::GetTxPositionResult` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} UInt64 `[`Index`](#struct_bitprim_1_1_get_tx_position_result_1abf0a3a30f1926f1d5ca78805f807ccfb) | +`{property} UInt64 `[`BlockHeight`](#struct_bitprim_1_1_get_tx_position_result_1a52fbd7cf6e6cb4f5e706be3a6a379cc1) | + +## Members + +#### `{property} UInt64 `[`Index`](#struct_bitprim_1_1_get_tx_position_result_1abf0a3a30f1926f1d5ca78805f807ccfb) + +#### `{property} UInt64 `[`BlockHeight`](#struct_bitprim_1_1_get_tx_position_result_1a52fbd7cf6e6cb4f5e706be3a6a379cc1) + +# namespace `Bitprim::Logging` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`enum `[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0) | The log level. +`public delegate bool `[`Logger`](#namespace_bitprim_1_1_logging_1a87f15f0754f0a1275273f4caff520307)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | +`class `[`Bitprim::Logging::LogExtensions`](#class_bitprim_1_1_logging_1_1_log_extensions) | +`class `[`Bitprim::Logging::LoggerExecutionWrapper`](#class_bitprim_1_1_logging_1_1_logger_execution_wrapper) | +`class `[`Bitprim::Logging::LogProvider`](#class_bitprim_1_1_logging_1_1_log_provider) | Provides a mechanism to create instances of ILog objects. + +## Members + +#### `enum `[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0) + + Values | Descriptions +--------------------------------|--------------------------------------------- +Trace | +Debug | +Info | +Warn | +Error | +Fatal | + +The log level. + +#### `public delegate bool `[`Logger`](#namespace_bitprim_1_1_logging_1a87f15f0754f0a1275273f4caff520307)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +# class `Bitprim::Logging::LogExtensions` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Bitprim::Logging::LoggerExecutionWrapper` + +``` +class Bitprim::Logging::LoggerExecutionWrapper + : public Bitprim.Logging.ILog +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_logger_execution_wrapper_1a0b2e71f3abfbc89712dc665c303f4499)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | + +## Members + +#### `public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_logger_execution_wrapper_1a0b2e71f3abfbc89712dc665c303f4499)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +# class `Bitprim::Logging::LogProvider` + +Provides a mechanism to create instances of ILog objects. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`IsDisabled`](#class_bitprim_1_1_logging_1_1_log_provider_1a8f9e9127793e0e036e4b54c590f3aa02) | Gets or sets a value indicating whether this is logging is disabled. +`{property} Action< `[`ILogProvider`](#interface_bitprim_1_1_logging_1_1_i_log_provider)` > `[`OnCurrentLogProviderSet`](#class_bitprim_1_1_logging_1_1_log_provider_1abb503a9dc6980810e845968c7dd3e6ac) | Sets an action that is invoked when a consumer of your library has called SetCurrentLogProvider. It is important that hook into this if you are using child libraries (especially ilmerged ones) that are using LibLog (or other logging abstraction) so you adapt and delegate to them. SetCurrentLogProvider + +## Members + +#### `{property} bool `[`IsDisabled`](#class_bitprim_1_1_logging_1_1_log_provider_1a8f9e9127793e0e036e4b54c590f3aa02) + +Gets or sets a value indicating whether this is logging is disabled. + +`true` if logging is disabled; otherwise, `false`. + +#### `{property} Action< `[`ILogProvider`](#interface_bitprim_1_1_logging_1_1_i_log_provider)` > `[`OnCurrentLogProviderSet`](#class_bitprim_1_1_logging_1_1_log_provider_1abb503a9dc6980810e845968c7dd3e6ac) + +Sets an action that is invoked when a consumer of your library has called SetCurrentLogProvider. It is important that hook into this if you are using child libraries (especially ilmerged ones) that are using LibLog (or other logging abstraction) so you adapt and delegate to them. SetCurrentLogProvider + +# namespace `Bitprim::Logging::LogProviders` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`class `[`Bitprim::Logging::LogProviders::DisposableAction`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_disposable_action) | +`class `[`Bitprim::Logging::LogProviders::Log4NetLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider) | +`class `[`Bitprim::Logging::LogProviders::LogMessageFormatter`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_message_formatter) | +`class `[`Bitprim::Logging::LogProviders::LogProviderBase`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base) | +`class `[`Bitprim::Logging::LogProviders::LoupeLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider) | +`class `[`Bitprim::Logging::LogProviders::NLogLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider) | +`class `[`Bitprim::Logging::LogProviders::SerilogLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider) | +`class `[`Bitprim::Logging::LogProviders::TraceEventTypeValues`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_trace_event_type_values) | +`class `[`Bitprim::Logging::LogProviders::TypeExtensions`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_type_extensions) | + +# class `Bitprim::Logging::LogProviders::DisposableAction` + +``` +class Bitprim::Logging::LogProviders::DisposableAction + : public IDisposable +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public `[`DisposableAction`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_disposable_action_1a0cb08e5ff6f32f072c09875bfa375ce0)`(Action onDispose)` | + +## Members + +#### `public `[`DisposableAction`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_disposable_action_1a0cb08e5ff6f32f072c09875bfa375ce0)`(Action onDispose)` + +# class `Bitprim::Logging::LogProviders::Log4NetLogProvider` + +``` +class Bitprim::Logging::LogProviders::Log4NetLogProvider + : public Bitprim.Logging.LogProviders.LogProviderBase +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1aa458d2a476f77b6fb6d532c4a87d0c27) | +`public inline `[`Log4NetLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1aca8cffb0f4e1da0ad92125372dd5a2fd)`()` | +`public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1a50249194a29487e2e742815117973a69)`(string name)` | +`protected inline override OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1a2dc9fde760ec81288f6cd9c01bc0ee33)`()` | +`protected inline override OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1a5ea5b2d9325107a7e2cc716b541372da)`()` | + +## Members + +#### `{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1aa458d2a476f77b6fb6d532c4a87d0c27) + +#### `public inline `[`Log4NetLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1aca8cffb0f4e1da0ad92125372dd5a2fd)`()` + +#### `public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1a50249194a29487e2e742815117973a69)`(string name)` + +#### `protected inline override OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1a2dc9fde760ec81288f6cd9c01bc0ee33)`()` + +#### `protected inline override OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1a5ea5b2d9325107a7e2cc716b541372da)`()` + +# class `Bitprim::Logging::LogProviders::LogMessageFormatter` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Bitprim::Logging::LogProviders::LogProviderBase` + +``` +class Bitprim::Logging::LogProviders::LogProviderBase + : public Bitprim.Logging.ILogProvider +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public abstract Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a54c03de723dde7ab216559577bd616c2)`(string name)` | +`public IDisposable `[`OpenNestedContext`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a703cb2b34b4e1c174fd4f44021f92276)`(string message)` | +`public IDisposable `[`OpenMappedContext`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a880f73a34ab257553907729284d00961)`(string key,object value,bool destructure)` | +`protected delegate IDisposable `[`OpenNdc`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a77ae5122ca397e98a55fd09c6a53793f)`(string message)` | +`protected delegate IDisposable `[`OpenMdc`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a34c42e08bc3d9734b71544d97bd604a9)`(string key,object value,bool destructure)` | +`protected inline `[`LogProviderBase`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a7260f77fe92b7609581ac905a441d228)`()` | +`protected virtual OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1ac036d5f314ac108e86a94cd59f8b61ea)`()` | +`protected virtual OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1aca9325f22a202a0c3786f5fd89e35be7)`()` | + +## Members + +#### `public abstract Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a54c03de723dde7ab216559577bd616c2)`(string name)` + +#### `public IDisposable `[`OpenNestedContext`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a703cb2b34b4e1c174fd4f44021f92276)`(string message)` + +#### `public IDisposable `[`OpenMappedContext`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a880f73a34ab257553907729284d00961)`(string key,object value,bool destructure)` + +#### `protected delegate IDisposable `[`OpenNdc`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a77ae5122ca397e98a55fd09c6a53793f)`(string message)` + +#### `protected delegate IDisposable `[`OpenMdc`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a34c42e08bc3d9734b71544d97bd604a9)`(string key,object value,bool destructure)` + +#### `protected inline `[`LogProviderBase`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1a7260f77fe92b7609581ac905a441d228)`()` + +#### `protected virtual OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1ac036d5f314ac108e86a94cd59f8b61ea)`()` + +#### `protected virtual OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log_provider_base_1aca9325f22a202a0c3786f5fd89e35be7)`()` + +# class `Bitprim::Logging::LogProviders::LoupeLogProvider` + +``` +class Bitprim::Logging::LogProviders::LoupeLogProvider + : public Bitprim.Logging.LogProviders.LogProviderBase +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1a63ff65b7c9de0c68d8312a07f1bb06ff) | Gets or sets a value indicating whether [provider is available override]. Used in tests. +`public inline `[`LoupeLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1a3e3ce702a91a2ca75debb45998c83fa0)`()` | +`public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1a8a7f8d51aa46620e00123299660d046c)`(string name)` | + +## Members + +#### `{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1a63ff65b7c9de0c68d8312a07f1bb06ff) + +Gets or sets a value indicating whether [provider is available override]. Used in tests. + +`true` if [provider is available override]; otherwise, `false`. + +#### `public inline `[`LoupeLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1a3e3ce702a91a2ca75debb45998c83fa0)`()` + +#### `public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1a8a7f8d51aa46620e00123299660d046c)`(string name)` + +# class `Bitprim::Logging::LogProviders::NLogLogProvider` + +``` +class Bitprim::Logging::LogProviders::NLogLogProvider + : public Bitprim.Logging.LogProviders.LogProviderBase +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1ac063ccdf79f8f39276748bd4d930e8d0) | +`public inline `[`NLogLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1a93ac90dfcc094ae42b35b7e963bd2fc7)`()` | +`public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1af2114403f160959501ba353a684b628a)`(string name)` | +`protected inline override OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1a2de35597cae00eec9bf6ebdc9f50febe)`()` | +`protected inline override OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1a216c686b33156c4ac9e76e53dec346ee)`()` | + +## Members + +#### `{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1ac063ccdf79f8f39276748bd4d930e8d0) + +#### `public inline `[`NLogLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1a93ac90dfcc094ae42b35b7e963bd2fc7)`()` + +#### `public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1af2114403f160959501ba353a684b628a)`(string name)` + +#### `protected inline override OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1a2de35597cae00eec9bf6ebdc9f50febe)`()` + +#### `protected inline override OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1a216c686b33156c4ac9e76e53dec346ee)`()` + +# class `Bitprim::Logging::LogProviders::SerilogLogProvider` + +``` +class Bitprim::Logging::LogProviders::SerilogLogProvider + : public Bitprim.Logging.LogProviders.LogProviderBase +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1a825f601a067b4bd285b183d943da8a4c) | +`public inline `[`SerilogLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1ad57e5f1c761277bc013a40ed0f507085)`()` | +`public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1adbe0c0f7a6dfed7e1d4f08335ab36bb8)`(string name)` | +`protected override OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1acd484c6e37b677b2f0362ed2451e1181)`()` | +`protected override OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1a6134cfb88fa2f26a89b4651721f2f9c8)`()` | + +## Members + +#### `{property} bool `[`ProviderIsAvailableOverride`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1a825f601a067b4bd285b183d943da8a4c) + +#### `public inline `[`SerilogLogProvider`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1ad57e5f1c761277bc013a40ed0f507085)`()` + +#### `public override Logger `[`GetLogger`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1adbe0c0f7a6dfed7e1d4f08335ab36bb8)`(string name)` + +#### `protected override OpenNdc `[`GetOpenNdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1acd484c6e37b677b2f0362ed2451e1181)`()` + +#### `protected override OpenMdc `[`GetOpenMdcMethod`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1a6134cfb88fa2f26a89b4651721f2f9c8)`()` + +# class `Bitprim::Logging::LogProviders::TraceEventTypeValues` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Bitprim::Logging::LogProviders::TypeExtensions` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Bitprim::Logging::LoggerExecutionWrapper::CallSiteExtension` + +``` +class Bitprim::Logging::LoggerExecutionWrapper::CallSiteExtension + : public Bitprim.Logging.LoggerExecutionWrapper.ICallSiteExtension +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Constants` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- + +## Members + +# class `Bitprim::Logging::LogProviders::Log4NetLogProvider::Log4NetLogger` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1_1_log4_net_logger_1ab64407ffab569fd99e360ae012d27ee4)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | + +## Members + +#### `public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_log4_net_log_provider_1_1_log4_net_logger_1ab64407ffab569fd99e360ae012d27ee4)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +# class `Bitprim::Logging::LogProviders::LoupeLogProvider::LoupeLogger` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1_1_loupe_logger_1a7430036e2428619f354edbff2e10552b)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | + +## Members + +#### `public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_loupe_log_provider_1_1_loupe_logger_1a7430036e2428619f354edbff2e10552b)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +# class `Bitprim::Logging::LogProviders::NLogLogProvider::NLogLogger` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1_1_n_log_logger_1a5bcaa10d1fa4fe93d68e297a8e3132a6)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | + +## Members + +#### `public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_n_log_log_provider_1_1_n_log_logger_1a5bcaa10d1fa4fe93d68e297a8e3132a6)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +# class `Bitprim::Logging::LogProvider::NoOpLogger` + +``` +class Bitprim::Logging::LogProvider::NoOpLogger + : public Bitprim.Logging.ILog +``` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_provider_1_1_no_op_logger_1af9f2b6a1bb4da4922d5d46992cb3feee)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | + +## Members + +#### `public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_provider_1_1_no_op_logger_1af9f2b6a1bb4da4922d5d46992cb3feee)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +# class `Bitprim::Logging::LogProviders::SerilogLogProvider::SerilogLogger` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1_1_serilog_logger_1afa133fc2dabc0cccdd32ef0c7df2ab11)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` | + +## Members + +#### `public inline bool `[`Log`](#class_bitprim_1_1_logging_1_1_log_providers_1_1_serilog_log_provider_1_1_serilog_logger_1afa133fc2dabc0cccdd32ef0c7df2ab11)`(`[`LogLevel`](#namespace_bitprim_1_1_logging_1a89a90f71ddc112bc62c596aeb14d42a0)` logLevel,Func< string > messageFunc,Exception exception,params object [] formatParameters)` + +Generated by [Moxygen](https://sourcey.com/moxygen) \ No newline at end of file diff --git a/docs/developer_guide/go/Go-interface.md b/docs/developer_guide/go/Go-interface.md new file mode 100644 index 0000000..f36d486 --- /dev/null +++ b/docs/developer_guide/go/Go-interface.md @@ -0,0 +1,25 @@ +Bitprim's Go interface is built on top of Bitprim's C interface, in this fashion: + +![](assets/binding_go.png) + +On top of the raw C interface, a 1-1 binding is made in Go, in order to separate access to the API from its usage; this avoids impedance mismatch by separating the marshalling aspects from the binding language idiosyncrasies. That is, the 1-1 interface takes care of marshalling, without changing the interface. Then, the idiomatic interface uses the higher level language tools and idioms in order to hide the complexity from the application programmer. + +It takes another programmer profile in order to tinker with the lower level interfaces or consume them directly, but that is also possible when working with this approach: 3 separate levels of abstraction for accessing the same functionality. + +## Basic structure + +--- + +See [the source in Github](https://github.com/bitprim/bitprim-go/tree/master/bitprim): + +* {entity}\_native.go: All of these together implement the 1-1 native interface. As usual, executor is the main entity which is used for manipulating the node. +* {entity}.go: Together, all of these comprise the idiomatic interface. They define user defined types using the Go conventions that Go application programmers are familiar with and expect from a Go library/binding. + +## RESTful interface + +--- + +One characteristic that sets Go apart from, say, Python, is the ease with which a REST API can be created and tested from scratch. This is a very useful feature in today's web-centric world, and in order to make things even easier for Go developers, a REST api is also offered in this interface. See [here](https://github.com/bitprim/bitprim-go/tree/master/rest-api) for an example of how to start an http server which hosts it and can be consumed from Postman, Curl or a browser and thus easily integrated into any web application. + + + diff --git a/docs/developer_guide/go/assets/binding_go.png b/docs/developer_guide/go/assets/binding_go.png new file mode 100644 index 0000000..f581575 Binary files /dev/null and b/docs/developer_guide/go/assets/binding_go.png differ diff --git a/docs/developer_guide/introduction.md b/docs/developer_guide/introduction.md new file mode 100644 index 0000000..0eaf28e --- /dev/null +++ b/docs/developer_guide/introduction.md @@ -0,0 +1,12 @@ +## Introduction + +*Bitprim* works as a cryptocurrency development platform with several programmable APIs: + +* C++ +* C +* C# +* Python +* Javascript +* Rust +* Golang + diff --git a/docs/developer_guide/python/Python-interface-details.md b/docs/developer_guide/python/Python-interface-details.md new file mode 100644 index 0000000..23a470b --- /dev/null +++ b/docs/developer_guide/python/Python-interface-details.md @@ -0,0 +1,1337 @@ +# Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`namespace `[`bitprim`](#namespacebitprim) | + +# namespace `bitprim` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`encode_hash`](#bitprim_8py_1a0592acb88150dfcb800e7fa1975cf8ce)`(hash)` | str: Converts a bytearray into a readable format. +`public def `[`decode_hash`](#bitprim_8py_1ae9d85d5c0bd672672fc12eb12144c092)`(hash_str)` | bytearray: Converts a string into a workable format. +`class `[`bitprim::Binary`](#classbitprim_1_1Binary) | Represents a binary filter. +`class `[`bitprim::Block`](#classbitprim_1_1Block) | Represent a full Bitcoin block. +`class `[`bitprim::BlockList`](#classbitprim_1_1BlockList) | +`class `[`bitprim::Chain`](#classbitprim_1_1Chain) | Represents the Bitcoin blockchain. +`class `[`bitprim::Executor`](#classbitprim_1_1Executor) | Controls the execution of the Bitprim bitcoin node. +`class `[`bitprim::Header`](#classbitprim_1_1Header) | Represent the Header of a Bitcoin Block. +`class `[`bitprim::History`](#classbitprim_1_1History) | Output points, values, and spends for a payment address +`class `[`bitprim::HistoryList`](#classbitprim_1_1HistoryList) | +`class `[`bitprim::Input`](#classbitprim_1_1Input) | Represents one of the inputs of a Transaction. +`class `[`bitprim::InputList`](#classbitprim_1_1InputList) | +`class `[`bitprim::MerkleBlock`](#classbitprim_1_1MerkleBlock) | +`class `[`bitprim::Output`](#classbitprim_1_1Output) | Represents one of the outputs of a Transaction. +`class `[`bitprim::OutputList`](#classbitprim_1_1OutputList) | +`class `[`bitprim::OutputPoint`](#classbitprim_1_1OutputPoint) | Transaction hash and index representing one of the transaction outputs. +`class `[`bitprim::PaymentAddress`](#classbitprim_1_1PaymentAddress) | Represents a Bitcoin wallet address. +`class `[`bitprim::Point`](#classbitprim_1_1Point) | Represents one of the txs input. +`class `[`bitprim::Script`](#classbitprim_1_1Script) | Represents transaction scripts. +`class `[`bitprim::Stealth`](#classbitprim_1_1Stealth) | +`class `[`bitprim::StealthCompact`](#classbitprim_1_1StealthCompact) | +`class `[`bitprim::StealthCompactList`](#classbitprim_1_1StealthCompactList) | +`class `[`bitprim::StealthList`](#classbitprim_1_1StealthList) | +`class `[`bitprim::Transaction`](#classbitprim_1_1Transaction) | Represents a Bitcoin Transaction. +`class `[`bitprim::TransactionList`](#classbitprim_1_1TransactionList) | +`class `[`bitprim::Wallet`](#classbitprim_1_1Wallet) | + +## Members + +#### `public def `[`encode_hash`](#bitprim_8py_1a0592acb88150dfcb800e7fa1975cf8ce)`(hash)` + +str: Converts a bytearray into a readable format. +example return: "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" + +Args: + hash (bytearray): bytes of the hash. + +#### `public def `[`decode_hash`](#bitprim_8py_1ae9d85d5c0bd672672fc12eb12144c092)`(hash_str)` + +bytearray: Converts a string into a workable format. + +Args: + hash_str (str): string with hash. example "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" + +# class `bitprim::Binary` + +Represents a binary filter. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Binary_1a1daf6fc8346857c44134d1b162888e00)`(self,ptr)` | +`public def `[`construct`](#classbitprim_1_1Binary_1a248318057ecc3f432d2f3d4514ee7018)`(self)` | Binary: create an empty binary object. +`public def `[`construct_string`](#classbitprim_1_1Binary_1af6393c61459c6e883bd103ffa30ce765)`(self,string_filter)` | Binary: construct a binary filter form string. +`public def `[`construct_blocks`](#classbitprim_1_1Binary_1a74fbcd4afc9837b23ef1a91ea2a7589c)`(self,size,`[`blocks`](#classbitprim_1_1Binary_1a59e18ba201b98aeb46acff7cdeddadb8)`)` | Binary: construct binary filter from an array of int. +`public def `[`blocks`](#classbitprim_1_1Binary_1a59e18ba201b98aeb46acff7cdeddadb8)`(self)` | Array [unsigned int]: returns the filter as an array of uint. +`public def `[`encoded`](#classbitprim_1_1Binary_1a357615d3078c30ad799f6a4f057a8d0d)`(self)` | str: returns the filter in a binary string. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Binary_1a1daf6fc8346857c44134d1b162888e00)`(self,ptr)` + +#### `public def `[`construct`](#classbitprim_1_1Binary_1a248318057ecc3f432d2f3d4514ee7018)`(self)` + +Binary: create an empty binary object. + +#### `public def `[`construct_string`](#classbitprim_1_1Binary_1af6393c61459c6e883bd103ffa30ce765)`(self,string_filter)` + +Binary: construct a binary filter form string. + +Args: + string_filter (str): binary string. Example: '10111010101011011111000000001101' + +#### `public def `[`construct_blocks`](#classbitprim_1_1Binary_1a74fbcd4afc9837b23ef1a91ea2a7589c)`(self,size,`[`blocks`](#classbitprim_1_1Binary_1a59e18ba201b98aeb46acff7cdeddadb8)`)` + +Binary: construct binary filter from an array of int. + +Args: + size (unsigned int): lenght of the filter. + blocks (array[unsigned int]): Every int represents a byte of the filter. Example: '[186,173,240,13]' + +#### `public def `[`blocks`](#classbitprim_1_1Binary_1a59e18ba201b98aeb46acff7cdeddadb8)`(self)` + +Array [unsigned int]: returns the filter as an array of uint. + +#### `public def `[`encoded`](#classbitprim_1_1Binary_1a357615d3078c30ad799f6a4f057a8d0d)`(self)` + +str: returns the filter in a binary string. + +# class `bitprim::Block` + +Represent a full Bitcoin block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Block_1a44545a7845b4018443876653dfec399b)`(self,pointer,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` | +`public def `[`__del__`](#classbitprim_1_1Block_1abe0b5010b709246f4c6782994e9425c8)`(self)` | +`public def `[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`(self)` | unsigned int: Height of the block in the chain. +`public def `[`header`](#classbitprim_1_1Block_1afcfdf6c352e1e7050d28c3feab1e1ac2)`(self)` | Header: block header object. +`public def `[`transaction_count`](#classbitprim_1_1Block_1af3d919e7ed870a65fd5478c2a9429e01)`(self)` | unsigned int: amount of transaction in the block. +`public def `[`hash`](#classbitprim_1_1Block_1abb559d43d05b2c1348cb1ead5c9cda41)`(self)` | bytearray: 32 bytes of the block hash. +`public def `[`serialized_size`](#classbitprim_1_1Block_1ab3436c618568d6e09084fa4e9523671f)`(self)` | unsigned int: size of the block in bytes. +`public def `[`fees`](#classbitprim_1_1Block_1a1ef7f0aa734ec9e299e24f7fffc0808e)`(self)` | unsigned int: amount of fees included in coinbase. +`public def `[`claim`](#classbitprim_1_1Block_1a907b7a24b60a5c02de03a24f4b3044b3)`(self)` | unsigned int: value of the outputs in the coinbase. +`public def `[`reward`](#classbitprim_1_1Block_1a1d018419f3b6159090f411edac2a509f)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` | unsigned int: value of the fees plus the reward for a block at the given height. +`public def `[`generate_merkle_root`](#classbitprim_1_1Block_1ac0f6c0124f4783ffc9e35c4a845551a4)`(self)` | bytearray: 32 bytes of the merkle root, for the generated merkle tree. +`public def `[`is_valid`](#classbitprim_1_1Block_1ab89a94a544e21b2ba10090bcd134d0f4)`(self)` | int: block has transactions and a valid Header. 1 if its valid. +`public def `[`transaction_nth`](#classbitprim_1_1Block_1a5667be645fb35e99672f6edd4eb79f71)`(self,n)` | Transaction: given a position in the block, returns the corresponding transaction. +`public def `[`signature_operations`](#classbitprim_1_1Block_1ab7e7eb80570a7e1592260ace29b8172f)`(self)` | unsigned int: amount of signature operations in the block. +`public def `[`signature_operations_bip16_active`](#classbitprim_1_1Block_1a529bf227db8e885caedfb01ba96b30f4)`(self,bip16_active)` | unsigned int: amount of signature operations in the block. +`public def `[`total_inputs`](#classbitprim_1_1Block_1aecf9d6861b5804bf4e8a531da92e5469)`(self,with_coinbase)` | unsigned int: amount of inputs in every transaction in the block. +`public def `[`is_extra_coinbases`](#classbitprim_1_1Block_1a9ae78d94a280b7d2f6d4e61378e148b9)`(self)` | int: returns '1' if there is another coinbase other than the first transaction. +`public def `[`is_final`](#classbitprim_1_1Block_1acbeaad19916285fcb598284e0560bc99)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` | int: returns '1' if every transaction in the block is final. +`public def `[`is_distinct_transaction_set`](#classbitprim_1_1Block_1a2f858494ee1ddb0f455efc2289422f22)`(self)` | int: returns '1' if there are not two transactions with the same hash. +`public def `[`is_valid_coinbase_claim`](#classbitprim_1_1Block_1a5e844d3b70bc66bcac3cf4108d9a4c14)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` | int: returns '1' if coinbase claim is not higher than the deserved reward. +`public def `[`is_valid_coinbase_script`](#classbitprim_1_1Block_1a0b1d70c44c0f94090f5f3dc2b2730fc2)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` | int: returns '1' if coinbase script is valid. +`public def `[`is_valid_merkle_root`](#classbitprim_1_1Block_1a53e999a14dc396d90606155c384a9848)`(self)` | int: returns '1' if the generated merkle root is equal to the Header merkle root. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Block_1a44545a7845b4018443876653dfec399b)`(self,pointer,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` + +#### `public def `[`__del__`](#classbitprim_1_1Block_1abe0b5010b709246f4c6782994e9425c8)`(self)` + +#### `public def `[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`(self)` + +unsigned int: Height of the block in the chain. + +#### `public def `[`header`](#classbitprim_1_1Block_1afcfdf6c352e1e7050d28c3feab1e1ac2)`(self)` + +Header: block header object. + +#### `public def `[`transaction_count`](#classbitprim_1_1Block_1af3d919e7ed870a65fd5478c2a9429e01)`(self)` + +unsigned int: amount of transaction in the block. + +#### `public def `[`hash`](#classbitprim_1_1Block_1abb559d43d05b2c1348cb1ead5c9cda41)`(self)` + +bytearray: 32 bytes of the block hash. + +#### `public def `[`serialized_size`](#classbitprim_1_1Block_1ab3436c618568d6e09084fa4e9523671f)`(self)` + +unsigned int: size of the block in bytes. + +#### `public def `[`fees`](#classbitprim_1_1Block_1a1ef7f0aa734ec9e299e24f7fffc0808e)`(self)` + +unsigned int: amount of fees included in coinbase. + +#### `public def `[`claim`](#classbitprim_1_1Block_1a907b7a24b60a5c02de03a24f4b3044b3)`(self)` + +unsigned int: value of the outputs in the coinbase. + +#### `public def `[`reward`](#classbitprim_1_1Block_1a1d018419f3b6159090f411edac2a509f)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` + +unsigned int: value of the fees plus the reward for a block at the given height. + +Args: + height (unsigned int): height of the block in the chain. + +#### `public def `[`generate_merkle_root`](#classbitprim_1_1Block_1ac0f6c0124f4783ffc9e35c4a845551a4)`(self)` + +bytearray: 32 bytes of the merkle root, for the generated merkle tree. + +#### `public def `[`is_valid`](#classbitprim_1_1Block_1ab89a94a544e21b2ba10090bcd134d0f4)`(self)` + +int: block has transactions and a valid Header. 1 if its valid. + +#### `public def `[`transaction_nth`](#classbitprim_1_1Block_1a5667be645fb35e99672f6edd4eb79f71)`(self,n)` + +Transaction: given a position in the block, returns the corresponding transaction. + +Args: + n (unsigned int): index of the transaction in the block. + +#### `public def `[`signature_operations`](#classbitprim_1_1Block_1ab7e7eb80570a7e1592260ace29b8172f)`(self)` + +unsigned int: amount of signature operations in the block. +Returns max_int in case of overflow. + +#### `public def `[`signature_operations_bip16_active`](#classbitprim_1_1Block_1a529bf227db8e885caedfb01ba96b30f4)`(self,bip16_active)` + +unsigned int: amount of signature operations in the block. +Returns max_int in case of overflow. + +Args: + bip16_active(int): if bip16 is activated at this point. Should be '1' if its active. + +#### `public def `[`total_inputs`](#classbitprim_1_1Block_1aecf9d6861b5804bf4e8a531da92e5469)`(self,with_coinbase)` + +unsigned int: amount of inputs in every transaction in the block. + +Args: + with_coinbase (int): should be '1' if block contains a coinbase transaction. '0' otherwise. + +#### `public def `[`is_extra_coinbases`](#classbitprim_1_1Block_1a9ae78d94a280b7d2f6d4e61378e148b9)`(self)` + +int: returns '1' if there is another coinbase other than the first transaction. + +#### `public def `[`is_final`](#classbitprim_1_1Block_1acbeaad19916285fcb598284e0560bc99)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` + +int: returns '1' if every transaction in the block is final. + +Args: + height (unsigned int): height of the block in the chain. + +#### `public def `[`is_distinct_transaction_set`](#classbitprim_1_1Block_1a2f858494ee1ddb0f455efc2289422f22)`(self)` + +int: returns '1' if there are not two transactions with the same hash. + +#### `public def `[`is_valid_coinbase_claim`](#classbitprim_1_1Block_1a5e844d3b70bc66bcac3cf4108d9a4c14)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` + +int: returns '1' if coinbase claim is not higher than the deserved reward. + +Args: + height (unsigned int): height of the block in the chain. + +#### `public def `[`is_valid_coinbase_script`](#classbitprim_1_1Block_1a0b1d70c44c0f94090f5f3dc2b2730fc2)`(self,`[`height`](#classbitprim_1_1Block_1a7d8e2c22055d9d5247969f709d2b574b)`)` + +int: returns '1' if coinbase script is valid. + +#### `public def `[`is_valid_merkle_root`](#classbitprim_1_1Block_1a53e999a14dc396d90606155c384a9848)`(self)` + +int: returns '1' if the generated merkle root is equal to the Header merkle root. + +# class `bitprim::BlockList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1BlockList_1af0275513907dd01841efb2707040f947)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1BlockList_1a2b0db7ee43138ad3ac6dede1e576d379)`(self)` | +`public def `[`construct_default`](#classbitprim_1_1BlockList_1a294964864e12b86ea650841c384e80c4)`(self)` | +`public def `[`push_back`](#classbitprim_1_1BlockList_1a0da9e5cf1747039d4538fcc9876d75a8)`(self,block)` | +`public def `[`list_count`](#classbitprim_1_1BlockList_1a3696b14ba1271ae45e3be336266f89c3)`(self)` | +`public def `[`__getitem__`](#classbitprim_1_1BlockList_1ad4d132428d9d3f6156fc4848720f640a)`(self,key)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1BlockList_1af0275513907dd01841efb2707040f947)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1BlockList_1a2b0db7ee43138ad3ac6dede1e576d379)`(self)` + +#### `public def `[`construct_default`](#classbitprim_1_1BlockList_1a294964864e12b86ea650841c384e80c4)`(self)` + +#### `public def `[`push_back`](#classbitprim_1_1BlockList_1a0da9e5cf1747039d4538fcc9876d75a8)`(self,block)` + +#### `public def `[`list_count`](#classbitprim_1_1BlockList_1a3696b14ba1271ae45e3be336266f89c3)`(self)` + +#### `public def `[`__getitem__`](#classbitprim_1_1BlockList_1ad4d132428d9d3f6156fc4848720f640a)`(self,key)` + +# class `bitprim::Chain` + +Represents the Bitcoin blockchain. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public `[`history_fetch_handler_`](#classbitprim_1_1Chain_1aa966de86303a5df511cdbd20fba36027) | +`public `[`fetch_block_header_handler_`](#classbitprim_1_1Chain_1ae2925200c9e3213b288672c130ca5d7c) | +`public def `[`__init__`](#classbitprim_1_1Chain_1a91d2e01fb06a95e28761bc33580be399)`(self,chain)` | +`public def `[`fetch_last_height`](#classbitprim_1_1Chain_1a3b2aaba82203b00addff05747f630443)`(self,handler)` | Gets the height of the highest block in the chain. +`public def `[`fetch_history`](#classbitprim_1_1Chain_1a8654c1cd107ce5455a3bf202a65ee6ac)`(self,address,limit,from_height,handler)` | Get list of output points, values, and spends for a payment address. +`public def `[`fetch_stealth`](#classbitprim_1_1Chain_1a1b87b8c0f9320c2c2e344297dee65b0f)`(self,binary_filter_str,from_height,handler)` | Get metadata on potential payment transactions by stealth filter. +`public def `[`fetch_block_height`](#classbitprim_1_1Chain_1a99c62752f73e9b7ef8402863a04ad4a9)`(self,hash,handler)` | Given a block hash, it cues the chain for the block height. +`public def `[`fetch_block_header_by_height`](#classbitprim_1_1Chain_1a094aa543335f147e7b6e48ad010ca070)`(self,height,handler)` | Get the block header from the specified height in the chain. +`public def `[`fetch_block_header_by_hash`](#classbitprim_1_1Chain_1aad170dbb1d2c7978414221a609856720)`(self,hash,handler)` | Get the block header from the specified block hash. +`public def `[`fetch_block_by_height`](#classbitprim_1_1Chain_1a284806f124ea0f94efdac5fa679993ad)`(self,height,handler)` | Gets a block from the specified height in the chain. +`public def `[`fetch_block_by_hash`](#classbitprim_1_1Chain_1a6d223f504ce3452988ffc2f84b27b2a4)`(self,hash,handler)` | Gets a block from the specified hash. +`public def `[`fetch_merkle_block_by_height`](#classbitprim_1_1Chain_1ae445ca8c6d5baaa009d08c98634246aa)`(self,height,handler)` | Given a block height in the chain, it retrieves a merkle block. +`public def `[`fetch_merkle_block_by_hash`](#classbitprim_1_1Chain_1a7e4efae5160fe3615e608ec41e71f758)`(self,hash,handler)` | Given a block hash, it retrieves a merkle block. +`public def `[`fetch_transaction`](#classbitprim_1_1Chain_1a1d85163b2ba7b815f0bfa997c3dbd442)`(self,hashn,require_confirmed,handler)` | Get a transaction by its hash. +`public def `[`fetch_output`](#classbitprim_1_1Chain_1a72218a16849f5a0c8054be336658caf1)`(self,hashn,index,require_confirmed,handler)` | Get a transaction output by its transaction hash and index inside the transaction. +`public def `[`fetch_transaction_position`](#classbitprim_1_1Chain_1a5024c70760381fc3eada646bba4a5c8e)`(self,hashn,require_confirmed,handler)` | Given a transaction hash it fetches the height and position inside the block. +`public def `[`validate_tx`](#classbitprim_1_1Chain_1a376f1a70435c94ee95d27dad2c66c6aa)`(self,transaction,handler)` | Determine if a transaction is valid for submission to the blockchain. +`public def `[`fetch_spend`](#classbitprim_1_1Chain_1ae1bd60745bb42815e14901925e6e6558)`(self,output_point,handler)` | Fetch the transaction input which spends the indicated output. The `fetch_spend_handler` will be executed after cueing the chain. + +## Members + +#### `public `[`history_fetch_handler_`](#classbitprim_1_1Chain_1aa966de86303a5df511cdbd20fba36027) + +#### `public `[`fetch_block_header_handler_`](#classbitprim_1_1Chain_1ae2925200c9e3213b288672c130ca5d7c) + +#### `public def `[`__init__`](#classbitprim_1_1Chain_1a91d2e01fb06a95e28761bc33580be399)`(self,chain)` + +#### `public def `[`fetch_last_height`](#classbitprim_1_1Chain_1a3b2aaba82203b00addff05747f630443)`(self,handler)` + +Gets the height of the highest block in the chain. + +Args: + handler (Callable (error, block_height)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* block_height (unsigned int): height of the highest block in the chain. + +#### `public def `[`fetch_history`](#classbitprim_1_1Chain_1a8654c1cd107ce5455a3bf202a65ee6ac)`(self,address,limit,from_height,handler)` + +Get list of output points, values, and spends for a payment address. + +Args: + address (PaymentAddress): wallet to search. + limit (unsigned int): max amount of results to fetch. + from_height (unsigned int): minimum height to search for transactions. + handler (Callable (error, list)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* list (HistoryList): list with every element found. + +#### `public def `[`fetch_stealth`](#classbitprim_1_1Chain_1a1b87b8c0f9320c2c2e344297dee65b0f)`(self,binary_filter_str,from_height,handler)` + +Get metadata on potential payment transactions by stealth filter. +Given a filter and a height in the chain it cues the chain for transactions matching the provided filter. + +Args: + binary_filter_str (string): Must be at least 8 bits in lenght. example "10101010" + from_height (unsigned int): minimum height in the chain where to look for transactions. + handler (Callable (error, list)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* list (StealthList): list with every transaction matching the given filter. + +#### `public def `[`fetch_block_height`](#classbitprim_1_1Chain_1a99c62752f73e9b7ef8402863a04ad4a9)`(self,hash,handler)` + +Given a block hash, it cues the chain for the block height. + +Args: + hash (bytearray): 32 bytes of the block hash. + handler (Callable (error, block_height)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* block_height (unsigned int): height of the block in the chain. + +#### `public def `[`fetch_block_header_by_height`](#classbitprim_1_1Chain_1a094aa543335f147e7b6e48ad010ca070)`(self,height,handler)` + +Get the block header from the specified height in the chain. + +Args: + height (unsigned int): block height in the chain. + handler (Callable (error, block_header)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* block_header (Header): header of the block found. + +#### `public def `[`fetch_block_header_by_hash`](#classbitprim_1_1Chain_1aad170dbb1d2c7978414221a609856720)`(self,hash,handler)` + +Get the block header from the specified block hash. + +Args: + hash (bytearray): 32 bytes of the block hash. + handler (Callable (error, block_header)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* block_header (Header): header of the block found. + +#### `public def `[`fetch_block_by_height`](#classbitprim_1_1Chain_1a284806f124ea0f94efdac5fa679993ad)`(self,height,handler)` + +Gets a block from the specified height in the chain. + +Args: + height (unsigned int): block height in the chain. + handler (Callable (error, block)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* block (Block): block at the defined height in the chain. + +#### `public def `[`fetch_block_by_hash`](#classbitprim_1_1Chain_1a6d223f504ce3452988ffc2f84b27b2a4)`(self,hash,handler)` + +Gets a block from the specified hash. + +Args: + hash (bytearray): 32 bytes of the block hash. + handler (Callable (error, block)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* block (Block): block found with the specified hash. + +#### `public def `[`fetch_merkle_block_by_height`](#classbitprim_1_1Chain_1ae445ca8c6d5baaa009d08c98634246aa)`(self,height,handler)` + +Given a block height in the chain, it retrieves a merkle block. + +Args: + height (unsigned int): block height in the chain. + handler (Callable (error, merkle_block, block_height)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* merkle_block (MerkleBlock): merkle block of the block found at the specified height. +* block_height (unsigned int): height of the block in the chain. + +#### `public def `[`fetch_merkle_block_by_hash`](#classbitprim_1_1Chain_1a7e4efae5160fe3615e608ec41e71f758)`(self,hash,handler)` + +Given a block hash, it retrieves a merkle block. + +Args: + hash (bytearray): 32 bytes of the block hash. + handler (Callable (error, merkle_block, block_height)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* merkle_block (MerkleBlock): merkle block of the block found with the given hash. +* block_height (unsigned int): height of the block in the chain. + +#### `public def `[`fetch_transaction`](#classbitprim_1_1Chain_1a1d85163b2ba7b815f0bfa997c3dbd442)`(self,hashn,require_confirmed,handler)` + +Get a transaction by its hash. + +Args: + hashn (bytearray): 32 bytes of the transaction hash. + require_confirmed (int): if transaction should be in a block. 0 if not. + handler (Callable (error, transaction, block_height, tx_index)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* transaction (Transaction): Transaction found. +* block_height (unsigned int): height in the chain of the block containing the transaction. +* tx_index (unsigned int): index of the transaction inside the block. + +#### `public def `[`fetch_output`](#classbitprim_1_1Chain_1a72218a16849f5a0c8054be336658caf1)`(self,hashn,index,require_confirmed,handler)` + +Get a transaction output by its transaction hash and index inside the transaction. + +Args: + hashn (bytearray): 32 bytes of the transaction hash. + index (unsigned int): index of the output in the transaction. + require_confirmed (int): if transaction should be in a block. 0 if not. + handler (Callable (error, output)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* output (Output): output found. + +#### `public def `[`fetch_transaction_position`](#classbitprim_1_1Chain_1a5024c70760381fc3eada646bba4a5c8e)`(self,hashn,require_confirmed,handler)` + +Given a transaction hash it fetches the height and position inside the block. + +Args: + hash (bytearray): 32 bytes of the transaction hash. + require_confirmed (int): if transaction should be in a block. 0 if not. + handler (Callable (error, block_height, tx_index)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* block_height (unsigned int): height of the block containing the transaction. +* tx_index (unsigned int): index in the block of the transaction. + +#### `public def `[`validate_tx`](#classbitprim_1_1Chain_1a376f1a70435c94ee95d27dad2c66c6aa)`(self,transaction,handler)` + +Determine if a transaction is valid for submission to the blockchain. + +Args: + transaction (Transaction): transaction to be checked. + handler (Callable (error, message)): Will be executed after the chain is cued. + +* error (int): error code. 0 if successfull. +* message (str): string describing the result of the cue. example: 'The transaction is valid' + +#### `public def `[`fetch_spend`](#classbitprim_1_1Chain_1ae1bd60745bb42815e14901925e6e6558)`(self,output_point,handler)` + +Fetch the transaction input which spends the indicated output. The `fetch_spend_handler` will be executed after cueing the chain. + +Args: + output_point (OutputPoint): tx hash and index pair. + handler (Callable (error, input_point)): Will be executed when the chain is cued. + +* error (int): error code. 0 if successfull. +* input_point (Point): Tx hash nad index pair where the output was spent. + +# class `bitprim::Executor` + +Controls the execution of the Bitprim bitcoin node. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Executor_1af03d07adc2f2ffdac5b3255ee8b69967)`(self,path,sout,serr)` | +`public def `[`__del__`](#classbitprim_1_1Executor_1a0be33b77505fd6836f22b2177b98a941)`(self)` | +`public def `[`init_chain`](#classbitprim_1_1Executor_1a963a48bff1fa656636909d41c44ba1dd)`(self)` | bool: Initialization of the blockchain. +`public def `[`run`](#classbitprim_1_1Executor_1adc2614f1b1a53246eb5c99f57bf50d77)`(self)` | bool: Starts running the node, initializing blockchain download. +`public def `[`run_wait`](#classbitprim_1_1Executor_1a9e6c0c3764214ce25872821141461792)`(self)` | bool: Starts running the node, initializing blockchain download. +`public def `[`stop`](#classbitprim_1_1Executor_1a8c3abf988c9b8db664548ac9442331d1)`(self)` | bool: it stops the node. +`public def `[`chain`](#classbitprim_1_1Executor_1a6287206dcd5c0d0c87a20f48cf3f5632)`(self)` | Chain: Object containing the blockchain. +`public def `[`__enter__`](#classbitprim_1_1Executor_1ad18cf685fae0e24f51b869b069ec3527)`(self)` | +`public def `[`__exit__`](#classbitprim_1_1Executor_1a4e694437fd6b419d279c979a0fa8e1de)`(self,exc_type,exc_value,traceback)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Executor_1af03d07adc2f2ffdac5b3255ee8b69967)`(self,path,sout,serr)` + +#### `public def `[`__del__`](#classbitprim_1_1Executor_1a0be33b77505fd6836f22b2177b98a941)`(self)` + +#### `public def `[`init_chain`](#classbitprim_1_1Executor_1a963a48bff1fa656636909d41c44ba1dd)`(self)` + +bool: Initialization of the blockchain. +Returns 'TRUE' if successfull. + +#### `public def `[`run`](#classbitprim_1_1Executor_1adc2614f1b1a53246eb5c99f57bf50d77)`(self)` + +bool: Starts running the node, initializing blockchain download. +Returns 'TRUE' if successful. + +#### `public def `[`run_wait`](#classbitprim_1_1Executor_1a9e6c0c3764214ce25872821141461792)`(self)` + +bool: Starts running the node, initializing blockchain download. +It listen to wait signals. +Returns 'TRUE' if successful. + +#### `public def `[`stop`](#classbitprim_1_1Executor_1a8c3abf988c9b8db664548ac9442331d1)`(self)` + +bool: it stops the node. +precondition: self._running. +Returns 'TRUE' if successfull + +#### `public def `[`chain`](#classbitprim_1_1Executor_1a6287206dcd5c0d0c87a20f48cf3f5632)`(self)` + +Chain: Object containing the blockchain. + +#### `public def `[`__enter__`](#classbitprim_1_1Executor_1ad18cf685fae0e24f51b869b069ec3527)`(self)` + +#### `public def `[`__exit__`](#classbitprim_1_1Executor_1a4e694437fd6b419d279c979a0fa8e1de)`(self,exc_type,exc_value,traceback)` + +# class `bitprim::Header` + +Represent the Header of a Bitcoin Block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Header_1ab1054610e909b96de1bb2dd8028a765a)`(self,pointer,`[`height`](#classbitprim_1_1Header_1a38f5a0200aa5d54e3bdd9d9cc1a136e5)`,auto_destroy)` | Construction of the Header class object. +`public def `[`__del__`](#classbitprim_1_1Header_1a4b2baea19d3f69d1657398b393829900)`(self)` | +`public def `[`height`](#classbitprim_1_1Header_1a38f5a0200aa5d54e3bdd9d9cc1a136e5)`(self)` | unsigned int: Height of the block in the chain. +`public def `[`version`](#classbitprim_1_1Header_1a3f3b70f4c986cb07dffe85b5afba040c)`(self)` | unsigned int: protocol version of the header. +`public def `[`set_version`](#classbitprim_1_1Header_1a609e51d54c44345e0ec5dbfb191bc8ce)`(self,`[`version`](#classbitprim_1_1Header_1a3f3b70f4c986cb07dffe85b5afba040c)`)` | +`public def `[`previous_block_hash`](#classbitprim_1_1Header_1a6f69d5f8a25ca54e0c5f62b907d3d11b)`(self)` | bytearray: 32 bytes hash of the previous block in the chain. +`public def `[`merkle`](#classbitprim_1_1Header_1acb8f6ae7da9ce9fc322cf368cb990dea)`(self)` | bytearray: 32 bytes merkle root. +`public def `[`hash`](#classbitprim_1_1Header_1ab5e63722faa35d7a4842f91b252db8cf)`(self)` | bytearray: 32 bytes block hash. +`public def `[`timestamp`](#classbitprim_1_1Header_1a376f62f26bbb764768bbd877ec0501e4)`(self)` | unsigned int: block timestamp. +`public def `[`set_timestamp`](#classbitprim_1_1Header_1ae47b3d4b8916e020f0f904ac030ba42b)`(self,`[`timestamp`](#classbitprim_1_1Header_1a376f62f26bbb764768bbd877ec0501e4)`)` | +`public def `[`bits`](#classbitprim_1_1Header_1a9d9b68fb70720ef9ebf16f9bd8d3db41)`(self)` | unsigned int: value of bits. Difficulty threshold. +`public def `[`set_bits`](#classbitprim_1_1Header_1a239f8d73f8d4039bef0880082d877320)`(self,`[`bits`](#classbitprim_1_1Header_1a9d9b68fb70720ef9ebf16f9bd8d3db41)`)` | +`public def `[`nonce`](#classbitprim_1_1Header_1ac071c7567cb2ab2942baed4044b0c07d)`(self)` | unsigned int: the nonce that allowed this block to added to the blockchain. +`public def `[`set_nonce`](#classbitprim_1_1Header_1aa6db7b91c6d5eb191334973dea3856f0)`(self,`[`nonce`](#classbitprim_1_1Header_1ac071c7567cb2ab2942baed4044b0c07d)`)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Header_1ab1054610e909b96de1bb2dd8028a765a)`(self,pointer,`[`height`](#classbitprim_1_1Header_1a38f5a0200aa5d54e3bdd9d9cc1a136e5)`,auto_destroy)` + +Construction of the Header class object. + +Args: + pointer (Object): pointer to c implementation. + height (unsigned int): Height of the block in the chain. + auto_destroy (bool): the object will be deleted when out of scope.. + +#### `public def `[`__del__`](#classbitprim_1_1Header_1a4b2baea19d3f69d1657398b393829900)`(self)` + +#### `public def `[`height`](#classbitprim_1_1Header_1a38f5a0200aa5d54e3bdd9d9cc1a136e5)`(self)` + +unsigned int: Height of the block in the chain. + +#### `public def `[`version`](#classbitprim_1_1Header_1a3f3b70f4c986cb07dffe85b5afba040c)`(self)` + +unsigned int: protocol version of the header. + +#### `public def `[`set_version`](#classbitprim_1_1Header_1a609e51d54c44345e0ec5dbfb191bc8ce)`(self,`[`version`](#classbitprim_1_1Header_1a3f3b70f4c986cb07dffe85b5afba040c)`)` + +#### `public def `[`previous_block_hash`](#classbitprim_1_1Header_1a6f69d5f8a25ca54e0c5f62b907d3d11b)`(self)` + +bytearray: 32 bytes hash of the previous block in the chain. + +#### `public def `[`merkle`](#classbitprim_1_1Header_1acb8f6ae7da9ce9fc322cf368cb990dea)`(self)` + +bytearray: 32 bytes merkle root. + +#### `public def `[`hash`](#classbitprim_1_1Header_1ab5e63722faa35d7a4842f91b252db8cf)`(self)` + +bytearray: 32 bytes block hash. + +#### `public def `[`timestamp`](#classbitprim_1_1Header_1a376f62f26bbb764768bbd877ec0501e4)`(self)` + +unsigned int: block timestamp. + +#### `public def `[`set_timestamp`](#classbitprim_1_1Header_1ae47b3d4b8916e020f0f904ac030ba42b)`(self,`[`timestamp`](#classbitprim_1_1Header_1a376f62f26bbb764768bbd877ec0501e4)`)` + +#### `public def `[`bits`](#classbitprim_1_1Header_1a9d9b68fb70720ef9ebf16f9bd8d3db41)`(self)` + +unsigned int: value of bits. Difficulty threshold. + +#### `public def `[`set_bits`](#classbitprim_1_1Header_1a239f8d73f8d4039bef0880082d877320)`(self,`[`bits`](#classbitprim_1_1Header_1a9d9b68fb70720ef9ebf16f9bd8d3db41)`)` + +#### `public def `[`nonce`](#classbitprim_1_1Header_1ac071c7567cb2ab2942baed4044b0c07d)`(self)` + +unsigned int: the nonce that allowed this block to added to the blockchain. + +#### `public def `[`set_nonce`](#classbitprim_1_1Header_1aa6db7b91c6d5eb191334973dea3856f0)`(self,`[`nonce`](#classbitprim_1_1Header_1ac071c7567cb2ab2942baed4044b0c07d)`)` + +# class `bitprim::History` + +Output points, values, and spends for a payment address + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1History_1a73191eb84c2e5bdf08b8040a3879dde5)`(self,ptr)` | +`public def `[`point_kind`](#classbitprim_1_1History_1a9ec5efba6a4cc6b1909e293d3e412613)`(self)` | unsigned int: Used for differentiation. +`public def `[`point`](#classbitprim_1_1History_1a851ad89d09c17a1f6da17a9b020a209e)`(self)` | Point: point that identifies History. +`public def `[`height`](#classbitprim_1_1History_1adde220878b3bc05ebc000b12d4013a10)`(self)` | unsigned int: Height of the block containing the Point. +`public def `[`value_or_previous_checksum`](#classbitprim_1_1History_1a836dc64f95577b4e430133f3346bbaee)`(self)` | unsigned int: varies depending of point_kind. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1History_1a73191eb84c2e5bdf08b8040a3879dde5)`(self,ptr)` + +#### `public def `[`point_kind`](#classbitprim_1_1History_1a9ec5efba6a4cc6b1909e293d3e412613)`(self)` + +unsigned int: Used for differentiation. + '0' output + '1' spend + +#### `public def `[`point`](#classbitprim_1_1History_1a851ad89d09c17a1f6da17a9b020a209e)`(self)` + +Point: point that identifies History. + +#### `public def `[`height`](#classbitprim_1_1History_1adde220878b3bc05ebc000b12d4013a10)`(self)` + +unsigned int: Height of the block containing the Point. + +#### `public def `[`value_or_previous_checksum`](#classbitprim_1_1History_1a836dc64f95577b4e430133f3346bbaee)`(self)` + +unsigned int: varies depending of point_kind. + +value: if output, then satoshi value of output. + +previous_checksum: if spend, then checksum hash of previous output_point. + +# class `bitprim::HistoryList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public `[`constructed`](#classbitprim_1_1HistoryList_1a0a940029b8c0820b1f64f7123fce997a) | +`public def `[`__init__`](#classbitprim_1_1HistoryList_1a52db717ce2e113abe759524175991cfb)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1HistoryList_1a78658958bcfe9062ffe7fad75df4a284)`(self)` | +`public def `[`count`](#classbitprim_1_1HistoryList_1a121077ffd2e0c1787234489ca2b065e2)`(self)` | +`public def `[`nth`](#classbitprim_1_1HistoryList_1a78e90bb2ca57368f01dfbcaae0ab5155)`(self,n)` | +`public def `[`__getitem__`](#classbitprim_1_1HistoryList_1a41a6ea5aeac370e6a51e40497e95947b)`(self,key)` | + +## Members + +#### `public `[`constructed`](#classbitprim_1_1HistoryList_1a0a940029b8c0820b1f64f7123fce997a) + +#### `public def `[`__init__`](#classbitprim_1_1HistoryList_1a52db717ce2e113abe759524175991cfb)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1HistoryList_1a78658958bcfe9062ffe7fad75df4a284)`(self)` + +#### `public def `[`count`](#classbitprim_1_1HistoryList_1a121077ffd2e0c1787234489ca2b065e2)`(self)` + +#### `public def `[`nth`](#classbitprim_1_1HistoryList_1a78e90bb2ca57368f01dfbcaae0ab5155)`(self,n)` + +#### `public def `[`__getitem__`](#classbitprim_1_1HistoryList_1a41a6ea5aeac370e6a51e40497e95947b)`(self,key)` + +# class `bitprim::Input` + +Represents one of the inputs of a Transaction. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Input_1ae13083fb6e70555b91861147ebff6329)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1Input_1aab52e334cbe944496a112bb726b21530)`(self)` | +`public def `[`is_valid`](#classbitprim_1_1Input_1ae29f9ee24d1a123f1dcce44393de606c)`(self)` | int: returns '0' if previous outputs or script are invalid. +`public def `[`is_final`](#classbitprim_1_1Input_1a76fccbec6192bf842745f7acb26adb85)`(self)` | int: returns '1' if sequence is equal to max_sequence. +`public def `[`serialized_size`](#classbitprim_1_1Input_1a0341dd46f71dd163a7e61fed469e9d15)`(self)` | unsigned int: size in bytes. +`public def `[`sequence`](#classbitprim_1_1Input_1a6116ec3110b937e98c12d4af036d14da)`(self)` | unsigned int: sequence number of inputs. if it equals max_sequence, txs is final. +`public def `[`signature_operations`](#classbitprim_1_1Input_1a29cff0c9139870bdc33225a935e461dd)`(self,bip16_active)` | unsigned int: amount of sigops in the script. +`public def `[`script`](#classbitprim_1_1Input_1a648a39c34feb63d42d658bbeaf88fdc5)`(self)` | Script: script object. +`public def `[`previous_output`](#classbitprim_1_1Input_1af9aec2095f608d93c6a3c31d5fd7adf9)`(self)` | OutputPoint: returns previous output, with transaction hash and index. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Input_1ae13083fb6e70555b91861147ebff6329)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1Input_1aab52e334cbe944496a112bb726b21530)`(self)` + +#### `public def `[`is_valid`](#classbitprim_1_1Input_1ae29f9ee24d1a123f1dcce44393de606c)`(self)` + +int: returns '0' if previous outputs or script are invalid. + +#### `public def `[`is_final`](#classbitprim_1_1Input_1a76fccbec6192bf842745f7acb26adb85)`(self)` + +int: returns '1' if sequence is equal to max_sequence. + +#### `public def `[`serialized_size`](#classbitprim_1_1Input_1a0341dd46f71dd163a7e61fed469e9d15)`(self)` + +unsigned int: size in bytes. + +#### `public def `[`sequence`](#classbitprim_1_1Input_1a6116ec3110b937e98c12d4af036d14da)`(self)` + +unsigned int: sequence number of inputs. if it equals max_sequence, txs is final. + +#### `public def `[`signature_operations`](#classbitprim_1_1Input_1a29cff0c9139870bdc33225a935e461dd)`(self,bip16_active)` + +unsigned int: amount of sigops in the script. + +Args: + bip16_active (int): '1' if bip 16 is active. '0' if not. + +#### `public def `[`script`](#classbitprim_1_1Input_1a648a39c34feb63d42d658bbeaf88fdc5)`(self)` + +Script: script object. + +#### `public def `[`previous_output`](#classbitprim_1_1Input_1af9aec2095f608d93c6a3c31d5fd7adf9)`(self)` + +OutputPoint: returns previous output, with transaction hash and index. + +# class `bitprim::InputList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1InputList_1a78cd01531883ead04e5d1f1827afd2f0)`(self,ptr)` | +`public def `[`push_back`](#classbitprim_1_1InputList_1a57753b4177314fd616ab77f244c4b0c2)`(self,inputn)` | +`public def `[`list_count`](#classbitprim_1_1InputList_1adc59d443ae7e6ddf904531e0e79eff38)`(self)` | +`public def `[`__getitem__`](#classbitprim_1_1InputList_1abda9474f6b9bf410d501db3628649483)`(self,key)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1InputList_1a78cd01531883ead04e5d1f1827afd2f0)`(self,ptr)` + +#### `public def `[`push_back`](#classbitprim_1_1InputList_1a57753b4177314fd616ab77f244c4b0c2)`(self,inputn)` + +#### `public def `[`list_count`](#classbitprim_1_1InputList_1adc59d443ae7e6ddf904531e0e79eff38)`(self)` + +#### `public def `[`__getitem__`](#classbitprim_1_1InputList_1abda9474f6b9bf410d501db3628649483)`(self,key)` + +# class `bitprim::MerkleBlock` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1MerkleBlock_1a23c009fc36170debc9e12fc94b330dda)`(self,pointer,`[`height`](#classbitprim_1_1MerkleBlock_1ab0ebe70c231ddd6e34769eda3778544b)`)` | +`public def `[`height`](#classbitprim_1_1MerkleBlock_1ab0ebe70c231ddd6e34769eda3778544b)`(self)` | unsigned int: Height of the block in the chain. +`public def `[`__del__`](#classbitprim_1_1MerkleBlock_1add318592cfd1e07138c9a06648e7b560)`(self)` | +`public def `[`header`](#classbitprim_1_1MerkleBlock_1a16d8f19f35c6fef29d314fbcc3e325fd)`(self)` | Header: header of the block. +`public def `[`is_valid`](#classbitprim_1_1MerkleBlock_1a8b8e074604860353111fba463d3b3c66)`(self)` | int: returns true if it cointains txs hashes, and header is valid. +`public def `[`hash_count`](#classbitprim_1_1MerkleBlock_1a0cd99a8fda5faaf504f3aed41ccbb3de)`(self)` | unsigned int: size of the transaction hashes list. +`public def `[`serialized_size`](#classbitprim_1_1MerkleBlock_1a4bd735a5ec63b1ab7b505073932fb629)`(self,version)` | unsigned int: size of the block in bytes. +`public def `[`total_transaction_count`](#classbitprim_1_1MerkleBlock_1ae8e7f4689bb58379a42ab18211c7e4ae)`(self)` | unsigned int: transactions included in the block. +`public def `[`reset`](#classbitprim_1_1MerkleBlock_1a27ba9a21dc72f6233f9c9d45946ad13e)`(self)` | void: delete all the data inside the block. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1MerkleBlock_1a23c009fc36170debc9e12fc94b330dda)`(self,pointer,`[`height`](#classbitprim_1_1MerkleBlock_1ab0ebe70c231ddd6e34769eda3778544b)`)` + +#### `public def `[`height`](#classbitprim_1_1MerkleBlock_1ab0ebe70c231ddd6e34769eda3778544b)`(self)` + +unsigned int: Height of the block in the chain. + +#### `public def `[`__del__`](#classbitprim_1_1MerkleBlock_1add318592cfd1e07138c9a06648e7b560)`(self)` + +#### `public def `[`header`](#classbitprim_1_1MerkleBlock_1a16d8f19f35c6fef29d314fbcc3e325fd)`(self)` + +Header: header of the block. + +#### `public def `[`is_valid`](#classbitprim_1_1MerkleBlock_1a8b8e074604860353111fba463d3b3c66)`(self)` + +int: returns true if it cointains txs hashes, and header is valid. + +#### `public def `[`hash_count`](#classbitprim_1_1MerkleBlock_1a0cd99a8fda5faaf504f3aed41ccbb3de)`(self)` + +unsigned int: size of the transaction hashes list. + +#### `public def `[`serialized_size`](#classbitprim_1_1MerkleBlock_1a4bd735a5ec63b1ab7b505073932fb629)`(self,version)` + +unsigned int: size of the block in bytes. + +Args: + version (unsigned int): block protocol version. + +#### `public def `[`total_transaction_count`](#classbitprim_1_1MerkleBlock_1ae8e7f4689bb58379a42ab18211c7e4ae)`(self)` + +unsigned int: transactions included in the block. + +#### `public def `[`reset`](#classbitprim_1_1MerkleBlock_1a27ba9a21dc72f6233f9c9d45946ad13e)`(self)` + +void: delete all the data inside the block. + +# class `bitprim::Output` + +Represents one of the outputs of a Transaction. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Output_1ac72bdb2e1bb09bef47eda818fd6f1867)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1Output_1ad7b4b7aa1483e0a2b1e176a709e954c5)`(self)` | +`public def `[`is_valid`](#classbitprim_1_1Output_1a51b38d7bcdac902c5d3815ebd218175f)`(self)` | int: returns '0' if output is not found. +`public def `[`serialized_size`](#classbitprim_1_1Output_1aac3a6e139f1b5a651e5c957103ee843f)`(self,wire)` | unsigned int: size in bytes. +`public def `[`value`](#classbitprim_1_1Output_1a795ca3150bebcb0ac3cd183869a24586)`(self)` | unsigned int: returns output value. +`public def `[`signature_operations`](#classbitprim_1_1Output_1aca5e32f4be5d0d2ee4e5bb6bc36c395f)`(self)` | unsigned int: amount of signature operations in script. +`public def `[`script`](#classbitprim_1_1Output_1a274170cfeabb30c64f2540054c82dc5c)`(self)` | Script: returns the output script. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Output_1ac72bdb2e1bb09bef47eda818fd6f1867)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1Output_1ad7b4b7aa1483e0a2b1e176a709e954c5)`(self)` + +#### `public def `[`is_valid`](#classbitprim_1_1Output_1a51b38d7bcdac902c5d3815ebd218175f)`(self)` + +int: returns '0' if output is not found. + +#### `public def `[`serialized_size`](#classbitprim_1_1Output_1aac3a6e139f1b5a651e5c957103ee843f)`(self,wire)` + +unsigned int: size in bytes. + +Args: + wire (bool): if 'TRUE' size will include size of 'uint32' for storing spender height. + +#### `public def `[`value`](#classbitprim_1_1Output_1a795ca3150bebcb0ac3cd183869a24586)`(self)` + +unsigned int: returns output value. + +#### `public def `[`signature_operations`](#classbitprim_1_1Output_1aca5e32f4be5d0d2ee4e5bb6bc36c395f)`(self)` + +unsigned int: amount of signature operations in script. + +#### `public def `[`script`](#classbitprim_1_1Output_1a274170cfeabb30c64f2540054c82dc5c)`(self)` + +Script: returns the output script. + +# class `bitprim::OutputList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1OutputList_1a960450aa4813cbd58396551499623da2)`(self,ptr)` | +`public def `[`push_back`](#classbitprim_1_1OutputList_1aaf6aaff75f7b2b9b3932c9eb30a80c02)`(self,output)` | +`public def `[`list_count`](#classbitprim_1_1OutputList_1aa0906a801a9402bbf962f6aa95940c67)`(self)` | +`public def `[`__getitem__`](#classbitprim_1_1OutputList_1add8fdca3e7916ae48fa88cdc63fcad8d)`(self,key)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1OutputList_1a960450aa4813cbd58396551499623da2)`(self,ptr)` + +#### `public def `[`push_back`](#classbitprim_1_1OutputList_1aaf6aaff75f7b2b9b3932c9eb30a80c02)`(self,output)` + +#### `public def `[`list_count`](#classbitprim_1_1OutputList_1aa0906a801a9402bbf962f6aa95940c67)`(self)` + +#### `public def `[`__getitem__`](#classbitprim_1_1OutputList_1add8fdca3e7916ae48fa88cdc63fcad8d)`(self,key)` + +# class `bitprim::OutputPoint` + +Transaction hash and index representing one of the transaction outputs. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1OutputPoint_1afa86b39354747b6cec4af931c7ec72b2)`(self,ptr)` | +`public def `[`hash`](#classbitprim_1_1OutputPoint_1a856c2a088c013a6eb786be10b6559695)`(self)` | bytearray: 32 bytes of the transaction hash. +`public def `[`__del__`](#classbitprim_1_1OutputPoint_1a1ecd26d135fced6148b47ff0935ee148)`(self)` | +`public def `[`index`](#classbitprim_1_1OutputPoint_1a9f2026dc8ea6f24a951bdcd87d1e12de)`(self)` | unsigned int: position of the output in the transaction. +`public def `[`construct`](#classbitprim_1_1OutputPoint_1a01668dcd11e97994c8c1c5d14a2efa07)`(self)` | OutputPoint: creates an empty output point. +`public def `[`construct_from_hash_index`](#classbitprim_1_1OutputPoint_1a1d421f77d0518ce53469ba18c58c1bbc)`(self,hashn,`[`index`](#classbitprim_1_1OutputPoint_1a9f2026dc8ea6f24a951bdcd87d1e12de)`)` | Outputpoint: creates an OutputPoint from a transaction hash and index pair. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1OutputPoint_1afa86b39354747b6cec4af931c7ec72b2)`(self,ptr)` + +#### `public def `[`hash`](#classbitprim_1_1OutputPoint_1a856c2a088c013a6eb786be10b6559695)`(self)` + +bytearray: 32 bytes of the transaction hash. + +#### `public def `[`__del__`](#classbitprim_1_1OutputPoint_1a1ecd26d135fced6148b47ff0935ee148)`(self)` + +#### `public def `[`index`](#classbitprim_1_1OutputPoint_1a9f2026dc8ea6f24a951bdcd87d1e12de)`(self)` + +unsigned int: position of the output in the transaction. + +#### `public def `[`construct`](#classbitprim_1_1OutputPoint_1a01668dcd11e97994c8c1c5d14a2efa07)`(self)` + +OutputPoint: creates an empty output point. + +#### `public def `[`construct_from_hash_index`](#classbitprim_1_1OutputPoint_1a1d421f77d0518ce53469ba18c58c1bbc)`(self,hashn,`[`index`](#classbitprim_1_1OutputPoint_1a9f2026dc8ea6f24a951bdcd87d1e12de)`)` + +Outputpoint: creates an OutputPoint from a transaction hash and index pair. + +Args: + + hashn (bytearray): 32 bytes of the transaction hash. + index (unsigned int): position of the output in the transaction. + +# class `bitprim::PaymentAddress` + +Represents a Bitcoin wallet address. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1PaymentAddress_1a716ff66b7cfa1bab2049d6809b7144fd)`(self,ptr)` | +`public def `[`encoded`](#classbitprim_1_1PaymentAddress_1a44c336a955badc58d015de528cf04c44)`(self)` | str: readable format of the address. +`public def `[`version`](#classbitprim_1_1PaymentAddress_1a53ccf810b1ad7d0ef3c6fd20a8cf5c61)`(self)` | unsigned int: address version. +`public def `[`construct_from_string`](#classbitprim_1_1PaymentAddress_1ad585e303e02efc54442cc983f71176d8)`(self,address)` | Creates the Payment Address based on the received string. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1PaymentAddress_1a716ff66b7cfa1bab2049d6809b7144fd)`(self,ptr)` + +#### `public def `[`encoded`](#classbitprim_1_1PaymentAddress_1a44c336a955badc58d015de528cf04c44)`(self)` + +str: readable format of the address. + +#### `public def `[`version`](#classbitprim_1_1PaymentAddress_1a53ccf810b1ad7d0ef3c6fd20a8cf5c61)`(self)` + +unsigned int: address version. + +#### `public def `[`construct_from_string`](#classbitprim_1_1PaymentAddress_1ad585e303e02efc54442cc983f71176d8)`(self,address)` + +Creates the Payment Address based on the received string. + +Args: + address(str): a base58 address. example '1MLVpZC2CTFHheox8SCEnAbW5NBdewRTdR' + +# class `bitprim::Point` + +Represents one of the txs input. +It's a pair of transaction hash and index. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Point_1a1b2ccac61ef8fe0f2f61aaf58c98fb6c)`(self,ptr)` | +`public def `[`hash`](#classbitprim_1_1Point_1a46bdd0b6d7df9c3576654b5a091a7263)`(self)` | Hash of the transaction. +`public def `[`is_valid`](#classbitprim_1_1Point_1a6adb5ce23e3ffdd311d07f1fda16d387)`(self)` | returns true if its not null. +`public def `[`index`](#classbitprim_1_1Point_1a876f64f8a82b16ea369a2f1dd4c61be2)`(self)` | Position of the Input in the transaction. +`public def `[`checksum`](#classbitprim_1_1Point_1a547cbaeb732a493881566efc0cc02f9a)`(self)` | This is used with output_point identification within a set of history rows + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Point_1a1b2ccac61ef8fe0f2f61aaf58c98fb6c)`(self,ptr)` + +#### `public def `[`hash`](#classbitprim_1_1Point_1a46bdd0b6d7df9c3576654b5a091a7263)`(self)` + +Hash of the transaction. + +Returns: + bytearray: 32 bytes. + +#### `public def `[`is_valid`](#classbitprim_1_1Point_1a6adb5ce23e3ffdd311d07f1fda16d387)`(self)` + +returns true if its not null. + +Returns: + bool + +#### `public def `[`index`](#classbitprim_1_1Point_1a876f64f8a82b16ea369a2f1dd4c61be2)`(self)` + +Position of the Input in the transaction. + +Returns: + unsigned int. + +#### `public def `[`checksum`](#classbitprim_1_1Point_1a547cbaeb732a493881566efc0cc02f9a)`(self)` + +This is used with output_point identification within a set of history rows +of the same address. Collision will result in miscorrelation of points by +client callers. This is NOT a bitcoin checksum. + +Returns: + unsigned int. + +# class `bitprim::Script` + +Represents transaction scripts. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Script_1a71167ed9cb1444e1bbed71834469ee05)`(self,ptr,auto_destroy)` | +`public def `[`__del__`](#classbitprim_1_1Script_1adc903b82b180174f84576bc0389bbf1f)`(self)` | +`public def `[`is_valid`](#classbitprim_1_1Script_1a5a22ae4af12fd6fc4c2c40f30802da2c)`(self)` | int: All script bytes are valid under some circumstance (e.g. coinbase). +`public def `[`is_valid_operations`](#classbitprim_1_1Script_1a611ffd4030e23d79d54ae18950f9e024)`(self)` | int: Script validity is independent of individual operation validity. +`public def `[`satoshi_content_size`](#classbitprim_1_1Script_1aeca70284e86f8042d28e77e31cd0a894)`(self)` | unsigned int: size in bytes. +`public def `[`serialized_size`](#classbitprim_1_1Script_1a5347d3490612815abb1a009d45abf880)`(self,prefix)` | unsigned int: size in bytes. If prefix '1' size includes a var int size. +`public def `[`to_string`](#classbitprim_1_1Script_1a8a77d30fc38c0b278aedbc59af993d8e)`(self,active_forks)` | str: translate operations in the script to string. +`public def `[`sigops`](#classbitprim_1_1Script_1ab0dffa99e266f48d352ece4ddf4f5a4f)`(self,embedded)` | unsigned int: amount of signature operations in the script. +`public def `[`embedded_sigops`](#classbitprim_1_1Script_1a87b18a27b56aa2c5309c9bbd43fdfd76)`(self,prevout_script)` | unsigned int: Count the sigops in the embedded script using BIP16 rules. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Script_1a71167ed9cb1444e1bbed71834469ee05)`(self,ptr,auto_destroy)` + +#### `public def `[`__del__`](#classbitprim_1_1Script_1adc903b82b180174f84576bc0389bbf1f)`(self)` + +#### `public def `[`is_valid`](#classbitprim_1_1Script_1a5a22ae4af12fd6fc4c2c40f30802da2c)`(self)` + +int: All script bytes are valid under some circumstance (e.g. coinbase). +Returns '0' if a prefix and byte count does not match. + +#### `public def `[`is_valid_operations`](#classbitprim_1_1Script_1a611ffd4030e23d79d54ae18950f9e024)`(self)` + +int: Script validity is independent of individual operation validity. +There is a trailing invalid/default op if a push op had a size mismatch. + +#### `public def `[`satoshi_content_size`](#classbitprim_1_1Script_1aeca70284e86f8042d28e77e31cd0a894)`(self)` + +unsigned int: size in bytes. + +#### `public def `[`serialized_size`](#classbitprim_1_1Script_1a5347d3490612815abb1a009d45abf880)`(self,prefix)` + +unsigned int: size in bytes. If prefix '1' size includes a var int size. + +Args: + prefix (bool): include prefix size in the final result. + +#### `public def `[`to_string`](#classbitprim_1_1Script_1a8a77d30fc38c0b278aedbc59af993d8e)`(self,active_forks)` + +str: translate operations in the script to string. + +Args: + active_forks (unsigned int): which rule is active. + +#### `public def `[`sigops`](#classbitprim_1_1Script_1ab0dffa99e266f48d352ece4ddf4f5a4f)`(self,embedded)` + +unsigned int: amount of signature operations in the script. + +Args: + embedded (bool): is embedded script. + +#### `public def `[`embedded_sigops`](#classbitprim_1_1Script_1a87b18a27b56aa2c5309c9bbd43fdfd76)`(self,prevout_script)` + +unsigned int: Count the sigops in the embedded script using BIP16 rules. + +# class `bitprim::Stealth` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Stealth_1a66223b8a9e25e938b27fb90e305131b6)`(self,ptr)` | +`public def `[`ephemeral_public_key_hash`](#classbitprim_1_1Stealth_1ac5b81ac8a33db2fc11076c7741944c5b)`(self)` | bytearray: 33 bytes. Includes the sign byte (0x02) +`public def `[`transaction_hash`](#classbitprim_1_1Stealth_1a0c2c65c2e7956f422da41e405945ed8b)`(self)` | bytearray: 32 bytes. +`public def `[`public_key_hash`](#classbitprim_1_1Stealth_1a91e692b85f2aca1bff55cef53a7d8f7f)`(self)` | bytearray: 20 bytes. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Stealth_1a66223b8a9e25e938b27fb90e305131b6)`(self,ptr)` + +#### `public def `[`ephemeral_public_key_hash`](#classbitprim_1_1Stealth_1ac5b81ac8a33db2fc11076c7741944c5b)`(self)` + +bytearray: 33 bytes. Includes the sign byte (0x02) + +#### `public def `[`transaction_hash`](#classbitprim_1_1Stealth_1a0c2c65c2e7956f422da41e405945ed8b)`(self)` + +bytearray: 32 bytes. + +#### `public def `[`public_key_hash`](#classbitprim_1_1Stealth_1a91e692b85f2aca1bff55cef53a7d8f7f)`(self)` + +bytearray: 20 bytes. + +# class `bitprim::StealthCompact` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1StealthCompact_1a096b83602f54149f4a057b2f5e0b537b)`(self,ptr)` | +`public def `[`ephemeral_public_key_hash`](#classbitprim_1_1StealthCompact_1a321f69a0c64289dd915079e6eb0f34e8)`(self)` | bytearray: 32 bytes. Excludes the sign byte (0x02) +`public def `[`transaction_hash`](#classbitprim_1_1StealthCompact_1afc2e71f2147e7c788ce9f475281f2e20)`(self)` | bytearray: 32 bytes. +`public def `[`public_key_hash`](#classbitprim_1_1StealthCompact_1a62d4aaec36ca9aa5a544097fa9bed367)`(self)` | bytearray: 20 bytes. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1StealthCompact_1a096b83602f54149f4a057b2f5e0b537b)`(self,ptr)` + +#### `public def `[`ephemeral_public_key_hash`](#classbitprim_1_1StealthCompact_1a321f69a0c64289dd915079e6eb0f34e8)`(self)` + +bytearray: 32 bytes. Excludes the sign byte (0x02) + +#### `public def `[`transaction_hash`](#classbitprim_1_1StealthCompact_1afc2e71f2147e7c788ce9f475281f2e20)`(self)` + +bytearray: 32 bytes. + +#### `public def `[`public_key_hash`](#classbitprim_1_1StealthCompact_1a62d4aaec36ca9aa5a544097fa9bed367)`(self)` + +bytearray: 20 bytes. + +# class `bitprim::StealthCompactList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1StealthCompactList_1a80eb34701f18beaddfc056bc81e046c5)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1StealthCompactList_1a00aedbc6e343018dfb192dc7fbd1773e)`(self)` | +`public def `[`list_count`](#classbitprim_1_1StealthCompactList_1a9d76141b462701811573a90d4a87f9b9)`(self)` | +`public def `[`__getitem__`](#classbitprim_1_1StealthCompactList_1a13259edfd3730528a6f025bfc09b9c2d)`(self,key)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1StealthCompactList_1a80eb34701f18beaddfc056bc81e046c5)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1StealthCompactList_1a00aedbc6e343018dfb192dc7fbd1773e)`(self)` + +#### `public def `[`list_count`](#classbitprim_1_1StealthCompactList_1a9d76141b462701811573a90d4a87f9b9)`(self)` + +#### `public def `[`__getitem__`](#classbitprim_1_1StealthCompactList_1a13259edfd3730528a6f025bfc09b9c2d)`(self,key)` + +# class `bitprim::StealthList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public `[`constructed`](#classbitprim_1_1StealthList_1a84aebac541d7b2c7601c6f6d2aca2832) | +`public def `[`__init__`](#classbitprim_1_1StealthList_1a8ba200a5cb697338d42c5950c8dc5735)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1StealthList_1a6e55a0d3c29eeb27f5150c7758cd3dfb)`(self)` | +`public def `[`count`](#classbitprim_1_1StealthList_1a12f2cede95c9e4b47ae9aeff6c7b2ff7)`(self)` | +`public def `[`nth`](#classbitprim_1_1StealthList_1a2565c5589877c4b44979148f1ac91eed)`(self,n)` | +`public def `[`__getitem__`](#classbitprim_1_1StealthList_1af8ab11d6980e5e5873f41e0acea9df49)`(self,key)` | + +## Members + +#### `public `[`constructed`](#classbitprim_1_1StealthList_1a84aebac541d7b2c7601c6f6d2aca2832) + +#### `public def `[`__init__`](#classbitprim_1_1StealthList_1a8ba200a5cb697338d42c5950c8dc5735)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1StealthList_1a6e55a0d3c29eeb27f5150c7758cd3dfb)`(self)` + +#### `public def `[`count`](#classbitprim_1_1StealthList_1a12f2cede95c9e4b47ae9aeff6c7b2ff7)`(self)` + +#### `public def `[`nth`](#classbitprim_1_1StealthList_1a2565c5589877c4b44979148f1ac91eed)`(self,n)` + +#### `public def `[`__getitem__`](#classbitprim_1_1StealthList_1af8ab11d6980e5e5873f41e0acea9df49)`(self,key)` + +# class `bitprim::Transaction` + +Represents a Bitcoin Transaction. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1Transaction_1a46725d5acd8c3a8fb06522f401ea204c)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1Transaction_1a282bbff062532d2589e8ef4fcde173aa)`(self)` | +`public def `[`version`](#classbitprim_1_1Transaction_1aa78e3b53addcba62cd4417de17aad628)`(self)` | unsigned int: Transaction protocol version. +`public def `[`set_version`](#classbitprim_1_1Transaction_1ae17721a2689408ef4dd28f407eefeb88)`(self,`[`version`](#classbitprim_1_1Transaction_1aa78e3b53addcba62cd4417de17aad628)`)` | +`public def `[`hash`](#classbitprim_1_1Transaction_1aa679c88ddf7e352528c71bf3ae797ec9)`(self)` | bytearray: 32 bytes transaction hash. +`public def `[`hash_sighash_type`](#classbitprim_1_1Transaction_1ac4b2912c9d68a47cdc8bcdd15c520d89)`(self,sighash_type)` | bytearray: 32 bytes transaction hash. +`public def `[`locktime`](#classbitprim_1_1Transaction_1aab337d983f698afa256bf38287b26820)`(self)` | unsigned int: transaction locktime. +`public def `[`serialized_size`](#classbitprim_1_1Transaction_1af007310b3682d57b74ee70f944cb883e)`(self,wire)` | unsigned int: size of the transaction in bytes. +`public def `[`fees`](#classbitprim_1_1Transaction_1a9ee46a7fc71ab7c9a74322c628802186)`(self)` | unsigned int: fees to pay. Difference between input and output value. +`public def `[`signature_operations`](#classbitprim_1_1Transaction_1ade18c210a75584010597d76fde6b33f8)`(self)` | unsigned int: amount of signature operations in the transaction. +`public def `[`signature_operations_bip16_active`](#classbitprim_1_1Transaction_1a5897d20624e799b44b458a391fc8aa40)`(self,bip16_active)` | unsigned int: amount of signature operations in the transaction. +`public def `[`total_input_value`](#classbitprim_1_1Transaction_1ac8298d1f71febab13fe5f9b4f539e3ed)`(self)` | unsigned int: sum of every input value in the transaction. +`public def `[`total_output_value`](#classbitprim_1_1Transaction_1a3e3774f262498777003e86eed9d9381d)`(self)` | unsigned int: sum of every output value in the transaction. +`public def `[`is_coinbase`](#classbitprim_1_1Transaction_1ae7d6a8dd291a15968fa5f078a53af242)`(self)` | int: return '1' if transaction is coinbase. +`public def `[`is_null_non_coinbase`](#classbitprim_1_1Transaction_1a5539ce12185ded041ab9ce5b2a775485)`(self)` | int: return '1' if is not coinbase, but has null previous output. +`public def `[`is_oversized_coinbase`](#classbitprim_1_1Transaction_1a4c9a6cb88c82d9d8da7ef4db54dac402)`(self)` | int: returns '1' if coinbase has invalid script size on first input. +`public def `[`is_immature`](#classbitprim_1_1Transaction_1ad2cc8a92dc67e58db75ea3afe606342e)`(self,target_height)` | int: returns '1' if at least one of the inputs is not mature. +`public def `[`is_overspent`](#classbitprim_1_1Transaction_1afc10506073f96f853693d3f2049751ee)`(self)` | int: returns '1' if it is not a coinbase, and outputs value is higher than its inputs. +`public def `[`is_double_spend`](#classbitprim_1_1Transaction_1a4c9912869aa7f16772490a56718dabd2)`(self,include_unconfirmed)` | int: returns '1' if at least one of the previous outputs was already spent. +`public def `[`is_missing_previous_outputs`](#classbitprim_1_1Transaction_1ac4a82072535321b6563cbf0fb70c715a)`(self)` | int: returns '1' if at least one of the previous outputs is invalid. +`public def `[`is_final`](#classbitprim_1_1Transaction_1a814e76e41eac39d0d106a1bf26a879fc)`(self,block_height,block_time)` | int: returns '1' if transaction is final. +`public def `[`is_locktime_conflict`](#classbitprim_1_1Transaction_1ac269016ed1aea06944f1e5d273637ffb)`(self)` | int: returns '1' if its locked, but every input is final. +`public def `[`outputs`](#classbitprim_1_1Transaction_1a1d4f613af7fbd60d2421309fa967461f)`(self)` | OutputList: returns a list with every transaction output. +`public def `[`inputs`](#classbitprim_1_1Transaction_1acd7f943c9d0e9f3c76fddbb1d7c3db3b)`(self)` | InputList: returns a list with every transaction input. + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1Transaction_1a46725d5acd8c3a8fb06522f401ea204c)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1Transaction_1a282bbff062532d2589e8ef4fcde173aa)`(self)` + +#### `public def `[`version`](#classbitprim_1_1Transaction_1aa78e3b53addcba62cd4417de17aad628)`(self)` + +unsigned int: Transaction protocol version. + +#### `public def `[`set_version`](#classbitprim_1_1Transaction_1ae17721a2689408ef4dd28f407eefeb88)`(self,`[`version`](#classbitprim_1_1Transaction_1aa78e3b53addcba62cd4417de17aad628)`)` + +#### `public def `[`hash`](#classbitprim_1_1Transaction_1aa679c88ddf7e352528c71bf3ae797ec9)`(self)` + +bytearray: 32 bytes transaction hash. + +#### `public def `[`hash_sighash_type`](#classbitprim_1_1Transaction_1ac4b2912c9d68a47cdc8bcdd15c520d89)`(self,sighash_type)` + +bytearray: 32 bytes transaction hash. + +Args: + sighash_type (unsigned int): signature hash type. + +#### `public def `[`locktime`](#classbitprim_1_1Transaction_1aab337d983f698afa256bf38287b26820)`(self)` + +unsigned int: transaction locktime. + +#### `public def `[`serialized_size`](#classbitprim_1_1Transaction_1af007310b3682d57b74ee70f944cb883e)`(self,wire)` + +unsigned int: size of the transaction in bytes. + +Args: + wire (bool): if 'TRUE' size will include size of 'uint32' for storing spender height of output. + +#### `public def `[`fees`](#classbitprim_1_1Transaction_1a9ee46a7fc71ab7c9a74322c628802186)`(self)` + +unsigned int: fees to pay. Difference between input and output value. + +#### `public def `[`signature_operations`](#classbitprim_1_1Transaction_1ade18c210a75584010597d76fde6b33f8)`(self)` + +unsigned int: amount of signature operations in the transaction. +Returns max int in case of overflow. + +#### `public def `[`signature_operations_bip16_active`](#classbitprim_1_1Transaction_1a5897d20624e799b44b458a391fc8aa40)`(self,bip16_active)` + +unsigned int: amount of signature operations in the transaction. +Returns max int in case of overflow. + +Args: + + bip16_active (int): '1' if bip 16 is active. '0' if not. + +#### `public def `[`total_input_value`](#classbitprim_1_1Transaction_1ac8298d1f71febab13fe5f9b4f539e3ed)`(self)` + +unsigned int: sum of every input value in the transaction. +Returns max int in case of overflow. + +#### `public def `[`total_output_value`](#classbitprim_1_1Transaction_1a3e3774f262498777003e86eed9d9381d)`(self)` + +unsigned int: sum of every output value in the transaction. +return max int in case of overflow. + +#### `public def `[`is_coinbase`](#classbitprim_1_1Transaction_1ae7d6a8dd291a15968fa5f078a53af242)`(self)` + +int: return '1' if transaction is coinbase. + +#### `public def `[`is_null_non_coinbase`](#classbitprim_1_1Transaction_1a5539ce12185ded041ab9ce5b2a775485)`(self)` + +int: return '1' if is not coinbase, but has null previous output. + +#### `public def `[`is_oversized_coinbase`](#classbitprim_1_1Transaction_1a4c9a6cb88c82d9d8da7ef4db54dac402)`(self)` + +int: returns '1' if coinbase has invalid script size on first input. + +#### `public def `[`is_immature`](#classbitprim_1_1Transaction_1ad2cc8a92dc67e58db75ea3afe606342e)`(self,target_height)` + +int: returns '1' if at least one of the inputs is not mature. + +#### `public def `[`is_overspent`](#classbitprim_1_1Transaction_1afc10506073f96f853693d3f2049751ee)`(self)` + +int: returns '1' if it is not a coinbase, and outputs value is higher than its inputs. + +#### `public def `[`is_double_spend`](#classbitprim_1_1Transaction_1a4c9912869aa7f16772490a56718dabd2)`(self,include_unconfirmed)` + +int: returns '1' if at least one of the previous outputs was already spent. + +#### `public def `[`is_missing_previous_outputs`](#classbitprim_1_1Transaction_1ac4a82072535321b6563cbf0fb70c715a)`(self)` + +int: returns '1' if at least one of the previous outputs is invalid. + +#### `public def `[`is_final`](#classbitprim_1_1Transaction_1a814e76e41eac39d0d106a1bf26a879fc)`(self,block_height,block_time)` + +int: returns '1' if transaction is final. + +#### `public def `[`is_locktime_conflict`](#classbitprim_1_1Transaction_1ac269016ed1aea06944f1e5d273637ffb)`(self)` + +int: returns '1' if its locked, but every input is final. + +#### `public def `[`outputs`](#classbitprim_1_1Transaction_1a1d4f613af7fbd60d2421309fa967461f)`(self)` + +OutputList: returns a list with every transaction output. + +#### `public def `[`inputs`](#classbitprim_1_1Transaction_1acd7f943c9d0e9f3c76fddbb1d7c3db3b)`(self)` + +InputList: returns a list with every transaction input. + +# class `bitprim::TransactionList` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim_1_1TransactionList_1a026cda25b13f6571665fac38e25dc76f)`(self,ptr)` | +`public def `[`__del__`](#classbitprim_1_1TransactionList_1a934e710f5cfb72c40312702fa9c0a188)`(self)` | +`public def `[`construct_default`](#classbitprim_1_1TransactionList_1a6d85dafaf12acf196c0a2fa04a380288)`(self)` | +`public def `[`push_back`](#classbitprim_1_1TransactionList_1a8923845ba6327427e13786ff136790d4)`(self,transaction)` | +`public def `[`list_count`](#classbitprim_1_1TransactionList_1a93e3ab285e7b747a3af2927e4a8ca9f5)`(self)` | +`public def `[`__getitem__`](#classbitprim_1_1TransactionList_1a997cffbbab6cfdcbb976e14ae7c3b09c)`(self,key)` | + +## Members + +#### `public def `[`__init__`](#classbitprim_1_1TransactionList_1a026cda25b13f6571665fac38e25dc76f)`(self,ptr)` + +#### `public def `[`__del__`](#classbitprim_1_1TransactionList_1a934e710f5cfb72c40312702fa9c0a188)`(self)` + +#### `public def `[`construct_default`](#classbitprim_1_1TransactionList_1a6d85dafaf12acf196c0a2fa04a380288)`(self)` + +#### `public def `[`push_back`](#classbitprim_1_1TransactionList_1a8923845ba6327427e13786ff136790d4)`(self,transaction)` + +#### `public def `[`list_count`](#classbitprim_1_1TransactionList_1a93e3ab285e7b747a3af2927e4a8ca9f5)`(self)` + +#### `public def `[`__getitem__`](#classbitprim_1_1TransactionList_1a997cffbbab6cfdcbb976e14ae7c3b09c)`(self,key)` + +# class `bitprim::Wallet` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`mnemonics_to_seed`](#classbitprim_1_1Wallet_1a4a8552caf0d1d1ff6bc8fdfc54b3a47f)`(cls,mnemonics)` | + +## Members + +#### `public def `[`mnemonics_to_seed`](#classbitprim_1_1Wallet_1a4a8552caf0d1d1ff6bc8fdfc54b3a47f)`(cls,mnemonics)` + +Generated by [Moxygen](https://sourcey.com/moxygen) \ No newline at end of file diff --git a/docs/developer_guide/python/Python-interface.md b/docs/developer_guide/python/Python-interface.md new file mode 100644 index 0000000..025deb3 --- /dev/null +++ b/docs/developer_guide/python/Python-interface.md @@ -0,0 +1,23 @@ +Bitprim's Pyhton interface is built on top of Bitprim's C interface, in this fashion: + +![binding](assets/binding.png) + +On top of the raw C interface, a 1-1 binding is made in Python, in order to separate access to the API from its usage; this avoids impedance mismatch by separating the marshalling aspects from the binding language idiosyncrasies. That is, the 1-1 interface takes care of marshalling, without changing the interface. Then, the idiomatic interface uses the higher level language tools and idioms in order to hide the complexity from the application programmer. + +It takes another programmer profile in order to tinker with the lower level interfaces or consume them directly, but that is also possible when working with this approach: 3 separate levels of abstraction for accessing the same functionality. + +## Basic structure + +--- + +See [the source in Github](https://github.com/bitprim/bitprim-py/tree/master): + +* **bitprimmodule.c**: This is where the 1-1 native interface is implemented. C functions which can be called from Python are defined here, implementing all necessary marshalling. +* **bitprim.py**: This is the idiomatic interface definition. Here, Python classes are defined and Python idioms and conventions offered to make life easier for the Python application programmer. +* **bitprim\_run.py**. Entry point. Creates an executor and starts it. Use for testing the API. + +## User guide + +--- + +Python interface documentation is available [here.](https://github.com/bitprim/bitprim-py/blob/master/doc/README.md) diff --git a/docs/developer_guide/python/assets/binding.png b/docs/developer_guide/python/assets/binding.png new file mode 100644 index 0000000..fba59a1 Binary files /dev/null and b/docs/developer_guide/python/assets/binding.png differ diff --git a/docs/developer_guide/python/details.md b/docs/developer_guide/python/details.md new file mode 100644 index 0000000..347b150 --- /dev/null +++ b/docs/developer_guide/python/details.md @@ -0,0 +1,1465 @@ +# Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`namespace `[`bitprim-py::bitprim`](#namespacebitprim-py_1_1bitprim) | + +# namespace `bitprim-py::bitprim` + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`encode_hash`](#bitprim_8py_1a35a6363ee1ecccef9236b6d100989e75)`(hash)` | Converts a bytearray into a readable format (hex string) +`public def `[`decode_hash`](#bitprim_8py_1a77eedeafd72bf91f59e51341e85154ae)`(hash_str)` | Converts a string into a workable format (byte array) +`class `[`bitprim-py::bitprim::Binary`](#classbitprim-py_1_1bitprim_1_1Binary) | Represents a binary filter. +`class `[`bitprim-py::bitprim::Block`](#classbitprim-py_1_1bitprim_1_1Block) | Represent a full Bitcoin blockchain block. +`class `[`bitprim-py::bitprim::Chain`](#classbitprim-py_1_1bitprim_1_1Chain) | Represents the Bitcoin blockchain. +`class `[`bitprim-py::bitprim::Executor`](#classbitprim-py_1_1bitprim_1_1Executor) | Controls the execution of the Bitprim bitcoin node. +`class `[`bitprim-py::bitprim::Header`](#classbitprim-py_1_1bitprim_1_1Header) | Represents a Bitcoin block's header. +`class `[`bitprim-py::bitprim::History`](#classbitprim-py_1_1bitprim_1_1History) | [Output](#classbitprim-py_1_1bitprim_1_1Output) points, values, and spends for a payment address. +`class `[`bitprim-py::bitprim::Input`](#classbitprim-py_1_1bitprim_1_1Input) | Represents one of the inputs of a [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction). +`class `[`bitprim-py::bitprim::MerkleBlock`](#classbitprim-py_1_1bitprim_1_1MerkleBlock) | Merkle tree representation of a transaction block. +`class `[`bitprim-py::bitprim::Output`](#classbitprim-py_1_1bitprim_1_1Output) | Represents one of the outputs of a [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction). +`class `[`bitprim-py::bitprim::OutputPoint`](#classbitprim-py_1_1bitprim_1_1OutputPoint) | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash and index pair representing one of the transaction outputs. +`class `[`bitprim-py::bitprim::P2p`](#classbitprim-py_1_1bitprim_1_1P2p) | Represents the Bitcoin `P2P` Networking API. +`class `[`bitprim-py::bitprim::PaymentAddress`](#classbitprim-py_1_1bitprim_1_1PaymentAddress) | Represents a Bitcoin wallet address. +`class `[`bitprim-py::bitprim::Point`](#classbitprim-py_1_1bitprim_1_1Point) | Represents one of the tx inputs. +`class `[`bitprim-py::bitprim::Script`](#classbitprim-py_1_1bitprim_1_1Script) | Represents a transaction script. +`class `[`bitprim-py::bitprim::Stealth`](#classbitprim-py_1_1bitprim_1_1Stealth) | [Stealth](#classbitprim-py_1_1bitprim_1_1Stealth) payment related data. +`class `[`bitprim-py::bitprim::StealthCompact`](#classbitprim-py_1_1bitprim_1_1StealthCompact) | Compressed representation of [Stealth](#classbitprim-py_1_1bitprim_1_1Stealth) payment related data. +`class `[`bitprim-py::bitprim::Transaction`](#classbitprim-py_1_1bitprim_1_1Transaction) | Represents a Bitcoin [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction). +`class `[`bitprim-py::bitprim::Wallet`](#classbitprim-py_1_1bitprim_1_1Wallet) | [Wallet](#classbitprim-py_1_1bitprim_1_1Wallet) handling utilities. + +## Members + +#### `public def `[`encode_hash`](#bitprim_8py_1a35a6363ee1ecccef9236b6d100989e75)`(hash)` + +Converts a bytearray into a readable format (hex string) + +#### Parameters +* `hash` (bytearray): Hash bytes + +#### Returns +(str) Hex string Example: "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" + +#### `public def `[`decode_hash`](#bitprim_8py_1a77eedeafd72bf91f59e51341e85154ae)`(hash_str)` + +Converts a string into a workable format (byte array) + +#### Parameters +* `hash_str` (str): hash hex string + +#### Returns +(bytearray): Byte array representing hash. Example "00 00 00 00 00 19 D6 68 ... E2 6F" + +# class `bitprim-py::bitprim::Binary` + +Represents a binary filter. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`construct`](#classbitprim-py_1_1bitprim_1_1Binary_1a9316644228cea96a0c795faef5a38ade)`()` | Create an empty binary object. +`public def `[`construct_string`](#classbitprim-py_1_1bitprim_1_1Binary_1a86c0b3de8e0dc2e5c84d2381ad03e85c)`(string_filter)` | Creates a binary filter from a binary string. +`public def `[`construct_blocks`](#classbitprim-py_1_1bitprim_1_1Binary_1a15b23af6128580697f431b8b1956634c)`(size,`[`blocks`](#classbitprim-py_1_1bitprim_1_1Binary_1a7c015d6228ba34e7474e2886ee6361f8)`)` | Creates a binary filter from an int array. +`public def `[`blocks`](#classbitprim-py_1_1bitprim_1_1Binary_1a7c015d6228ba34e7474e2886ee6361f8)`()` | Filter representation as uint array. +`public def `[`encoded`](#classbitprim-py_1_1bitprim_1_1Binary_1a87b87bdb3f1a568c20db4573655e9a61)`()` | Filter representation as binary string. + +## Members + +#### `public def `[`construct`](#classbitprim-py_1_1bitprim_1_1Binary_1a9316644228cea96a0c795faef5a38ade)`()` + +Create an empty binary object. + +#### Returns +([Binary](#classbitprim-py_1_1bitprim_1_1Binary)) New instance + +#### `public def `[`construct_string`](#classbitprim-py_1_1bitprim_1_1Binary_1a86c0b3de8e0dc2e5c84d2381ad03e85c)`(string_filter)` + +Creates a binary filter from a binary string. + +#### Parameters +* `string_filter` [Binary](#classbitprim-py_1_1bitprim_1_1Binary) string. Example: '10111010101011011111000000001101' + +#### Returns +([Binary](#classbitprim-py_1_1bitprim_1_1Binary)) Instance representing the given filter string + +#### `public def `[`construct_blocks`](#classbitprim-py_1_1bitprim_1_1Binary_1a15b23af6128580697f431b8b1956634c)`(size,`[`blocks`](#classbitprim-py_1_1bitprim_1_1Binary_1a7c015d6228ba34e7474e2886ee6361f8)`)` + +Creates a binary filter from an int array. + +#### Parameters +* `size` (int) Filter length + +* `blocks` (int array) Filter representation. Example: '[186,173,240,13]' + +#### Returns +([Binary](#classbitprim-py_1_1bitprim_1_1Binary)) Instance representing the given filter + +#### `public def `[`blocks`](#classbitprim-py_1_1bitprim_1_1Binary_1a7c015d6228ba34e7474e2886ee6361f8)`()` + +Filter representation as uint array. + +#### Returns +(uint array) + +#### `public def `[`encoded`](#classbitprim-py_1_1bitprim_1_1Binary_1a87b87bdb3f1a568c20db4573655e9a61)`()` + +Filter representation as binary string. + +#### Returns +(str) + +# class `bitprim-py::bitprim::Block` + +Represent a full Bitcoin blockchain block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`()` | The block's height in the chain. +`public def `[`header`](#classbitprim-py_1_1bitprim_1_1Block_1a66ff4a0260d856f0ba0501d83a37996e)`()` | The block's header. +`public def `[`transaction_count`](#classbitprim-py_1_1bitprim_1_1Block_1a7f586edd8ff2af4414d1f457466142ba)`()` | The total amount of transactions that the block contains. +`public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Block_1a1b7c56cf57daa5abdba702996e088354)`()` | The block's hash as a 32 byte array. +`public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Block_1a0bb0ed4f08d877755b5f63ffb5a1c83e)`()` | [Block](#classbitprim-py_1_1bitprim_1_1Block) size in bytes. +`public def `[`fees`](#classbitprim-py_1_1bitprim_1_1Block_1a16259124f105d8f0713620748a7e0283)`()` | Miner fees included in the block's coinbase transaction. +`public def `[`claim`](#classbitprim-py_1_1bitprim_1_1Block_1af6123eaeb15dc6173aedb5249c76222a)`()` | Sum of coinbase outputs. +`public def `[`reward`](#classbitprim-py_1_1bitprim_1_1Block_1a2355ee175a47be556e227bc560ad91d9)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`)` | Reward = Subsidy + Fees, for the block at the given height. +`public def `[`generate_merkle_root`](#classbitprim-py_1_1bitprim_1_1Block_1a9a2c4d24510492541117635a46bda8e4)`()` | The block's Merkle root, as a 32 byte array. +`public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Block_1a32a1d3fce927c0368a9a17ee92f9e559)`()` | Return 1 if and only if the block has transactions and a valid header, 0 otherwise. +`public def `[`transaction_nth`](#classbitprim-py_1_1bitprim_1_1Block_1a83506a11e3c73dc177ae7641295e9b71)`(n)` | Given a position in the block, returns the corresponding transaction. +`public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Block_1a442b31f9cdd99017c4fe69d9fcc1708f)`()` | Amount of signature operations in the block. +`public def `[`signature_operations_bip16_active`](#classbitprim-py_1_1bitprim_1_1Block_1aa758b654d597a804582bd848088cdf5e)`(bip16_active)` | Amount of signature operations in the block. +`public def `[`total_inputs`](#classbitprim-py_1_1bitprim_1_1Block_1ae274945c0c5a93e97f0520ce6ab19ede)`(with_coinbase)` | Total amount of inputs in the block (consider all transactions). +`public def `[`is_extra_coinbases`](#classbitprim-py_1_1bitprim_1_1Block_1a0292edcc495d96184612853b4d4f85ac)`()` | Tell whether there is more than one coinbase transaction in the block. +`public def `[`is_final`](#classbitprim-py_1_1bitprim_1_1Block_1a00fe0c357648fe5ab621dce05838e406)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`,block_time)` | Tell whether every transaction in the block is final or not. +`public def `[`is_distinct_transaction_set`](#classbitprim-py_1_1bitprim_1_1Block_1a1f4c4eca104136073014ed084f49f2eb)`()` | Tell whether all transactions in the block have a unique hash (i.e. +`public def `[`is_valid_coinbase_claim`](#classbitprim-py_1_1bitprim_1_1Block_1aa986d71754a4cf477d61ae34d6f37ca8)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`)` | Given a block height, tell if its coinbase claim is not higher than the deserved reward. +`public def `[`is_valid_coinbase_script`](#classbitprim-py_1_1bitprim_1_1Block_1a5801ed77d131384d4f2e917e07f13c27)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`)` | Returns 1 if and only if the coinbase script is valid. +`public def `[`is_valid_merkle_root`](#classbitprim-py_1_1bitprim_1_1Block_1a8b699ddd4ea235009db7197542f64e76)`()` | Tell if the generated Merkle root equals the header's Merkle root. + +## Members + +#### `public def `[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`()` + +The block's height in the chain. + +It identifies it univocally +#### Returns +(int) + +#### `public def `[`header`](#classbitprim-py_1_1bitprim_1_1Block_1a66ff4a0260d856f0ba0501d83a37996e)`()` + +The block's header. + +#### Returns +([Header](#classbitprim-py_1_1bitprim_1_1Header)) + +#### `public def `[`transaction_count`](#classbitprim-py_1_1bitprim_1_1Block_1a7f586edd8ff2af4414d1f457466142ba)`()` + +The total amount of transactions that the block contains. + +#### Returns +(unsigned int) + +#### `public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Block_1a1b7c56cf57daa5abdba702996e088354)`()` + +The block's hash as a 32 byte array. + +#### Returns +(bytearray) + +#### `public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Block_1a0bb0ed4f08d877755b5f63ffb5a1c83e)`()` + +[Block](#classbitprim-py_1_1bitprim_1_1Block) size in bytes. + +#### Returns +(int) + +#### `public def `[`fees`](#classbitprim-py_1_1bitprim_1_1Block_1a16259124f105d8f0713620748a7e0283)`()` + +Miner fees included in the block's coinbase transaction. + +#### Returns +(unsigned int) + +#### `public def `[`claim`](#classbitprim-py_1_1bitprim_1_1Block_1af6123eaeb15dc6173aedb5249c76222a)`()` + +Sum of coinbase outputs. + +#### Returns +(unsigned int) + +#### `public def `[`reward`](#classbitprim-py_1_1bitprim_1_1Block_1a2355ee175a47be556e227bc560ad91d9)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`)` + +Reward = Subsidy + Fees, for the block at the given height. + +#### Parameters +* `height` (unsigned int) [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. Identifies it univocally + +#### Returns +(unsigned int) + +#### `public def `[`generate_merkle_root`](#classbitprim-py_1_1bitprim_1_1Block_1a9a2c4d24510492541117635a46bda8e4)`()` + +The block's Merkle root, as a 32 byte array. + +#### Returns +(byte array) + +#### `public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Block_1a32a1d3fce927c0368a9a17ee92f9e559)`()` + +Return 1 if and only if the block has transactions and a valid header, 0 otherwise. + +#### Returns +(int) TODO Why not a bool? + +#### `public def `[`transaction_nth`](#classbitprim-py_1_1bitprim_1_1Block_1a83506a11e3c73dc177ae7641295e9b71)`(n)` + +Given a position in the block, returns the corresponding transaction. + +#### Parameters +* `n` (unsigned int): [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) index inside the block (starting at zero) + +#### Returns +([Transaction](#classbitprim-py_1_1bitprim_1_1Transaction)) + +#### `public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Block_1a442b31f9cdd99017c4fe69d9fcc1708f)`()` + +Amount of signature operations in the block. + +Returns max_int in case of overflow. +#### Returns +(unsigned int) + +#### `public def `[`signature_operations_bip16_active`](#classbitprim-py_1_1bitprim_1_1Block_1aa758b654d597a804582bd848088cdf5e)`(bip16_active)` + +Amount of signature operations in the block. + +Returns max_int in case of overflow. +#### Parameters +* `bip16_active` (int): should be '1' if and only if bip16 is activated at this point. + +#### `public def `[`total_inputs`](#classbitprim-py_1_1bitprim_1_1Block_1ae274945c0c5a93e97f0520ce6ab19ede)`(with_coinbase)` + +Total amount of inputs in the block (consider all transactions). + +#### Parameters +* `with_coinbase` (int): should be '1' if and only if the block contains a coinbase transaction, '0' otherwise. + +#### Returns +(unsigned int) + +#### `public def `[`is_extra_coinbases`](#classbitprim-py_1_1bitprim_1_1Block_1a0292edcc495d96184612853b4d4f85ac)`()` + +Tell whether there is more than one coinbase transaction in the block. + +#### Returns +(int) 1 if and only if there is another coinbase other than the first transaction, 0 otherwise. + +#### `public def `[`is_final`](#classbitprim-py_1_1bitprim_1_1Block_1a00fe0c357648fe5ab621dce05838e406)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`,block_time)` + +Tell whether every transaction in the block is final or not. + +#### Parameters +* `height` (unsigned int): [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. Identifies it univocally. + +#### Returns +(int) 1 if every transaction in the block is final, 0 otherwise. + +#### `public def `[`is_distinct_transaction_set`](#classbitprim-py_1_1bitprim_1_1Block_1a1f4c4eca104136073014ed084f49f2eb)`()` + +Tell whether all transactions in the block have a unique hash (i.e. + +no duplicates) +#### Returns +(int): 1 if there are no two transactions with the same hash in the block, 0 otherwise + +#### `public def `[`is_valid_coinbase_claim`](#classbitprim-py_1_1bitprim_1_1Block_1aa986d71754a4cf477d61ae34d6f37ca8)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`)` + +Given a block height, tell if its coinbase claim is not higher than the deserved reward. + +#### Parameters +* `height` (unsigned int): [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. Identifies it univocally. + +#### Returns +(int) 1 if coinbase claim is not higher than the deserved reward. + +#### `public def `[`is_valid_coinbase_script`](#classbitprim-py_1_1bitprim_1_1Block_1a5801ed77d131384d4f2e917e07f13c27)`(`[`height`](#classbitprim-py_1_1bitprim_1_1Block_1adbee2f505eaed0757aa06581476061bf)`)` + +Returns 1 if and only if the coinbase script is valid. + +#### Returns +(int) + +#### `public def `[`is_valid_merkle_root`](#classbitprim-py_1_1bitprim_1_1Block_1a8b699ddd4ea235009db7197542f64e76)`()` + +Tell if the generated Merkle root equals the header's Merkle root. + +#### Returns +(int) 1 if and only if the generated Merkle root is equal to the [Header](#classbitprim-py_1_1bitprim_1_1Header)'s Merkle root + +# class `bitprim-py::bitprim::Chain` + +Represents the Bitcoin blockchain. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public `[`history_fetch_handler_`](#classbitprim-py_1_1bitprim_1_1Chain_1affd953b04003452fafe5a3a559409ca2) | Internal callback which is called by the native fetch_history function and marshalls parameters to the managed callback. +`public `[`fetch_block_header_handler_`](#classbitprim-py_1_1bitprim_1_1Chain_1a89897722d7aed04f04ae393852c16204) | Internal callback which is called by the native fetch_block_header function and marshalls parameters to the managed callback. +`public def `[`fetch_last_height`](#classbitprim-py_1_1bitprim_1_1Chain_1ac61495c0b64988230423073f3b03ff07)`(handler)` | Gets the height of the highest block in the local copy of the blockchain. +`public def `[`fetch_history`](#classbitprim-py_1_1bitprim_1_1Chain_1a965cf6db03e48540bb14d3b3edaa8bcc)`(address,limit,from_height,handler)` | Get a list of output points, values, and spends for a given payment address. +`public def `[`fetch_stealth`](#classbitprim-py_1_1bitprim_1_1Chain_1af176a2ccfcfb1f50830367a19c35a794)`(binary_filter_str,from_height,handler)` | Get metadata on potential payment transactions by stealth filter. +`public def `[`fetch_block_height`](#classbitprim-py_1_1bitprim_1_1Chain_1afdf1cef6c699bdfbf2e9d84e4301ac31)`(hash,handler)` | Given a block hash, it queries the chain for the block height. +`public def `[`fetch_block_header_by_height`](#classbitprim-py_1_1bitprim_1_1Chain_1aaebc8d01e70714a76baf7f18254d17a1)`(height,handler)` | Get the block header from the specified height in the chain. +`public def `[`fetch_block_header_by_hash`](#classbitprim-py_1_1bitprim_1_1Chain_1a906414b6f4be27e8f4cdea304e693c60)`(hash,handler)` | Get the block header from the specified block hash. +`public def `[`fetch_block_by_height`](#classbitprim-py_1_1bitprim_1_1Chain_1a0194a90c0647ecf28f5561fec03795fe)`(height,handler)` | Gets a block from the specified height in the chain. +`public def `[`fetch_block_by_hash`](#classbitprim-py_1_1bitprim_1_1Chain_1ada2a30b95551270e866128b9faf78e91)`(hash,handler)` | Gets a block from the specified hash. +`public def `[`fetch_merkle_block_by_height`](#classbitprim-py_1_1bitprim_1_1Chain_1a8736e68dd88164e25c20a342f71d51fb)`(height,handler)` | Given a block height in the chain, it retrieves the block's associated Merkle block. +`public def `[`fetch_merkle_block_by_hash`](#classbitprim-py_1_1bitprim_1_1Chain_1a34fe828b455288f6b0e4394309827823)`(hash,handler)` | Given a block hash, it retrieves the block's associated Merkle block. +`public def `[`fetch_transaction`](#classbitprim-py_1_1bitprim_1_1Chain_1aa3a1843a9773e0356f583279842e0937)`(hashn,require_confirmed,handler)` | Get a transaction by its hash. +`public def `[`fetch_transaction_position`](#classbitprim-py_1_1bitprim_1_1Chain_1a3ccaf20e10f6c95349c58a548213e12d)`(hashn,require_confirmed,handler)` | Given a transaction hash, it fetches the height and position inside the block. +`public def `[`validate_tx`](#classbitprim-py_1_1bitprim_1_1Chain_1a34527842538c37c393577c62ad0827a5)`(transaction,handler)` | Determine if a transaction is valid for submission to the blockchain. +`public def `[`fetch_spend`](#classbitprim-py_1_1bitprim_1_1Chain_1a03e03c44ed6ff0049d091b2cf9e1b10d)`(output_point,handler)` | Fetch the transaction input which spends the indicated output. +`public def `[`subscribe_blockchain`](#classbitprim-py_1_1bitprim_1_1Chain_1a5f64a4f2a1e978265468fff03f6a8979)`(handler)` | +`public def `[`unsubscribe`](#classbitprim-py_1_1bitprim_1_1Chain_1a89c0f67530a7e6c420b72d0d93cc9ba0)`()` | + +## Members + +#### `public `[`history_fetch_handler_`](#classbitprim-py_1_1bitprim_1_1Chain_1affd953b04003452fafe5a3a559409ca2) + +Internal callback which is called by the native fetch_history function and marshalls parameters to the managed callback. + +#### `public `[`fetch_block_header_handler_`](#classbitprim-py_1_1bitprim_1_1Chain_1a89897722d7aed04f04ae393852c16204) + +Internal callback which is called by the native fetch_block_header function and marshalls parameters to the managed callback. + +#### `public def `[`fetch_last_height`](#classbitprim-py_1_1bitprim_1_1Chain_1ac61495c0b64988230423073f3b03ff07)`(handler)` + +Gets the height of the highest block in the local copy of the blockchain. + +This number will grow as the node synchronizes with the blockchain. This is an asynchronous method; a callback must be provided to receive the result + +Args: handler (Callable (error, block_height)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if and only if successful. + +* block_height (unsigned int): Height of the highest block in the chain. + +#### `public def `[`fetch_history`](#classbitprim-py_1_1bitprim_1_1Chain_1a965cf6db03e48540bb14d3b3edaa8bcc)`(address,limit,from_height,handler)` + +Get a list of output points, values, and spends for a given payment address. + +This is an asynchronous method; a callback must be provided to receive the result + +Args: address ([PaymentAddress](#classbitprim-py_1_1bitprim_1_1PaymentAddress)): [Wallet](#classbitprim-py_1_1bitprim_1_1Wallet) to search. limit (unsigned int): Max amount of results to fetch. from_height (unsigned int): Starting height to search for transactions. handler (Callable (error, list)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if and only if successful. + +* list (HistoryList): A list with every element found. + +#### `public def `[`fetch_stealth`](#classbitprim-py_1_1bitprim_1_1Chain_1af176a2ccfcfb1f50830367a19c35a794)`(binary_filter_str,from_height,handler)` + +Get metadata on potential payment transactions by stealth filter. + +Given a filter and a height in the chain, it queries the chain for transactions matching the given filter. Args: binary_filter_str (string): Must be at least 8 bits in length. example "10101010" from_height (unsigned int): Starting height in the chain to search for transactions. handler (Callable (error, list)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if and only if successful. + +* list (StealthList): list with every transaction matching the given filter. + +#### `public def `[`fetch_block_height`](#classbitprim-py_1_1bitprim_1_1Chain_1afdf1cef6c699bdfbf2e9d84e4301ac31)`(hash,handler)` + +Given a block hash, it queries the chain for the block height. + +Args: hash (bytearray): 32 bytes of the block hash. handler (Callable (error, block_height)): Will be executed after the chain is cued. + +* error (int): Error code. 0 if and only if successful. + +* block_height (unsigned int): height of the block in the chain. + +#### `public def `[`fetch_block_header_by_height`](#classbitprim-py_1_1bitprim_1_1Chain_1aaebc8d01e70714a76baf7f18254d17a1)`(height,handler)` + +Get the block header from the specified height in the chain. + +Args: height (unsigned int): [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. handler (Callable (error, block_header)): Will be executed after the chain is queried. + +* error (int): Error code. 0 if successful. + +* block_header ([Header](#classbitprim-py_1_1bitprim_1_1Header)): The found block's header. + +#### `public def `[`fetch_block_header_by_hash`](#classbitprim-py_1_1bitprim_1_1Chain_1a906414b6f4be27e8f4cdea304e693c60)`(hash,handler)` + +Get the block header from the specified block hash. + +Args: hash (bytearray): 32 bytes of the block hash. handler (Callable (error, block_header)): Will be executed after the chain is queried. + +* error (int): Error code. 0 if successful. + +* block_header ([Header](#classbitprim-py_1_1bitprim_1_1Header)): The found block's header. + +#### `public def `[`fetch_block_by_height`](#classbitprim-py_1_1bitprim_1_1Chain_1a0194a90c0647ecf28f5561fec03795fe)`(height,handler)` + +Gets a block from the specified height in the chain. + +Args: height (unsigned int): [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. handler (Callable (error, block)): Will be executed after the chain is queried. + +* error (int): Error code. 0 if successful. + +* block ([Block](#classbitprim-py_1_1bitprim_1_1Block)): [Block](#classbitprim-py_1_1bitprim_1_1Block) at the given height in the chain. + +#### `public def `[`fetch_block_by_hash`](#classbitprim-py_1_1bitprim_1_1Chain_1ada2a30b95551270e866128b9faf78e91)`(hash,handler)` + +Gets a block from the specified hash. + +Args: hash (bytearray): 32 bytes of the block hash. handler (Callable (error, block)): Will be executed after the chain is queried. + +* error (int): Error code. 0 if successful. + +* block ([Block](#classbitprim-py_1_1bitprim_1_1Block)): [Block](#classbitprim-py_1_1bitprim_1_1Block) found with the specified hash. + +#### `public def `[`fetch_merkle_block_by_height`](#classbitprim-py_1_1bitprim_1_1Chain_1a8736e68dd88164e25c20a342f71d51fb)`(height,handler)` + +Given a block height in the chain, it retrieves the block's associated Merkle block. + +Args: height (unsigned int): [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. handler (Callable (error, merkle_block, block_height)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if successful. + +* merkle_block ([MerkleBlock](#classbitprim-py_1_1bitprim_1_1MerkleBlock)): The requested block's Merkle block. + +* block_height (unsigned int): The block's height in the chain. + +#### `public def `[`fetch_merkle_block_by_hash`](#classbitprim-py_1_1bitprim_1_1Chain_1a34fe828b455288f6b0e4394309827823)`(hash,handler)` + +Given a block hash, it retrieves the block's associated Merkle block. + +Args: hash (bytearray): 32 bytes of the block hash. handler (Callable (error, merkle_block, block_height)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if successful. + +* merkle_block ([MerkleBlock](#classbitprim-py_1_1bitprim_1_1MerkleBlock)): The requested block's Merkle block. + +* block_height (unsigned int): The block's height in the chain. + +#### `public def `[`fetch_transaction`](#classbitprim-py_1_1bitprim_1_1Chain_1aa3a1843a9773e0356f583279842e0937)`(hashn,require_confirmed,handler)` + +Get a transaction by its hash. + +Args: hashn (bytearray): 32 bytes of the transaction hash. require_confirmed (int): If transaction should be in a block. 0 if not. handler (Callable (error, transaction, block_height, tx_index)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if successful. + +* transaction ([Transaction](#classbitprim-py_1_1bitprim_1_1Transaction)): [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) found. + +* block_height (unsigned int): height in the chain of the block containing the transaction. + +* tx_index (unsigned int): index of the transaction inside the block (starting at zero). + +#### `public def `[`fetch_transaction_position`](#classbitprim-py_1_1bitprim_1_1Chain_1a3ccaf20e10f6c95349c58a548213e12d)`(hashn,require_confirmed,handler)` + +Given a transaction hash, it fetches the height and position inside the block. + +Args: hash (bytearray): 32 bytes of the transaction hash. require_confirmed (int): 1 if and only if transaction should be in a block, 0 otherwise. handler (Callable (error, block_height, tx_index)): Will be executed after the chain is queried. + +* error (int): Error code. 0 if successful. + +* block_height (unsigned int): Height of the block containing the transaction. + +* tx_index (unsigned int): [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) index inside the block (starting at zero). + +#### `public def `[`validate_tx`](#classbitprim-py_1_1bitprim_1_1Chain_1a34527842538c37c393577c62ad0827a5)`(transaction,handler)` + +Determine if a transaction is valid for submission to the blockchain. + +Args: transaction ([Transaction](#classbitprim-py_1_1bitprim_1_1Transaction)): transaction to be checked. handler (Callable (error, message)): Will be executed after the chain is queried. + +* error (int): error code. 0 if successful. + +* message (str): string describing the result of the query. Example: 'The transaction is valid' + +#### `public def `[`fetch_spend`](#classbitprim-py_1_1bitprim_1_1Chain_1a03e03c44ed6ff0049d091b2cf9e1b10d)`(output_point,handler)` + +Fetch the transaction input which spends the indicated output. + +The `fetch_spend_handler` callback will be executed after querying the chain. Args: output_point ([OutputPoint](#classbitprim-py_1_1bitprim_1_1OutputPoint)): tx hash and index pair. handler (Callable (error, input_point)): Will be executed when the chain is queried. + +* error (int): Error code. 0 if successful. + +* input_point ([Point](#classbitprim-py_1_1bitprim_1_1Point)): Tx hash and index pair where the output was spent. + +#### `public def `[`subscribe_blockchain`](#classbitprim-py_1_1bitprim_1_1Chain_1a5f64a4f2a1e978265468fff03f6a8979)`(handler)` + +#### `public def `[`unsubscribe`](#classbitprim-py_1_1bitprim_1_1Chain_1a89c0f67530a7e6c420b72d0d93cc9ba0)`()` + +# class `bitprim-py::bitprim::Executor` + +Controls the execution of the Bitprim bitcoin node. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`__init__`](#classbitprim-py_1_1bitprim_1_1Executor_1a72c2f23cb1edf83547118813f6e93eae)`(path,sout,serr)` | Node executor constructor. +`public def `[`init_chain`](#classbitprim-py_1_1bitprim_1_1Executor_1a7c32502c052194f5135ac02896935f57)`()` | Initializes blockchain local copy. +`public def `[`run`](#classbitprim-py_1_1bitprim_1_1Executor_1ae5e0072a42604d141baf924fc4c58e6c)`()` | Starts running the node; blockchain starts synchronizing (downloading). +`public def `[`run_wait`](#classbitprim-py_1_1bitprim_1_1Executor_1a8113286b620ec22753af007ddeae073b)`()` | Starts running the node; blockchain start synchronizing (downloading). +`public def `[`stop`](#classbitprim-py_1_1bitprim_1_1Executor_1a4f60688eaed3452c1f8b54d1ed925a55)`()` | Stops the node; that includes all activies, such as synchronization and networking precondition: self._running. +`public def `[`stopped`](#classbitprim-py_1_1bitprim_1_1Executor_1aa0cb066e377ffd93c907eaf90be34382)`()` | To know if the node is stopped. +`public def `[`chain`](#classbitprim-py_1_1bitprim_1_1Executor_1ae5d4f74596113f6aa1b63034240885f1)`()` | Return the chain object representation. +`public def `[`p2p`](#classbitprim-py_1_1bitprim_1_1Executor_1aba4d20326e54e244c389f5f0149d65c3)`()` | Return the p2p object representation. +`public def `[`__enter__`](#classbitprim-py_1_1bitprim_1_1Executor_1aef4dd157e70a41c03b6ec61d1a5c3dd4)`()` | Implements acquisition part of the RAII idiom (acquires the executor object) +`public def `[`__exit__`](#classbitprim-py_1_1bitprim_1_1Executor_1a987258e17974de21c21553aed017456b)`(exc_type,exc_value,traceback)` | Implements the release part of the RAII idiom (releases the executor object) + +## Members + +#### `public def `[`__init__`](#classbitprim-py_1_1bitprim_1_1Executor_1a72c2f23cb1edf83547118813f6e93eae)`(path,sout,serr)` + +Node executor constructor. + +#### Parameters +* `path` (string): Absolute path to node configuration file. + +* `sout` (file handle): File handle for redirecting standard output. If None, output goes to the a log file in the current directory. + +* `serr` (file handle): File handle for redirecting standard error output. If None, output goes to log file in the current directory. + +#### `public def `[`init_chain`](#classbitprim-py_1_1bitprim_1_1Executor_1a7c32502c052194f5135ac02896935f57)`()` + +Initializes blockchain local copy. + +#### Returns +(bool) true if and only if successful. + +#### `public def `[`run`](#classbitprim-py_1_1bitprim_1_1Executor_1ae5e0072a42604d141baf924fc4c58e6c)`()` + +Starts running the node; blockchain starts synchronizing (downloading). + +Returns right away (doesn't wait for init process to end) +#### Returns +(bool) true if and only if successful. + +#### `public def `[`run_wait`](#classbitprim-py_1_1bitprim_1_1Executor_1a8113286b620ec22753af007ddeae073b)`()` + +Starts running the node; blockchain start synchronizing (downloading). + +Call blocks until init process is completed or fails. +#### Returns +(bool) true if and only if successful. + +#### `public def `[`stop`](#classbitprim-py_1_1bitprim_1_1Executor_1a4f60688eaed3452c1f8b54d1ed925a55)`()` + +Stops the node; that includes all activies, such as synchronization and networking precondition: self._running. + +#### Returns +(bool) true if and only if successful + +#### `public def `[`stopped`](#classbitprim-py_1_1bitprim_1_1Executor_1aa0cb066e377ffd93c907eaf90be34382)`()` + +To know if the node is stopped. + +#### Returns +(bool) true if the node is stopped + +#### `public def `[`chain`](#classbitprim-py_1_1bitprim_1_1Executor_1ae5d4f74596113f6aa1b63034240885f1)`()` + +Return the chain object representation. + +#### Returns +([Chain](#classbitprim-py_1_1bitprim_1_1Chain)) + +#### `public def `[`p2p`](#classbitprim-py_1_1bitprim_1_1Executor_1aba4d20326e54e244c389f5f0149d65c3)`()` + +Return the p2p object representation. + +#### Returns +([P2p](#classbitprim-py_1_1bitprim_1_1P2p)) + +#### `public def `[`__enter__`](#classbitprim-py_1_1bitprim_1_1Executor_1aef4dd157e70a41c03b6ec61d1a5c3dd4)`()` + +Implements acquisition part of the RAII idiom (acquires the executor object) + +#### Returns +([Executor](#classbitprim-py_1_1bitprim_1_1Executor)) a newly acquired instance ready to use + +#### `public def `[`__exit__`](#classbitprim-py_1_1bitprim_1_1Executor_1a987258e17974de21c21553aed017456b)`(exc_type,exc_value,traceback)` + +Implements the release part of the RAII idiom (releases the executor object) + +#### Parameters +* `exc_type` Ignored + +* `exc_value` Ignored + +* `traceback` Ignored + +# class `bitprim-py::bitprim::Header` + +Represents a Bitcoin block's header. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`height`](#classbitprim-py_1_1bitprim_1_1Header_1ad3fe6079bf8dd360481a8f4a1a83a48e)`()` | [Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. +`public def `[`version`](#classbitprim-py_1_1bitprim_1_1Header_1adef8d2dd843f47fb7d360095a50eb924)`()` | [Header](#classbitprim-py_1_1bitprim_1_1Header) protocol version. +`public def `[`set_version`](#classbitprim-py_1_1bitprim_1_1Header_1a82f67cf031b79cb2f1db5683a1776f24)`(`[`version`](#classbitprim-py_1_1bitprim_1_1Header_1adef8d2dd843f47fb7d360095a50eb924)`)` | Set version. +`public def `[`previous_block_hash`](#classbitprim-py_1_1bitprim_1_1Header_1ad83d031d2a01ce270f83ada967cc80fb)`()` | 32 bytes hash of the previous block in the chain. +`public def `[`merkle`](#classbitprim-py_1_1bitprim_1_1Header_1acc826caa5c5668f4e4343c291c8e22bb)`()` | Merkle root in 32 byte array format. +`public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Header_1ad22ece8e1effb91727cd387be35b84c3)`()` | [Block](#classbitprim-py_1_1bitprim_1_1Block) hash in 32 byte array format. +`public def `[`timestamp`](#classbitprim-py_1_1bitprim_1_1Header_1a6c1e6f3893a2baf66cf195cbcf3b088d)`()` | [Block](#classbitprim-py_1_1bitprim_1_1Block) timestamp in UNIX Epoch (seconds since January 1st 1970) Assume UTC 0. +`public def `[`set_timestamp`](#classbitprim-py_1_1bitprim_1_1Header_1a9fa47d19f94503612e0188184b49c451)`(`[`timestamp`](#classbitprim-py_1_1bitprim_1_1Header_1a6c1e6f3893a2baf66cf195cbcf3b088d)`)` | Set header timestamp. +`public def `[`bits`](#classbitprim-py_1_1bitprim_1_1Header_1aaec0b170366dd10bec3732d43a41f8fa)`()` | Difficulty threshold. +`public def `[`set_bits`](#classbitprim-py_1_1bitprim_1_1Header_1a7f373da41c2c472e1eaba4cfe06cbf7c)`(`[`bits`](#classbitprim-py_1_1bitprim_1_1Header_1aaec0b170366dd10bec3732d43a41f8fa)`)` | Set header bits. +`public def `[`nonce`](#classbitprim-py_1_1bitprim_1_1Header_1ad18f1cc735e0e1b18cc4e5638f74363d)`()` | The nonce that allowed this block to be added to the blockchain. +`public def `[`set_nonce`](#classbitprim-py_1_1bitprim_1_1Header_1a50e3efb83494717264730251b752f789)`(`[`nonce`](#classbitprim-py_1_1bitprim_1_1Header_1ad18f1cc735e0e1b18cc4e5638f74363d)`)` | Set header nonce. + +## Members + +#### `public def `[`height`](#classbitprim-py_1_1bitprim_1_1Header_1ad3fe6079bf8dd360481a8f4a1a83a48e)`()` + +[Block](#classbitprim-py_1_1bitprim_1_1Block) height in the chain. + +#### Returns +(unsigned int) + +#### `public def `[`version`](#classbitprim-py_1_1bitprim_1_1Header_1adef8d2dd843f47fb7d360095a50eb924)`()` + +[Header](#classbitprim-py_1_1bitprim_1_1Header) protocol version. + +#### Returns +(unsigned int) + +#### `public def `[`set_version`](#classbitprim-py_1_1bitprim_1_1Header_1a82f67cf031b79cb2f1db5683a1776f24)`(`[`version`](#classbitprim-py_1_1bitprim_1_1Header_1adef8d2dd843f47fb7d360095a50eb924)`)` + +Set version. + +#### Parameters +* `version` New version value + +#### `public def `[`previous_block_hash`](#classbitprim-py_1_1bitprim_1_1Header_1ad83d031d2a01ce270f83ada967cc80fb)`()` + +32 bytes hash of the previous block in the chain. + +#### Returns +(bytearray) + +#### `public def `[`merkle`](#classbitprim-py_1_1bitprim_1_1Header_1acc826caa5c5668f4e4343c291c8e22bb)`()` + +Merkle root in 32 byte array format. + +#### Returns +(bytearray) + +#### `public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Header_1ad22ece8e1effb91727cd387be35b84c3)`()` + +[Block](#classbitprim-py_1_1bitprim_1_1Block) hash in 32 byte array format. + +#### Returns +(bytearray + +#### `public def `[`timestamp`](#classbitprim-py_1_1bitprim_1_1Header_1a6c1e6f3893a2baf66cf195cbcf3b088d)`()` + +[Block](#classbitprim-py_1_1bitprim_1_1Block) timestamp in UNIX Epoch (seconds since January 1st 1970) Assume UTC 0. + +#### Returns +(unsigned int) + +#### `public def `[`set_timestamp`](#classbitprim-py_1_1bitprim_1_1Header_1a9fa47d19f94503612e0188184b49c451)`(`[`timestamp`](#classbitprim-py_1_1bitprim_1_1Header_1a6c1e6f3893a2baf66cf195cbcf3b088d)`)` + +Set header timestamp. + +#### Parameters +* `timestamp` New header timestamp value + +#### `public def `[`bits`](#classbitprim-py_1_1bitprim_1_1Header_1aaec0b170366dd10bec3732d43a41f8fa)`()` + +Difficulty threshold. + +#### Returns +(unsigned int) + +#### `public def `[`set_bits`](#classbitprim-py_1_1bitprim_1_1Header_1a7f373da41c2c472e1eaba4cfe06cbf7c)`(`[`bits`](#classbitprim-py_1_1bitprim_1_1Header_1aaec0b170366dd10bec3732d43a41f8fa)`)` + +Set header bits. + +#### Parameters +* `bits` New header bits value + +#### `public def `[`nonce`](#classbitprim-py_1_1bitprim_1_1Header_1ad18f1cc735e0e1b18cc4e5638f74363d)`()` + +The nonce that allowed this block to be added to the blockchain. + +#### Returns +(unsigned int) + +#### `public def `[`set_nonce`](#classbitprim-py_1_1bitprim_1_1Header_1a50e3efb83494717264730251b752f789)`(`[`nonce`](#classbitprim-py_1_1bitprim_1_1Header_1ad18f1cc735e0e1b18cc4e5638f74363d)`)` + +Set header nonce. + +#### Parameters +* `nonce` New header nonce value + +# class `bitprim-py::bitprim::History` + +[Output](#classbitprim-py_1_1bitprim_1_1Output) points, values, and spends for a payment address. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`point_kind`](#classbitprim-py_1_1bitprim_1_1History_1ad238b84935d85af45317a4c40b407044)`()` | Used for differentiation. +`public def `[`point`](#classbitprim-py_1_1bitprim_1_1History_1a1641137742fea1930eb579efa771a39b)`()` | The point that identifies the [History](#classbitprim-py_1_1bitprim_1_1History) instance. +`public def `[`height`](#classbitprim-py_1_1bitprim_1_1History_1ad4c4d4d355c109413520392b9da29f9e)`()` | Height of the block containing the [Point](#classbitprim-py_1_1bitprim_1_1Point). +`public def `[`value_or_previous_checksum`](#classbitprim-py_1_1bitprim_1_1History_1aa524f25be3735504843a427030bf3663)`()` | Varies depending of point_kind. + +## Members + +#### `public def `[`point_kind`](#classbitprim-py_1_1bitprim_1_1History_1ad238b84935d85af45317a4c40b407044)`()` + +Used for differentiation. + +'0' output '1' spend +#### Returns +(unsigned int) + +#### `public def `[`point`](#classbitprim-py_1_1bitprim_1_1History_1a1641137742fea1930eb579efa771a39b)`()` + +The point that identifies the [History](#classbitprim-py_1_1bitprim_1_1History) instance. + +#### Returns +([Point](#classbitprim-py_1_1bitprim_1_1Point)) + +#### `public def `[`height`](#classbitprim-py_1_1bitprim_1_1History_1ad4c4d4d355c109413520392b9da29f9e)`()` + +Height of the block containing the [Point](#classbitprim-py_1_1bitprim_1_1Point). + +#### Returns +(unsigned int) + +#### `public def `[`value_or_previous_checksum`](#classbitprim-py_1_1bitprim_1_1History_1aa524f25be3735504843a427030bf3663)`()` + +Varies depending of point_kind. + +value: if output, then satoshi value of output. previous_checksum: if spend, then checksum hash of previous output_point. +#### Returns +(unsigned int) + +# class `bitprim-py::bitprim::Input` + +Represents one of the inputs of a [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction). + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Input_1ad31d4fd3352cdb164bc8cd7f597b2245)`()` | Returns 0 if and only if previous outputs or script are invalid. +`public def `[`is_final`](#classbitprim-py_1_1bitprim_1_1Input_1a358c573c56fbf98c8026a0e6377e7203)`()` | Returns 1 if and only if sequence is equal to max_sequence. +`public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Input_1a4ae1e6fd2bc06dee3c8892d375831687)`()` | Size in bytes. +`public def `[`sequence`](#classbitprim-py_1_1bitprim_1_1Input_1a0dcf9a7c5e43e648a9ac2524cc641ea6)`()` | Sequence number of inputs. +`public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Input_1add34303f9c31390fc6bfca9c37c4813e)`(bip16_active)` | Total amount of sigops in the script. +`public def `[`script`](#classbitprim-py_1_1bitprim_1_1Input_1a3791f42e9d7bae367d1a24ab739edc0d)`()` | The input's script. +`public def `[`previous_output`](#classbitprim-py_1_1bitprim_1_1Input_1acbc3904f5c0a3c38a087d533e906ed66)`()` | Returns the previous output, with its transaction hash and index. + +## Members + +#### `public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Input_1ad31d4fd3352cdb164bc8cd7f597b2245)`()` + +Returns 0 if and only if previous outputs or script are invalid. + +#### Returns +(int) + +#### `public def `[`is_final`](#classbitprim-py_1_1bitprim_1_1Input_1a358c573c56fbf98c8026a0e6377e7203)`()` + +Returns 1 if and only if sequence is equal to max_sequence. + +#### Returns +int + +#### `public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Input_1a4ae1e6fd2bc06dee3c8892d375831687)`()` + +Size in bytes. + +#### Returns +(unsigned int) + +#### `public def `[`sequence`](#classbitprim-py_1_1bitprim_1_1Input_1a0dcf9a7c5e43e648a9ac2524cc641ea6)`()` + +Sequence number of inputs. + +If it equals max_sequence, txs is final +#### Returns +(unsigned int) + +#### `public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Input_1add34303f9c31390fc6bfca9c37c4813e)`(bip16_active)` + +Total amount of sigops in the script. + +#### Parameters +* `bip16_active` (int): 1 if and only if bip 16 is active. 0 if not. + +#### Returns +(unsigned int) + +#### `public def `[`script`](#classbitprim-py_1_1bitprim_1_1Input_1a3791f42e9d7bae367d1a24ab739edc0d)`()` + +The input's script. + +#### Returns +([Script](#classbitprim-py_1_1bitprim_1_1Script)) + +#### `public def `[`previous_output`](#classbitprim-py_1_1bitprim_1_1Input_1acbc3904f5c0a3c38a087d533e906ed66)`()` + +Returns the previous output, with its transaction hash and index. + +#### Returns +([OutputPoint](#classbitprim-py_1_1bitprim_1_1OutputPoint)) + +# class `bitprim-py::bitprim::MerkleBlock` + +Merkle tree representation of a transaction block. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`height`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1abfc566beda5c199193ec2be8e421ffc2)`()` | Height of the block in the chain. +`public def `[`header`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1afdc8d1a7f34d22b6de787aa659a18418)`()` | The block's header. +`public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1a5d192339bee7659d9d7e11a12a3adaad)`()` | Returns true if and only if it the block contains txs hashes, and header is valid. +`public def `[`hash_count`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1aa79c9306522448016e065715e3f0684d)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hashes list element count. +`public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1aee85571af3517d3a9985c11596b2d02c)`(version)` | [Block](#classbitprim-py_1_1bitprim_1_1Block) size in bytes. +`public def `[`total_transaction_count`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1a74e7756dc8cef287f922f08077419309)`()` | Amount of transactions inside the block. +`public def `[`reset`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1a327461611bfb0fbd67c75c180eceb3df)`()` | Delete all the data inside the block. + +## Members + +#### `public def `[`height`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1abfc566beda5c199193ec2be8e421ffc2)`()` + +Height of the block in the chain. + +#### Returns +(unsigned int) + +#### `public def `[`header`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1afdc8d1a7f34d22b6de787aa659a18418)`()` + +The block's header. + +#### Returns +([Header](#classbitprim-py_1_1bitprim_1_1Header)) + +#### `public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1a5d192339bee7659d9d7e11a12a3adaad)`()` + +Returns true if and only if it the block contains txs hashes, and header is valid. + +#### Returns +(int) + +#### `public def `[`hash_count`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1aa79c9306522448016e065715e3f0684d)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hashes list element count. + +#### Returns +(unsigned int) + +#### `public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1aee85571af3517d3a9985c11596b2d02c)`(version)` + +[Block](#classbitprim-py_1_1bitprim_1_1Block) size in bytes. + +#### Parameters +* `version` (unsigned int): block protocol version. + +#### Returns +(unsigned int) + +#### `public def `[`total_transaction_count`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1a74e7756dc8cef287f922f08077419309)`()` + +Amount of transactions inside the block. + +#### Returns +(unsigned int) + +#### `public def `[`reset`](#classbitprim-py_1_1bitprim_1_1MerkleBlock_1a327461611bfb0fbd67c75c180eceb3df)`()` + +Delete all the data inside the block. + +# class `bitprim-py::bitprim::Output` + +Represents one of the outputs of a [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction). + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Output_1ad00852dc52696e41210132d0b8640c62)`()` | Returns 0 if and only if output is not found. +`public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Output_1a7cb3c94232de8c027b592813f3f23e53)`(wire)` | [Block](#classbitprim-py_1_1bitprim_1_1Block) size in bytes. +`public def `[`value`](#classbitprim-py_1_1bitprim_1_1Output_1afe291758c2d3df8773a180b3314b6026)`()` | [Output](#classbitprim-py_1_1bitprim_1_1Output) value in Satoshis. +`public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Output_1ae15adadbf1f3d77a20d07520ab773414)`()` | Amount of signature operations in script. +`public def `[`script`](#classbitprim-py_1_1bitprim_1_1Output_1af932383bc4ff5906d53bb50ce19edd59)`()` | [Script](#classbitprim-py_1_1bitprim_1_1Script): returns the output script. + +## Members + +#### `public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Output_1ad00852dc52696e41210132d0b8640c62)`()` + +Returns 0 if and only if output is not found. + +#### Returns +(int) + +#### `public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Output_1a7cb3c94232de8c027b592813f3f23e53)`(wire)` + +[Block](#classbitprim-py_1_1bitprim_1_1Block) size in bytes. + +#### Parameters +* `wire` (bool): if true, size will include size of 'uint32' for storing spender height + +#### Returns +(unsigned int) + +#### `public def `[`value`](#classbitprim-py_1_1bitprim_1_1Output_1afe291758c2d3df8773a180b3314b6026)`()` + +[Output](#classbitprim-py_1_1bitprim_1_1Output) value in Satoshis. + +#### Returns +(unsigned int) + +#### `public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Output_1ae15adadbf1f3d77a20d07520ab773414)`()` + +Amount of signature operations in script. + +#### Returns +(unsigned int) + +#### `public def `[`script`](#classbitprim-py_1_1bitprim_1_1Output_1af932383bc4ff5906d53bb50ce19edd59)`()` + +[Script](#classbitprim-py_1_1bitprim_1_1Script): returns the output script. + +""" + +# class `bitprim-py::bitprim::OutputPoint` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash and index pair representing one of the transaction outputs. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`hash`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1a05dbf08bfe327b6921c973dc3d892cae)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format. +`public def `[`index`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1aa5b25737824a2e3cc4c740938a26860d)`()` | Position of the output in the transaction (starting at zero) +`public def `[`construct`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1a4d0c7f4cc0ca831aee9ead6894b28d3f)`()` | Creates an empty output point. +`public def `[`construct_from_hash_index`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1a00b134c01738b03ee4127e621f037414)`(hashn,`[`index`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1aa5b25737824a2e3cc4c740938a26860d)`)` | Creates an [OutputPoint](#classbitprim-py_1_1bitprim_1_1OutputPoint) from a transaction hash and index pair. + +## Members + +#### `public def `[`hash`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1a05dbf08bfe327b6921c973dc3d892cae)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format. + +#### Returns +(bytearray) + +#### `public def `[`index`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1aa5b25737824a2e3cc4c740938a26860d)`()` + +Position of the output in the transaction (starting at zero) + +#### Returns +(unsigned int) + +#### `public def `[`construct`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1a4d0c7f4cc0ca831aee9ead6894b28d3f)`()` + +Creates an empty output point. + +#### Returns +([OutputPoint](#classbitprim-py_1_1bitprim_1_1OutputPoint)) + +#### `public def `[`construct_from_hash_index`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1a00b134c01738b03ee4127e621f037414)`(hashn,`[`index`](#classbitprim-py_1_1bitprim_1_1OutputPoint_1aa5b25737824a2e3cc4c740938a26860d)`)` + +Creates an [OutputPoint](#classbitprim-py_1_1bitprim_1_1OutputPoint) from a transaction hash and index pair. + +#### Parameters +* `hashn` (bytearray): [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format + +* `index` (unsigned int): position of the output in the transaction. + +#### Returns +(Outputpoint) + +# class `bitprim-py::bitprim::P2p` + +Represents the Bitcoin `P2P` Networking API. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`address_count`](#classbitprim-py_1_1bitprim_1_1P2p_1a7d87a3623ae7dc935cb664733da2e6cd)`()` | +`public def `[`stop`](#classbitprim-py_1_1bitprim_1_1P2p_1a26d9a1501654d0ed1e5afeefda3de941)`()` | +`public def `[`close`](#classbitprim-py_1_1bitprim_1_1P2p_1a57adb23c0c20f510f6eb4f3f09be2d39)`()` | +`public def `[`stopped`](#classbitprim-py_1_1bitprim_1_1P2p_1afb2ce808ea6759718922020d46f043c8)`()` | + +## Members + +#### `public def `[`address_count`](#classbitprim-py_1_1bitprim_1_1P2p_1a7d87a3623ae7dc935cb664733da2e6cd)`()` + +#### `public def `[`stop`](#classbitprim-py_1_1bitprim_1_1P2p_1a26d9a1501654d0ed1e5afeefda3de941)`()` + +#### `public def `[`close`](#classbitprim-py_1_1bitprim_1_1P2p_1a57adb23c0c20f510f6eb4f3f09be2d39)`()` + +#### `public def `[`stopped`](#classbitprim-py_1_1bitprim_1_1P2p_1afb2ce808ea6759718922020d46f043c8)`()` + +# class `bitprim-py::bitprim::PaymentAddress` + +Represents a Bitcoin wallet address. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`encoded`](#classbitprim-py_1_1bitprim_1_1PaymentAddress_1af1cdc7005a7ef4d8675ed0d058cc8501)`()` | Address in readable format (hex string) +`public def `[`version`](#classbitprim-py_1_1bitprim_1_1PaymentAddress_1a3ab562255f10b971828f4469e93fed27)`()` | Address version. +`public def `[`construct_from_string`](#classbitprim-py_1_1bitprim_1_1PaymentAddress_1ad36c727ed2a22d9319cce02f90a6edf9)`(address)` | Creates the Payment Address based on the received string. + +## Members + +#### `public def `[`encoded`](#classbitprim-py_1_1bitprim_1_1PaymentAddress_1af1cdc7005a7ef4d8675ed0d058cc8501)`()` + +Address in readable format (hex string) + +#### Returns +(str) + +#### `public def `[`version`](#classbitprim-py_1_1bitprim_1_1PaymentAddress_1a3ab562255f10b971828f4469e93fed27)`()` + +Address version. + +#### Returns +(unsigned int) + +#### `public def `[`construct_from_string`](#classbitprim-py_1_1bitprim_1_1PaymentAddress_1ad36c727ed2a22d9319cce02f90a6edf9)`(address)` + +Creates the Payment Address based on the received string. + +#### Parameters +* `address` (str) A base58 address. Example: '1MLVpZC2CTFHheox8SCEnAbW5NBdewRTdR' + +# class `bitprim-py::bitprim::Point` + +Represents one of the tx inputs. + +It's a transaction hash and index pair. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Point_1a769b69a1c88d48a005cf3ee5bc3fc0be)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format. +`public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Point_1ae9fe3003137cd984294baf00d326d860)`()` | returns true if its not null. +`public def `[`index`](#classbitprim-py_1_1bitprim_1_1Point_1a4ea1423a10b705f0da514602984d0cfc)`()` | [Input](#classbitprim-py_1_1bitprim_1_1Input) position in the transaction (starting at zero) +`public def `[`checksum`](#classbitprim-py_1_1bitprim_1_1Point_1aa7d8499e11091e3d6814d449f984d151)`()` | This is used with output_point identification within a set of history rows of the same address. + +## Members + +#### `public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Point_1a769b69a1c88d48a005cf3ee5bc3fc0be)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format. + +#### Returns +(byte array) + +#### `public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Point_1ae9fe3003137cd984294baf00d326d860)`()` + +returns true if its not null. + +Returns: bool + +#### `public def `[`index`](#classbitprim-py_1_1bitprim_1_1Point_1a4ea1423a10b705f0da514602984d0cfc)`()` + +[Input](#classbitprim-py_1_1bitprim_1_1Input) position in the transaction (starting at zero) + +#### Returns +(unsigned int) + +#### `public def `[`checksum`](#classbitprim-py_1_1bitprim_1_1Point_1aa7d8499e11091e3d6814d449f984d151)`()` + +This is used with output_point identification within a set of history rows of the same address. + +Collision will result in miscorrelation of points by client callers. This is NOT a bitcoin checksum. +#### Returns +(unsigned int) + +# class `bitprim-py::bitprim::Script` + +Represents a transaction script. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Script_1a9b6ec4344c4c0e2f8449137924525ecd)`()` | All script bytes are valid under some circumstance (e.g. +`public def `[`is_valid_operations`](#classbitprim-py_1_1bitprim_1_1Script_1af761eba7a960265c8b93a2c3f1e17412)`()` | [Script](#classbitprim-py_1_1bitprim_1_1Script) validity is independent of individual operation validity. +`public def `[`satoshi_content_size`](#classbitprim-py_1_1bitprim_1_1Script_1aa7656ca492d8372873d61ab80176addd)`()` | Size in bytes. +`public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Script_1a6c72828fc7e8ab8fd2c73a9df3add14d)`(prefix)` | Size in bytes. +`public def `[`to_string`](#classbitprim-py_1_1bitprim_1_1Script_1ae83d84e607644b7703ce44eeacf6dd3a)`(active_forks)` | Translate operations in the script to string. +`public def `[`sigops`](#classbitprim-py_1_1bitprim_1_1Script_1a5879bfb8f103ce5c9276c98a1432b27d)`(embedded)` | Amount of signature operations in the script. +`public def `[`embedded_sigops`](#classbitprim-py_1_1bitprim_1_1Script_1a6da1a8dba7ce44d5a8261ef9c8474cb7)`(prevout_script)` | Count the sigops in the embedded script using BIP16 rules. + +## Members + +#### `public def `[`is_valid`](#classbitprim-py_1_1bitprim_1_1Script_1a9b6ec4344c4c0e2f8449137924525ecd)`()` + +All script bytes are valid under some circumstance (e.g. + +coinbase). +#### Returns +(int) 0 if and only if prefix and byte count do not match. + +#### `public def `[`is_valid_operations`](#classbitprim-py_1_1bitprim_1_1Script_1af761eba7a960265c8b93a2c3f1e17412)`()` + +[Script](#classbitprim-py_1_1bitprim_1_1Script) validity is independent of individual operation validity. + +Ops are considered invalid if there is a trailing invalid/default op or if a push op has a size mismatch +#### Returns +(int) + +#### `public def `[`satoshi_content_size`](#classbitprim-py_1_1bitprim_1_1Script_1aa7656ca492d8372873d61ab80176addd)`()` + +Size in bytes. + +#### Returns +(unsigned int) + +#### `public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Script_1a6c72828fc7e8ab8fd2c73a9df3add14d)`(prefix)` + +Size in bytes. + +If prefix is 1 size, includes a var int size +#### Parameters +* `prefix` (int): include prefix size in the final result + +#### Returns +(unsigned int) + +#### `public def `[`to_string`](#classbitprim-py_1_1bitprim_1_1Script_1ae83d84e607644b7703ce44eeacf6dd3a)`(active_forks)` + +Translate operations in the script to string. + +#### Parameters +* `active_forks` (unsigned int): Tells which rule is active + +#### Returns +(str) + +#### `public def `[`sigops`](#classbitprim-py_1_1bitprim_1_1Script_1a5879bfb8f103ce5c9276c98a1432b27d)`(embedded)` + +Amount of signature operations in the script. + +#### Parameters +* `embedded` (bool): Tells whether this is an embedded script + +#### Returns +(unsigned int) + +#### `public def `[`embedded_sigops`](#classbitprim-py_1_1bitprim_1_1Script_1a6da1a8dba7ce44d5a8261ef9c8474cb7)`(prevout_script)` + +Count the sigops in the embedded script using BIP16 rules. + +#### Returns +(unsigned int) + +# class `bitprim-py::bitprim::Stealth` + +[Stealth](#classbitprim-py_1_1bitprim_1_1Stealth) payment related data. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`ephemeral_public_key_hash`](#classbitprim-py_1_1bitprim_1_1Stealth_1a40bf96bf4766af27b611bbb7fb3ca532)`()` | 33 bytes. +`public def `[`transaction_hash`](#classbitprim-py_1_1bitprim_1_1Stealth_1a2a969744c067849b58f69f0369824eff)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 bytes format. +`public def `[`public_key_hash`](#classbitprim-py_1_1bitprim_1_1Stealth_1ad85500f41aebba4296898f1d0ad0412c)`()` | Public key hash in 20 byte array format. + +## Members + +#### `public def `[`ephemeral_public_key_hash`](#classbitprim-py_1_1bitprim_1_1Stealth_1a40bf96bf4766af27b611bbb7fb3ca532)`()` + +33 bytes. + +Includes the sign byte (0x02) +#### Returns +(bytearray) + +#### `public def `[`transaction_hash`](#classbitprim-py_1_1bitprim_1_1Stealth_1a2a969744c067849b58f69f0369824eff)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 bytes format. + +#### Returns +(bytearray) + +#### `public def `[`public_key_hash`](#classbitprim-py_1_1bitprim_1_1Stealth_1ad85500f41aebba4296898f1d0ad0412c)`()` + +Public key hash in 20 byte array format. + +#### Returns +(bytearray) + +# class `bitprim-py::bitprim::StealthCompact` + +Compressed representation of [Stealth](#classbitprim-py_1_1bitprim_1_1Stealth) payment related data. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`ephemeral_public_key_hash`](#classbitprim-py_1_1bitprim_1_1StealthCompact_1a50276fa81cbdbdc6d9c5c61c08c3b466)`()` | Ephemeral public key hash in 32 byte array format. +`public def `[`transaction_hash`](#classbitprim-py_1_1bitprim_1_1StealthCompact_1a77d9f757e9e6c9d4fa1dbcc1c00cfede)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format. +`public def `[`public_key_hash`](#classbitprim-py_1_1bitprim_1_1StealthCompact_1a91abc6e2a28913ee1e61ce76f21787e6)`()` | Public key hash in 20 byte array format. + +## Members + +#### `public def `[`ephemeral_public_key_hash`](#classbitprim-py_1_1bitprim_1_1StealthCompact_1a50276fa81cbdbdc6d9c5c61c08c3b466)`()` + +Ephemeral public key hash in 32 byte array format. + +Does not include the sign byte (0x02) +#### Returns +(byte array) + +#### `public def `[`transaction_hash`](#classbitprim-py_1_1bitprim_1_1StealthCompact_1a77d9f757e9e6c9d4fa1dbcc1c00cfede)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) hash in 32 byte array format. + +#### Returns +(byte array) + +#### `public def `[`public_key_hash`](#classbitprim-py_1_1bitprim_1_1StealthCompact_1a91abc6e2a28913ee1e61ce76f21787e6)`()` + +Public key hash in 20 byte array format. + +#### Returns +(byte array) + +# class `bitprim-py::bitprim::Transaction` + +Represents a Bitcoin [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction). + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`version`](#classbitprim-py_1_1bitprim_1_1Transaction_1aa0645d1ed364603e366414e4e70e19e2)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) protocol version. +`public def `[`set_version`](#classbitprim-py_1_1bitprim_1_1Transaction_1aa4877d45df18da894d8975b666570c03)`(`[`version`](#classbitprim-py_1_1bitprim_1_1Transaction_1aa0645d1ed364603e366414e4e70e19e2)`)` | Set new transaction version value. +`public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Transaction_1a4bc40f5d9a176b9e58b88026b0715638)`()` | bytearray: 32 bytes transaction hash. +`public def `[`hash_sighash_type`](#classbitprim-py_1_1bitprim_1_1Transaction_1ad34d97d680ec9d6ba824325f07388bd8)`(sighash_type)` | 32 bytes transaction hash + 4 bytes signature hash type +`public def `[`locktime`](#classbitprim-py_1_1bitprim_1_1Transaction_1a0bb1fb350c14fef36a221d1d8d8c6b67)`()` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) locktime. +`public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Transaction_1a1f861e77dbc67de37c6667cc69a5893f)`(wire)` | [Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) size in bytes. +`public def `[`fees`](#classbitprim-py_1_1bitprim_1_1Transaction_1a39560a3fe997f308d6d8e5993f2fe804)`()` | Fees to pay to the winning miner. +`public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Transaction_1afdc08c10aa1f6d5fa0e97900435229d2)`()` | Amount of signature operations in the transaction. +`public def `[`signature_operations_bip16_active`](#classbitprim-py_1_1bitprim_1_1Transaction_1afb639b53fa7f54c76685b09e0e301d72)`(bip16_active)` | Amount of signature operations in the transaction. +`public def `[`total_input_value`](#classbitprim-py_1_1bitprim_1_1Transaction_1a6ace5d080d3fdacf2ae464e9a6132728)`()` | Sum of every input value in the transaction. +`public def `[`total_output_value`](#classbitprim-py_1_1bitprim_1_1Transaction_1afb97ebed6e1f5e54f1f998ee7ca03da5)`()` | Sum of every output value in the transaction. +`public def `[`is_coinbase`](#classbitprim-py_1_1bitprim_1_1Transaction_1ad4789711bb2628a48d99d5e0942b85ff)`()` | Return 1 if and only if transaction is coinbase, 0 otherwise. +`public def `[`is_null_non_coinbase`](#classbitprim-py_1_1bitprim_1_1Transaction_1a212bcb41f5af02e5a321507238b7c67e)`()` | Return 1 if and only if the transaction is not coinbase and has a null previous output, 0 otherwise. +`public def `[`is_oversized_coinbase`](#classbitprim-py_1_1bitprim_1_1Transaction_1ab0e7d9c00716cedf8d0c7a36fd57710a)`()` | Returns 1 if the transaction is coinbase and has an invalid script size on its first input. +`public def `[`is_mature`](#classbitprim-py_1_1bitprim_1_1Transaction_1a252aeca7f71d8132b537d6aa50e03af6)`(target_height)` | Returns 1 if and only if at least one of the inputs is not mature, 0 otherwise. +`public def `[`is_overspent`](#classbitprim-py_1_1bitprim_1_1Transaction_1ac5572cc62c77734450b73e14b9ff0a1e)`()` | Returns 1 if transaction is not a coinbase, and the sum of its outputs is higher than the sum of its inputs, 0 otherwise. +`public def `[`is_double_spend`](#classbitprim-py_1_1bitprim_1_1Transaction_1a477e1e68292a50ade80ab598ec645e59)`(include_unconfirmed)` | Returns 1 if at least one of the previous outputs was already spent, 0 otherwise. +`public def `[`is_missing_previous_outputs`](#classbitprim-py_1_1bitprim_1_1Transaction_1ad3cc78bfe0ba993fe1eafab6905b5f70)`()` | Returns 1 if and only if at least one of the previous outputs is invalid, 0 otherwise. +`public def `[`is_final`](#classbitprim-py_1_1bitprim_1_1Transaction_1a8d846e71bd65b0bae933037709321e59)`(block_height,block_time)` | Returns 1 if and only if the transaction is final, 0 otherwise. +`public def `[`is_locktime_conflict`](#classbitprim-py_1_1bitprim_1_1Transaction_1a4b6c074b3d02e78eb4c21260b8bc23cf)`()` | Returns 1 if and only if the transaction is locked and every input is final, 0 otherwise. +`public def `[`outputs`](#classbitprim-py_1_1bitprim_1_1Transaction_1af95578f147dee2cfc6b31b17422ba45f)`()` | Returns a list with all of this transaction's outputs. +`public def `[`inputs`](#classbitprim-py_1_1bitprim_1_1Transaction_1a853bc44a3722b45b4c289e3e49335267)`()` | Returns a list with all of this transaction's inputs. +`public def `[`to_data`](#classbitprim-py_1_1bitprim_1_1Transaction_1adce773eb03ed3dc5439bf47cf64a9b92)`(wired)` | + +## Members + +#### `public def `[`version`](#classbitprim-py_1_1bitprim_1_1Transaction_1aa0645d1ed364603e366414e4e70e19e2)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) protocol version. + +#### Returns +(unsigned int) + +#### `public def `[`set_version`](#classbitprim-py_1_1bitprim_1_1Transaction_1aa4877d45df18da894d8975b666570c03)`(`[`version`](#classbitprim-py_1_1bitprim_1_1Transaction_1aa0645d1ed364603e366414e4e70e19e2)`)` + +Set new transaction version value. + +#### Parameters +* `version` New transaction version value + +#### `public def `[`hash`](#classbitprim-py_1_1bitprim_1_1Transaction_1a4bc40f5d9a176b9e58b88026b0715638)`()` + +bytearray: 32 bytes transaction hash. + +#### `public def `[`hash_sighash_type`](#classbitprim-py_1_1bitprim_1_1Transaction_1ad34d97d680ec9d6ba824325f07388bd8)`(sighash_type)` + +32 bytes transaction hash + 4 bytes signature hash type + +#### Parameters +* `sighash_type` (unsigned int): signature hash type + +#### Returns +(byte array) + +#### `public def `[`locktime`](#classbitprim-py_1_1bitprim_1_1Transaction_1a0bb1fb350c14fef36a221d1d8d8c6b67)`()` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) locktime. + +#### Returns +(unsigned int) + +#### `public def `[`serialized_size`](#classbitprim-py_1_1bitprim_1_1Transaction_1a1f861e77dbc67de37c6667cc69a5893f)`(wire)` + +[Transaction](#classbitprim-py_1_1bitprim_1_1Transaction) size in bytes. + +#### Parameters +* `wire` (bool): if true, size will include size of 'uint32' for storing spender output height + +#### Returns +(unsigned int) + +#### `public def `[`fees`](#classbitprim-py_1_1bitprim_1_1Transaction_1a39560a3fe997f308d6d8e5993f2fe804)`()` + +Fees to pay to the winning miner. + +Difference between sum of inputs and outputs +#### Returns +(unsigned int) + +#### `public def `[`signature_operations`](#classbitprim-py_1_1bitprim_1_1Transaction_1afdc08c10aa1f6d5fa0e97900435229d2)`()` + +Amount of signature operations in the transaction. + +#### Returns +(unsigned int) max_int in case of overflow + +#### `public def `[`signature_operations_bip16_active`](#classbitprim-py_1_1bitprim_1_1Transaction_1afb639b53fa7f54c76685b09e0e301d72)`(bip16_active)` + +Amount of signature operations in the transaction. + +#### Parameters +* `bip16_active` (int): 1 if and only if bip 16 is active, 0 otherwise + +#### Returns +(unsigned int) max_int in case of overflow. + +#### `public def `[`total_input_value`](#classbitprim-py_1_1bitprim_1_1Transaction_1a6ace5d080d3fdacf2ae464e9a6132728)`()` + +Sum of every input value in the transaction. + +#### Returns +(unsigned int) max_int in case of overflow + +#### `public def `[`total_output_value`](#classbitprim-py_1_1bitprim_1_1Transaction_1afb97ebed6e1f5e54f1f998ee7ca03da5)`()` + +Sum of every output value in the transaction. + +#### Returns +(unsigned int) max_int in case of overflow + +#### `public def `[`is_coinbase`](#classbitprim-py_1_1bitprim_1_1Transaction_1ad4789711bb2628a48d99d5e0942b85ff)`()` + +Return 1 if and only if transaction is coinbase, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_null_non_coinbase`](#classbitprim-py_1_1bitprim_1_1Transaction_1a212bcb41f5af02e5a321507238b7c67e)`()` + +Return 1 if and only if the transaction is not coinbase and has a null previous output, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_oversized_coinbase`](#classbitprim-py_1_1bitprim_1_1Transaction_1ab0e7d9c00716cedf8d0c7a36fd57710a)`()` + +Returns 1 if the transaction is coinbase and has an invalid script size on its first input. + +#### Returns +(int) + +#### `public def `[`is_mature`](#classbitprim-py_1_1bitprim_1_1Transaction_1a252aeca7f71d8132b537d6aa50e03af6)`(target_height)` + +Returns 1 if and only if at least one of the inputs is not mature, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_overspent`](#classbitprim-py_1_1bitprim_1_1Transaction_1ac5572cc62c77734450b73e14b9ff0a1e)`()` + +Returns 1 if transaction is not a coinbase, and the sum of its outputs is higher than the sum of its inputs, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_double_spend`](#classbitprim-py_1_1bitprim_1_1Transaction_1a477e1e68292a50ade80ab598ec645e59)`(include_unconfirmed)` + +Returns 1 if at least one of the previous outputs was already spent, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_missing_previous_outputs`](#classbitprim-py_1_1bitprim_1_1Transaction_1ad3cc78bfe0ba993fe1eafab6905b5f70)`()` + +Returns 1 if and only if at least one of the previous outputs is invalid, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_final`](#classbitprim-py_1_1bitprim_1_1Transaction_1a8d846e71bd65b0bae933037709321e59)`(block_height,block_time)` + +Returns 1 if and only if the transaction is final, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`is_locktime_conflict`](#classbitprim-py_1_1bitprim_1_1Transaction_1a4b6c074b3d02e78eb4c21260b8bc23cf)`()` + +Returns 1 if and only if the transaction is locked and every input is final, 0 otherwise. + +#### Returns +(int) + +#### `public def `[`outputs`](#classbitprim-py_1_1bitprim_1_1Transaction_1af95578f147dee2cfc6b31b17422ba45f)`()` + +Returns a list with all of this transaction's outputs. + +#### Returns +(OutputList) + +#### `public def `[`inputs`](#classbitprim-py_1_1bitprim_1_1Transaction_1a853bc44a3722b45b4c289e3e49335267)`()` + +Returns a list with all of this transaction's inputs. + +#### Returns +(InputList) + +#### `public def `[`to_data`](#classbitprim-py_1_1bitprim_1_1Transaction_1adce773eb03ed3dc5439bf47cf64a9b92)`(wired)` + +# class `bitprim-py::bitprim::Wallet` + +[Wallet](#classbitprim-py_1_1bitprim_1_1Wallet) handling utilities. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public def `[`mnemonics_to_seed`](#classbitprim-py_1_1bitprim_1_1Wallet_1ac66aadd0dc07bc22a938152b2aeacf58)`(cls,mnemonics)` | Convert mnemonics to a seed. + +## Members + +#### `public def `[`mnemonics_to_seed`](#classbitprim-py_1_1bitprim_1_1Wallet_1ac66aadd0dc07bc22a938152b2aeacf58)`(cls,mnemonics)` + +Convert mnemonics to a seed. + +#### Parameters +* `mnemonics` A list of strings representing the mnemonics + +#### Returns +A new seed + +Generated by [Moxygen](https://sourcey.com/moxygen) \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..286e751 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,28 @@ +##### ![Bitprim](assets/bitprim_logo_orange.png) + +##### "Bringing decentralized solutions to everyday life" + +##### + +## Welcome to Bitprim + +Bitprim is a multi-coin developing platform, working with multi-languages programming compatible with the Satoshi Client. + +Download: + +* Github: [https://github.com/bitprim](https://github.com/bitprim) +* Slack: bitprim.slack.com +* Email: info@bitprim.org + +The platform includes: + +* 100% Satoshi Client Compatible Protocol Implementation +* Mining Engine +* Multi-Coin + * Bitcoin Cash (BCH) + * Bitcoin (BTC) + * Litecoin (LTC) +* RPC support +* C Interface +* C++ Interface +* Interfaces for Go, Python, Node, C\# and others \ No newline at end of file diff --git a/docs/team.md b/docs/team.md new file mode 100644 index 0000000..8590929 --- /dev/null +++ b/docs/team.md @@ -0,0 +1,26 @@ +## Members + +* **Juan Garavaglia - CEO Founder** + +* **Mariano Orsili - CTO Founder** + +* **Mateo Friedman - Math Expert** + +* **Fernando Pelliccioni - Lead Developer** + +* **Ramiro Carlucho - Developer** + +* **Guillermo Paoletti - Developer** + +* **Dario Ramos - Developer** + +* **Mario Dal Lago - Developer** + +* **Gerardo Arceri - DevOp** + +* **Renzo Barrionuevo - Project Manager** + +* **Sergio Suchockas - Operations Manager** + +We are open for contibutors and looking for full time developers, feel free to contact us at info@bitprim.org + diff --git a/docs/user_guide/installation.md b/docs/user_guide/installation.md new file mode 100644 index 0000000..4f73658 --- /dev/null +++ b/docs/user_guide/installation.md @@ -0,0 +1,81 @@ +## Installation Requirements + +- 64-bit machine. +- [Conan](https://www.conan.io/) package manager, version 1.4.0 or newer. See [Conan Installation](http://docs.conan.io/en/latest/installation.html#install-with-pip-recommended). + +## Installation Procedure + +The *Bitprim* executables can be installed on Linux, macOS, FreeBSD, Windows and others. These binaries are pre-built for the most usual operating system/compiler combinations and hosted in an online repository. If there are no pre-built binaries for your platform, a build from source will be attempted. + +So, for any platform, an installation can be performed in 2 simple steps: + +1. Configure the Conan remote +``` +conan remote add bitprim https://api.bintray.com/conan/bitprim/bitprim +``` + +2. Install the appropriate executable + +``` +# For Bitcoin Cash +conan install bitprim-node-exe/0.10.2@bitprim/stable -o currency=BCH +# ... or (BCH is the default crypto) +conan install bitprim-node-exe/0.10.2@bitprim/stable + +# For Bitcoin Legacy +conan install bitprim-node-exe/0.10.2@bitprim/stable -o currency=BTC + +# For Litecoin +conan install bitprim-node-exe/0.10.2@bitprim/stable -o currency=LTC +``` + +## Building from source Requirements + +In case there are no pre-built binaries for your platform, it is necessary to build from source code. In such a scenario, the following requirements must be added to the previous ones: + +- C++11 Conforming Compiler. +- [CMake](https://cmake.org/) building tool, version 3.4 or newer. + + +## Running the node + +In order to run the full node, you have to initialize the database and then run the node: + +1. Run the following to initialize the database: + +```./bn -i``` + +2. Finally, run the node: + +```./bn``` + +The above commands use the default configuration hardcoded in the executable. You can use a configuration file to customize the behavior of the node. In the [bitprim-config](https://github.com/bitprim/bitprim-config) repository you can find some example files. + +1. Initialize the database using a configuration file: + +```./bn -i -c ``` + +2. Run the node using a configuration file: + +```./bn -c ``` + +## Advanced Installation + +Bitprim is a high performance node, so we have some options and pre-built packages tuned for several platforms. +Specifically, you can choose your computer _microarchitecture_ to download a pre-build executable compiled to take advantage of the instructions available in your processor. For example: + +``` +# For Haswell microarchitecture and Bitcoin Cash currency +conan install bitprim-node-exe/0.10.2@bitprim/stable -o currency=BCH -o microarchitecture=haswell +``` +So, you can manually choose the appropriate microarchitecture, some examples are: _x86_64_, _haswell_, _ivybridge_, _sandybridge_, _bulldozer_, ... +By default, if you do not specify any, the building system will select a base microarchitecture corresponding to your _Instruction Set Architecture_ (ISA). For example, for _Intel 80x86_, the x86_64 microarchitecture will be selected. + +### Automatic Microarchitecture selection + +Our build system has the ability to automatically detect the microarchitecture of your processor. To do this, first, you have to install our _pip_ package called [cpuid](https://pypi.python.org/pypi/cpuid). Our build system detects if this package is installed and in such case, makes use of it to detect the best possible executable for your processor. + +``` +pip install cpuid +conan install bitprim-node-exe/0.10.2@bitprim/stable +``` diff --git a/docs/user_guide/introduction.md b/docs/user_guide/introduction.md new file mode 100644 index 0000000..3222975 --- /dev/null +++ b/docs/user_guide/introduction.md @@ -0,0 +1,25 @@ +## Introduction + +*Bitprim* allows you to run a full +[Bitcoin Cash](https://www.bitcoincash.org/)/[Bitcoin](https://bitcoin.org/)/[Litecoin](https://litecoin.org/) node, with all four main features: + +* Wallet +* Mining +* Full blockchain +* Routing + +*Bitprim* also works as a cryptocurrency development platform with several programmable APIs: + +* C++ +* C +* C# +* Python +* Javascript +* Rust +* Golang + +... and networking APIs: + +* bitprim-insight: A Bitprim implementation of the Insight-API +* JSON-RPC +* Libbitcoin BS-BX protocol diff --git a/docs/user_guide/releases_notes.md b/docs/user_guide/releases_notes.md new file mode 100644 index 0000000..58a4d9f --- /dev/null +++ b/docs/user_guide/releases_notes.md @@ -0,0 +1,5 @@ +## Releases + + [Here](https://github.com/bitprim/bitprim/blob/master/doc/release-notes/release-notes.md) is the list of bitprim's releases + + diff --git a/docs/user_guide/rpc.md b/docs/user_guide/rpc.md new file mode 100644 index 0000000..86c697c --- /dev/null +++ b/docs/user_guide/rpc.md @@ -0,0 +1,29 @@ +We are currently developing full RPC support, to be compatible with software that currently relies on other Bitcoin implementations. + +Currently we are able to respond to the following messages: + +* `getaddressbalance` +* `getaddresstxids` +* `getaddressdeltas` +* `getaddressutxos` +* `getblockhashes` +* `getaddressmempool` +* `getbestblockhash` +* `getblock` +* `getblockhash` +* `getblockchaininfo` +* `getblockheader` +* `getblockcount` +* `getblocktemplate` +* `getchaintips` +* `getdifficulty` +* `getinfo` +* `getmininginfo` +* `getrawtransaction` +* `getspentinfo` +* `validateaddress` +* `sendrawtransaction` +* `submitblock` + +This allow us to successfully mine using our software. + diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..5074e77 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,41 @@ +site_name: Bitprim +site_url: http://www.bitprim.org +site_description: Bitprim +site_author: Bitprim Team + +repo_url: https://github.com/mkdocs/mkdocs/ +edit_uri: "" + +pages: + - Home: index.md + - User Guide: + - Introduction: user_guide/introduction.md + - Installation: user_guide/installation.md + - RPC: user_guide/rpc.md + - Release Notes: user_guide/releases_notes.md + - Developer Guide: + - Introduction: developer_guide/introduction.md + - .Net: + - Introduction: developer_guide/dotnet/dotnet-Interface.md + - Reference: developer_guide/dotnet/dotnet-interface-details.md + - C: + - Introduction: developer_guide/c/C-interface.md + - Reference: developer_guide/c/api.md + - C++: + - Introduction: developer_guide/c++/C---interface.md + - Python: + - Introduction: developer_guide/python/Python-interface.md + - Reference: developer_guide/python/Python-interface-details.md + - Go: + - Introduction: developer_guide/go/Go-interface.md + - About: + - Team: team.md + +copyright: Copyright © 2018 Bitprim + +markdown_extensions: + - toc: + permalink: # + +plugins: + - search \ No newline at end of file