Download the PHP package joaosantanadev/skynet-php-mr without Composer

On this page you can find all versions of the php package joaosantanadev/skynet-php-mr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package skynet-php-mr

Skynet PHP SDK

This SDK is a community-created, unofficial SDK in PHP for the Skynet Decentralized Internet Network. It is taken as primarily a port from https://github.com/SkynetLabs/skynet-js.

Better documentation will come in the future. However, despite being a mirror, there are some details to know to use the library. The API will also likely improve and change in the future. This initial version is a reflection of the JS library.

Classes

Functions

Most functions from skynet-js have been ported over. The ones of most interest will be in src/functions/mysky.php. Not all functions are grouped together the same way.

Please note there are two versions of genKeyPairFromSeed in different namespaces since the mysky library uses a different version only for signing registry entries and getting your PUBLIC ID. \Skynet\functions\mysky\genKeyPairFromSeed uses an extra derivation hashing step for security.

It was decided given the evolution of PHP; these functions don't need to emulate PHP classes. So they are standalone functions that are inner dependant unless there is a reason to refactor.

Usage

You will most often want to make use of the MySky class. Example:

DO NOT USE THIS SEED. It is valid for demonstration purposes, but as it is published here, it can never be trusted since ANYONE can make use or abuse it. Portal can be configured but will default to siasky.net

Upload File

This example will upload a file and, by being logged in, will be pinned to your account:

You can send raw data as well as long as it doesn't match a file:

Pin Skylink

This will pin a skylink to your account. A skylink must be pinned by atleast one portal to stay online. The skylink is a content ID including metadata:

Create Plaintext DataLink/Resolver

Create JSON file

JSON data can be either a stdClass object or an array. the returned datalink is the skylink. It can be referenced again from the file path.

Contributing

Any contributions are welcome. I will rapidly be iterating on this software since running as a server-side language can be very different from the browser. Semver will be followed as practical. Consider this software tested because it has nearly all unit tests from the JS version, but still experimental as it has not gotten any real-world use yet, but that will change.


All versions of skynet-php-mr with dependencies

PHP Build Version
Package Version
Requires paragonie/sodium_compat Version ^1.17
rmccue/requests Version ^1.8
jakeasmith/http_build_url Version ^1
simplito/bn-php Version ^1.1
ext-json Version *
ext-curl Version *
ankitpokhrel/tus-php Version ^1.2
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package joaosantanadev/skynet-php-mr contains the following files

Loading the files please wait ....