
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
ruby gem for encoding and decoding Monero Payment Request Standard requests.
Install the gem and add to the application's Gemfile by executing:
$ bundle add monerorequest
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install monerorequest
Encode a request:
require 'monerorequest'
req = {
"custom_label" => "[some string here]",
"sellers_wallet" => "[monero main address, starts with 4]",
"currency" => "USD",
"amount" => 420.69,
"payment_id" => "[monero payment ID]",
"start_date" => "[timestamp in rfc3339 format]",
"days_per_billing_cycle" => 30,
"number_of_payments" => 12,
"change_indicator_url" => "[some url here]"
}
enc = Monerorequest::Encoder.new(req, 1)
Decode a request:
require 'monerorequest'
req = "monero-request:1:H4sIAAAAAAACAy2QS4vUQBSF/0qondA9XanqJJ3sZjEozGYW4kooKpWbTjmVqnQ9pjuKID7HlStxZiEo4pMBQRAcFPwvCq5c2O0fMD24utxzOR/n3FuItyZoj4o0iWm+k8YjJBqu58CkrqTg3lgWrEIFarzvisnEGlOOG5AVaAtSNDuw4m2nYCJsuIkGd7AWtOgHx8GVgwvBedMyxUvYYtafHrz49fT13+8nb+rNnS/nm7ff3v04vb+/fvj8w/WAcQw/3z++dDnai67tbp4cP4ouRP7787M/Z69eJtF+tNycnd/bW9/9+NUN+Ir3jnVgWSmVknrORC8UoCKnI6RDWw4XU7OO9y1o71BB8hH6vzFZDYFIlRFe1yTPeVblpB6YDpQC69iSD3P4DZruUtybtGxXcqZS08yrlMeYmMNF1lF+o1FULvzMxwL3C3DikAM/8jSmSpbG9NbWqll1mQtJ6jgJJqFHIe+obDQsLU22NZzn1rOKe9hGwmQ6xskYp1fjWTElBaFjnBUYo9v/ANjVPGWxAQAA"
dec = Monerorequest::Decoder.new(req)
dec.decode
Encode a request:
require 'monerorequest'
req = {
"custom_label" => "[some string here]",
"sellers_wallet" => "[monero main address, starts with 4]",
"currency" => "USD",
"amount" => 420.69,
"payment_id" => "[monero payment ID]",
"start_date" => "[timestamp in rfc3339 format]",
"schedule" => '* * 1 * *',
"number_of_payments" => 12,
"change_indicator_url" => "[some url here]"
}
enc = Monerorequest::Encoder.new(req, 2)
Decode a request:
require 'monerorequest'
req = "monero-request:2:H4sIAAAAAAACAy2PTW/CMAyG/wrKEVFIE9rS3nbbkcPukZu4JCNNSj6Abtp/X5h2sCw/9vva/iYw++wSGdqm5v2+rXdEanAXFMYpIyH5IHKwZCA6pWU4HIL3Y6XRKHQBjdR7fMK8WDzIkL9IUecQ0Mm1KM7v5z8Qk5+FhRFfNgljKtTlecQg/CQWWGd0KZKB9TvyXwmjyixTHYNpYn0PnerZVHRRalTZYuluN9tNXWL7wmgthigeUHL5hhzfOF19O85Pc7Kt1xfVQk2Zv966hcOnttzc0inVkq43jPIKCPfEa27N6P0awmT1c+libtoILPuG33O/cKMdPgJv4mtlgpCEgvS6hVF2rGhT0fajPg1HNjBe0W6glPz8AihAH5JjAQAA"
dec = Monerorequest::Decoder.new(req)
dec.decode
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Adding a new Monerorequest version should be simple.
lib/monerorequest.rb
.bundle exec rubocop
to ensure it passes the linter.Bug reports and pull requests are welcome on GitHub at https://github.com/snex/monerorequest.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that monerorequest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.