Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Apr 12, 2024
1 parent d49d98e commit 2b3a5be
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
10 changes: 0 additions & 10 deletions yarn-project/circuit-types/src/keys/new_key_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,4 @@ export interface NewKeyStore {
* @returns A Promise that resolves to the application outgoing viewing secret key.
*/
getAppOutgoingViewingSecretKey(account: AztecAddress, app: AztecAddress): Promise<Fr>;

/**
* Retrieves application tagging secret key.
* @throws If the account does not exist in the key store.
* @param account - The account to retrieve the application tagging secret key for.
* @param app - The application address to retrieve the tagging secret key for.
* @returns A Promise that resolves to the application tagging secret key.
* TODO: Not sure if this func will be needed. 💣💣💣 if not
*/
getAppTaggingSecretKey(account: AztecAddress, app: AztecAddress): Promise<Fr>;
}
5 changes: 0 additions & 5 deletions yarn-project/key-store/src/new_test_key_store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,5 @@ describe('NewTestKeyStore', () => {
expect(appOutgoingViewingSecretKey.toString()).toMatchInlineSnapshot(
`"0x2639b26510f9d30b7e173d301b263b246b7a576186be1f44cd7c86bc06773f8a"`,
);

const appTaggingSecretKey = await keyStore.getAppTaggingSecretKey(accountAddress, appAddress);
expect(appTaggingSecretKey.toString()).toMatchInlineSnapshot(
`"0x13b400d2fccab28a04a4df9fe541d242e6b518d03137ef0ffa57c3d98cc56e67"`,
);
});
});
20 changes: 0 additions & 20 deletions yarn-project/key-store/src/new_test_key_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,4 @@ export class NewTestKeyStore implements NewKeyStore {
]),
);
}

/**
* Retrieves application tagging secret key.
* @throws If the account does not exist in the key store.
* @param account - The account to retrieve the application tagging secret key for.
* @param app - The application address to retrieve the tagging secret key for.
* @returns A Promise that resolves to the application tagging secret key.
* TODO: Not sure if this func will be needed. 💣💣💣 if not
*/
public getAppTaggingSecretKey(account: AztecAddress, app: AztecAddress): Promise<Fr> {
const masterTaggingSecretKeyBuffer = this.#keys.get(`${account.toString()}-tsk_m`);
if (!masterTaggingSecretKeyBuffer) {
throw new Error(`Account ${account.toString()} does not exist.`);
}
const masterTaggingSecretKey = GrumpkinScalar.fromBuffer(masterTaggingSecretKeyBuffer);

return Promise.resolve(
poseidon2Hash([masterTaggingSecretKey.high, masterTaggingSecretKey.low, app, GeneratorIndex.TSK_M]),
);
}
}

0 comments on commit 2b3a5be

Please sign in to comment.