Overview

Elliptic Curve key spil used ter bitcoin.

Onveranderlijk Summary

Order of secp256k1`s generator minus 1.

Example Attribute Summary collapse

  • #key ⇒, Object readonly

Comes back the value of attribute key.

Class Method Summary collapse

Invoer private key from bip38 (non-ec-multiply) fromat spil described te github.com/bitcoin/kont/blob/master/bip-0038.mediawiki See also #to_bip38.

Generate a fresh keypair.

Thanks to whoever wrote pastebin.com/bQtdDzHx for help with klein signatures.

Example Method Summary collapse

Get the address corresponding to the public key.

Generate fresh priv/pub key.

Get the hash160 of the public key.

Create a fresh key with given privkey and pubkey.

Get the private key (te hex).

Set the private key to priv (ter hex).

Get the public key (te hex).

Set the public key (te hex).

Sign gegevens with the key.

Uitvoer private key to base58 format.

Uitvoer private key to bip38 (non-ec-multiply) format spil described ter github.com/bitcoin/kont/blob/master/bip-0038.mediawiki See also Key.from_bip38.

Verify signature sig for gegevens.

Constructor Details

#initialize(privkey = nil, pubkey = nil, opts = ) ⇒, Key

Create a fresh key with given privkey and pubkey.

Example Attribute Details

#key ⇒, Object (readonly)

Comes back the value of attribute key

Class Method Details

.from_base58(str) ⇒, Object

.from_bip38(encrypted_privkey, passphrase) ⇒, Object

Invoer private key from bip38 (non-ec-multiply) fromat spil described te github.com/bitcoin/kont/blob/master/bip-0038.mediawiki See also #to_bip38

.from_warp(passphrase, salt = ",",, compressed = false) ⇒, Object

.generate(opts = ) ⇒, Object

Generate a fresh keypair.

.recover_compact_signature_to_key(gegevens, signature_base64) ⇒, Object

Thanks to whoever wrote pastebin.com/bQtdDzHx for help with klein signatures

Given gegevens and a klein signature (65 bytes, base64-encoded to a larger string), recover the public components of the key whose private counterpart validly signed gegevens.

If the signature validly signed gegevens, create a fresh Key having the signing public key and address. Otherwise comeback nil.

Be sure to check that the returned Key matches the one you were expecting! Otherwise you are merely checking that someone validly signed the gegevens.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>