Class: DbchainClient::PrivateKey
- Inherits:
-
Object
- Object
- DbchainClient::PrivateKey
- Defined in:
- lib/dbchain_client/key.rb
Instance Method Summary collapse
-
#initialize(private_key_hex) ⇒ PrivateKey
constructor
A new instance of PrivateKey.
- #public_key ⇒ Object
- #sign(message) ⇒ Object
Constructor Details
#initialize(private_key_hex) ⇒ PrivateKey
Returns a new instance of PrivateKey.
38 39 40 41 |
# File 'lib/dbchain_client/key.rb', line 38 def initialize(private_key_hex) raw_key = Secp256k1::Utils.decode_hex(private_key_hex) @private_key = Secp256k1::PrivateKey.new(privkey: raw_key) end |