
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
= BigMoney
== Description
Represents an amount of money in a particular currency. Backed by BigDecimal, so it's safe from float rounding errors.
== Features
== Problems
== Todo
== Synopsis
=== Basic
require 'big_money'
bm = BigMoney.new('3.99', :aud) bm.amount #=> BigDecimal.new('3.99') bm.currency #=> BigMoney::Currency::AUD bm.to_s #=> '3.99' bm.to_s('$.2f') #=> '$3.99' bm.to_s('$%.2f %s') #=> '$3.99 AUD'
BigMoney::Currency.default = :aud
bm = BigMoney.new('3.99') bm.amount #=> BigDecimal.new('3.99') bm.currency #=> BigMoney::Currency::AUD
bm2 = 1.to_big_money bm2.amount #=> BigDecimal.new('3.99') bm2.currency #=> BigMoney::Currency::AUD
=== Exchange
require 'big_money' require 'big_money/exchange/yahoo' # Use yahoo finance exchange service.
require 'moneta' require 'moneta/memcache' BigMoney::Exchange.cache = Moneta::Memcache.new(server: 'localhost', default_ttl: 3_600)
bm = BigMoney.new('3.99', :usd) bm.amount #=> BigDecimal.new('3.99') bm.currency #=> BigMoney::Currency::USD
bm2 = bm.exchange(:aud) bm.amount #=> BigDecimal.new('5.22') bm.currency #=> BigMoney::Currency::AUD
=== Parser
require 'big_money' require 'big_money/parser'
BigMoney.parse('JPY ¥2500') #=> BigMoney.new('2500', :jpy) BigMoney.parse('JPY2500') #=> BigMoney.new('2500', :jpy) BigMoney.parse('2500JPY') #=> BigMoney.new('2500', :jpy) BigMoney.parse('¥2500JPY') #=> BigMoney.new('2500', :jpy)
bm = BigMoney.parse('¥2500') #=> BigMoney.new('2500', :xxx) bm.exchange(:jpy) #=> BigMoney.new('2500', :jpy)
=== Types
require 'big_money' require 'big_money/types'
1.to_big_money(:aud) #=> BigMoney.new(1, :aud) 12_123.44.to_big_money(:aud) #=> BigMoney.new('12123.44', :aud)
'1'.to_big_money(:aud) #=> BigMoney.new(1, :aud)
== Install
Via git:
git clone git://github.com/shanna/big_money.git
Via gem:
gem install big_money
== License
See LICENSE.
FAQs
Unknown package
We found that big_money demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.