From 221308582725cfb6e0f7116ec63a73c261a6cb6e Mon Sep 17 00:00:00 2001 From: moritz Date: Fri, 12 Jan 2024 18:19:35 +0100 Subject: [PATCH] finalize example and readme --- .projenrc.ts | 2 +- README.md | 8 ++++++-- example/example.ts | 2 ++ tsconfig.dev.json | 4 ++-- tsconfig.json | 7 ++++--- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.projenrc.ts b/.projenrc.ts index fbb0bb9..1060601 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -24,7 +24,7 @@ const project = new typescript.TypeScriptProject({ 'viem@1.21.4', ], tsconfig: { - include: [ + exclude: [ 'example/**/*', ], compilerOptions: { diff --git a/README.md b/README.md index 3d75997..aa181e7 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ -The Fluidkey Trust Kit is an open source repository of the core cryptographic functions used by Fluidkey’s interface and SDK. It enables anyone to independently generate and recover Fluidkey stealth smart accounts and related funds. It is composed of the following functions: +The Fluidkey Trust Kit is an open source repository of the core cryptographic functions used by Fluidkey’s interface and SDK. It enables anyone to independently generate and recover Fluidkey stealth smart accounts and related funds. + +It is composed of the following functions: - `generateKeysFromSignature`: generates a user's private keypair from a signature -- `extractPrivateViewingKeyNode`: extracts a [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) node from a private viewing key +- `extractViewingPrivateKeyNode`: extracts a [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) node from a private viewing key - `generateEphemeralPrivateKey`: generates an ephemeral private key based on the private viewing key node - `generateStealthAddresses`: generates stealth addresses based on an ephemeral secret and a list of public spending keys - `predictStealthSafeAddress`: predicts the address of a stealth safe based on a list of stealth address owners +An example of how to use these functions to recover stealth addresses based on a user's privateKey can be found in the `example` folder. + Dependencies ------------ - [viem](https://github.com/wevm/viem) and its dependencies, specifically: diff --git a/example/example.ts b/example/example.ts index 6b5ed67..3f7df64 100644 --- a/example/example.ts +++ b/example/example.ts @@ -90,6 +90,8 @@ WARNING: Only sign this message within a trusted website or platform to avoid lo Secret: c0bd24706c958efa41b1e470838288dbd617a30930c974e403e386e4434648ac`, chainId: 5, + startNonce: 10, + endNonce: 30, }); console.log(results); diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 787a210..35cc25c 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -29,11 +29,11 @@ "include": [ "src/**/*.ts", "test/**/*.ts", - "example/**/*", ".projenrc.ts", "projenrc/**/*.ts" ], "exclude": [ - "node_modules" + "node_modules", + "example/**/*" ] } diff --git a/tsconfig.json b/tsconfig.json index 96014dc..151e61e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,8 +29,9 @@ "target": "ES2019" }, "include": [ - "src/**/*.ts", - "example/**/*" + "src/**/*.ts" ], - "exclude": [] + "exclude": [ + "example/**/*" + ] }