Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This gem provides EU governmental data, extracted from various EU / EC websites. With this gem you can validate VAT numbers, retrieve VAT tax rates and currency exchange rates matched to the Euro. How to use this gem is pretty straightforward and written below.
Add this line to your application's Gemfile:
gem 'europe'
And then execute:
$ bundle
Or install it yourself as:
$ gem install europe
There are several calls you can make with this gem. Below are a few examples where this gem can be used for.
** Updated: Parameter now consists of one value.** Call to validate VAT number (always starts with country code as specified in VIES)
Europe::Vat.validate('NL009291477B01')
Response
{ :country_code => "NL",
:vat_number => "009291477B01",
:request_date => #<Date: 2015-12-15 ((2457372j,0s,0n),+0s,2299161j)>,
:valid => true,
:name => "KONINKLIJKE POSTNL B.V.",
:address => nil }
Call
Europe::Vat::Format.validate('NL123456789B01')
Response
=> true
Call
Europe::Postal.validate('NL', '1000 AP')
Response
=> true
Call
Europe::Vat::Rates.retrieve
Response
{ :AT=>20.0,
:BE=>21.0,
:BG=>20.0,
:CY=>19.0,
:CZ=>21.0,
:DE=>19.0,
:DK=>25.0,
# etc...
Call
Europe::Currency::ExchangeRates.retrieve
Response
{ :date=>#<Date: 2015-12-15 ((2457372j,0s,0n),+0s,2299161j)>,
:rates=>
{ :USD=>1.099,
:JPY=>132.97,
:BGN=>1.9558,
:CZK=>27.022,
:DKK=>7.4614,
:GBP=>0.7252,
# etc...
Call
Europe::Currency::CURRENCIES
Response
CURRENCIES = {
EUR: { name: 'Euro', symbol: '€', html: '€' },
BGN: { name: 'Lev', symbol: 'лв', html: 'лв' },
# etc...
Call
Europe::Countries::COUNTRIES
Response
{
:BE=>
{:name=>"Belgium",
:source_name=>"Belgique/België",
:official_name=>"Kingdom of Belgium",
:tld=>".be",
:currency=>:EUR,
:capital=>"Brussels"},
:BG=>
{:name=>"Bulgaria",
:source_name=>"България",
:official_name=>"Republic of Bulgaria",
:tld=>".bg",
:currency=>:BGN,
:capital=>"Sofia"},
# etc...
Call with optional parameters (name, currency, source_name, official_name, tld, currency and capital)
Europe::Countries::Reversed.generate('name')
Response
{ "Belgium" => :BE,
"Bulgaria" => :BG,
"Czech Republic" => :CZ,
"Denmark" => :DK,
"Germany" => :DE,
"Estonia" => :EE,
# etc...
This gem is tested with the following Ruby versions on Linux and Mac OS X:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that europe 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.