From 2be088bcd82d945ba489593b01b9f5f15e6ae2ba Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:48:14 -0500 Subject: [PATCH 1/9] make meta properties non-underscored --- .../boundwitness/XyoBoundWitnessMetaInterface.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt index 4efdfd9..6a386dd 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt @@ -1,9 +1,7 @@ package network.xyo.client.boundwitness -import network.xyo.client.payload.Payload - -interface XyoBoundWitnessMetaInterface : Payload { - var _hash: String? - var _signatures: List? - var _client: String? +interface XyoBoundWitnessMetaInterface { + var hash: String? + var signatures: List? + var client: String? } \ No newline at end of file From 197121951846d41b292fdcf42d97060afd767b96 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:49:22 -0500 Subject: [PATCH 2/9] serializable meta object at top level with hash methods --- .../boundwitness/XyoBoundWitnessBuilder.kt | 6 ++-- .../boundwitness/XyoBoundWitnessJson.kt | 29 +++++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt index 644fb0f..ea5515a 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt @@ -81,7 +81,7 @@ open class XyoBoundWitnessBuilder(private val context: Context) { bw.addresses = addresses // update underscore fields - bw._client = "android" + bw.meta.client = "android" // construct fields involved in hashing constructHashableFieldsFields() @@ -92,8 +92,8 @@ open class XyoBoundWitnessBuilder(private val context: Context) { // in the serialized version of the bw because they will invalidate the hash val hashable = hashableFields() val hash = XyoSerializable.sha256String(hashable) - bw._signatures = this.sign(hash) - bw._hash = hash + bw.meta.signatures = this.sign(hash) + bw.meta.hash = hash } open suspend fun build(): XyoBoundWitnessJson { diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt index 4fda7ac..d6d40f7 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt @@ -1,14 +1,33 @@ package network.xyo.client.boundwitness +import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) -open class XyoBoundWitnessJson: XyoBoundWitnessBodyJson(), XyoBoundWitnessMetaInterface { - override var _signatures: List? = null - override var _client: String? = null - override var _hash: String? = null +class XyoBoundWitnessMeta: XyoBoundWitnessMetaInterface { + override var signatures: List? = null + override var client: String? = null + override var hash: String? = null +} + +@JsonClass(generateAdapter = true) +open class XyoBoundWitnessJson: XyoBoundWitnessBodyJson() { + val _meta: XyoBoundWitnessMeta = XyoBoundWitnessMeta() + + @Json(name = "\$meta") + var meta: XyoBoundWitnessMeta + get() = _meta + set(value) = Unit + + fun rootHash(): String { + return sha256String(this) + } + + fun dataHash(): String { + return sha256String(getBodyJson()) + } open fun getBodyJson(): XyoBoundWitnessBodyJson { - return this + return XyoBoundWitnessBodyJson(this.addresses, this.previous_hashes, this.payload_hashes, this.payload_schemas, this.timestamp) } } \ No newline at end of file From fde9008b308fd63154201fbe48f934e17070d695 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:49:42 -0500 Subject: [PATCH 3/9] passing tests --- .../boundwitness/XyoBoundWitnessTest.kt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt b/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt index 0643d5d..f5ae339 100644 --- a/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt @@ -12,6 +12,7 @@ import network.xyo.client.datastore.previous_hash_store.PreviousHashStorePrefsRe import network.xyo.client.lib.XyoSerializable import network.xyo.client.node.client.NodeClient import network.xyo.client.payload.XyoPayload +import org.json.JSONObject import org.junit.Before import org.junit.Rule import org.junit.Test @@ -71,15 +72,23 @@ class XyoBoundWitnessTest { } @Test - fun testBoundWitnessHash() { + fun testBoundWitnessMeta() { runBlocking { val bw = XyoBoundWitnessBuilder(appContext).signer(Account.random()).payloads(listOf( TestPayload1() )).build() val hashableFields = bw.getBodyJson() - assert(bw._hash !== null) - assert(bw._hash!! == XyoSerializable.sha256String(hashableFields)) - assert(bw._hash!! == hashableFields.hash()) + assert(bw.meta.hash !== null) + assert(bw.meta.hash!! == hashableFields.hash()) + assert(bw.meta.client == "android") + assert(bw.meta.signatures?.size == 1) + + val serializedBw = XyoSerializable.toJson(bw) + val bwJson = JSONObject(serializedBw) + val meta = bwJson.get("\$meta") as JSONObject + assert(meta.get("client") == "android") + assertNotNull(meta.get("hash")) + assertNotNull(meta.get("signatures")) } } @@ -93,7 +102,7 @@ class XyoBoundWitnessTest { val bw2 = XyoBoundWitnessBuilder(appContext).signer(testAccount).payloads(listOf( TestPayload1() )).build() - assert(bw2.previous_hashes.first() == bw._hash) + assert(bw2.previous_hashes.first() == bw.meta.hash) } } } \ No newline at end of file From fc9e3d3e89d2b53595ee17c62145f181605c9a1e Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:50:41 -0500 Subject: [PATCH 4/9] update tests that need hash properties --- .../androidTest/java/network/xyo/client/settings/XyoSdkTest.kt | 2 +- .../androidTest/java/network/xyo/client/witness/XyoPanelTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt b/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt index 63fbf06..415786d 100644 --- a/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt @@ -76,7 +76,7 @@ class XyoSdkTest { val bw = result.bw val result2 = panel.reportAsyncQuery() - assert(result2.bw.previous_hashes.contains(bw._hash)) + assert(result2.bw.previous_hashes.contains(bw.meta.hash)) } } } \ No newline at end of file diff --git a/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt b/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt index f6a91e3..3929506 100644 --- a/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt @@ -113,7 +113,7 @@ class XyoPanelTest { val bw = result.bw val result2 = panel.reportAsyncQuery() - assert(result2.bw.previous_hashes.contains(bw._hash)) + assert(result2.bw.previous_hashes.contains(bw.meta.hash)) } } From 59129a0aace8745ec1bc10e49ec04247ee7bb081 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:53:49 -0500 Subject: [PATCH 5/9] test rootHash and dataHash methods --- .../network/xyo/client/boundwitness/XyoBoundWitnessTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt b/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt index f5ae339..1c2b8d0 100644 --- a/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt @@ -77,9 +77,9 @@ class XyoBoundWitnessTest { val bw = XyoBoundWitnessBuilder(appContext).signer(Account.random()).payloads(listOf( TestPayload1() )).build() - val hashableFields = bw.getBodyJson() assert(bw.meta.hash !== null) - assert(bw.meta.hash!! == hashableFields.hash()) + assert(bw.meta.hash!! == bw.dataHash()) + assert(bw.meta.hash!! != bw.rootHash()) assert(bw.meta.client == "android") assert(bw.meta.signatures?.size == 1) From 6ad6b3c2a126195671abad8452bd4a0f8170d7b1 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:56:50 -0500 Subject: [PATCH 6/9] ensure panel consumers know which bw type to use --- .../client/witness/WitnessLocationHandlerTest.kt | 13 +++++++------ .../xyo/client/witness/location/info/Handler.kt | 10 +++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt b/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt index ac2d535..4b8467c 100644 --- a/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt @@ -10,6 +10,7 @@ import kotlinx.coroutines.runBlocking import network.xyo.client.lib.TestConstants import network.xyo.client.account.Account import network.xyo.client.boundwitness.XyoBoundWitnessBodyJson +import network.xyo.client.boundwitness.XyoBoundWitnessJson import network.xyo.client.datastore.previous_hash_store.PreviousHashStorePrefsRepository import network.xyo.client.witness.types.WitnessResult import network.xyo.client.payload.XyoPayload @@ -48,10 +49,10 @@ class WitnessLocationHandlerTest { @Test fun testObserve() { runBlocking { - var firstBw: XyoBoundWitnessBodyJson? = null + var firstBw: XyoBoundWitnessJson? = null val result1 = WitnessLocationHandler().witness(appContext.applicationContext, arrayListOf(Pair(apiDomainBeta, null))) when (result1) { - is WitnessResult.Success> -> { + is WitnessResult.Success> -> { firstBw = result1.data.first assertInstanceOf(firstBw) assertInstanceOf(result1.data.second) @@ -62,12 +63,12 @@ class WitnessLocationHandlerTest { } } - var secondBw: XyoBoundWitnessBodyJson? = null + var secondBw: XyoBoundWitnessJson? = null val result2 = WitnessLocationHandler().witness(appContext.applicationContext, arrayListOf(Pair(apiDomainBeta, null))) when (result2) { - is WitnessResult.Success> -> { + is WitnessResult.Success> -> { secondBw = result2.data.first - assertInstanceOf(secondBw) + assertInstanceOf(secondBw) assertInstanceOf(result2.data.second) assertInstanceOf(result2.data.third) @@ -77,7 +78,7 @@ class WitnessLocationHandlerTest { } } - val firstBwHash = firstBw!!.hash() + val firstBwHash = firstBw!!.dataHash() assert(secondBw!!.previous_hashes.size == 1) assert(secondBw.previous_hashes.first() == firstBwHash) } diff --git a/sdk/src/main/java/network/xyo/client/witness/location/info/Handler.kt b/sdk/src/main/java/network/xyo/client/witness/location/info/Handler.kt index 8f303d6..1f049b9 100644 --- a/sdk/src/main/java/network/xyo/client/witness/location/info/Handler.kt +++ b/sdk/src/main/java/network/xyo/client/witness/location/info/Handler.kt @@ -10,13 +10,13 @@ import network.xyo.client.witness.types.WitnessHandlerInterface import network.xyo.client.witness.types.WitnessResult import network.xyo.client.witness.XyoPanel import network.xyo.client.account.model.AccountInstance -import network.xyo.client.boundwitness.XyoBoundWitnessBodyJson +import network.xyo.client.boundwitness.XyoBoundWitnessJson import network.xyo.client.payload.XyoPayload import network.xyo.client.settings.XyoSdk -open class WitnessLocationHandler : WitnessHandlerInterface> { +open class WitnessLocationHandler : WitnessHandlerInterface> { @RequiresApi(Build.VERSION_CODES.M) - override suspend fun witness(context: Context, nodeUrlsAndAccounts: ArrayList>): WitnessResult> { + override suspend fun witness(context: Context, nodeUrlsAndAccounts: ArrayList>): WitnessResult> { val account = XyoSdk.getInstance(context.applicationContext).getAccount() val panel = XyoPanel(context, account, nodeUrlsAndAccounts, listOf( XyoLocationWitness(account) @@ -26,11 +26,11 @@ open class WitnessLocationHandler : WitnessHandlerInterface> { + private suspend fun getLocation(panel: XyoPanel): WitnessResult> { return withContext(Dispatchers.IO) { var locationPayload: XyoPayload? = null var locationPayloadRaw: XyoPayload? = null - var bw: XyoBoundWitnessBodyJson? = null + var bw: XyoBoundWitnessJson? = null val errors: MutableList = mutableListOf() panel.let { it.reportAsyncQuery().let { result -> From 73765d810aac9e7336574ae0eec0799c4b2cd166 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:56:59 -0500 Subject: [PATCH 7/9] remove implied extension --- .../network/xyo/client/boundwitness/QueryBoundWitnessJson.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessJson.kt b/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessJson.kt index 1339ce4..7dbb7a6 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessJson.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessJson.kt @@ -3,7 +3,7 @@ package network.xyo.client.boundwitness import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) -open class QueryBoundWitnessJson: XyoBoundWitnessJson(), XyoBoundWitnessMetaInterface { +open class QueryBoundWitnessJson: XyoBoundWitnessJson() { var query: String? = null // override to return a bound witness json body that has query in its hashable fields From b86a645cfef9641c3a1ed437b8f3b9c855066f12 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:06:41 -0500 Subject: [PATCH 8/9] move dataHash to hash --- .../client/boundwitness/XyoBoundWitnessTest.kt | 16 +++++++++++----- .../network/xyo/client/settings/XyoSdkTest.kt | 2 +- .../client/witness/WitnessLocationHandlerTest.kt | 2 +- .../network/xyo/client/witness/XyoPanelTest.kt | 2 +- .../boundwitness/XyoBoundWitnessBuilder.kt | 1 - .../client/boundwitness/XyoBoundWitnessJson.kt | 9 ++++----- .../boundwitness/XyoBoundWitnessMetaInterface.kt | 1 - 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt b/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt index 1c2b8d0..49ee7a4 100644 --- a/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/boundwitness/XyoBoundWitnessTest.kt @@ -77,17 +77,23 @@ class XyoBoundWitnessTest { val bw = XyoBoundWitnessBuilder(appContext).signer(Account.random()).payloads(listOf( TestPayload1() )).build() - assert(bw.meta.hash !== null) - assert(bw.meta.hash!! == bw.dataHash()) - assert(bw.meta.hash!! != bw.rootHash()) + assert(bw.rootHash() == XyoSerializable.sha256String(bw)) + assert(bw.hash() == bw.getBodyJson().hash()) assert(bw.meta.client == "android") assert(bw.meta.signatures?.size == 1) + } + } + @Test + fun testBoundWitnessMetaSerialization() { + runBlocking { + val bw = XyoBoundWitnessBuilder(appContext).signer(Account.random()).payloads(listOf( + TestPayload1() + )).build() val serializedBw = XyoSerializable.toJson(bw) val bwJson = JSONObject(serializedBw) val meta = bwJson.get("\$meta") as JSONObject assert(meta.get("client") == "android") - assertNotNull(meta.get("hash")) assertNotNull(meta.get("signatures")) } } @@ -102,7 +108,7 @@ class XyoBoundWitnessTest { val bw2 = XyoBoundWitnessBuilder(appContext).signer(testAccount).payloads(listOf( TestPayload1() )).build() - assert(bw2.previous_hashes.first() == bw.meta.hash) + assert(bw2.previous_hashes.first() == bw.hash()) } } } \ No newline at end of file diff --git a/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt b/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt index 415786d..2c614f4 100644 --- a/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/settings/XyoSdkTest.kt @@ -76,7 +76,7 @@ class XyoSdkTest { val bw = result.bw val result2 = panel.reportAsyncQuery() - assert(result2.bw.previous_hashes.contains(bw.meta.hash)) + assert(result2.bw.previous_hashes.contains(bw.hash())) } } } \ No newline at end of file diff --git a/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt b/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt index 4b8467c..2eec27b 100644 --- a/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/witness/WitnessLocationHandlerTest.kt @@ -78,7 +78,7 @@ class WitnessLocationHandlerTest { } } - val firstBwHash = firstBw!!.dataHash() + val firstBwHash = firstBw!!.hash() assert(secondBw!!.previous_hashes.size == 1) assert(secondBw.previous_hashes.first() == firstBwHash) } diff --git a/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt b/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt index 3929506..c6433a3 100644 --- a/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/witness/XyoPanelTest.kt @@ -113,7 +113,7 @@ class XyoPanelTest { val bw = result.bw val result2 = panel.reportAsyncQuery() - assert(result2.bw.previous_hashes.contains(bw.meta.hash)) + assert(result2.bw.previous_hashes.contains(bw.hash())) } } diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt index ea5515a..3636608 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt @@ -93,7 +93,6 @@ open class XyoBoundWitnessBuilder(private val context: Context) { val hashable = hashableFields() val hash = XyoSerializable.sha256String(hashable) bw.meta.signatures = this.sign(hash) - bw.meta.hash = hash } open suspend fun build(): XyoBoundWitnessJson { diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt index d6d40f7..fc1c414 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt @@ -7,7 +7,6 @@ import com.squareup.moshi.JsonClass class XyoBoundWitnessMeta: XyoBoundWitnessMetaInterface { override var signatures: List? = null override var client: String? = null - override var hash: String? = null } @JsonClass(generateAdapter = true) @@ -19,12 +18,12 @@ open class XyoBoundWitnessJson: XyoBoundWitnessBodyJson() { get() = _meta set(value) = Unit - fun rootHash(): String { - return sha256String(this) + override fun hash(): String { + return getBodyJson().hash() } - fun dataHash(): String { - return sha256String(getBodyJson()) + fun rootHash(): String { + return sha256String(this) } open fun getBodyJson(): XyoBoundWitnessBodyJson { diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt index 6a386dd..9a21b7f 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt @@ -1,7 +1,6 @@ package network.xyo.client.boundwitness interface XyoBoundWitnessMetaInterface { - var hash: String? var signatures: List? var client: String? } \ No newline at end of file From b54ccc4adbc55f7124f77a6bb85b3298b479a48c Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:11:04 -0500 Subject: [PATCH 9/9] moshi should ignore _meta on class --- .../java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt index fc1c414..29d8353 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt @@ -11,6 +11,7 @@ class XyoBoundWitnessMeta: XyoBoundWitnessMetaInterface { @JsonClass(generateAdapter = true) open class XyoBoundWitnessJson: XyoBoundWitnessBodyJson() { + @Json(ignore = true) val _meta: XyoBoundWitnessMeta = XyoBoundWitnessMeta() @Json(name = "\$meta")