Class: Siwe::Config
- Inherits:
-
Object
- Object
- Siwe::Config
- Defined in:
- lib/siwe/config.rb
Overview
Verification config — pluggable adapter (crypto) plus RPC URL or RPC client for the smart-wallet (ERC-1271 / ERC-6492) verification path.
Set globally via Siwe.configure { |c| … } or per-call as ‘verify(config: …)`.
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#rpc ⇒ Object
readonly
Returns the value of attribute rpc.
-
#rpc_url ⇒ Object
readonly
Returns the value of attribute rpc_url.
Instance Method Summary collapse
-
#initialize(rpc_url: nil, rpc: nil, adapter: nil) ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
11 12 13 |
# File 'lib/siwe/config.rb', line 11 def adapter @adapter end |
#rpc ⇒ Object (readonly)
Returns the value of attribute rpc.
11 12 13 |
# File 'lib/siwe/config.rb', line 11 def rpc @rpc end |
#rpc_url ⇒ Object (readonly)
Returns the value of attribute rpc_url.
11 12 13 |
# File 'lib/siwe/config.rb', line 11 def rpc_url @rpc_url end |
Instance Method Details
#to_h ⇒ Object
19 20 21 |
# File 'lib/siwe/config.rb', line 19 def to_h { rpc_url: @rpc_url, rpc: @rpc, adapter: @adapter } end |