import { type Bytes, type Hex, Secp256k1 } from 'ox' import { expectTypeOf, test } from 'vp/test' test('fromPrf', () => { const prf = '0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f' expectTypeOf(Secp256k1.fromPrf(prf)).toEqualTypeOf() expectTypeOf(Secp256k1.fromPrf(new Uint8Array(32))).toEqualTypeOf() expectTypeOf(Secp256k1.fromPrf(prf, { as: 'Hex' })).toEqualTypeOf() expectTypeOf( Secp256k1.fromPrf(prf, { as: 'Bytes' }), ).toEqualTypeOf() }) test('fromMnemonic', () => { const mnemonic = 'test test test test test test test test test test test junk' expectTypeOf(Secp256k1.fromMnemonic(mnemonic)).toEqualTypeOf() expectTypeOf( Secp256k1.fromMnemonic(mnemonic, { passphrase: 'qwerty' }), ).toEqualTypeOf() expectTypeOf( Secp256k1.fromMnemonic(mnemonic, { as: 'Bytes' }), ).toEqualTypeOf() expectTypeOf( Secp256k1.fromMnemonic(mnemonic, { path: "m/44'/60'/0'/0/1" }), ).toEqualTypeOf() }) test('fromSeed', () => { const seed = '0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f' expectTypeOf(Secp256k1.fromSeed(seed)).toEqualTypeOf() expectTypeOf(Secp256k1.fromSeed(new Uint8Array(32))).toEqualTypeOf() expectTypeOf(Secp256k1.fromSeed(seed, { as: 'Hex' })).toEqualTypeOf() expectTypeOf( Secp256k1.fromSeed(seed, { as: 'Bytes' }), ).toEqualTypeOf() })