Class: KeyPair
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- KeyPair
- Defined in:
- lib/sr25519_lib.rb
Instance Method Summary collapse
-
#public_key ⇒ Object
Return the keypair public key.
- #to_s ⇒ Object
Instance Method Details
#public_key ⇒ Object
Return the keypair public key
23 24 25 26 27 28 |
# File 'lib/sr25519_lib.rb', line 23 def public_key pub_key = self[:String].to_a[64..96] public_key = PublicKey.new public_key[:String].to_ptr.write_array_of_uint8(pub_key) public_key end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/sr25519_lib.rb', line 30 def to_s self[:String].to_a.pack("c*").unpack1("H*") end |