Class: Solrengine::Sdp::Ramps
- Inherits:
-
Object
- Object
- Solrengine::Sdp::Ramps
- Defined in:
- lib/solrengine/sdp/ramps.rb
Overview
Thin engine wrapper over solana-sdp’s ramps surface (SDP fiat on/off-ramps). Its only job is to default ‘provider:` from config.ramp_provider so apps don’t repeat it on every call — the same convenience custody_provider gives wallet calls. Everything else passes straight through to the client; there is no model and no extra state.
SANDBOX-ONLY in v0.2: wired against SDP’s ramp surface and verified against the sandbox, not live fiat rails. Treat as preview.
Instance Method Summary collapse
-
#initialize(client:, provider: nil) ⇒ Ramps
constructor
provider may be nil (no configured default) — then callers must pass ‘provider:` per call, and the client validates it.
- #offramp_currencies(**kwargs) ⇒ Object
- #offramp_execute(**kwargs) ⇒ Object
- #onramp_currencies(**kwargs) ⇒ Object
- #onramp_execute(**kwargs) ⇒ Object
- #onramp_quote(**kwargs) ⇒ Object
-
#simulate_ramp(**payload) ⇒ Object
The sandbox event hook — no provider involved; pure passthrough.
Constructor Details
#initialize(client:, provider: nil) ⇒ Ramps
provider may be nil (no configured default) — then callers must pass ‘provider:` per call, and the client validates it.
16 17 18 19 |
# File 'lib/solrengine/sdp/ramps.rb', line 16 def initialize(client:, provider: nil) @client = client @provider = provider end |
Instance Method Details
#offramp_currencies(**kwargs) ⇒ Object
25 26 27 |
# File 'lib/solrengine/sdp/ramps.rb', line 25 def offramp_currencies(**kwargs) @client.offramp_currencies(**with_provider(kwargs)) end |
#offramp_execute(**kwargs) ⇒ Object
37 38 39 |
# File 'lib/solrengine/sdp/ramps.rb', line 37 def offramp_execute(**kwargs) @client.offramp_execute(**with_provider(kwargs)) end |
#onramp_currencies(**kwargs) ⇒ Object
21 22 23 |
# File 'lib/solrengine/sdp/ramps.rb', line 21 def onramp_currencies(**kwargs) @client.onramp_currencies(**with_provider(kwargs)) end |
#onramp_execute(**kwargs) ⇒ Object
33 34 35 |
# File 'lib/solrengine/sdp/ramps.rb', line 33 def onramp_execute(**kwargs) @client.onramp_execute(**with_provider(kwargs)) end |
#onramp_quote(**kwargs) ⇒ Object
29 30 31 |
# File 'lib/solrengine/sdp/ramps.rb', line 29 def onramp_quote(**kwargs) @client.onramp_quote(**with_provider(kwargs)) end |
#simulate_ramp(**payload) ⇒ Object
The sandbox event hook — no provider involved; pure passthrough.
42 43 44 |
# File 'lib/solrengine/sdp/ramps.rb', line 42 def simulate_ramp(**payload) @client.simulate_ramp(**payload) end |