Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

secure-upload

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-upload

skynet kernel module to securely upload files to skynet

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

secure-upload

secure-upload is a kernel module that provides uploading functionality. The final skylink of the file is computed before uploading to the kernel, which means that the user is guaranteed that the data in the skylink matches the intended upload, the portal cannot cheat here.

secure-upload does trust the portal to properly custody the file on Sia. If the portal decides to delete the file, the file may unexpectedly become unavailable on Skynet. The portal cannot however modify the data, any modifcations will be ignored.

Usage

secureUpload

Input:

{
	module: "AQD1kFeJJhRnkgWGD-ws6V1QITQrHd2WX5pQnU78MM_o3Q",
	method: "secureUpload",
	data: {
		filename: <string>,
		fileData: <Uint8Array>,
	},
}

Output:

{
	skylink: <immutable skylink>,
}

Building

Use npm run build to build and deploy the developer version of the module. This creates a unique seed for each machine that allows you to run tests against a full skynet module without having to push unfinished code to prod.

Use npm run deploy to build and deploy the production code. A password will be requested which is required to deploy to prod.

If this is the first time you have called 'npm run deploy' for this module, you will be asked to create a password. Use a secure password! If someone can guess your password, they can deploy any code they want to your users.

We currently use a password scheme because it is more decentralized. We do not want a central server that controls the deployment process in the Skynet ecosystem. Over time, we will be able to add more sophisticated tooling such as a decentralized 2FA scheme and a decentralized code approval process which ensures code cannot be shipped to users without some process and oversight.

FAQs

Package last updated on 30 Apr 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc