Skip to content

Releases: commercelayer/rail0-ruby

v1.0.0 — rail0-sdk

Choose a tag to compare

@pviti pviti released this 21 Sep 13:28
d6f788f

First published release of the RAIL0 Ruby SDK, live on RubyGems as
rail0-sdk.

gem install rail0-sdk
gem "rail0-sdk"   # Gemfile
require "rail0"   # the require path — unchanged, and canonical

The gem is rail0-sdk; the entry point is rail0. RubyGems has one global namespace and no
scopes, so the package name says what the artifact is rather than claiming the protocol's
name — while Rail0 stays the module every caller already uses. require "rail0-sdk" works
too, for whoever reaches for the name they installed.

What it is

A REST client for the RAIL0 gateway covering the full lifecycle — authorize → capture, void,
release, refund, charge — plus disputes, wallets and their holdings, payment-method
discovery, webhook subscriptions and their delivery log, analytics, accounts, chains, tokens,
health and SIWE auth.

  • Ruby stdlib only at runtime (net/http, json, openssl) beyond logger.
  • Retries with backoff, honouring Retry-After, with cancellation.
  • Pluggable logging, and a default logger for when you want none of it.
  • Typed errors with hints: Rail0::ApiError carries the gateway's own vocabulary.
  • Webhook verification — HMAC signature plus a freshness check.
  • Off-chain EIP-3009 signing and SIWE login are optional. eth and siwe-rb load
    lazily, so require "rail0" works without them and they are needed only if you call
    client.auth.login or Rail0::Signing.

Why 1.0.0 and not 1.2.0

The gem reached 1.2.0 while it was consumed by path: from a sibling checkout, where the
number bought nothing: no registry ever served a 1.x, no tag was ever cut, and its one
consumer resolved the working tree. Publishing from 1.2.0 would have implied two releases
nobody can install, so the published history starts here.

Requirements

  • Ruby ≥ 3.0

Verified at this tag

bundle exec rake — RuboCop across 46 files, no offenses; 178 examples, 0 failures — and a
warning-free gem build. The release task is gated on that same suite through build, so a
publish cannot run ahead of it.


Part of the RAIL0 project, alongside rail0 (the
escrow contract), rail0-gateway (the API
this client talks to) and rail0-ts.