/** * C-40 remediation (2026-08-05 safe-withdrawal-delegation hardening). * * Binds a caller-supplied `pkpId` to the position it claims to sign for, * BEFORE any auth/signing work — so a mismatch is a cheap failure. The * reference implementation for this check is `btc-utxo-invalidator.ts` * (STEP 3, ~444-459); `btc-transaction-signer.ts` (STEP 3.5) imports this * module rather than inlining a second copy. * * `btc-utxo-invalidator.ts` is deliberately NOT refactored onto this module * (2026-08-05 hardening plan §9 Q1 / E-12): it is the reference * implementation for the C-40 fix and must not be destabilised in the same * change that introduces the shared helper. * * NOTE: this fix is necessary but NOT sufficient. The demonstrated primitive * on 2026-08-05 was extraction of a PKP private key by a usage key with NO * membership in that PKP's group, via arbitrary submitted code — an attacker * submitting arbitrary code never runs this check at all, so no * single-action fix constrains it. See C-41 / D-0 in * docs/vigil/plans/2026-08-05-safe-withdrawal-delegation-hardening-plan.md. */ /** * Canonicalise a pkpId (or any bytes32-shaped hex value) to a lowercase, * unprefixed, zero-padded 64-hex string, so a bare address and a bytes32 * form of the same value compare equal. */ export declare function canonicalPkpHex(v: string): string; /** * Throws unless `suppliedPkpId` canonicalises to the SAME value as * `positionPkpId`. Refuses to sign with a key the position does not own. * * Error texts are load-bearing: they are asserted verbatim by * `tests/unit/btc-transaction-signer-pkpid-binding.unit.test.ts` and must * not drift without updating that test. */ export declare function assertPkpIdBoundToPosition(suppliedPkpId: string | undefined, positionId: string, positionPkpId: string | undefined): void; //# sourceMappingURL=pkp-position-binding.d.ts.map