v0.8.3
host-api-test-sdk 0.8.3
Single rollup for everything that landed in the 0.8 line. 0.8.0–0.8.2 were never posted; 0.8.3 is the version to upgrade to and the rest of this section explains everything that's changed since 0.7.6.
TL;DR
- Upstream
@novasamatech/*bumped to^0.7.9(final). @novasamatech/product-sdkrenamed to@novasamatech/host-api-wrapper. No compat re-export.handleCreateTransactionrequest shape was redesigned and the handler now returns a real signed v4 extrinsic on the wire (not echoedcallData).- Push notifications gained scheduling + cancellation.
Breaking changes since 0.7.6
1. Upstream package rename: product-sdk → host-api-wrapper
@novasamatech/product-sdk is gone. Use @novasamatech/host-api-wrapper. There is no compat re-export under the old name. Update both your package.json and your source imports — usually a one-line dep change plus a find-replace.
2. handleCreateTransaction request shape
host_create_transaction was redesigned upstream. The request is now a flat object — no more outer tuple, no more inner versioned envelope around the payload, no context block, and genesisHash is required at the top level.
// 0.7.6 — old
container.handleCreateTransaction(([[dotnsId, idx], payload], { ok }) => {
return ok(payload.callData);
});
// 0.8.3 — new
container.handleCreateTransaction((params, { ok }) => {
// params: {
// signer: [dotnsId, idx], // ProductAccountId tuple
// genesisHash: Uint8Array, // required
// callData: Uint8Array, // was HexString
// extensions: { id, extra: Uint8Array, additionalSigned: Uint8Array }[],
// txExtVersion: number,
// }
return ok(buildSignedV4Extrinsic(...));
});handleCreateTransactionWithLegacyAccount got the same flattening; its signer is now Uint8Array (raw AccountId) instead of an SS58 string. Exports VersionedPublicTxPayload / TxPayloadV1Public are gone — use ProductAccountTransaction / LegacyTransaction.
3. handleCreateTransaction return value is now a real signed extrinsic
In 0.7.x the handler returned callData straight through. That worked for tests that only checked result.ok === true, but as soon as a product tried to submit the returned bytes — for instance via polkadot-api's signer.signTx(...) against paseo-asset-hub-next — the extrinsic codec rejected them.
0.8.3 signs and frames the extrinsic. No product-side code change required — the wrapper API didn't move. What changes is the byte content of the response.
What the handler does now:
-
Resolves the keypair from
params.signer:- Product flow:
[dotNsId, derivationIndex]→ derived child of the host's configured root account (or theproductAccountsoverride map). - Legacy flow: raw 32-byte sr25519 public key → matched against
accounts[i].publicKey.
- Product flow:
-
Concatenates
extraandadditionalSignedfrom each entry inparams.extensions, in order. -
Signs
callData || extras || additionalSignedwith sr25519. Payloads longer than 256 bytes are blake2_256-hashed first, matchingpolkadot-sdk'sSignedPayload::using_encoded. -
Returns the full v4 wire form (with the SCALE-compact length prefix that RPC and polkadot-api decoders expect):
[compact len] length of the bytes that follow [0x84] v4 + signed bit [0x00 + AccountId32 (32 bytes)] MultiAddress::Id [0x01 + signature (64 bytes)] MultiSignature::Sr25519 [extras concat] each extension's `extra`, in order [callData]
extrinsic.version on paseo-asset-hub-next is [4] — there is no v5 in that runtime. So 0.8.3 ships v4-signed only. If your target runtime negotiates v5 general extrinsics, file an issue — v5 support is a follow-up.
4. Push notification protocol
host_push_notificationrequest gained an optionalscheduledAt: bigint(epoch-ms) for future-delivery notifications.- Response is now
Result<NotificationId, PushNotificationError>instead ofResult<void, GenericError>. The host returns au32id; products can hold on to it. - New
handlePushNotificationCancel(id)handler. The test host marks the matching log entry'scancelled = true. - New
PushNotificationError::ScheduleLimitReachedvariant available for hosts that want to reject when their queue is full. NotificationLogEntrygainedid,scheduledAt, andcancelled. Tests that snapshot the whole entry need updating; spot-checks on individual fields still work.
Non-breaking notes
- Attestation has moved off the Host onto the paired Polkadot Mobile app — no SDK-facing change, but if you assert on SSO traffic in product tests, expect different message shapes.
getProductAccountSigner(inhost-api-wrapper) now routessignTxthroughhost_create_transactionand returns the full signed extrinsic by default. Pass'signPayload'as the second argument to opt back into the previous behaviour.
What you need to do
- Upgrade to
0.8.3(drop0.8.0/0.8.1/0.8.2if you ever pinned them). - Replace
@novasamatech/product-sdkwith@novasamatech/host-api-wrapperin yourpackage.jsonand imports. - If you constructed
createTransactionrequests by hand, switch to the flatProductAccountTransactionshape and includegenesisHash. - If your tests asserted on the bytes being equal to
callData, drop that assumption and decode the response as a v4 extrinsic instead. - If you have a custom
handlePushNotification, changeok(undefined)→ok(<id>).
What's Changed
Full Changelog: v0.8.2...v0.8.3