Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-test:
runs-on: parity-default
runs-on: parity-int-ubuntu
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
run: pnpm pack && ls -lh *.tgz

integration-tests:
runs-on: parity-default
runs-on: parity-int-ubuntu
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
publish:
runs-on: parity-default
runs-on: parity-int-ubuntu
steps:
- uses: actions/checkout@v4

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.7.4

### Added

- **`handleRequestResourceAllocation`** (RFC-0010) — products can request resource allowances (StatementStoreAllowance, BulletInAllowance, SmartContractAllowance, AutoSigning). The test host auto-allocates all requested resources.
- **`handleStatementStoreCreateProofAuthorized`** — creates statement proofs using the host-internal allowance account (no product account required). Uses the first configured account.

### Changed

- **Dependencies** — `@novasamatech/host-api`, `host-container`, `product-sdk` → ^0.7.7. Upstream changes include RFC-0010 resource allocation, authorized statement proofs, SSO signer fixes, and reconnect improvements.

## 0.7.3

### Breaking changes
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parity/host-api-test-sdk",
"version": "0.7.3",
"version": "0.7.4",
"description": "Lightweight test host for Spektr product E2E testing — embeds dapps with auto-signing dev accounts, no Docker needed",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -42,11 +42,11 @@
}
},
"dependencies": {
"@novasamatech/host-api": "^0.7.4"
"@novasamatech/host-api": "^0.7.7"
},
"devDependencies": {
"@novasamatech/host-container": "^0.7.4",
"@novasamatech/product-sdk": "^0.7.4",
"@novasamatech/host-container": "^0.7.7",
"@novasamatech/product-sdk": "^0.7.7",
"@polkadot/keyring": "^14.0.0",
"@polkadot/types": "^16.0.0",
"@polkadot/util": "^14.0.0",
Expand Down
43 changes: 22 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions src/browser/host-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,22 @@ function setupContainer(
});
});

// Authorized proof: uses the first account (host-internal allowance, no product account needed)
container.handleStatementStoreCreateProofAuthorized((statement, { ok }) => {
const pair = pairs[0]?.pair;
const dataToSign =
(statement as { data?: Uint8Array }).data ?? new Uint8Array();
const signature = pair ? pair.sign(dataToSign) : new Uint8Array(64);

return ok({
tag: "Sr25519",
value: {
signature,
signer: pair?.publicKey ?? new Uint8Array(32),
},
});
});

container.handleStatementStoreSubmit((statement, { ok }) => {
statementStore.push(statement);
submittedStatements.push({
Expand Down Expand Up @@ -1011,6 +1027,17 @@ function setupContainer(
};
});

// ── Resource allocation (RFC-0010) ───────────────────────────

container.handleRequestResourceAllocation((resources, { ok }) => {
// Auto-allocate all requested resources for test purposes
const outcomes = resources.map(() => ({
tag: "Allocated" as const,
value: undefined,
}));
return ok(outcomes);
});

// ── Connection status ────────────────────────────────────────

container.subscribeProductConnectionStatus((status) => {
Expand Down
Loading