import { expectTypeOf, test } from 'vp/test' import type * as Engine from '../../core/Engine.js' import * as core_Secp256k1 from '../../core/Secp256k1.js' import * as Secp256k1 from '../Secp256k1.js' type Slot = Awaited> test('return type exposes only deterministic Secp256k1 primitives', () => { expectTypeOf().toEqualTypeOf< NonNullable >() expectTypeOf().toEqualTypeOf< NonNullable >() expectTypeOf().toEqualTypeOf< NonNullable >() expectTypeOf().toEqualTypeOf< NonNullable >() expectTypeOf().toEqualTypeOf< NonNullable >() expectTypeOf().not.toHaveProperty('randomSecretKey') }) test('the WASM namespace exposes the public Secp256k1 API', () => { expectTypeOf(Secp256k1.getPublicKey).toEqualTypeOf( core_Secp256k1.getPublicKey, ) expectTypeOf(Secp256k1.randomPrivateKey).toEqualTypeOf( core_Secp256k1.randomPrivateKey, ) expectTypeOf().not.toHaveProperty('create') })