Skip to content

v0.1.0

Choose a tag to compare

@rameerez rameerez released this 18 Mar 03:19
· 3 commits to main since this release

Initial Release

  • Multi-asset wallets per owner via has_wallets — user.wallet(:usd), user.wallet(:gems), etc.
  • Append-only transaction ledger with credit, debit, and transfer_to APIs
  • FIFO allocation for expiring balances — oldest credits consumed first
  • Transfer expiration policies: :preserve (default), :none, :fixed
  • Transfers split into multiple inbound legs when consuming buckets with different expirations
  • Embeddability hooks for other gems to reuse the ledger core with custom tables/config/callbacks
  • Idempotent create_for_owner! with race condition handling
  • Row-level locking to prevent double-spending
  • Balance snapshots on every transaction for reconciliation
  • Rich metadata support on wallets, transactions, and transfers
  • Lifecycle callbacks: on_balance_credited, on_balance_debited, on_transfer_completed, etc.
  • Install generator with migrations and initializer
  • Rails 6.1+ support (tested through Rails 8.x)

What's Changed

  • Add embeddability hooks and transfer expiration policies (v0.2.0) by @rameerez in #1
  • Make create_for_owner! idempotent and race-safe by @rameerez in #2

New Contributors

Full Changelog: https://github.com/rameerez/wallets/commits/v0.1.0