2017 © Pedro Peláez
 

library php-stellar-strkey

A php implementation of Stellar Js SDK's "strkey"

image

bdteo/php-stellar-strkey

A php implementation of Stellar Js SDK's "strkey"

  • Saturday, July 28, 2018
  • by bteo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Stellar StrKey in PHP

This repo is a 1:1 PHP implementation of the StrKey helper from the Stellar Js SDK, (*1)

See it at: https://github.com/stellar/js-stellar-base/blob/master/src/strkey.js, (*2)


composer require bdteo/php-stellar-strkey

According to the Stellar implementation: the 56 character base32 encoded string key can contain binary data of public key, private key, preAuthTx or a sha256Hash. ( Stellar uses Ed25519 public/private keys - https://ed25519.cr.yp.to/ ), (*3)


You can use this class to validate Stellar addresses., (*4)

You can use this class also to check the validity of a Stellar string key, extract the payload data or encode payload data into a sting key., (*5)

Here is an example:, (*6)

use Bdteo\Stellar\StrKey;

$testAddress = 'GDDJ7IIWHZV4KWEX3QH437C3QZL4RTJCSXNVRAQMFESQP6WNZAM4N32Y';
$strKey = new StrKey();

$isValid = $strKey->isValidStellarAddress($testAddress);

echo $isValid
    ? 'Awesome ! The address is valid !'
    : 'Too bad ! Your address is incorrect !'; 

Used on The TokenRush Airdrop Platform

I am planning to publish more general purpose crypto tools in the near future !, (*7)

The Versions

28/07 2018

dev-master

9999999-dev

A php implementation of Stellar Js SDK's "strkey"

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Boris Teoharov