Download the PHP package nexgenspin/coordinator without Composer
On this page you can find all versions of the php package nexgenspin/coordinator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nexgenspin/coordinator
More information about nexgenspin/coordinator
Files in nexgenspin/coordinator
Package coordinator
Short Description PHP client for the NexGenSpin Coordinator API with Ed25519 request signing
License MIT
Homepage https://github.com/nexgenspin/coordinator-php
Informations about the package coordinator
NexGenSpin Coordinator PHP Client
Minimal PHP client for the NexGenSpin Coordinator API with Ed25519 request signing via ext-sodium.
Overview
This package demonstrates how to:
- Sign Coordinator requests as
timestamp + exact JSON body - Send the required authentication headers
- Query games, currencies, and languages
- Create demo and real-money sessions
The client itself accepts a single private key format:
- PKCS#8 DER encoded private key represented as hex
For convenience, the example script can read a PEM file and convert it into PKCS#8 DER hex before constructing the client.
Requirements
- PHP 7.4+
ext-sodium
Compatibility has been verified with a live request in Docker using php:7.4-cli.
Repository Layout
src/NexGenSpinCoordinatorClient.php— Coordinator clientsrc/KeyLoader.php— PEM to PKCS#8 DER hex helperexamples/smoke_test.php— runnable staging smoke testexamples/compose.yaml— local Docker/OrbStack smoke test
Installation
Install the package with Composer:
Then autoload it through Composer:
Quick Start
The bundled example uses:
- Staging environment
- A hardcoded operator caller ID in
examples/smoke_test.php - A local PEM file at
./operator.pem
Run it with:
Before running the example, place your own private key at ./operator.pem or update the path in examples/smoke_test.php.
Client Construction
From PKCS#8 DER hex
From PEM file
Example
Available Methods
games()
Fetches the list of games available to the operator.
currencies()
Fetches the list of supported currencies.
languages()
Fetches the list of supported languages.
createSession(array $input)
Creates a game session.
Demo session
For a demo session, omit the operator session and customer identifiers.
Real-money session
Response Shape
Each client method returns an array with:
request.timestamprequest.bodyrequest.signatureresponse.headersresponse.body_rawresponse.json
The response structure is intentionally verbose to support debugging and integration testing.
Integration Notes
- Coordinator signatures are computed as
timestamp + exact JSON body - There is no delimiter between the timestamp and the body
- The body you sign must be byte-for-byte identical to the body you send
- GraphQL requests with no variables must send
{}rather than[]
All versions of coordinator with dependencies
ext-sodium Version *