PHPackages                             joaosantanadev/skynet-php-mr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. joaosantanadev/skynet-php-mr

ActiveLibrary

joaosantanadev/skynet-php-mr
============================

Skynet SDK for PHP

1.0(4y ago)041MITPHP

Since Dec 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/joaosantanadev/skynet-php-mr)[ Packagist](https://packagist.org/packages/joaosantanadev/skynet-php-mr)[ RSS](/packages/joaosantanadev-skynet-php-mr/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

Skynet PHP SDK
--------------

[](#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 .

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

[](#classes)

- Skynet
    - This is the bottom layer of the system where most operations happen at
- Registry
    - This is the basic key -&gt; value store system. This is the database system that is used with your keypair to manage records
- Db
    - This is the system that is used to set basic registry entries linked to your keypair, which are not encrypted
- MySky
    - This is where all file management actions revolving around your account (seed) happen, including encrypted files. This also enables creating file paths that are stored as hashes in the Db and can also be encrypted via libsodium.

#### Functions

[](#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.

- generateSeedPhrase
- validatePhrase

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

[](#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

[](#upload-file)

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

```
$drive = new \Skynet\MySky('roster donuts tycoon dunes muffin vector nasty jingle goblet amidst often wife digit earth eight');
$drive->setPortalLogin('john.doe@gmail.com', 'password');
$drive->setPortal('https://yourprivateportal.com');
$skyfile = $drive->getSkynet()->uploadFile(\Skynet\Types\File::fromResource('/mnt/data/file_to_upload.txt'));
echo $skyfile->getSkylink();
```

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

```
$skyfile = $drive->getSkynet()->uploadFile(\Skynet\Types\File::fromResource('Hello World'));
```

### Pin Skylink

[](#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:

```
$skynet = new \Skynet\Skynet();
$drive->setPortalLogin('john.doe@gmail.com', 'password');
$skyfile = $drive->pinSkylink('XABvi7JtJbQSMAcDwnUnmp2FKDPjg8_tTTFP4BwMSxVdEg')
echo $skyfile->getSkylink();
```

### Create Plaintext DataLink/Resolver

[](#create-plaintext-datalinkresolver)

```
$drive = new \Skynet\MySky('roster donuts tycoon dunes muffin vector nasty jingle goblet amidst often wife digit earth eight');
$drive->setPortalLogin('john.doe@gmail.com', 'password');
$drive->getDb()->setDataLink($drive->getKey()->getPrivatekey(), 'hello_world', 'XABvi7JtJbQSMAcDwnUnmp2FKDPjg8_tTTFP4BwMSxVdEg');
$entry = $drive->getDb()->getRegistry()->getEntry( $drive->getKey()->getPublicKey(), 'hello_world');
```

### Create JSON file

[](#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.

```
$drive = new \Skynet\MySky('roster donuts tycoon dunes muffin vector nasty jingle goblet amidst often wife digit earth eight');
$drive->setPortalLogin('john.doe@gmail.com', 'password');
$skylink = $drive->setJSON('/data/my_json_file.json', ['message' => 'hello world'] );
echo $skylink->getDataLink();
```

Contributing
------------

[](#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.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1622d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61dac710ce808087e367a6c11f67fba50339957c0080b1cdf96792be19826faf?d=identicon)[joaofilho](/maintainers/joaofilho)

---

Top Contributors

[![joaosantanadev](https://avatars.githubusercontent.com/u/82423306?v=4)](https://github.com/joaosantanadev "joaosantanadev (3 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/joaosantanadev-skynet-php-mr/health.svg)

```
[![Health](https://phpackages.com/badges/joaosantanadev-skynet-php-mr/health.svg)](https://phpackages.com/packages/joaosantanadev-skynet-php-mr)
```

###  Alternatives

[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[yourls/yourls

Your Own URL Shortener

11.9k27.7k1](/packages/yourls-yourls)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[paragonie/ciphersweet

Searchable field-level encryption library for relational databases

4641.2M21](/packages/paragonie-ciphersweet)[soneso/stellar-php-sdk

Stellar PHP SDK for the Stellar Network

4048.2k4](/packages/soneso-stellar-php-sdk)[pumukit/pumukit

Media Portal

5714.0k37](/packages/pumukit-pumukit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
