Download the PHP package gawrys/counterparty-core without Composer
On this page you can find all versions of the php package gawrys/counterparty-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gawrys/counterparty-core
More information about gawrys/counterparty-core
Files in gawrys/counterparty-core
Package counterparty-core
Short Description Framework-agnostic core for counterparty due diligence: domain model, ports, rule-based risk strategy, PSR-18 reference adapters and contract tests.
License MIT
Informations about the package counterparty-core
Counterparty Core
The framework-agnostic heart of the Counterparty Verification toolkit - per-country registry lookups, sanctions screening and a pluggable risk engine for counterparty due diligence. Hexagonal: it depends only on PSR interfaces, so it drops into any framework (or none).
⚠️ This is a due-diligence aid, not a compliance product. It does not make you "AML compliant" - that remains your responsibility. The risk score is advisory.
Features
- Hexagonal & dependency-light - PSR-18/17 (HTTP), PSR-16 (cache), PSR-3 (log), PSR-20 (clock). No framework, no vendor SDK in the core.
- Capability-aware registries - drivers declare a
RegistryCapability; the verifier routes by (country + capability) and returns an honestinconclusivewhen nothing covers a request. Adding a country is one driver + one registration. - Reference adapters (PSR-18) - PL White List (VAT status, IBAN match, search-id proof), EU VIES, KRS, CEIDG, REGON, CRBR, sanctions.network (default) and OpenSanctions.
- Pluggable risk engine -
RuleBasedRiskStrategycomposed of smallRiskRules; add your own without subclassing, or implementRiskStrategyfor a bespoke model. - Contract tests as a feature -
RegistryDriverContractTestCasecertifies any third-party driver. - Strict - PHPStan max + Psalm level 1, fully typed.
Installation
This package is HTTP-client agnostic: it depends on the PSR-18 / PSR-17 interfaces and
declares psr/http-client-implementation + psr/http-factory-implementation as virtual
requirements, so Composer asks you to choose a client. Install any PSR-18 implementation, e.g.:
Usage
Quick start (auto-wired)
The factory assembles the bundled checks (White List, VIES, sanctions.network) + the rule-based strategy. It auto-discovers your installed PSR-18 client and PSR-17 factories:
Manual wiring (full control)
The clock is optional and defaults to SystemClock; pass a FrozenClock in tests.
Add a country (one driver + one registration)
Add a custom scoring rule
Certify a third-party driver
Full guides live in the documentation.
Part of the toolkit
| Package | Purpose |
|---|---|
| counterparty-core (this) | Domain, registries, risk engine, PSR-18 adapters |
| counterparty-ai | Optional advisory AI risk research |
| counterparty-laravel | Laravel bridge |
| counterparty-bundle | Symfony bundle |
Testing
Changelog
See CHANGELOG.md.
Contributing & Security
Pull requests welcome. Please report security issues privately - see SECURITY.md.
Credits
License
The MIT License (MIT). See LICENSE.
All versions of counterparty-core with dependencies
psr/clock Version ^1.0
psr/http-client Version ^1.0
psr/http-client-implementation Version ^1.0
psr/http-factory Version ^1.0
psr/http-factory-implementation Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/simple-cache Version ^2.0 || ^3.0
psr/log Version ^2.0 || ^3.0
php-http/discovery Version ^1.19