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

storj-nodejs

v1.0.2

Published

Storj-NodeJS bindings package

Downloads

17

Readme

storj-nodejs binding

*Developed using RC v1.0.2 storj/uplink-c

Initial Set-up

NOTE: for Golang

Make sure your PATH includes the $GOPATH/bin directory, so that your commands can be easily used Refer: Install the Go Tools:

export PATH=$PATH:$GOPATH/bin

NOTE: for Nodejs

  • Please ensure Node.js with version 10 or higher is installed

  • Check its version

$ node -v
  • Install node-gyp globally
$ npm install -g node-gyp
  • Install the storj-nodejs Node.js package
$ npm install storj-nodejs

NOTE: for windows please ensure make is already installed.

Sample Hello Storj!

The sample HelloStorj.js code calls the libUplinkNode.js binding module to do the following: * create a new bucket within desired Storj project * list buckets on storj V3 * write a file from local system to the created Storj bucket * list object on storj V3 * read back the object from the Storj bucket to local system for verification * create share access * delete uploaded object * delete created bucket

Node.js-Storj Binding Functions

parse_accessc(String)

  • function parse_accessc to parses serialized access grant string
  • pre-requisites: None
  • inputs: accessString (String)
  • output: AccessResult (Object)

request_access_with_passphrasec(String, String, String)

  • function request_access_with_passphrasec requests satellite for a new access grant using a passhprase
  • pre-requisites: None
  • inputs: satellite address (String),API key (String) and passphrase (String)
  • output: AccessResult (Object)

config_request_access_with_passphrasec(Config ,String, String, String)

  • function config_request_access_with_passphrasec requests satellite for a new access grant using a passhprase and config
  • pre-requisites: None
  • inputs: satellite address (String),API key (String) and passphrase (String)
  • output: AccessResult (Object)

open_projectc(Access)

  • function open_project opens project using access grant.
  • pre-requisites: request_access_with_passphrasec or config_request_access_with_passphrasec
  • inputs: Access (Object)
  • output: ProjectResult (Object)

config_open_projectc(Config, Access)

  • function open_project opens project using access grant and config
  • pre-requisites: request_access_with_passphrasec or config_open_projectc
  • inputs: Access (Object)
  • output: ProjectResult (Object)

close_projectc(Project)

  • function close_projectc closes the project.
  • pre-requisites: open_projectc
  • inputs: Project (Object)
  • output: Error (Object)

stat_bucketc(Project, String)

  • function stat_bucketc returns information about a bucket.
  • pre-requisites: open_projectc
  • inputs: Project (Object) ,Bucket Name (String)
  • output: BucketResult (Object)

ensure_bucketc(Project, String)

  • function ensure_bucketc creates a new bucket and ignores the error when it already exists
  • pre-requisites: open_projectc
  • inputs: Project (Object) ,Bucket Name (String)
  • output: BucketResult (Object)

create_bucketc(Project, String)

  • function create_bucketc creates a new bucket.
  • pre-requisites: open_projectc
  • inputs: Project (Object) ,Bucket Name (String)
  • output: BucketResult (Object)

delete_bucketc(Project, String)

  • function delete_bucketc deletes a bucket.
  • pre-requisites: open_projectc
  • inputs: Project (object) ,Bucket Name (string)
  • output: BucketResult (object)

list_bucketsc(Project, ListBucketsOptions)

  • function list_bucketsc lists buckets
  • pre-requisites: open_projectc
  • inputs: Project (Object) ,ListBucketsOptions(Object)
  • output: BucketList (Object)

stat_objectc(Project, String, String)

  • function stat_objectc information about an object at the specific key.
  • pre-requisites: open_projectc
  • inputs: Project (Object) ,Bucket Name (String) , Object Key(String)
  • output: ObjectResult (Object)

upload_objectc(Project, String, String, Upload Options)

  • function upload_objectc starts an upload to the specified key.
  • pre-requisites: open_projectc
  • inputs: Project (Object) ,Bucket Name (String) , Object Key(String) , Uplaod Options(Object)
  • output: UploadResult (Object)

upload_writec(Upload, Pointer, size_t)

  • function upload_writec uploads len(p) bytes from p to the object's data stream.
  • pre-requisites: upload_objectc
  • inputs: Upload (Object) ,Pointer(Buffer) , Length (size_t)
  • output: WriteResult (Object)

download_objectc(Project, String, String, Download Options)

  • function download_objectc starts download to the specified key.
  • pre-requisites: open_projectc
  • inputs: Project (Object), Buxcket Name(String), Object Key(String), Download Options(Object)
  • output: DownloadResult (Object)

upload_commitc(Upload)

  • function upload_commitc commits the uploaded data.
  • pre-requisites: upload_objectc
  • inputs: Upload (Object)
  • output: Error (Object)

close_downloadc(Download)

  • function close_downloadc closes the download.
  • pre-requisites: download_objectc
  • inputs: Download (Object)
  • output: Error (Object)

download_readc(Download, Pointer, size_t)

  • function download_readc downloads from object's data stream into bytes up to length amount.
  • pre-requisites: download_objectc
  • inputs: Download (Object), Pointer (Buffer), Length(size_t)
  • output: ReadResult (Object)

delete_objectc(Project, String, String)

  • function delete_objectc deletes an object.
  • pre-requisites: open_projectc
  • inputs: Project (Object), Bucket Name (String), Object Key (String)
  • output: ObjectResult (Object)

access_sharec(Access, Permission, SharePrefix, int)

  • function access_sharec creates new access grant with specific permission. Permission will be applied to prefixes when defined.
  • pre-requisites: parse_accessc
  • inputs: Access (Object), Permission (Object), Share Prefix (Object), prefix count (int)
  • output: String Result (Object)

list_objectsc(Project, String, ListObjectsOptions)

  • function list_objectsc lists objects
  • pre-requisites: open_projectc
  • inputs: Project (Object), Bucket Name(String), ListObjectsOptions(Object)
  • output: ObjectList (Object)

access_serializec(Access)

  • function access_serializec serializes access grant into a string.
  • pre-requisites: parse_accessc
  • inputs: Access (Object)
  • output: String Result (object)

upload_infoc(Upload)

  • function upload_infoc returns the last information about the uploaded object.
  • pre-requisites: upload_objectc
  • inputs: Upload (Object)
  • output: Object Result (object)

upload_abortc(Upload)

  • function upload_abortc aborts an upload.
  • pre-requisites: upload_objectc
  • inputs: Upload (Object)
  • output: Error (Object)

download_infoc(Download)

  • function download_infoc returns information about the downloaded object.
  • pre-requisites: download_objectc
  • inputs: Download (Object)
  • output: Object Result (Object)

upload_set_custom_metadatac(Upload, CustomMetadata)

  • function upload_set_custom_metadatac set custom meta information
  • pre-requisites: upload_objectc
  • inputs: Upload (Object), CustomMetadata
  • output: Error (object)

Tested On

MacOS

  • OS version : 10.15.3
  • Node version : 13.6.0

Windows

  • OS version : Windows 10
  • Node version : v10.18.1

Ubuntu

  • OS version : 16.04
  • Node version : 10.12.0