Skip to content

Commit

Permalink
finalize example and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mozrt2 committed Jan 12, 2024
1 parent 1b11021 commit 2213085
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const project = new typescript.TypeScriptProject({
'[email protected]',
],
tsconfig: {
include: [
exclude: [
'example/**/*',
],
compilerOptions: {
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 2 additions & 0 deletions example/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.dev.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions tsconfig.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2213085

Please sign in to comment.