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(pluto) Database initialisation and connection state checking #30

Merged
merged 12 commits into from
Feb 13, 2023
Merged
2 changes: 1 addition & 1 deletion apollo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {

js(IR) {
this.moduleName = currentModuleName
this.binaries.executable()
this.binaries.library()
this.useCommonJs()
this.compilations["main"].packageJson {
this.version = rootProject.version.toString()
Expand Down
2 changes: 1 addition & 1 deletion castor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {

js(IR) {
this.moduleName = currentModuleName
this.binaries.executable()
this.binaries.library()
this.useCommonJs()
this.compilations["main"].packageJson {
this.version = rootProject.version.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ expect class CastorImpl(apollo: Apollo) : Castor {
override fun parseDID(did: String): DID
override fun createPrismDID(
masterPublicKey: PublicKey,
services: Array<DIDDocument.Service>?
services: Array<DIDDocument.Service>?,
): DID

@Throws(CastorError.InvalidKeyError::class)
override fun createPeerDID(
keyPairs: Array<KeyPair>,
services: Array<DIDDocument.Service>
services: Array<DIDDocument.Service>,
): DID
}
152 changes: 0 additions & 152 deletions core-sdk/build.gradle.kts

This file was deleted.

2 changes: 0 additions & 2 deletions core-sdk/src/androidMain/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {

js(IR) {
this.moduleName = currentModuleName
this.binaries.executable()
this.binaries.library()
this.useCommonJs()
this.compilations["main"].packageJson {
this.version = rootProject.version.toString()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.iohk.atala.prism.walletsdk.domain.models

actual object Platform {
actual val type: PlatformType
get() = PlatformType.ANDROID
actual val OS: String
get() = "Android ${android.os.Build.VERSION.SDK_INT}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ import io.iohk.atala.prism.walletsdk.domain.models.PeerDID
import io.iohk.atala.prism.walletsdk.domain.models.PrismDIDInfo
import io.iohk.atala.prism.walletsdk.domain.models.PrivateKey
import io.iohk.atala.prism.walletsdk.domain.models.VerifiableCredential
import kotlin.js.ExperimentalJsExport
import kotlin.js.JsExport
import kotlin.js.JsName

@OptIn(ExperimentalJsExport::class)
@JsExport
interface Pluto {

fun storePrismDID(
did: DID,
keyPathIndex: Int,
alias: String?
alias: String?,
)

fun storePeerDID(did: DID, privateKeys: Array<PrivateKey>)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package io.iohk.atala.prism.walletsdk.domain.models

import kotlinx.serialization.Serializable
import kotlin.js.ExperimentalJsExport
import kotlin.js.JsExport
import kotlin.js.JsName
import kotlin.jvm.JvmStatic

@OptIn(ExperimentalJsExport::class)
@Serializable
@JsExport
data class DID(
val schema: String,
val method: String,
val methodId: String
val methodId: String,
) {

@JsName("fromString")
constructor(
string: String
string: String,
) : this(getSchemaFromString(string), getMethodFromString(string), getMethodIdFromString(string))

override fun toString(): String {
Expand Down
Loading