Validate & register
Test the lifecycle of the exact deployment before issuing an app token.
On this page
Prepare the environment
The SDK owns validation. A ValidationEnvironment supplies the client, durable checkpoint options and prepare callback with concrete acceptance scenarios. It funds or binds the House, borrower and independent recovery actor. It is not a browser-only ABI smoke test.
create_validation_environment supports executable validation programs. create_evidence_environment binds recorded scenario evidence. Evidence must identify the chain, Core, integration version, dependencies and lifecycle transactions; isolated fixtures do not certify another deployment.
Required scenarios
- Draw credit and execute every admitted action variant.
- Verify actual account custody, balances, positions, liabilities and recoverable value.
- Reject wrong recipients, excess spending, unsupported actions, stale authorizations and unsafe health.
- Reconcile partial fills, cancellations and delayed requests when supported.
- Repay the House and confirm accounting, then close and return collateral.
- Recover through an independent keeper without the borrower.
- Resume interrupted operations and prove replay or duplicate execution cannot reuse authorization.
- Bind dependency upgrade behavior to the admitted guard or explicit monitoring policy.
Unsupported scenarios require valid use-case exclusions. Every applicable acceptance case must run. A passed result is bound to the exact package hash and version ID.
Run the Kuru suite
anvil --fork-url "$RPC_URL" --chain-id 10143 --port 18548node --env-file=.env --import tsx server/test/kuru/run-acceptance.ts http://127.0.0.1:18548 --deploymentThe deployment mode binds tests to deployments/testnet.json and uses the configured independent RISK_KEEPER_KEY. It runs and replays acceptance scenarios against an isolated fork, with explicit exclusions for unsupported features. The runner writes its report to a temporary directory and prints that path.
A fork report needs the admission review and actual live lifecycle bindings before it can certify a deployed version. The SDK then verifies callbacks against recorded active and recovered Credits. Do not present an isolated fixture report as a live acceptance result.
Run SDK validation
const report = await sdk.integrations.validate({
plugin: exchange,
wallet: developer_wallet,
amount: 100_000n,
});
// amount is in the House settlement asset’s smallest unit.
if (!report.passed) {
throw new Error(report.failures.join("; "));
}
const result = await sdk.integrations.register({
validation_id: report.id,
});| Validation result | Meaning |
|---|---|
| id | Validation ID used for registration. |
| passed, failures | Result and concrete failed requirements. |
| version_id, package_hash | The definition and version tested. |
Activation & token
{
integration_id: validation_id,
version_id,
status: "awaiting_approval",
}
// After authorized activation:
{
integration_id: validation_id,
version_id,
status: "active",
app_token: "tbk_…",
}The validation ID is not an app token. Validation expires before activation under the configured window, currently 24 hours. register and status use the same ID so a retry does not create another integration. The authorized operator uses approve; an ordinary app author cannot activate its own risk rules.