]> zoso.dev Git - libnemo.git/commitdiff
Use more concise typing.
authorChris Duncan <chris@zoso.dev>
Fri, 29 Nov 2024 09:45:49 +0000 (01:45 -0800)
committerChris Duncan <chris@zoso.dev>
Fri, 29 Nov 2024 09:45:49 +0000 (01:45 -0800)
src/lib/wallet.ts

index 7c6f000591598dc7e9c9fbe804ca0bcdb193041c..43e74ed677c5af77888382b7002282a67829796e 100644 (file)
@@ -100,7 +100,7 @@ abstract class Wallet {
                        const data: any = []\r
                        results.forEach(r => data.push({ privateKey: hex.toBytes(r.privateKey as string), index: r.index }))\r
                        let now = performance.now()\r
-                       const keypairs: [{ publicKey: string, privateKey: string, index: number }] = await this.#pool.work(data)\r
+                       const keypairs: KeyPair[] = await this.#pool.work(data)\r
                        console.log(`keypairs: ${-now + (now = performance.now())} ms`)\r
                        for (const keypair of keypairs) {\r
                                if (keypair.publicKey == null) throw new RangeError('Account public key missing')\r