Sha256: fceee0939b1e73a84effa752201812ffd6fddc522e903bc5648f885a2972e6ed

Contents?: true

Size: 598 Bytes

Versions: 2

Compression:

Stored size: 598 Bytes

Contents

#!/usr/bin/env ruby


require 'stellar-base'
require 'faraday'
require 'faraday_middleware'

$server = Faraday.new(url: "http://localhost:39132") do |conn|
  conn.response :json
  conn.adapter Faraday.default_adapter
end

master      = Stellar::KeyPair.from_raw_seed("allmylifemyhearthasbeensearching")
destination = Stellar::KeyPair.random

tx = Stellar::Transaction.create_account({
  account:     master,
  destination: destination,
  sequence:    2,
  starting_balance:  50 * Stellar::ONE
})

b64    = tx.to_envelope(master).to_xdr(:base64)

result = $server.get('tx', blob: b64)
p result.body

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stellar-base-0.1.2 examples/create_account.rb
stellar-base-0.1.1 examples/create_account.rb