Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add OIDC key registry server #11

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

matias-gonz
Copy link
Collaborator

Description

Additional context

private wallet: Wallet;

constructor() {
const provider = Provider.getDefaultProvider(types.Network.Sepolia);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make the network configurable?

packages/oidc-key-registry-server/src/config.ts Outdated Show resolved Hide resolved
return `0x${str.padStart(64, '0')}`;
}

toBytes(str: string): string {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call this "toHex"? If I read "toBytes" I expect a Buffer or a Uint8Array as return value.

private getIssHash(iss: string): string {
let issHash = this.issHashes.get(iss);
if (!issHash) {
issHash = keccak256(toBytes(iss));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this can be an static call to the contract, so we centralize how we calculate this.

let issHash = this.issHashes.get(iss);
if (!issHash) {
issHash = keccak256(toBytes(iss));
console.log("issHash:", issHash);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants