npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

arrlaravel

v1.0.36

Published

A server-side library for creating and signing oblio transactions in php and nodejs

Downloads

4

Readme

#What is this? A server-side library for creating and signing oblio transactions in php and nodejs

A server-side library for creating and signing messages between servers in php and nodejs. there is a littlebit of hardwiring in here for project oblio sites as well, which should allow you to accept messages from these sites as being "trusted" if you want. but this part is really just for our own purposes and backend stuff.

Compatibility

tbh this might be the first library in history to be compatible in both php and nodejs. This comes at a cost at the PHP side, as it uses system commands to interact with javascript library (try using nodejs >=8.11.1). Sometimes function is more important than form, as a php library for signing transactions doesn't seem to exist inside the ethereum ecosystem except for this one, and we gain the advantage of using the exact same library in any relevant server environment.

This is important because:

One of the really important improvements of this library is that all signatures are inherently probabilistic (meaning noise is added before signing a message then automatically removed by the recipient). This enhances security because the same message will never be signed to the same value twice (important for deterring snoopers). It's actually standard practice in encryption, but I know some Ethereum libraries that don't do this by default.

Installation

nodejs

Run the command:

npm install --save arrlaravel

php/laravel

Run the command:

composer require "projectoblio/arrlaravel @dev"

Make sure you have nodejs >= 8.11.1 (but anything above 6 should work)

both!

Add a file called "serverKey" to your root project directory. Store a private key for your site in there. Can be any string

Initializiation

nodejs

	var Arrlaravel = require("arrlaravel");
	var arrlaravel = new ArrLaravel({"privateKey":"adsklfjaslkdjfalksjf"}); // easiest 
	// or 
	var arrlaravel = new ArrLaravel({"path":"/home/you/site/folder/serverKey"}); // path to privatekey
	// or 
	var arrlaravel = new ArrLaravel({"path":"/home/you/site/folder/serverKey","siteName":"oblioBomb"}); // useful for identifying yourself to project oblio later on
	
	

laravel (simple mod for php i think

	use Projectoblio\Arrlaravel\ArrProvider;
	
	// class or whatever function thing { 
	 
	//ajlkasdjflsakjfd is your private key. In oblio servers, this input is the siteName don't worry about that)
	// second input is the vendor directory where your package will be installed. needed to access js auth.js
	$arr = new ArrProvider("ajlkasdjflsakjfd","/root/laravel-tests/vendor/projectoblio/arrlaravel");

	// call "commandByPrivateKey" since you initialized with a privateKey. Sorry about that
	// first input is the command inside auth.js (_this[command]);
	// second input is a comma-separated list of inputs
	$output = $arr->commandByPrivateKey("createIdentity",""); // first input is the function name. second input is json version of your thing
	// will give you an ethPublickey, private key as output
	
	// this will give you an Ethereum address from any private key. Useful if you're creating addresses for users (be careful)
	$output = $arr->commandByPrivateKey("privateKeyToAddress","oiewqufadshvflsadhf"); 

	// This will give you the server's public key. Useful if you want another user or server to send you a signed message
	$output = $arr->commandByPrivateKey("getServerPublicKey");

	// Sign a message 
	// note that this has to be a public key, not an ethereum address ( :( ) . That's just how encryption works sadly
	$output = $arr->commandByPrivateKey("send","aSecretMessage,aPublicKey");

	// Receive a message. will be decrypted using your server's  private key.
	// ensure the message was sencrypted iwth your server's public key
	$output = $arr->commandByPrivateKey("receive","theSecretMessage");

	
	// Probabilstically encrypt a piece of data so that it can only be opened by dubs.projectoblio.com
	// "dubs" is a hardwired string linked to the dubsPublicKey
	$output = $arr->commandByPrivateKey("send","aSecretMessage,dubs")

	 
	
	

Supported methods / commands

Questions?

Contact [email protected]

Manual package update (admin)

https://packagist.org/packages/projectoblio/arrlaravel

npm update

npm publish