Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
tests_silentpayments_generate Namespace Reference

Functions

 sha256 (s)
 smallest_outpoint (outpoints)
 is_p2tr (s)
 get_pubkey_from_input (input_data, pubkey_hex)
 gen_byte_array (hex)
 maybe_gen_comment (comment)
 gen_key_material (keys, comment=None, prepend_count=False)
 gen_recipient_addr_material (recipients)
 gen_sending_outputs (output_sets, comment=None, prepend_count=False)
 gen_outputs (outputs, comment=None, prepend_count=False, indent=8)
 gen_labels (labels)
 gen_preamble (test_vectors)
 gen_test_vectors (test_vectors)
 main ()

Variables

 NUMS_H = bytes.fromhex("50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0")
int MAX_INPUTS_PER_TEST_CASE = 3
int MAX_OUTPUTS_PER_TEST_CASE = 2324
int MAX_RECIPIENT_ENTRIES_PER_TEST_CASE = 4
int MAX_LABELS_PER_TEST_CASE = 4
int MAX_PERMUTATIONS_PER_SENDING_TEST_CASE = 12
int MAX_RECEIVE_SUBTESTS = 2

Detailed Description

A script to convert BIP352 test vectors from JSON to a C header.

Usage:

    ./tools/tests_silentpayments_generate.py src/modules/silentpayments/bip352_send_and_receive_test_vectors.json  > ./src/modules/silentpayments/vectors.h

Function Documentation

◆ gen_byte_array()

gen_byte_array ( hex)

Definition at line 68 of file tests_silentpayments_generate.py.

◆ gen_key_material()

gen_key_material ( keys,
comment = None,
prepend_count = False )

Definition at line 81 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

◆ gen_labels()

gen_labels ( labels)

Definition at line 146 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

◆ gen_outputs()

gen_outputs ( outputs,
comment = None,
prepend_count = False,
indent = 8 )

Definition at line 133 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

◆ gen_preamble()

gen_preamble ( test_vectors)

Definition at line 158 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

◆ gen_recipient_addr_material()

gen_recipient_addr_material ( recipients)

Definition at line 94 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

◆ gen_sending_outputs()

gen_sending_outputs ( output_sets,
comment = None,
prepend_count = False )

Definition at line 119 of file tests_silentpayments_generate.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_test_vectors()

gen_test_vectors ( test_vectors)

Definition at line 219 of file tests_silentpayments_generate.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pubkey_from_input()

get_pubkey_from_input ( input_data,
pubkey_hex )
Extract the correct pubkey for an input, handling NUMS_H filtering and format conversion

Definition at line 33 of file tests_silentpayments_generate.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_p2tr()

is_p2tr ( s)

Definition at line 30 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

◆ main()

main ( void )

Definition at line 311 of file tests_silentpayments_generate.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maybe_gen_comment()

maybe_gen_comment ( comment)

Definition at line 75 of file tests_silentpayments_generate.py.

◆ sha256()

sha256 ( s)

Definition at line 23 of file tests_silentpayments_generate.py.

◆ smallest_outpoint()

smallest_outpoint ( outpoints)

Definition at line 26 of file tests_silentpayments_generate.py.

Here is the caller graph for this function:

Variable Documentation

◆ MAX_INPUTS_PER_TEST_CASE

int tests_silentpayments_generate.MAX_INPUTS_PER_TEST_CASE = 3

Definition at line 16 of file tests_silentpayments_generate.py.

◆ MAX_LABELS_PER_TEST_CASE

int tests_silentpayments_generate.MAX_LABELS_PER_TEST_CASE = 4

Definition at line 19 of file tests_silentpayments_generate.py.

◆ MAX_OUTPUTS_PER_TEST_CASE

int tests_silentpayments_generate.MAX_OUTPUTS_PER_TEST_CASE = 2324

Definition at line 17 of file tests_silentpayments_generate.py.

◆ MAX_PERMUTATIONS_PER_SENDING_TEST_CASE

int tests_silentpayments_generate.MAX_PERMUTATIONS_PER_SENDING_TEST_CASE = 12

Definition at line 20 of file tests_silentpayments_generate.py.

◆ MAX_RECEIVE_SUBTESTS

int tests_silentpayments_generate.MAX_RECEIVE_SUBTESTS = 2

Definition at line 21 of file tests_silentpayments_generate.py.

◆ MAX_RECIPIENT_ENTRIES_PER_TEST_CASE

int tests_silentpayments_generate.MAX_RECIPIENT_ENTRIES_PER_TEST_CASE = 4

Definition at line 18 of file tests_silentpayments_generate.py.

◆ NUMS_H

tests_silentpayments_generate.NUMS_H = bytes.fromhex("50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0")

Definition at line 15 of file tests_silentpayments_generate.py.