Class: Remitmd::MockSigner
- Inherits:
-
Object
- Object
- Remitmd::MockSigner
- Includes:
- Signer
- Defined in:
- lib/remitmd/mock.rb
Overview
─── Internal: MockSigner ──────────────────────────────────────────────────
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
-
#initialize(addr) ⇒ MockSigner
constructor
A new instance of MockSigner.
- #sign(_message) ⇒ Object
- #sign_hash(_hash_bytes) ⇒ Object
Constructor Details
#initialize(addr) ⇒ MockSigner
Returns a new instance of MockSigner.
102 103 104 |
# File 'lib/remitmd/mock.rb', line 102 def initialize(addr) @address = addr end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
106 107 108 |
# File 'lib/remitmd/mock.rb', line 106 def address @address end |
Instance Method Details
#sign(_message) ⇒ Object
108 109 110 |
# File 'lib/remitmd/mock.rb', line 108 def sign() "0x" + SecureRandom.hex(32) + SecureRandom.hex(32) + "1b" end |
#sign_hash(_hash_bytes) ⇒ Object
112 113 114 |
# File 'lib/remitmd/mock.rb', line 112 def sign_hash(_hash_bytes) "0x" + SecureRandom.hex(32) + SecureRandom.hex(32) + "1b" end |