Skip to content

Use owned credential type#189

Merged
geonnave merged 5 commits intolake-rs:mainfrom
geonnave:use-owned-credential-type
Jan 12, 2024
Merged

Use owned credential type#189
geonnave merged 5 commits intolake-rs:mainfrom
geonnave:use-owned-credential-type

Conversation

@geonnave
Copy link
Copy Markdown
Collaborator

No description provided.

@geonnave geonnave force-pushed the use-owned-credential-type branch 2 times, most recently from 81f5dd0 to edfe62a Compare January 10, 2024 18:26
@geonnave
Copy link
Copy Markdown
Collaborator Author

My initial goal was to get rid of IdCredOwned, and replace it with CredentialRPK, but then fields such as CredentialRPK.value would have to be Optional, spreading around runtime checks that would otherwise not be needed.

So I've decided to just keep IdCredOwned as is.

Thus, the main change in this PR is the addition of the CredentialRPK type which owns its contents and provide static access to fields such as public_key and id_cred, thus removing one potential source of panics from the protocol core.

@geonnave geonnave force-pushed the use-owned-credential-type branch from 8729997 to e4cc190 Compare January 10, 2024 18:44
@geonnave geonnave added the type:enhancement New feature or request label Jan 10, 2024
@geonnave geonnave force-pushed the use-owned-credential-type branch from e4cc190 to e0addd3 Compare January 12, 2024 10:38
@geonnave geonnave merged commit e87542d into lake-rs:main Jan 12, 2024
@geonnave geonnave deleted the use-owned-credential-type branch January 12, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant