import { expectTypeOf, test } from 'vp/test' import type * as Engine from '../../core/Engine.js' import * as core_P256 from '../../core/P256.js' import * as NodeP256 from '../P256.js' type Slot = Awaited> test('public-key derivation is present', () => { expectTypeOf().toEqualTypeOf< (privateKey: Uint8Array) => Uint8Array >() }) test('unsupported primitives are absent', () => { expectTypeOf().not.toHaveProperty('getSharedSecret') expectTypeOf().not.toHaveProperty('randomSecretKey') expectTypeOf().not.toHaveProperty('recoverPublicKey') expectTypeOf().not.toHaveProperty('sign') expectTypeOf().not.toHaveProperty('verify') }) test('the result is the raw slot', () => { expectTypeOf<{ P256: Slot }>().toExtend() }) test('the Node namespace exposes the public P256 API', () => { expectTypeOf(NodeP256.getPublicKey).toEqualTypeOf(core_P256.getPublicKey) expectTypeOf().not.toHaveProperty('create') })