Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This is an under-construction official gem from Universa to facilitate access to the Java library using Universa UMI protocol and Universa client services.
contract.state
and contract.transactional
in new revisions.This gem is already used in new Universa projects and is being actively tested.
JVM v1.8.* must be installed.
Add this line to your application's Gemfile:
gem 'universa'
And then execute:
$ bundle
Or install it yourself as:
$ gem install universa
include Universa
@private_key = PrivateKey.new 2048
c = Contract.create @private_key
c.get_creator.get_all_addresses.should == [@private_key.long_address.to_s]
c.seal()
c.check() and c.trace_errors()
c.should be_ok
c1 = Contract.from_packed(c.packed)
c1.hash_id.should == c.hash_id
c1.should == c
c1.expires_at.should > (Time.now + 120)
see smaples in specs (spec/contract_spec, spec/compound_spec, etc.)
So far, you can only get direct access the the Java API functions. To get it:
require 'universa'
umi = Universa::UMI.new
p umi.version #=> "0.8.8"
key = umi.instantiate "PrivateKey", 2048
contract = umi.instantiate "Contract", key
sealed = contract.seal()
puts "Contract is ok: #{contract.check()}" #=> contract is ok: true"
puts "Contract id: #{contract.getId.toBase64String}" #=> contract id: x9Ey+q...
# ruby-style snake case could also be used:
contract_id = contract.get_id.to_base64_string
for more information see:
The Universa::Service greatly simplify work taking all boilerplate. Just create objects almost as usual and use them as is they are local:
key = PrivateKey.new(open('mykey.private.unikey', 'rb').read)
contract = Contract.new(key)
contract.seal()
p contract.check()
The system will create UMI server and do all the work for you. Look at the RemoteAdapter class to see how does it work. Soon we'll add adapters for all frequently used Universa classes.
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 tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/universa. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Universa project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that universa demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.