Class: Remitmd::MockSigner

Inherits:
Object
  • Object
show all
Includes:
Signer
Defined in:
lib/remitmd/mock.rb

Overview

─── Internal: MockSigner ──────────────────────────────────────────────────

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject (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(_message)
  "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