Blockchain! Blockchain! Blockchain! - The blockchain-lite, ledger-lite, merkletree, centralbank, etc gems moved to a new home / monorepo

Hello,

  I moved the blockchain-lite, ledger-lite, merkletree, centralbank,
tulipmania, etc. gems [1]
to a new home / monorepo, that is, blockchain @ ruby code commons (coco).

  Happy blockchaining and growing money on (merkle) trees with ruby.
Cheers. Prost.

PS: From the blockchain-lite readme:

Let's get started. Build your own blockchain one block at a time.
Example:

require 'blockchain-lite'

b0 = Block.first(
        { from: "Dutchgrown", to: "Vincent", what: "Tulip Bloemendaal
Sunset", qty: 10 },
        { from: "Keukenhof",  to: "Anne",    what: "Tulip Semper
Augustus",    qty: 7  } )

b1 = Block.next( b0,
        { from: "Flowers", to: "Ruben", what: "Tulip Admiral van
Eijck",  qty: 5 },
        { from: "Vicent",  to: "Anne",  what: "Tulip Bloemendaal
Sunset", qty: 3 },
        { from: "Anne",    to: "Julia", what: "Tulip Semper Augustus",
   qty: 1 },
        { from: "Julia",   to: "Luuk",  what: "Tulip Semper Augustus",
   qty: 1 } )

b2 = Block.next( b1,
        { from: "Bloom & Blossom", to: "Daisy",   what: "Tulip Admiral
of Admirals", qty: 8 },
        { from: "Vincent",         to: "Max",     what: "Tulip
Bloemendaal Sunset",  qty: 2 },
        { from: "Anne",            to: "Martijn", what: "Tulip Semper
Augustus",     qty: 2 },
        { from: "Ruben",           to: "Julia",   what: "Tulip Admiral
van Eijck",   qty: 2 } )
## ...

blockchain = [b0, b1, b2, ...]
pp blockchain

will pretty print (pp) something like:

[#<Block:0x2da3da0
  @index              = 0,
  @timestamp          = 1637-09-24 11:40:15,
  @previous_hash      = "0",
  @hash               =
"32bd169baebba0b70491b748329ab631c85175be15e1672f924ca174f628cb66",
  @transactions_count = 2,
  @transactions       =
   [{:from=>"Dutchgrown", :to=>"Vincent", :what=>"Tulip Bloemendaal
Sunset", :qty=>10},
    {:from=>"Keukenhof",  :to=>"Anne",    :what=>"Tulip Semper
Augustus",    :qty=>7}]>,
 #<Block:0x2da2ff0
  @index              = 1,
  @timestamp          = 1637-09-24 11:50:15,
  @previous_hash      =
"32bd169baebba0b70491b748329ab631c85175be15e1672f924ca174f628cb66",
  @hash               =
"57b519a8903e45348ac8a739c788815e2bd90423663957f87e276307f77f1028",
  @transactions_count = 4,
  @transactions       =
   [{:from=>"Flowers", :to=>"Ruben", :what=>"Tulip Admiral van Eijck",
 :qty=>5},
    {:from=>"Vicent",  :to=>"Anne",  :what=>"Tulip Bloemendaal
Sunset", :qty=>3},
    {:from=>"Anne",    :to=>"Julia", :what=>"Tulip Semper Augustus",
 :qty=>1},
    {:from=>"Julia",   :to=>"Luuk",  :what=>"Tulip Semper Augustus",
 :qty=>1}]>,
 #<Block:0x2da2720
  @index              = 2,
  @timestamp          = 1637-09-24 12:00:15,
  @previous_hash      =
"57b519a8903e45348ac8a739c788815e2bd90423663957f87e276307f77f1028",
  @hash               =
"ec7dd5ea86ab966d4d4db182abb7aa93c7e5f63857476e6301e7e38cebf36568",
  @transactions_count = 4,
  @transactions       =
   [{:from=>"Bloom & Blossom", :to=>"Daisy",   :what=>"Tulip Admiral
of Admirals", :qty=>8},
    {:from=>"Vincent",         :to=>"Max",     :what=>"Tulip
Bloemendaal Sunset",  :qty=>2},
    {:from=>"Anne",            :to=>"Martijn", :what=>"Tulip Semper
Augustus",     :qty=>2},
    {:from=>"Ruben",           :to=>"Julia",   :what=>"Tulip Admiral
van Eijck",   :qty=>2}]>,
 ...

[1] https://github.com/rubycoco/blockchain

How can I ever thank you?

···

Sent from my iPhone

On Nov 2, 2020, at 2:51 AM, Gerald Bauer <gerald.bauer@gmail.com> wrote:

Hello,

I moved the blockchain-lite, ledger-lite, merkletree, centralbank,
tulipmania, etc. gems [1]
to a new home / monorepo, that is, blockchain @ ruby code commons (coco).

Happy blockchaining and growing money on (merkle) trees with ruby.
Cheers. Prost.

PS: From the blockchain-lite readme:

Let's get started. Build your own blockchain one block at a time.
Example:

require 'blockchain-lite'

b0 = Block.first(
       { from: "Dutchgrown", to: "Vincent", what: "Tulip Bloemendaal
Sunset", qty: 10 },
       { from: "Keukenhof",  to: "Anne",    what: "Tulip Semper
Augustus",    qty: 7  } )

b1 = Block.next( b0,
       { from: "Flowers", to: "Ruben", what: "Tulip Admiral van
Eijck",  qty: 5 },
       { from: "Vicent",  to: "Anne",  what: "Tulip Bloemendaal
Sunset", qty: 3 },
       { from: "Anne",    to: "Julia", what: "Tulip Semper Augustus",
  qty: 1 },
       { from: "Julia",   to: "Luuk",  what: "Tulip Semper Augustus",
  qty: 1 } )

b2 = Block.next( b1,
       { from: "Bloom & Blossom", to: "Daisy",   what: "Tulip Admiral
of Admirals", qty: 8 },
       { from: "Vincent",         to: "Max",     what: "Tulip
Bloemendaal Sunset",  qty: 2 },
       { from: "Anne",            to: "Martijn", what: "Tulip Semper
Augustus",     qty: 2 },
       { from: "Ruben",           to: "Julia",   what: "Tulip Admiral
van Eijck",   qty: 2 } )
## ...

blockchain = [b0, b1, b2, ...]
pp blockchain

will pretty print (pp) something like:

[#<Block:0x2da3da0
 @index              = 0,
 @timestamp          = 1637-09-24 11:40:15,
 @previous_hash      = "0",
 @hash               =
"32bd169baebba0b70491b748329ab631c85175be15e1672f924ca174f628cb66",
 @transactions_count = 2,
 @transactions       =
  [{:from=>"Dutchgrown", :to=>"Vincent", :what=>"Tulip Bloemendaal
Sunset", :qty=>10},
   {:from=>"Keukenhof",  :to=>"Anne",    :what=>"Tulip Semper
Augustus",    :qty=>7}]>,
#<Block:0x2da2ff0
 @index              = 1,
 @timestamp          = 1637-09-24 11:50:15,
 @previous_hash      =
"32bd169baebba0b70491b748329ab631c85175be15e1672f924ca174f628cb66",
 @hash               =
"57b519a8903e45348ac8a739c788815e2bd90423663957f87e276307f77f1028",
 @transactions_count = 4,
 @transactions       =
  [{:from=>"Flowers", :to=>"Ruben", :what=>"Tulip Admiral van Eijck",
:qty=>5},
   {:from=>"Vicent",  :to=>"Anne",  :what=>"Tulip Bloemendaal
Sunset", :qty=>3},
   {:from=>"Anne",    :to=>"Julia", :what=>"Tulip Semper Augustus",
:qty=>1},
   {:from=>"Julia",   :to=>"Luuk",  :what=>"Tulip Semper Augustus",
:qty=>1}]>,
#<Block:0x2da2720
 @index              = 2,
 @timestamp          = 1637-09-24 12:00:15,
 @previous_hash      =
"57b519a8903e45348ac8a739c788815e2bd90423663957f87e276307f77f1028",
 @hash               =
"ec7dd5ea86ab966d4d4db182abb7aa93c7e5f63857476e6301e7e38cebf36568",
 @transactions_count = 4,
 @transactions       =
  [{:from=>"Bloom & Blossom", :to=>"Daisy",   :what=>"Tulip Admiral
of Admirals", :qty=>8},
   {:from=>"Vincent",         :to=>"Max",     :what=>"Tulip
Bloemendaal Sunset",  :qty=>2},
   {:from=>"Anne",            :to=>"Martijn", :what=>"Tulip Semper
Augustus",     :qty=>2},
   {:from=>"Ruben",           :to=>"Julia",   :what=>"Tulip Admiral
van Eijck",   :qty=>2}]>,
...

[1] https://github.com/rubycoco/blockchain

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>