Class: Siwe::Adapter::EthGem
- Inherits:
-
Object
- Object
- Siwe::Adapter::EthGem
- Defined in:
- lib/siwe/adapter.rb
Overview
Default crypto adapter using the eth gem. The verification path only needs signer recovery — any object implementing ‘#verify_message(message, signature)` returning the recovered EIP-55 address can be plugged in via Config.new(adapter:).
Instance Method Summary collapse
Instance Method Details
#verify_message(message, signature) ⇒ Object
14 15 16 17 |
# File 'lib/siwe/adapter.rb', line 14 def (, signature) public_key = Eth::Signature.personal_recover(, signature) Eth::Util.public_key_to_address(public_key).to_s end |