Skip to content

Commit

Permalink
harden full derivation path
Browse files Browse the repository at this point in the history
  • Loading branch information
mozrt2 committed Jan 22, 2024
1 parent 28866be commit 5c34841
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions example/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ export async function example({

async function runExample() {
const results = await example({
userPrivateKey: '0xa795a0c0b64ccd65c1ca2890f8a592a9cad9f11e4a63a34acd628d8e308d39a4',
userPrivateKey: '0x8575420a19052cf9bbe9ef4ac755a9abaaefa3f1f2e35d14c04f38829182e9ba',
keyGenerationMessage: `Sign this message to generate your Fluidkey private payment keys.
WARNING: Only sign this message within a trusted website or platform to avoid loss of funds.
Secret: c0bd24706c958efa41b1e470838288dbd617a30930c974e403e386e4434648ac`,
Secret: deccc7b0ba824d3b6f73c50c41935eabf5e7e10f5b0177732344899c60be0f16`,
chainId: 5,
startNonce: 10,
startNonce: 0,
endNonce: 30,
});

Expand Down
2 changes: 1 addition & 1 deletion src/generateEphemeralPrivateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function generateEphemeralPrivateKey({
}

// Create the derivation path
const index = `m/${coinTypePart1}'/${coinTypePart2}'/0'/${parentNonce}/${nonce}`;
const index = `m/${coinTypePart1}'/${coinTypePart2}'/0'/${parentNonce}'/${nonce}'`;

// Derive the child private key based on the index
const childPrivateKey = viewingPrivateKeyNode.derive(index);
Expand Down

0 comments on commit 5c34841

Please sign in to comment.