šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

coin-op

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coin-op

0.4.6
Rubygems
Version published
Maintainers
4
Created
Source

Coin-Op

Install:

gem install coin-op

Basic usage:

require "coin-op"

include CoinOp::Bit

transaction = Transaction.from_data(
  # Override the minimum suggested fee
  :fee => 20_000,
  :inputs => [
    {
      :output => {
        :transaction_hash => "2f47a8d7537fd981670b6142f86e1961991577506a825cdfb4c6ab3666db4fc1",
        :index => 0,
        :value => 2_000_000
      }
    },
    {
      :output => {
        :transaction_hash => "fe4d26f6536c17c451e7d9fd7bca3e981a1c9f4542ee49f3bdcb71050c8ef243",
        :index => 0,
        :value => 2_600_000
      }
    }
  ],
  :outputs => [
    {
      :value => 3_000_000,
      :address => "2N9c7acEJNHkDaQvRShMxJcBu5Lw535AvwR"
    }
  ]
)

transaction.add_change(change_address)

# Set the script_sigs manually
transaction.inputs[0].script_sig = "foo"
transaction.inputs[1].script_sig = "bar"

# Or use an iterating helper method. First argument is an array of
# items corresponding to the inputs.  The block yields to you each
# input, along with the corresponding element from your array.
transaction.set_script_sigs *keypairs do |input, keypair|
  sig_for(keypair, input)
end

Developers

Installing dependencies:

gem install starter
rake gem:deps

Running the tests:

rake test

FAQs

Package last updated on 09 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts