Summary

Members Descriptions
enumpoint_kind 0 = output, 1 = spend
public voidblock_destruct(block_tblock) Release the memory held by a block object.
public intblock_is_valid(block_tblock) Determine if a block is valid.
publicheader_t`[block_header](#block_8h_1aa644a0753e3d370f683883aecc37a199)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block)` Get the block's header.
publichash_t`[block_hash](#block_8h_1a30cfad237bdb5bebe5fd7e3b48f3d410)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block)` Get the block's hash.
public size_tblock_transaction_count(block_tblock) Get the block's transaction count.
publictransaction_t`[block_transaction_nth](#block_8h_1a0732e73992d9c4c4789fc54f39e8747a)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block,size_t n)` Get the block's n-th transaction.
public size_tblock_serialized_size(block_tblock,uint32_t version) Get the block's serialized size.
public uint64_tblock_subsidy(size_t height) Get the block subsidy (miner_reward = block_subsidy + transaction_fees)
public uint64_tblock_fees(block_tblock) Get the block's total transaction fees (miner_reward = block_subsidy + transaction_fees)
public uint64_tblock_claim(block_tblock) Get the block's claim.
public uint64_tblock_reward(block_tblock,size_t height) Get the block's miner reward (miner_reward = block_subsidy + transaction_fees)
publichash_t`[block_generate_merkle_root](#block_8h_1accd9987fa1b37396e047f6e8b2251c12)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block)` Generate a Merkle root for a block.
public size_tblock_signature_operations(block_tblock) Get the block's signature operations count.
public size_tblock_signature_operations_bip16_active(block_tblock,int bip16_active) Get the block's BIP0016 signature operations count.
public size_tblock_total_inputs(block_tblock,int with_coinbase) Get the block's input count.
public intblock_is_extra_coinbases(block_tblock) Determine if a block has extra coinbases.
public intblock_is_final(block_tblock,size_t height) Determine if a block is final.
public intblock_is_distinct_transaction_set(block_tblock) Determine if a block contains a distinct transaction set.
public intblock_is_valid_coinbase_claim(block_tblock,size_t height) Determine if a block contains a valid coinbase claim.
public intblock_is_valid_coinbase_script(block_tblock,size_t height) Determine if a block contains a valid coinbase script.
public intblock_is_internal_double_spend(block_tblock) Determine if a block contains an internal double spend.
public intblock_is_valid_merkle_root(block_tblock) Determine if a block has a valid Merkle root.
publicheader_t`[compact_block_header](#compact__block_8h_1a8cf34d1187d38c7d6201453289a19d5c)([compact_block_t](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad) block)` Get compact block header.
public intcompact_block_is_valid(compact_block_tblock) Determine if a compact block is valid.
public size_tcompact_block_serialized_size(compact_block_tblock,uint32_t version) Get a compact block's serialized size.
public size_tcompact_block_transaction_count(compact_block_tblock) Get the compact block's transaction count.
publictransaction_t`[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_tcompact_block_nonce(compact_block_tblock) Get compact block's nonce.
public voidcompact_block_destruct(compact_block_tblock) Release memory held by compact block instance.
public voidcompact_block_reset(compact_block_tblock) Reset compact block.
publicexecutor_t`[executor_construct](#executor__c_8h_1aed246db742bdb2aeee6842a8743ea094)(char const path,FILE sout,FILE * serr)` Creates an executor instance, which controls a node in the network.
publicexecutor_t`[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 voidexecutor_destruct(executor_texec) Destroys an executor instance (it only releases memory)
public voidexecutor_run(executor_texec,run_handler_thandler) After executor_initchain() has been called, the node can be started using this function. This is an asynchronous function, hence the callback parameter.
public intexecutor_run_wait(executor_texec) After executor_initchain() 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 intexecutor_initchain(executor_texec) Initializes the chain for this node. It only creates the structure; the blockchain won't be synced.
public voidexecutor_stop(executor_texec) Stops execution of the node.
public voidfetch_last_height(executor_texec,last_height_fetch_handler_thandler) Get the current blockchain height.
public intget_last_height(executor_texec,size_t * height) Get the current blockchain height. This is the synchronous version of fetch_last_height(), so it will block until height is retrieved from the network, or an error occurs.
public voidfetch_block_height(executor_texec,hash_thash,block_height_fetch_handler_thandler) Given a block, get its height in the blockchain.
public intget_block_height(executor_texec,hash_thash,size_t * height) Given a block, get its height in the blockchain. This is the synchronous version of fetch_block_height(), so it will block until height is retrieved from the network, or an error occurs.
public voidfetch_block_header_by_height(executor_texec,size_t height,block_header_fetch_handler_thandler) Given a height in the blockchain, retrieve its block's header.
public intget_block_header_by_height(executor_texec,size_t height,header_t* 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(), so it will block until the header is retrieved from the network, or an error occurs.
public voidfetch_block_header_by_hash(executor_texec,hash_thash,block_header_fetch_handler_thandler) Given a block hash, retrieve its header.
public intget_block_header_by_hash(executor_texec,hash_thash,header_t* header,size_t * ret_height) Given a block hash, retrieve its header. This is the synchronous version of fetch_block_header_by_height(), so it will block until the header is retrieved from the network, or an error occurs.
public voidfetch_block_by_height(executor_texec,size_t height,block_fetch_handler_thandler) Given a block's height, retrieve the block.
public intget_block_by_height(executor_texec,size_t height,block_t* block,size_t * ret_height) Given a block's height, retrieve the block. This is the synchronous version of fetch_block_by_height(), so it will block until the block is retrieved from the network, or an error occurs.
public voidfetch_block_by_hash(executor_texec,hash_thash,block_fetch_handler_thandler) Given a block's hash, retrieve the block.
public intget_block_by_hash(executor_texec,hash_thash,block_t* block,size_t * ret_height) Given a block's hash, retrieve the block. This is the synchronous version of fetch_block_by_height(), so it will block until the block is retrieved from the network, or an error occurs.
public voidfetch_merkle_block_by_height(executor_texec,size_t height,merkle_block_fetch_handler_thandler) Given a Merkle block's height, retrieve the block.
public voidfetch_merkle_block_by_hash(executor_texec,hash_thash,merkle_block_fetch_handler_thandler) Given a Merkle block's hash, retrieve the block.
public voidfetch_compact_block_by_height(executor_texec,size_t height,compact_block_fetch_handler_thandler) Given a compact block's height, retrieve the block.
public voidfetch_compact_block_by_hash(executor_texec,hash_thash,compact_block_fetch_handler_thandler) Given a compact block's hash, retrieve the block.
public voidfetch_transaction(executor_texec,hash_thash,int require_confirmed,transaction_fetch_handler_thandler) Given a transaction hash, retrieve it (optionally requiring it to be confirmed)
public intget_transaction(executor_texec,hash_thash,int require_confirmed,transaction_t* transaction,size_t * ret_height,size_t * index) Given a transaction's hash, retrieve it This is the synchronous version of fetch_transaction(), so it will block until the transaction is retrieved from the network, or an error occurs.
public voidfetch_transaction_position(executor_texec,hash_thash,int require_confirmed,transaction_index_fetch_handler_thandler) Given a transaction hash, retrieve its position inside the block (optionally requiring it to be confirmed)
public voidfetch_output(executor_texec,hash_thash,uint32_t index,int require_confirmed,output_fetch_handler_thandler) Given an output hash, retrieve it (optionally requiring it to be confirmed)
public intget_output(executor_texec,hash_thash,uint32_t index,int require_confirmed,output_t* output) Given an output's hash, retrieve it This is the synchronous version of fetch_output(), so it will block until the output is retrieved from the network, or an error occurs.
public voidfetch_spend(executor_texec,output_point_toutpoint,spend_fetch_handler_thandler) Given an output point, retrieve its spend.
public voidfetch_history(executor_texec,payment_address_taddress,size_t limit,size_t from_height,history_fetch_handler_thandler) Given a payment address, a starting height and an entry limit, retrieve its transaction history.
public intget_history(executor_texec,payment_address_taddress,size_t limit,size_t from_height,history_compact_list_t* 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(), so it will block until the history is retrieved from the network, or an error occurs.
publictransaction_t`[hex_to_tx](#executor__c_8h_1a8af262d3a75ff3da484cbbccac8a987a)(char const * tx_hex)` Converts a raw transaction hex string to a transaction object.
public voidvalidate_tx(executor_texec,transaction_ttx,validate_tx_handler_thandler) Validates a new transaction (has not been added to the blockchain yet)
publiclong_hash_t`[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 voidlong_hash_destroy(long_hash_tptr) Release the memory held by a long hash object.
public voidheader_destruct(header_theader) Releases memory held by the header object.
public intheader_is_valid(header_theader) Determine if the header is valid.
public uint32_theader_version(header_theader) Get header version.
public voidheader_set_version(header_theader,uint32_t version) Set a header's version.
public uint32_theader_timestamp(header_theader) Get header timestamp.
public voidheader_set_timestamp(header_theader,uint32_t timestamp) Set header timestamp.
public uint32_theader_bits(header_theader) Get header bits.
public voidheader_set_bits(header_theader,uint32_t bits) Set header bits.
public uint32_theader_nonce(header_theader) Get header nonce.
public voidheader_set_nonce(header_theader,uint32_t nonce) Set header nonce
publichash_t`[header_previous_block_hash](#header_8h_1ac048f31bf04639f83e5be544adf9b977)([header_t](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8) header)` Get previous block hash.
publichash_t`[header_merkle](#header_8h_1af0f199ca6fed2c5cc37fedfe5dd86b47)([header_t](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8) header)` Get header Merkle.
publichash_t`[header_hash](#header_8h_1a625887dacbb1b408e292e0ff6a5638fc)([header_t](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8) header)` Get header hash.
publicpoint_kind_t`[history_compact_get_point_kind](#history__compact_8h_1ad821d566985946fe24bc56f95d3a89c2)([history_compact_t](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d) history)` Get the entry's point kind.
publicpoint_t`[history_compact_get_point](#history__compact_8h_1a86510b343ae158fb7ceefbdbdb92a304)([history_compact_t](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d) history)` Get the entry's point.
public uint32_thistory_compact_get_height(history_compact_thistory) Get the height of history entry in the blockchain.
public uint64_thistory_compact_get_value_or_previous_checksum(history_compact_thistory) Get the entry's value.
public voidhistory_compact_list_destruct(history_compact_list_thistory_compact_list) Release memory held by a history compact list instance.
public size_thistory_compact_list_count(history_compact_list_thistory_compact_list) Get the amount of entries in the list.
publichistory_compact_t`[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 voidinput_destruct(input_tinput) Release the memory held by an input instance.
public intinput_is_valid(input_tinput) Determine if an input is valid.
public intinput_is_final(input_tinput) Determine if an input is final.
public size_tinput_serialized_size(input_tinput,int wire) Get the input's serialized size.
public uint32_tinput_sequence(input_tinput) Get the input's sequence number.
public size_tinput_signature_operations(input_tinput,int bip16_active) Get the input's signature operations count.
publicscript_t`[input_script](#input_8h_1a5962a64778d3825861968bd7b93f37ca)([input_t](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa) input)` Get input script.
publicoutput_point_t`[input_previous_output](#input_8h_1a6117fe1c39f484f7fef1d76df61cb514)([input_t](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa) input)` Get the input's previous output.
publichash_t`[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.
publicheader_t`[merkle_block_header](#merkle__block_8h_1ad4ee91f14e5bab50b388c5438ad59698)([merkle_block_t](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9) block)` Get Merkle block header.
public intmerkle_block_is_valid(merkle_block_tblock) Determine if a Merkle block is valid.
public size_tmerkle_block_hash_count(merkle_block_tblock) Get Merkle block hash count.
public size_tmerkle_block_serialized_size(merkle_block_tblock,uint32_t version) Get Merkle block serialized size.
public size_tmerkle_block_total_transaction_count(merkle_block_tblock) Get Merkle block transaction count.
public voidmerkle_block_destruct(merkle_block_tblock) Release memory held by Merkle block instance.
public voidmerkle_block_reset(merkle_block_tblock) Reset Merkle block.
public voidoutput_destruct(output_toutput) Release memory held by an output instance.
public intoutput_is_valid(output_toutput) Determine if an output is valid.
public size_toutput_serialized_size(output_toutput,int wire) Get the output's serialized size.
public uint64_toutput_value(output_toutput) Get the output's value.
public size_toutput_signature_operations(output_toutput) Get the output signature operations count.
publicscript_t`[output_script](#output_8h_1a8d1f20140cb6d480fbfe0e2622fa5065)([output_t](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0) output)` : Get the output's script
publichash_t`[output_get_hash](#output_8h_1aabd1bd7f280dc40de4e81b3470bb1ab4)([output_t](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0) output)` Get output hash.
public uint32_toutput_get_index(output_toutput) Get the output's index.
publichash_t`[output_point_get_hash](#output__point_8h_1ac9f315a515685375a2b015f2afe17eef)([output_point_t](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074) output)` Get the output point's hash.
publicoutput_point_t`[output_point_construct](#output__point_8h_1aeb7c309b991761bff5cdc4c5cdcbad1e)()` Create an empty output point.
public uint32_toutput_point_get_index(output_point_toutput) Get output point index inside the point. Starts at 0 (zero) with the first one.
public voidoutput_point_destruct(output_point_toutput) Release memory held by output point.
public char const *payment_address_encoded(payment_address_tpayment_address) Encode a payment address.
publicpayment_address_t`[payment_address_construct_from_string](#payment__address_8h_1a266e2071493b7ed6c7ff9bc9eb80b8fb)(char const * address)` Create a payment address from a string.
public uint8_tversion(payment_address_tpayment_address) Get payment address version.
public voidpayment_address_destruct(payment_address_tpayment_address) Release memory held by payment address instance.
publichash_t`[point_get_hash](#point_8h_1a2a624b2b8a7f329d9962b7a1924e12ab)([point_t](#primitives_8h_1af6e7950f472a081d958eb8519843d38b) point)` Get point hash.
public intpoint_is_valid(point_tpoint) Determine if point is valid.
public uint32_tpoint_get_index(point_tpoint) Get point index.
public uint64_tpoint_get_checksum(point_tpoint) Get point checksum.
publicpoint_t`[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_tpoint_list_count(point_list_tpoint_list) Get point list count.
public voidpoint_list_destruct(point_list_tpoint_list) Release memory held by point list instance.
public voidscript_destruct(script_tscript) Release memory held by a script instance.
public intscript_is_valid(script_tscript) Determine if a script is valid.
public intscript_is_valid_operations(script_tscript) Determine if the script operations are valid.
public size_tscript_satoshi_content_size(script_tscript) Get the script Satoshi content size.
public size_tscript_serialized_size(script_tscript,bool prefix) Get script serialized size.
public char const *script_to_string(script_tscript,uint32_t active_forks) Get script string representation.
public size_tscript_sigops(script_tscript,bool embedded) Get script signature operations (sigops) count.
public size_tscript_embedded_sigops(script_tscript,script_tprevout_script) Get script embedded signature operations (sigops) count.
public voidtransaction_destruct(transaction_ttransaction) Release memory held by transaction instance.
public inttransaction_is_valid(transaction_ttransaction) Determine if a transaction is valid.
public uint32_ttransaction_version(transaction_ttransaction) Get transaction version.
public voidtransaction_set_version(transaction_ttransaction,uint32_t version) Set transaction version.
publichash_t`[transaction_hash](#transaction_8h_1a0e6db5b986bbc034483d319f1221b37c)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction)` Get transaction hash.
publichash_t`[transaction_hash_sighash_type](#transaction_8h_1a922f312aad666746d25921814a6f1272)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction,uint32_t sighash_type)` Get transaction sighash by type.
public uint32_ttransaction_locktime(transaction_ttransaction) Get transaction locktime.
public size_ttransaction_serialized_size(transaction_ttransaction,int wire) Get transaction serialized size.
public uint64_ttransaction_fees(transaction_ttransaction) Get transaction fees.
public size_ttransaction_signature_operations(transaction_ttransaction) Get transaction signature operations count.
public size_ttransaction_signature_operations_bip16_active(transaction_ttransaction,int bip16_active) Get transaction BIP0016 signature operations count.
public uint64_ttransaction_total_input_value(transaction_ttransaction) Get the sum of the transaction input values.
public uint64_ttransaction_total_output_value(transaction_ttransaction) Get the sum of the transaction output values.
public inttransaction_is_coinbase(transaction_ttransaction) Determine if a transaction is coinbase.
public inttransaction_is_null_non_coinbase(transaction_ttransaction) Determine if a transaction is null and not coinnase.
public inttransaction_is_oversized_coinbase(transaction_ttransaction) Determine if a transaction is oversized coinbase.
public inttransaction_is_immature(transaction_ttransaction,size_t target_height) Determine if a transaction is immature.
public inttransaction_is_overspent(transaction_ttransaction) Determine if a transaction is overspent.
public inttransaction_is_double_spend(transaction_ttransaction,int include_unconfirmed) Determine if a transaction is double spent.
public inttransaction_is_missing_previous_outputs(transaction_ttransaction) Determine whether transaction is missing previous outputs.
public inttransaction_is_final(transaction_ttransaction,size_t block_height,uint32_t block_time) Determine if a transaction is final.
public inttransaction_is_locktime_conflict(transaction_ttransaction) Determine if a transaction incurs in a locktime conflict.
public size_ttransaction_output_count(transaction_ttransaction) Get transaction output count.
publicoutput_t`[transaction_output_nth](#transaction_8h_1ab85fba65372d0078afedcc839ed50d46)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction,size_t n)` Get the transaction's n-th output.
public size_ttransaction_input_count(transaction_ttransaction) Get transaction input count.
publicinput_t`[transaction_input_nth](#transaction_8h_1a58617f586abf033ed1cdaf77e087d538)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction,size_t n)` Get n-th transaction input.
publicword_list_t`[word_list_construct](#word__list_8h_1ac30529cbf0ce5a79d53add1f61c0c90d)()` Create a new word list instance.
public voidword_list_add_word(word_list_tword_list,const char * word) Add a word to the word list
public voidword_list_destruct(word_list_tword_list) Release memory held by word list object.

Members

enumpoint_kind

0 = output, 1 = spend

Values Descriptions
output
spend

public voidblock_destruct(block_tblock)

Release the memory held by a block object.

Parameters

  • block Handle to a block instance

public intblock_is_valid(block_tblock)

Determine if a block is valid.

Parameters

  • block Handle to a block instance

Returns

True (non zero) iif the block is valid

publicheader_t`[block_header](#block_8h_1aa644a0753e3d370f683883aecc37a199)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block)`

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()

publichash_t`[block_hash](#block_8h_1a30cfad237bdb5bebe5fd7e3b48f3d410)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block)`

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_tblock_transaction_count(block_tblock)

Get the block's transaction count.

Parameters

  • block Handle to a block instance

Returns

The amount of transactions that comprise the block

publictransaction_t`[block_transaction_nth](#block_8h_1a0732e73992d9c4c4789fc54f39e8747a)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block,size_t n)`

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()

public size_tblock_serialized_size(block_tblock,uint32_t version)

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_tblock_subsidy(size_t height)

Get the block subsidy (miner_reward = block_subsidy + transaction_fees)

Parameters

  • height The block's height

Returns

The block's subsidy

public uint64_tblock_fees(block_tblock)

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_tblock_claim(block_tblock)

Get the block's claim.

Parameters

  • block Handle to a block instance

Returns

The block's claim

public uint64_tblock_reward(block_tblock,size_t height)

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

publichash_t`[block_generate_merkle_root](#block_8h_1accd9987fa1b37396e047f6e8b2251c12)([block_t](#primitives_8h_1a8ed39cb12068667c597f544ec838ccc4) block)`

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_tblock_signature_operations(block_tblock)

Get the block's signature operations count.

Parameters

  • block Handle to a block instance

Returns

Amount of block signature operations

public size_tblock_signature_operations_bip16_active(block_tblock,int bip16_active)

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_tblock_total_inputs(block_tblock,int with_coinbase)

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 intblock_is_extra_coinbases(block_tblock)

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 intblock_is_final(block_tblock,size_t height)

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 intblock_is_distinct_transaction_set(block_tblock)

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 intblock_is_valid_coinbase_claim(block_tblock,size_t height)

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 intblock_is_valid_coinbase_script(block_tblock,size_t height)

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 intblock_is_internal_double_spend(block_tblock)

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 intblock_is_valid_merkle_root(block_tblock)

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

publicheader_t`[compact_block_header](#compact__block_8h_1a8cf34d1187d38c7d6201453289a19d5c)([compact_block_t](#primitives_8h_1a43ccacc67cf17b4bf244f421228028ad) block)`

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()

public intcompact_block_is_valid(compact_block_tblock)

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_tcompact_block_serialized_size(compact_block_tblock,uint32_t version)

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_tcompact_block_transaction_count(compact_block_tblock)

Get the compact block's transaction count.

Parameters

  • block Handle to a compact block instance

Returns

Amount of transactions that comprise the compact block

publictransaction_t`[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.

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()

public uint64_tcompact_block_nonce(compact_block_tblock)

Get compact block's nonce.

Parameters

  • block Handle to a compact block instance

Returns

Compact block's nonce

public voidcompact_block_destruct(compact_block_tblock)

Release memory held by compact block instance.

Parameters

  • block Handle to a compact block instance

public voidcompact_block_reset(compact_block_tblock)

Reset compact block.

Parameters

  • block Handle to a compact block instance

publicexecutor_t`[executor_construct](#executor__c_8h_1aed246db742bdb2aeee6842a8743ea094)(char const path,FILE sout,FILE * serr)`

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()

publicexecutor_t`[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.

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()

public voidexecutor_destruct(executor_texec)

Destroys an executor instance (it only releases memory)

Parameters

  • exec Handle to executor instance

public voidexecutor_run(executor_texec,run_handler_thandler)

After executor_initchain() 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

public intexecutor_run_wait(executor_texec)

After executor_initchain() 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 intexecutor_initchain(executor_texec)

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 voidexecutor_stop(executor_texec)

Stops execution of the node.

Parameters

  • exec Handle to executor instance

public voidfetch_last_height(executor_texec,last_height_fetch_handler_thandler)

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

public intget_last_height(executor_texec,size_t * height)

Get the current blockchain height. This is the synchronous version of fetch_last_height(), 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 voidfetch_block_height(executor_texec,hash_thash,block_height_fetch_handler_thandler)

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

public intget_block_height(executor_texec,hash_thash,size_t * height)

Given a block, get its height in the blockchain. This is the synchronous version of fetch_block_height(), 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 voidfetch_block_header_by_height(executor_texec,size_t height,block_header_fetch_handler_thandler)

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

public intget_block_header_by_height(executor_texec,size_t height,header_t* 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(), 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()

  • ret_height The block's height

Returns

Error code. Zero for success, non zero for error

public voidfetch_block_header_by_hash(executor_texec,hash_thash,block_header_fetch_handler_thandler)

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

public intget_block_header_by_hash(executor_texec,hash_thash,header_t* header,size_t * ret_height)

Given a block hash, retrieve its header. This is the synchronous version of fetch_block_header_by_height(), 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 voidfetch_block_by_height(executor_texec,size_t height,block_fetch_handler_thandler)

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

public intget_block_by_height(executor_texec,size_t height,block_t* block,size_t * ret_height)

Given a block's height, retrieve the block. This is the synchronous version of fetch_block_by_height(), 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 voidfetch_block_by_hash(executor_texec,hash_thash,block_fetch_handler_thandler)

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

public intget_block_by_hash(executor_texec,hash_thash,block_t* block,size_t * ret_height)

Given a block's hash, retrieve the block. This is the synchronous version of fetch_block_by_height(), 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()

  • ret_height Block height

Returns

Error code. Zero for success, non zero for error

public voidfetch_merkle_block_by_height(executor_texec,size_t height,merkle_block_fetch_handler_thandler)

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

public voidfetch_merkle_block_by_hash(executor_texec,hash_thash,merkle_block_fetch_handler_thandler)

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

public voidfetch_compact_block_by_height(executor_texec,size_t height,compact_block_fetch_handler_thandler)

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

public voidfetch_compact_block_by_hash(executor_texec,hash_thash,compact_block_fetch_handler_thandler)

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

public voidfetch_transaction(executor_texec,hash_thash,int require_confirmed,transaction_fetch_handler_thandler)

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

public intget_transaction(executor_texec,hash_thash,int require_confirmed,transaction_t* transaction,size_t * ret_height,size_t * index)

Given a transaction's hash, retrieve it This is the synchronous version of fetch_transaction(), 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 voidfetch_transaction_position(executor_texec,hash_thash,int require_confirmed,transaction_index_fetch_handler_thandler)

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

public voidfetch_output(executor_texec,hash_thash,uint32_t index,int require_confirmed,output_fetch_handler_thandler)

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

public intget_output(executor_texec,hash_thash,uint32_t index,int require_confirmed,output_t* output)

Given an output's hash, retrieve it This is the synchronous version of fetch_output(), 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()

Returns

Error code. Zero for success, non zero for error

public voidfetch_spend(executor_texec,output_point_toutpoint,spend_fetch_handler_thandler)

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

public voidfetch_history(executor_texec,payment_address_taddress,size_t limit,size_t from_height,history_fetch_handler_thandler)

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

public intget_history(executor_texec,payment_address_taddress,size_t limit,size_t from_height,history_compact_list_t* 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(), 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()

Returns

Error code. Zero for success, non zero for error

publictransaction_t`[hex_to_tx](#executor__c_8h_1a8af262d3a75ff3da484cbbccac8a987a)(char const * tx_hex)`

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()

public voidvalidate_tx(executor_texec,transaction_ttx,validate_tx_handler_thandler)

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

publiclong_hash_t`[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.

Parameters

  • mnemonics List of keywords/mnemonics

Returns

Handle to long_hash object containing the seed. Must be released by calling long_hash_destroy()

public voidlong_hash_destroy(long_hash_tptr)

Release the memory held by a long hash object.

Parameters

  • ptr Handle to long hash object

public voidheader_destruct(header_theader)

Releases memory held by the header object.

Parameters

  • header Handle to the header instance

public intheader_is_valid(header_theader)

Determine if the header is valid.

Parameters

  • header Handle to a header instance

Returns

True (non zero) iif the header is valid

public uint32_theader_version(header_theader)

Get header version.

Parameters

  • header Handle to a header instance

Returns

Header version

public voidheader_set_version(header_theader,uint32_t version)

Set a header's version.

Parameters

  • header Handle to a header instance

  • version New version value

public uint32_theader_timestamp(header_theader)

Get header timestamp.

Parameters

  • header Handle to a header instance

Returns

Header timestamp

public voidheader_set_timestamp(header_theader,uint32_t timestamp)

Set header timestamp.

Parameters

  • header Handle to a header instance

  • timestamp New header timestamp value

public uint32_theader_bits(header_theader)

Get header bits.

Parameters

  • header Handle to a header instance

Returns

Header bits

public voidheader_set_bits(header_theader,uint32_t bits)

Set header bits.

Parameters

  • header Handle to a header instance

  • bits New header bits value

public uint32_theader_nonce(header_theader)

Get header nonce.

Parameters

  • header Handle to a header instance

Returns

Header nonce

public voidheader_set_nonce(header_theader,uint32_t nonce)

Set header nonce

Parameters

  • header Handle to a header instance

  • nonce New header nonce value

publichash_t`[header_previous_block_hash](#header_8h_1ac048f31bf04639f83e5be544adf9b977)([header_t](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8) header)`

Get previous block hash.

Parameters

  • header Handle to a header instance

publichash_t`[header_merkle](#header_8h_1af0f199ca6fed2c5cc37fedfe5dd86b47)([header_t](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8) header)`

Get header Merkle.

Parameters

  • header Handle to a header instance

Returns

Header Merkle hash. Must be released by calling delete[]

publichash_t`[header_hash](#header_8h_1a625887dacbb1b408e292e0ff6a5638fc)([header_t](#primitives_8h_1ae6323fbfdc3ff99f33acbae250895ab8) header)`

Get header hash.

Parameters

  • header Handle to a header instance

Returns

Header hash as byte array. Must be released by calling delete[]

publicpoint_kind_t`[history_compact_get_point_kind](#history__compact_8h_1ad821d566985946fe24bc56f95d3a89c2)([history_compact_t](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d) history)`

Get the entry's point kind.

Parameters

  • history Handle to a history entry instance

Returns

Entry's point kind

publicpoint_t`[history_compact_get_point](#history__compact_8h_1a86510b343ae158fb7ceefbdbdb92a304)([history_compact_t](#primitives_8h_1afecbcaff5ab6fec4cda05ca77abb093d) history)`

Get the entry's point.

Parameters

  • history Handle to a history entry instance

Returns

Entry's point

public uint32_thistory_compact_get_height(history_compact_thistory)

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_thistory_compact_get_value_or_previous_checksum(history_compact_thistory)

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 voidhistory_compact_list_destruct(history_compact_list_thistory_compact_list)

Release memory held by a history compact list instance.

Parameters

  • history_compact_list Handle to a history compact list instance

public size_thistory_compact_list_count(history_compact_list_thistory_compact_list)

Get the amount of entries in the list.

Parameters

  • history_compact_list Handle to a history compact list instance

Returns

Entry count

publichistory_compact_t`[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.

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 voidinput_destruct(input_tinput)

Release the memory held by an input instance.

Parameters

  • input Handle to an input instance

public intinput_is_valid(input_tinput)

Determine if an input is valid.

Parameters

  • input Handle to an input instance

Returns

True (non zero) iif the input is valid

public intinput_is_final(input_tinput)

Determine if an input is final.

Parameters

  • input Handle to an input instance

Returns

True (non zero) iif the input is final

public size_tinput_serialized_size(input_tinput,int wire)

Get the input's serialized size.

Parameters

  • input Handle to an input instance

  • wire Deprecated; currently ignored

Returns

Input's serialized size

public uint32_tinput_sequence(input_tinput)

Get the input's sequence number.

Parameters

  • input Handle to an input instance

Returns

The input's sequence number

public size_tinput_signature_operations(input_tinput,int bip16_active)

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

publicscript_t`[input_script](#input_8h_1a5962a64778d3825861968bd7b93f37ca)([input_t](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa) input)`

Get input script.

Parameters

  • input Handle to an input instance

Returns

Handle to input script. Must be released by calling script_destruct()

publicoutput_point_t`[input_previous_output](#input_8h_1a6117fe1c39f484f7fef1d76df61cb514)([input_t](#primitives_8h_1acb1903f2f2f7ed4502a5f53615cff8aa) input)`

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

publichash_t`[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.

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[]

publicheader_t`[merkle_block_header](#merkle__block_8h_1ad4ee91f14e5bab50b388c5438ad59698)([merkle_block_t](#primitives_8h_1a17bcda76594c1a89acd36ec09d5e41a9) block)`

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()

public intmerkle_block_is_valid(merkle_block_tblock)

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_tmerkle_block_hash_count(merkle_block_tblock)

Get Merkle block hash count.

Parameters

  • block Handle to a Merkle block instance

Returns

The Merkle block hash count

public size_tmerkle_block_serialized_size(merkle_block_tblock,uint32_t version)

Get Merkle block serialized size.

Parameters

  • block Handle to a Merkle block instance

  • version Protocol version

Returns

The Merkle block serialized size

public size_tmerkle_block_total_transaction_count(merkle_block_tblock)

Get Merkle block transaction count.

Parameters

  • block Handle to a Merkle block instance

Returns

Merkle block transaction count

public voidmerkle_block_destruct(merkle_block_tblock)

Release memory held by Merkle block instance.

Parameters

  • block Handle to a Merkle block instance

public voidmerkle_block_reset(merkle_block_tblock)

Reset Merkle block.

Parameters

  • block Handle to a Merkle block instance

public voidoutput_destruct(output_toutput)

Release memory held by an output instance.

Parameters

  • output Handle to an output instance

public intoutput_is_valid(output_toutput)

Determine if an output is valid.

Parameters

  • output Handle to an output instance

Returns

True (non zero) iif the output is valid

public size_toutput_serialized_size(output_toutput,int wire)

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_toutput_value(output_toutput)

Get the output's value.

Parameters

  • output Handle to an output instance

Returns

The output's value

public size_toutput_signature_operations(output_toutput)

Get the output signature operations count.

Parameters

  • output Handle to an output instance

Returns

Amount of signature operations in the output

publicscript_t`[output_script](#output_8h_1a8d1f20140cb6d480fbfe0e2622fa5065)([output_t](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0) output)`

: 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

publichash_t`[output_get_hash](#output_8h_1aabd1bd7f280dc40de4e81b3470bb1ab4)([output_t](#primitives_8h_1a6db821b2b1332e8be7a662d075ede0b0) output)`

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_toutput_get_index(output_toutput)

Get the output's index.

Parameters

  • output Handle to an output instance

Returns

Output index

publichash_t`[output_point_get_hash](#output__point_8h_1ac9f315a515685375a2b015f2afe17eef)([output_point_t](#primitives_8h_1ad4d5035e7d5ca4f6a10eafdfdfd2e074) output)`

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[]

publicoutput_point_t`[output_point_construct](#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_toutput_point_get_index(output_point_toutput)

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 voidoutput_point_destruct(output_point_toutput)

Release memory held by output point.

Parameters

  • output Handle to an output point instance

public char const *payment_address_encoded(payment_address_tpayment_address)

Encode a payment address.

Parameters

  • payment_address Handle to a payment address instance

Returns

Encoded payment address

publicpayment_address_t`[payment_address_construct_from_string](#payment__address_8h_1a266e2071493b7ed6c7ff9bc9eb80b8fb)(char const * address)`

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()

public uint8_tversion(payment_address_tpayment_address)

Get payment address version.

Parameters

  • payment_address Handle to a payment address instance

Returns

Payment address version

public voidpayment_address_destruct(payment_address_tpayment_address)

Release memory held by payment address instance.

Parameters

  • payment_address Handle to a payment address instance

publichash_t`[point_get_hash](#point_8h_1a2a624b2b8a7f329d9962b7a1924e12ab)([point_t](#primitives_8h_1af6e7950f472a081d958eb8519843d38b) point)`

Get point hash.

Parameters

  • point Handle to point instance

Returns

Point hash as byte array. Must be released by calling delete[]

public intpoint_is_valid(point_tpoint)

Determine if point is valid.

Parameters

  • point Handle to point instance

Returns

True (non zero) iif point is valid

public uint32_tpoint_get_index(point_tpoint)

Get point index.

Parameters

  • point Handle to point instance

Returns

Point index

public uint64_tpoint_get_checksum(point_tpoint)

Get point checksum.

Parameters

  • point Handle to point instance

Returns

Point checksum

publicpoint_t`[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.

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_tpoint_list_count(point_list_tpoint_list)

Get point list count.

Parameters

  • point_list Handle to a point list instance

Returns

Point list count

public voidpoint_list_destruct(point_list_tpoint_list)

Release memory held by point list instance.

Parameters

  • point_list Handle to a point list instance

public voidscript_destruct(script_tscript)

Release memory held by a script instance.

Parameters

  • script Handle to a script instance

public intscript_is_valid(script_tscript)

Determine if a script is valid.

Parameters

  • script Handle to a script instance

Returns

True (non zero) iif the script is valid

public intscript_is_valid_operations(script_tscript)

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_tscript_satoshi_content_size(script_tscript)

Get the script Satoshi content size.

Parameters

  • script Handle to a script instance

Returns

Script Satoshi content size

public size_tscript_serialized_size(script_tscript,bool prefix)

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_tscript,uint32_t active_forks)

Get script string representation.

Parameters

  • script Handle to a script instance

  • active_forks Active forks count

Returns

Script string representation

public size_tscript_sigops(script_tscript,bool embedded)

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_tscript_embedded_sigops(script_tscript,script_tprevout_script)

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 voidtransaction_destruct(transaction_ttransaction)

Release memory held by transaction instance.

Parameters

  • transaction Handle to transaction instance

public inttransaction_is_valid(transaction_ttransaction)

Determine if a transaction is valid.

Parameters

  • transaction Handle to transaction instance

Returns

True (non zero) iif a transaction is valid

public uint32_ttransaction_version(transaction_ttransaction)

Get transaction version.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction version

public voidtransaction_set_version(transaction_ttransaction,uint32_t version)

Set transaction version.

Parameters

  • transaction Handle to transaction instance

  • version New value for transaction version

publichash_t`[transaction_hash](#transaction_8h_1a0e6db5b986bbc034483d319f1221b37c)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction)`

Get transaction hash.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction hash as byte array. Must be released by calling delete[]

publichash_t`[transaction_hash_sighash_type](#transaction_8h_1a922f312aad666746d25921814a6f1272)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction,uint32_t sighash_type)`

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_ttransaction_locktime(transaction_ttransaction)

Get transaction locktime.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction locktime

public size_ttransaction_serialized_size(transaction_ttransaction,int wire)

Get transaction serialized size.

Parameters

  • transaction Handle to transaction instance

  • wire Deprecated; currently ignored

Returns

Transaction serialized size

public uint64_ttransaction_fees(transaction_ttransaction)

Get transaction fees.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction fees

public size_ttransaction_signature_operations(transaction_ttransaction)

Get transaction signature operations count.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction signature operations count

public size_ttransaction_signature_operations_bip16_active(transaction_ttransaction,int bip16_active)

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_ttransaction_total_input_value(transaction_ttransaction)

Get the sum of the transaction input values.

Parameters

  • transaction Handle to transaction instance

Returns

Sum of transaction input values

public uint64_ttransaction_total_output_value(transaction_ttransaction)

Get the sum of the transaction output values.

Parameters

  • transaction Handle to transaction instance

Returns

Sum of transaction output values

public inttransaction_is_coinbase(transaction_ttransaction)

Determine if a transaction is coinbase.

Parameters

  • transaction Handle to transaction instance

Returns

True (non zero) iif transaction is coinbase

public inttransaction_is_null_non_coinbase(transaction_ttransaction)

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 inttransaction_is_oversized_coinbase(transaction_ttransaction)

Determine if a transaction is oversized coinbase.

Parameters

  • transaction Handle to transaction instance

Returns

True (non zero) iif the transaction is oversized coinbase

public inttransaction_is_immature(transaction_ttransaction,size_t target_height)

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 inttransaction_is_overspent(transaction_ttransaction)

Determine if a transaction is overspent.

Parameters

  • transaction Handle to transaction instance

Returns

True (non zero) iif the transaction is overspent

public inttransaction_is_double_spend(transaction_ttransaction,int include_unconfirmed)

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 inttransaction_is_missing_previous_outputs(transaction_ttransaction)

Determine whether transaction is missing previous outputs.

Parameters

  • transaction Handle to transaction instance

Returns

True (non zero) iif transaction is missing previous outputs

public inttransaction_is_final(transaction_ttransaction,size_t block_height,uint32_t block_time)

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 inttransaction_is_locktime_conflict(transaction_ttransaction)

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_ttransaction_output_count(transaction_ttransaction)

Get transaction output count.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction output count

publicoutput_t`[transaction_output_nth](#transaction_8h_1ab85fba65372d0078afedcc839ed50d46)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction,size_t n)`

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()

public size_ttransaction_input_count(transaction_ttransaction)

Get transaction input count.

Parameters

  • transaction Handle to transaction instance

Returns

Transaction input count

publicinput_t`[transaction_input_nth](#transaction_8h_1a58617f586abf033ed1cdaf77e087d538)([transaction_t](#primitives_8h_1a5618f23f10ca9f9ad96cf52f4059e995) transaction,size_t n)`

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

publicword_list_t`[word_list_construct](#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()

public voidword_list_add_word(word_list_tword_list,const char * word)

Add a word to the word list

Parameters

  • word_list Handle to a word list instance

  • word New word

public voidword_list_destruct(word_list_tword_list)

Release memory held by word list object.

Parameters

  • word_list Handle to a word list instance

Generated by Moxygen

results matching ""

    No results matching ""