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

Method get_pubkey

test/functional/test_framework/key.py:372–380  ·  view source on GitHub ↗

Compute an ECPubKey object for this secret key.

(self)

Source from the content-addressed store, hash-verified

370 return self.compressed
371
372 def get_pubkey(self):
373 """Compute an ECPubKey object for this secret key."""
374 assert(self.valid)
375 ret = ECPubKey()
376 p = SECP256K1.mul([(SECP256K1_G, self.secret)])
377 ret.p = p
378 ret.valid = True
379 ret.compressed = self.compressed
380 return ret
381
382 def sign_ecdsa(self, msg, low_s=True, rfc6979=False):
383 """Construct a DER-encoded ECDSA signature with this key.

Callers 15

run_testMethod · 0.95
test_double_spendMethod · 0.95
run_testMethod · 0.95
run_testMethod · 0.95
get_keysMethod · 0.95
run_testMethod · 0.95
witness_script_testMethod · 0.95

Calls 2

ECPubKeyClass · 0.85
mulMethod · 0.45

Tested by 3

test_double_spendMethod · 0.76