gmajor/sr25519-bindings
PHP bindings for sr25519 cryptography, enabling Substrate/Polkadot-compatible key handling, signing, and signature verification in PHP and Laravel applications through a simple native-backed API.
Architecture fit
sodium and openssl provide ed25519/ECDSA but not sr25519, so a native binding is genuinely required to do this work in-process. The package therefore fills a real gap rather than duplicating a standard extension.schnorrkel/sr25519-dalek library. That is architecturally thin: little business logic to inherit, but also little abstraction — the calling code owns key lifecycle, SS58 encoding, mnemonic/junction derivation, and error mapping.SignerContract), not as a framework feature.Integration feasibility
.so/extension and ensuring it is present at runtime. This is a meaningful change to the build pipeline (Dockerfile, CI matrix) and rules out many shared-hosting targets.Technical risk
ffi.enable, correct .so loading, and matching glibc/musl and architecture. Extension-based bindings additionally require rebuilds per PHP minor version. Either way, PHP-FPM and long-running queue workers behave differently under FFI.Key questions
Stack fit
SignerInterface in the domain layer with an FFI-backed adapter as one implementation. This lets dev/test environments use deterministic fixtures and lets production swap to a remote signing service without touching call sites.config/ or env vars. Prefer a dedicated signing worker or sidecar.Migration path
.so into an internal artifact registry keyed by PHP version/arch so rebuilds are reproducible and independent of the upstream repo.Compatibility
Sequencing
Maintenance
^ ranges on a 0.x package.schnorrkel/sr25519-dalek, not the PHP shim.Support
Scaling
Failure modes
Ramp-up
subkey or a Rust reference) before touching production flows.How can I help you explore Laravel packages today?