Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianIOHK committed Sep 19, 2023
1 parent 45b4b86 commit d6798fe
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class ApolloImpl : Apollo {
val signature = key.sign(message)

Signature(
value = signature,
value = signature
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Secp256k1PrivateKey(nativeValue: ByteArray) : PrivateKey(), SignableKey {
return KMMECDSA.sign(
type = ECDSAType.ECDSA_SHA256,
data = message,
privateKey = kmmPrivateKey,
privateKey = kmmPrivateKey
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Secp256k1PublicKey(nativeValue: ByteArray) : PublicKey(), VerifiableKey {
type = ECDSAType.ECDSA_SHA256,
data = message,
publicKey = kmmPublicKey,
signature = signature,
signature = signature
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class X25519KeyPair(override var privateKey: PrivateKey, override var publicKey:
val keyPair = generator.generateKeyPair()
return X25519KeyPair(
privateKey = X25519PrivateKey((keyPair.private as X25519PrivateKeyParameters).encoded),
publicKey = X25519PublicKey((keyPair.public as X25519PublicKeyParameters).encoded),
publicKey = X25519PublicKey((keyPair.public as X25519PublicKeyParameters).encoded)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class PrismDIDPublicKey {
id = id,
usage = usage.toProto(),
keyData = io.iohk.atala.prism.protos.PublicKey.KeyData.CompressedEcKeyData(
compressedPublicKey.toProto(),
),
compressedPublicKey.toProto()
)
)
}

Expand Down Expand Up @@ -79,7 +79,7 @@ fun KeyUsage.fromProto(): PrismDIDPublicKey.Usage {
fun Secp256k1PublicKey.toProto(): CompressedECKeyData {
return CompressedECKeyData(
curve = Curve.SECP256K1.value,
data = ByteArr(raw),
data = ByteArr(raw)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ internal class CastorShared {
id = didUrl,
controller = did,
type = publicKey.keyData.getCurve(),
publicKeyMultibase = publicKey.keyData.getValue().base64Encoded,
publicKeyMultibase = publicKey.keyData.getValue().base64Encoded
)
partialResult + (didUrl.string() to method)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ data class KeyCurve @JvmOverloads constructor(
enum class Curve(val value: String) {
X25519("X25519"),
ED25519("Ed25519"),
SECP256K1("secp256k1"),
SECP256K1("secp256k1")
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ data class W3CCredential @JvmOverloads constructor(
get() = null
override val availableClaims: Array<String>
get() = claims.map { it.key }.toTypedArray()

override val id: String
get() = c.id
override val issuer: String
Expand Down Expand Up @@ -131,6 +132,10 @@ data class W3CCredential @JvmOverloads constructor(

return properties.toMap()
}

override fun fromStorableCredential(): Credential {
return c
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class DefaultSecretsResolverImpl(val pluto: Pluto) : SecretsResolver {
PrivateJWK(
secretId,
privateKey.getCurve(),
privateKey.getValue().base64UrlEncoded,
).toString(),
),
privateKey.getValue().base64UrlEncoded
).toString()
)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ApolloMock : Apollo {
var createRandomSeedReturn: SeedWords = SeedWords(emptyArray(), Seed(ByteArray(0)))
var createKeyPairReturn: KeyPair = Ed25519KeyPair(
privateKey = Ed25519PrivateKey(ByteArray(0)),
publicKey = Ed25519PublicKey(ByteArray(0)),
publicKey = Ed25519PublicKey(ByteArray(0))
)
var compressedPublicKeyReturn: PublicKey = Secp256k1PublicKey(ByteArray(0))
var publicKeyReturn: PublicKey = Ed25519PublicKey(ByteArray(0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ApolloMock : Apollo {
var createRandomSeedReturn: SeedWords = SeedWords(emptyArray(), Seed(ByteArray(0)))
var createKeyPairReturn: KeyPair = Ed25519KeyPair(
privateKey = Ed25519PrivateKey(ByteArray(0)),
publicKey = Ed25519PublicKey(ByteArray(0)),
publicKey = Ed25519PublicKey(ByteArray(0))
)
var compressedPublicKeyReturn = Ed25519PublicKey(ByteArray(0))
var publicKeyReturn: PublicKey = Ed25519PublicKey(ByteArray(0))
Expand Down

0 comments on commit d6798fe

Please sign in to comment.