MCPcopy Create free account
hub / github.com/ElementsProject/elements / generate

Method generate

test/functional/test_framework/key.py:355–357  ·  view source on GitHub ↗

Generate a random private key (compressed or uncompressed).

(self, compressed=True)

Source from the content-addressed store, hash-verified

353 self.compressed = compressed
354
355 def generate(self, compressed=True):
356 """Generate a random private key (compressed or uncompressed)."""
357 self.set(generate_privkey(), compressed)
358
359 def get_bytes(self):
360 """Retrieve the 32-byte representation of this key."""

Callers 15

test_external_inputsMethod · 0.95
run_testMethod · 0.95
test_double_spendMethod · 0.95
run_testMethod · 0.95
run_testMethod · 0.95
run_testMethod · 0.95
init_keysMethod · 0.95
init_keysMethod · 0.95
run_testMethod · 0.95
get_keysMethod · 0.95

Calls 2

setMethod · 0.95
generate_privkeyFunction · 0.85

Tested by 15

test_external_inputsMethod · 0.76
test_double_spendMethod · 0.76
test_change_positionMethod · 0.36
test_spend_2of2Method · 0.36
test_locked_walletMethod · 0.36
test_many_inputs_feeMethod · 0.36
test_many_inputs_sendMethod · 0.36
test_include_unsafeMethod · 0.36