diff --git a/src/main/kotlin/org/dashj/platform/dpp/StateRepository.kt b/src/main/kotlin/org/dashj/platform/dpp/StateRepository.kt index 4c80ab0..ebb1f0f 100644 --- a/src/main/kotlin/org/dashj/platform/dpp/StateRepository.kt +++ b/src/main/kotlin/org/dashj/platform/dpp/StateRepository.kt @@ -46,6 +46,8 @@ interface StateRepository { */ fun fetchIdentity(id: Identifier): Identity? + fun fetchIdentityFromPubKeyHash(pubKeyHash: ByteArray): Identity? + fun storeIdentity(identity: Identity) fun storeIdentityPublicKeyHashes(identity: Identifier, publicKeyHashes: List) diff --git a/src/main/kotlin/org/dashj/platform/dpp/document/Document.kt b/src/main/kotlin/org/dashj/platform/dpp/document/Document.kt index b2d3684..9c59d29 100644 --- a/src/main/kotlin/org/dashj/platform/dpp/document/Document.kt +++ b/src/main/kotlin/org/dashj/platform/dpp/document/Document.kt @@ -94,7 +94,7 @@ class Document(rawDocument: Map, dataContract: DataContract) : Bas } fun get(path: String): Any? { - val keys = path.split("/") + val keys = path.split('.') var value: Any? = data for (key in keys) { if ((value as Map).containsKey(key)) { diff --git a/src/test/kotlin/org/dashj/platform/dpp/StateRepositoryMock.kt b/src/test/kotlin/org/dashj/platform/dpp/StateRepositoryMock.kt index c7e1d97..5e9939c 100644 --- a/src/test/kotlin/org/dashj/platform/dpp/StateRepositoryMock.kt +++ b/src/test/kotlin/org/dashj/platform/dpp/StateRepositoryMock.kt @@ -36,6 +36,10 @@ open class StateRepositoryMock : StateRepository { return null } + override fun fetchIdentityFromPubKeyHash(pubKeyHash: ByteArray): Identity? { + TODO("Not yet implemented") + } + override fun storeIdentity(identity: Identity) { TODO("Not yet implemented") }