Download the PHP package legalthings/lto-api without Composer

On this page you can find all versions of the php package legalthings/lto-api. 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 lto-api

LTO github readme

LTO Network client for PHP

PHP Scrutinizer Code Quality Code Coverage Packagist Stable Version Packagist License

Signing and addresses work both for the (private) event chain as for the public chain.

Installation

composer require lto/api

Accounts

Creation

Create an account from seed

Create an account from sign key

Create an account from full info

Properties that are specified will be verified. Properties that are omitted will be generated where possible.

Signing (ED25519)

Sign a message

Verify a signature

Encryption (X25519)

Encrypt a message for another account

You can use $account->encryptFor($account, $message); to encrypt a message for yourself.

Decrypt a message received from another account

You can use $account->decryptFrom($account, $message); to decrypt a message from yourself.

Public layer

Private layer

Event chain

Create a new event chain

Note: You need to add an identity as first event on the chain. This is not done automatically.

Create and sign an event and add it to an existing event chain

You need the chain id and the hash of the last event to use an existing chain.

HTTP Authentication

Signing HTTP Messages is described IETF draft draft-cavage-http-signatures-10.

The HTTP Authentication library can be used to sign and verify PSR-7 requests.

This library can be used in conjunction with the HTTP authentication library. The keyId should be the base58 encoded public key.

For POST and PUT requests, it's recommended to create an HTTP Digest (RFC 3230). This is a hash of the body, which manages to indirectly include the body in the signature. See the HTTP Digest library.

Creating the HTTP Authentication service

Server middleware

Create server middleware to verify incoming requests.

The LTO\Account\ServerMiddleware can be used to set the account attribute for a server request that contains a signature_key_id attribute.

The server middleware implements the PSR-15 MiddlewareInterface for single pass support and returns a callback for double pass with the asDoublePass() method.

Client middleware

Create client middleware to sign outgoing requests.

Commandline scripts

Generate account from seed

Get the seed from stdin to generate account info.

By default a mainnet (L) address is generated. Pass T as argument to create a testnet address.

Account info

Show account info from the secret key. The secret key should be base58 encoded.

By default a mainnet (L) address is generated. Pass T as third argument to create a testnet address.

Sign message

Sign a message (from stdin). The secret key should be base58 encoded. Outputs the signature and hash (base58 encoded).


All versions of lto-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
ext-json Version *
ext-sodium Version *
legalthings/base58-compat Version ^0.1.0
psr/http-message Version ^1.0
psr/http-server-middleware Version ^1.0
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 legalthings/lto-api contains the following files

Loading the files please wait ....