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

fix: ATL-5864 pr changes #109

Merged
merged 6 commits into from
Nov 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: pluto inputs storable credentials to store them
  • Loading branch information
cristianIOHK committed Nov 13, 2023
commit 7cbaafde692af836fac284a4698bab9b462363bd
Original file line number Diff line number Diff line change
@@ -353,18 +353,19 @@ class PlutoImpl(private val connection: DbConnection) : Pluto {
allDIDs.executeAsList()
.groupBy { allPeerDid -> allPeerDid.did }
.map {
val privateKeyList = it.value.mapNotNull { storableKey ->
when (storableKey.restorationIdentifier) {
println("Restoration ID: ${it.value.get(0).restorationIdentifier}")
val privateKeyList: Array<PrivateKey> = it.value.mapNotNull { allPeerDID ->
when (allPeerDID.restorationIdentifier) {
"secp256k1+priv" -> {
Secp256k1PrivateKey(storableKey.data_.base64UrlDecodedBytes)
Secp256k1PrivateKey(allPeerDID.data_.base64UrlDecodedBytes)
}

"ed25519+priv" -> {
Ed25519PrivateKey(storableKey.data_.base64UrlDecodedBytes)
Ed25519PrivateKey(allPeerDID.data_.base64UrlDecodedBytes)
}

"x25519+priv" -> {
X25519PrivateKey(storableKey.data_.base64UrlDecodedBytes)
X25519PrivateKey(allPeerDID.data_.base64UrlDecodedBytes)
}

else -> {