Skip to content
Community maintained Ruby SDK for Stellar
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
examples "setting trust" example points to the spec Jun 6, 2018
lib Prepare v0.7.0 Apr 26, 2019
spec Add Friendbot support Apr 8, 2019
tasks Remove nacl tasks Nov 8, 2016
.gitignore
.travis.yml Update JRuby to avoid failing TravisCI job Apr 30, 2019
.yardopts Add yardoc Mar 25, 2015
CHANGELOG.md
CONTRIBUTING.md
Gemfile Set ruby-stellar-base to 0.0.5, bump to 0.0.2 May 7, 2015
Guardfile Initial commit Mar 22, 2015
LICENSE.txt Update license Apr 7, 2015
README.md Change text that made sense when this repo was under SDF May 12, 2019
Rakefile Remove generic bundler setup code May 23, 2018
ruby-stellar-sdk.gemspec Merge pull request #1 from ccjr/loose_active_support_requirement Apr 8, 2019

README.md

Ruby Stellar

Build Status Code Climate

This library helps you to integrate your application into the Stellar network.

Installation

Add this line to your application's Gemfile:

gem 'stellar-sdk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install stellar-sdk

Also requires libsodium. Installable via brew install libsodium on OS X.

Usage

See examples.

A simple payment from the root account to some random accounts

require 'stellar-sdk'

account   = Stellar::Account.master
client    = Stellar::Client.default_testnet()
recipient = Stellar::Account.random

client.send_payment({
  from:   account,
  to:     recipient,
  amount: Stellar::Amount.new(100_000_000)
}) 

Be sure to set the network when submitting to the public network (more information in stellar-base):

Stellar.default_network = Stellar::Networks::PUBLIC

Development

  • Copy spec/config.yml.sample to spec/config.yml
  • Replace anything in spec/config.yml especially if you will re-record specs
  • rspec spec

Contributing

  1. Sign the Contributor License Agreement
  2. Fork it ( https://github.com/bloom-solutions/ruby-stellar-lib/fork )
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request
You can’t perform that action at this time.