commit f5daaf2be9febea5963169b54d1739e28e24bfff
parent e82d4b3058bbf4f4dfa4d0e849cf4ab447417ea1
Author: triesap <tyson@radroots.org>
Date: Thu, 20 Aug 2026 07:13:43 +0000
sdk: regenerate evidence attestation surfaces
- pin the verified Lib evidence-attestation source revision
- regenerate TypeScript, Swift, Kotlin, and Wasm contract surfaces
- preserve exact evidence vocabularies and unsigned timestamp mappings
- refresh provenance and generated-source integrity records
Diffstat:
16 files changed, 1985 insertions(+), 158 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -389,7 +389,7 @@ dependencies = [
[[package]]
name = "radroots_blossom"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"mediatype",
"serde",
@@ -401,7 +401,7 @@ dependencies = [
[[package]]
name = "radroots_core"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"rust_decimal",
"serde",
@@ -410,7 +410,7 @@ dependencies = [
[[package]]
name = "radroots_event"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"hex",
"jiff-tzdb",
@@ -428,7 +428,7 @@ dependencies = [
[[package]]
name = "radroots_event_codec"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"hex",
"radroots_blossom",
@@ -445,7 +445,7 @@ dependencies = [
[[package]]
name = "radroots_identity"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"k256",
"serde",
@@ -455,7 +455,7 @@ dependencies = [
[[package]]
name = "radroots_protocol"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"serde",
]
@@ -463,7 +463,7 @@ dependencies = [
[[package]]
name = "radroots_sdk"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"radroots_core",
"radroots_event",
@@ -486,7 +486,7 @@ dependencies = [
[[package]]
name = "radroots_signing"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"hex",
"radroots_event",
@@ -499,7 +499,7 @@ dependencies = [
[[package]]
name = "radroots_storage"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"radroots_event",
"radroots_event_codec",
@@ -512,7 +512,7 @@ dependencies = [
[[package]]
name = "radroots_trade"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"hex",
"radroots_core",
@@ -526,7 +526,7 @@ dependencies = [
[[package]]
name = "radroots_transport"
version = "0.1.0-alpha"
-source = "git+https://github.com/radrootslabs/lib?rev=2a982d02f4b251f59edf5c5ec54c53daac25fdcc#2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+source = "git+https://github.com/radrootslabs/lib?rev=3563f3b5a4331eb2cb3f925cafc9de524d844228#3563f3b5a4331eb2cb3f925cafc9de524d844228"
dependencies = [
"radroots_event",
"radroots_identity",
diff --git a/Cargo.toml b/Cargo.toml
@@ -23,4 +23,4 @@ todo = "deny"
unimplemented = "deny"
[workspace.dependencies]
-radroots_sdk = { package = "radroots_sdk", git = "https://github.com/radrootslabs/lib", rev = "2a982d02f4b251f59edf5c5ec54c53daac25fdcc", version = "=0.1.0-alpha", default-features = false }
+radroots_sdk = { package = "radroots_sdk", git = "https://github.com/radrootslabs/lib", rev = "3563f3b5a4331eb2cb3f925cafc9de524d844228", version = "=0.1.0-alpha", default-features = false }
diff --git a/contracts/provenance/sdk/kotlin.json b/contracts/provenance/sdk/kotlin.json
@@ -10,12 +10,12 @@
"files": [],
"provenance": {
"repository": "https://github.com/radrootslabs/lib",
- "revision": "2a982d02f4b251f59edf5c5ec54c53daac25fdcc",
+ "revision": "3563f3b5a4331eb2cb3f925cafc9de524d844228",
"architecture": "radroots.crates.release.v2",
- "catalog_sha256": "8c27cebf6825f9ed74e122513c661f6dd31837dddb39d0988014121d8ab05e75",
- "lockfile_sha256": "3c539b02db83e7109094ff63e7eaaed9aaeccf74948d7ff740aa782a21e69576",
- "source_archive_sha256": "0e7928364cf05659c688e6320028f64f83ab7b92246c8cff9fd66e34afab94ff",
- "source_date_epoch": 1786224930,
+ "catalog_sha256": "deca0c080deae187ff8186c0708903e42f41ea57f77c5f91581e23aa561164a4",
+ "lockfile_sha256": "f296a4199802e629cfd04e058b67471a8e68a50efc262a0a15d94bdf383a13df",
+ "source_archive_sha256": "2da62bd0112d43b634ba5e87dfc09d048f7ea1836ab89d2fd18fcfce5186ad6b",
+ "source_date_epoch": 1787209450,
"builder_id": "radroots_sdk_artifact_v1",
"features": []
}
diff --git a/contracts/provenance/sdk/swift.json b/contracts/provenance/sdk/swift.json
@@ -10,12 +10,12 @@
"files": [],
"provenance": {
"repository": "https://github.com/radrootslabs/lib",
- "revision": "2a982d02f4b251f59edf5c5ec54c53daac25fdcc",
+ "revision": "3563f3b5a4331eb2cb3f925cafc9de524d844228",
"architecture": "radroots.crates.release.v2",
- "catalog_sha256": "8c27cebf6825f9ed74e122513c661f6dd31837dddb39d0988014121d8ab05e75",
- "lockfile_sha256": "3c539b02db83e7109094ff63e7eaaed9aaeccf74948d7ff740aa782a21e69576",
- "source_archive_sha256": "0e7928364cf05659c688e6320028f64f83ab7b92246c8cff9fd66e34afab94ff",
- "source_date_epoch": 1786224930,
+ "catalog_sha256": "deca0c080deae187ff8186c0708903e42f41ea57f77c5f91581e23aa561164a4",
+ "lockfile_sha256": "f296a4199802e629cfd04e058b67471a8e68a50efc262a0a15d94bdf383a13df",
+ "source_archive_sha256": "2da62bd0112d43b634ba5e87dfc09d048f7ea1836ab89d2fd18fcfce5186ad6b",
+ "source_date_epoch": 1787209450,
"builder_id": "radroots_sdk_artifact_v1",
"features": []
}
diff --git a/contracts/provenance/sdk/typescript.json b/contracts/provenance/sdk/typescript.json
@@ -10,12 +10,12 @@
"files": [],
"provenance": {
"repository": "https://github.com/radrootslabs/lib",
- "revision": "2a982d02f4b251f59edf5c5ec54c53daac25fdcc",
+ "revision": "3563f3b5a4331eb2cb3f925cafc9de524d844228",
"architecture": "radroots.crates.release.v2",
- "catalog_sha256": "8c27cebf6825f9ed74e122513c661f6dd31837dddb39d0988014121d8ab05e75",
- "lockfile_sha256": "3c539b02db83e7109094ff63e7eaaed9aaeccf74948d7ff740aa782a21e69576",
- "source_archive_sha256": "0e7928364cf05659c688e6320028f64f83ab7b92246c8cff9fd66e34afab94ff",
- "source_date_epoch": 1786224930,
+ "catalog_sha256": "deca0c080deae187ff8186c0708903e42f41ea57f77c5f91581e23aa561164a4",
+ "lockfile_sha256": "f296a4199802e629cfd04e058b67471a8e68a50efc262a0a15d94bdf383a13df",
+ "source_archive_sha256": "2da62bd0112d43b634ba5e87dfc09d048f7ea1836ab89d2fd18fcfce5186ad6b",
+ "source_date_epoch": 1787209450,
"builder_id": "radroots_sdk_artifact_v1",
"features": []
}
diff --git a/contracts/provenance/sdk/wasm.json b/contracts/provenance/sdk/wasm.json
@@ -10,12 +10,12 @@
"files": [],
"provenance": {
"repository": "https://github.com/radrootslabs/lib",
- "revision": "2a982d02f4b251f59edf5c5ec54c53daac25fdcc",
+ "revision": "3563f3b5a4331eb2cb3f925cafc9de524d844228",
"architecture": "radroots.crates.release.v2",
- "catalog_sha256": "8c27cebf6825f9ed74e122513c661f6dd31837dddb39d0988014121d8ab05e75",
- "lockfile_sha256": "3c539b02db83e7109094ff63e7eaaed9aaeccf74948d7ff740aa782a21e69576",
- "source_archive_sha256": "0e7928364cf05659c688e6320028f64f83ab7b92246c8cff9fd66e34afab94ff",
- "source_date_epoch": 1786224930,
+ "catalog_sha256": "deca0c080deae187ff8186c0708903e42f41ea57f77c5f91581e23aa561164a4",
+ "lockfile_sha256": "f296a4199802e629cfd04e058b67471a8e68a50efc262a0a15d94bdf383a13df",
+ "source_archive_sha256": "2da62bd0112d43b634ba5e87dfc09d048f7ea1836ab89d2fd18fcfce5186ad6b",
+ "source_date_epoch": 1787209450,
"builder_id": "radroots_sdk_artifact_v1",
"features": []
}
diff --git a/contracts/provenance/typescript/event.json b/contracts/provenance/typescript/event.json
@@ -5,7 +5,7 @@
"license": "MIT OR Apache-2.0",
"outputs": {
"src/generated/constants.ts": "8918f0fe056d0c4dc59d05cf1245481b93dc4c135a4150bf512e8811e3b524e8",
- "src/generated/kinds.ts": "e4f01fdf45da2a1dc3dd363bfba5c3ac9adefb0196e40e08fd9affcc65f6c5bc",
+ "src/generated/kinds.ts": "bef17435ae4573aed4ba432a208f459cc054729502498d3d38e948bf16c2c8e4",
"src/generated/types.ts": "fe4496950852715c573ff2abc7df8edede7161de75d9c68c3f4d6836e67f829a"
},
"package": "@radroots/event-bindings",
diff --git a/contracts/provenance/typescript/trade.json b/contracts/provenance/typescript/trade.json
@@ -4,12 +4,12 @@
"generator": "radroots_lib_xtask",
"license": "MIT OR Apache-2.0",
"outputs": {
- "src/generated/types.ts": "49560c572206095bd7de5cfd377c234a7f136e4affc13d53516ae2c4b8998e87"
+ "src/generated/types.ts": "66e6a378231e5341a59cf331b23b3164b27a43fa00411e889d634e4d9d19b53d"
},
"package": "@radroots/trade-bindings",
"repository": "https://github.com/radrootslabs/sdk",
"repository_directory": "packages/trade-bindings",
- "types_sha256": "49560c572206095bd7de5cfd377c234a7f136e4affc13d53516ae2c4b8998e87",
+ "types_sha256": "66e6a378231e5341a59cf331b23b3164b27a43fa00411e889d634e4d9d19b53d",
"types_source": "canonical_native_type_snapshot",
"types_source_packages": [
"radroots_trade",
diff --git a/generated/kotlin/source.lock b/generated/kotlin/source.lock
@@ -2,11 +2,11 @@
"schema_version": 1,
"source_package": "radroots_sdk_ffi",
"source_version": "0.1.0-alpha",
- "source_sha256": "dccf9f024910684a3225310a593667312f0c2598c22f05fa233b6012b0e133eb",
+ "source_sha256": "bb89f460401a22a2bca7d58bb9dbe3300f114f25bd8f64156e492c43563ae12c",
"generator": "uniffi",
"generator_version": "0.29.5",
"language": "kotlin",
"outputs": {
- "uniffi/radroots_sdk/radroots_sdk.kt": "63a91b7c7790ee786d1c94cfad30cbe6e3ac5c737108ec61c74696fc068ef7da"
+ "uniffi/radroots_sdk/radroots_sdk.kt": "cc57260fade24a3b6d8366f06f17fb2d3132a0293cb61dd2a12d30d95f4a4e66"
}
}
diff --git a/generated/kotlin/uniffi/radroots_sdk/radroots_sdk.kt b/generated/kotlin/uniffi/radroots_sdk/radroots_sdk.kt
@@ -729,6 +729,14 @@ internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback {
+
+
+
+
+
+
+
+
// For large crates we prevent `MethodTooLargeException` (see #2340)
// N.B. the name of the extension is very misleading, since it is
// rather `InterfaceTooLargeException`, caused by too many methods
@@ -744,7 +752,15 @@ internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback {
// when the library is loaded.
internal interface IntegrityCheckingUniffiLib : Library {
// Integrity check functions only
- fun uniffi_radroots_sdk_ffi_checksum_method_mobileclient_capabilities(
+ fun uniffi_radroots_sdk_ffi_checksum_func_parse_rhi_evidence_report(
+): Short
+fun uniffi_radroots_sdk_ffi_checksum_func_parse_trade_evidence_manifest(
+): Short
+fun uniffi_radroots_sdk_ffi_checksum_func_prepare_rhi_evidence_attestation(
+): Short
+fun uniffi_radroots_sdk_ffi_checksum_func_validate_rhi_evidence_attestation(
+): Short
+fun uniffi_radroots_sdk_ffi_checksum_method_mobileclient_capabilities(
): Short
fun uniffi_radroots_sdk_ffi_checksum_method_mobileclient_close(
): Short
@@ -813,6 +829,14 @@ fun uniffi_radroots_sdk_ffi_fn_method_mobileclient_close(`ptr`: Pointer,
): Long
fun uniffi_radroots_sdk_ffi_fn_method_mobileclient_is_closed(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
): Byte
+fun uniffi_radroots_sdk_ffi_fn_func_parse_rhi_evidence_report(`canonicalContent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
+): RustBuffer.ByValue
+fun uniffi_radroots_sdk_ffi_fn_func_parse_trade_evidence_manifest(`canonicalBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
+): RustBuffer.ByValue
+fun uniffi_radroots_sdk_ffi_fn_func_prepare_rhi_evidence_attestation(`canonicalContent`: RustBuffer.ByValue,`createdAtUnixS`: Long,uniffi_out_err: UniffiRustCallStatus,
+): RustBuffer.ByValue
+fun uniffi_radroots_sdk_ffi_fn_func_validate_rhi_evidence_attestation(`event`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
+): RustBuffer.ByValue
fun ffi_radroots_sdk_ffi_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus,
): RustBuffer.ByValue
fun ffi_radroots_sdk_ffi_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus,
@@ -939,6 +963,18 @@ private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) {
}
@Suppress("UNUSED_PARAMETER")
private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
+ if (lib.uniffi_radroots_sdk_ffi_checksum_func_parse_rhi_evidence_report() != 37549.toShort()) {
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
+ }
+ if (lib.uniffi_radroots_sdk_ffi_checksum_func_parse_trade_evidence_manifest() != 35922.toShort()) {
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
+ }
+ if (lib.uniffi_radroots_sdk_ffi_checksum_func_prepare_rhi_evidence_attestation() != 53127.toShort()) {
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
+ }
+ if (lib.uniffi_radroots_sdk_ffi_checksum_func_validate_rhi_evidence_attestation() != 46555.toShort()) {
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
+ }
if (lib.uniffi_radroots_sdk_ffi_checksum_method_mobileclient_capabilities() != 23938.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
@@ -1137,6 +1173,75 @@ private class JavaLangRefCleanable(
/**
* @suppress
*/
+public object FfiConverterUShort: FfiConverter<UShort, Short> {
+ override fun lift(value: Short): UShort {
+ return value.toUShort()
+ }
+
+ override fun read(buf: ByteBuffer): UShort {
+ return lift(buf.getShort())
+ }
+
+ override fun lower(value: UShort): Short {
+ return value.toShort()
+ }
+
+ override fun allocationSize(value: UShort) = 2UL
+
+ override fun write(value: UShort, buf: ByteBuffer) {
+ buf.putShort(value.toShort())
+ }
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterUInt: FfiConverter<UInt, Int> {
+ override fun lift(value: Int): UInt {
+ return value.toUInt()
+ }
+
+ override fun read(buf: ByteBuffer): UInt {
+ return lift(buf.getInt())
+ }
+
+ override fun lower(value: UInt): Int {
+ return value.toInt()
+ }
+
+ override fun allocationSize(value: UInt) = 4UL
+
+ override fun write(value: UInt, buf: ByteBuffer) {
+ buf.putInt(value.toInt())
+ }
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterULong: FfiConverter<ULong, Long> {
+ override fun lift(value: Long): ULong {
+ return value.toULong()
+ }
+
+ override fun read(buf: ByteBuffer): ULong {
+ return lift(buf.getLong())
+ }
+
+ override fun lower(value: ULong): Long {
+ return value.toLong()
+ }
+
+ override fun allocationSize(value: ULong) = 8UL
+
+ override fun write(value: ULong, buf: ByteBuffer) {
+ buf.putLong(value.toLong())
+ }
+}
+
+/**
+ * @suppress
+ */
public object FfiConverterBoolean: FfiConverter<Boolean, Byte> {
override fun lift(value: Byte): Boolean {
return value.toInt() != 0
@@ -1214,6 +1319,25 @@ public object FfiConverterString: FfiConverter<String, RustBuffer.ByValue> {
}
}
+/**
+ * @suppress
+ */
+public object FfiConverterByteArray: FfiConverterRustBuffer<ByteArray> {
+ override fun read(buf: ByteBuffer): ByteArray {
+ val len = buf.getInt()
+ val byteArr = ByteArray(len)
+ buf.get(byteArr)
+ return byteArr
+ }
+ override fun allocationSize(value: ByteArray): ULong {
+ return 4UL + value.size.toULong()
+ }
+ override fun write(value: ByteArray, buf: ByteBuffer) {
+ buf.putInt(value.size)
+ buf.put(value)
+ }
+}
+
// This template implements a class for working with a Rust struct via a Pointer/Arc<T>
// to the live Rust struct on the other side of the FFI.
@@ -1577,6 +1701,364 @@ public object FfiConverterTypeCapabilityStatus: FfiConverterRustBuffer<Capabilit
/**
+ * Verified final RHI attestation projection.
+ */
+data class RhiEvidenceAttestation (
+ var `issuerPubkey`: kotlin.String,
+ var `tradeId`: kotlin.String,
+ var `claimMutationId`: kotlin.String,
+ var `outcome`: TradeEvidenceOutcome,
+ var `observedAtUnixS`: kotlin.String,
+ var `tradeGeneration`: kotlin.String,
+ var `statementDigest`: kotlin.String,
+ var `supersession`: RhiEvidenceSupersession?,
+ var `canonicalContent`: kotlin.String
+) {
+
+ companion object
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeRhiEvidenceAttestation: FfiConverterRustBuffer<RhiEvidenceAttestation> {
+ override fun read(buf: ByteBuffer): RhiEvidenceAttestation {
+ return RhiEvidenceAttestation(
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterTypeTradeEvidenceOutcome.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterOptionalTypeRhiEvidenceSupersession.read(buf),
+ FfiConverterString.read(buf),
+ )
+ }
+
+ override fun allocationSize(value: RhiEvidenceAttestation) = (
+ FfiConverterString.allocationSize(value.`issuerPubkey`) +
+ FfiConverterString.allocationSize(value.`tradeId`) +
+ FfiConverterString.allocationSize(value.`claimMutationId`) +
+ FfiConverterTypeTradeEvidenceOutcome.allocationSize(value.`outcome`) +
+ FfiConverterString.allocationSize(value.`observedAtUnixS`) +
+ FfiConverterString.allocationSize(value.`tradeGeneration`) +
+ FfiConverterString.allocationSize(value.`statementDigest`) +
+ FfiConverterOptionalTypeRhiEvidenceSupersession.allocationSize(value.`supersession`) +
+ FfiConverterString.allocationSize(value.`canonicalContent`)
+ )
+
+ override fun write(value: RhiEvidenceAttestation, buf: ByteBuffer) {
+ FfiConverterString.write(value.`issuerPubkey`, buf)
+ FfiConverterString.write(value.`tradeId`, buf)
+ FfiConverterString.write(value.`claimMutationId`, buf)
+ FfiConverterTypeTradeEvidenceOutcome.write(value.`outcome`, buf)
+ FfiConverterString.write(value.`observedAtUnixS`, buf)
+ FfiConverterString.write(value.`tradeGeneration`, buf)
+ FfiConverterString.write(value.`statementDigest`, buf)
+ FfiConverterOptionalTypeRhiEvidenceSupersession.write(value.`supersession`, buf)
+ FfiConverterString.write(value.`canonicalContent`, buf)
+ }
+}
+
+
+
+/**
+ * Bounded projection of one canonical RHI evidence report.
+ */
+data class RhiEvidenceReport (
+ var `contractId`: kotlin.String,
+ var `contractVersion`: kotlin.UShort,
+ var `issuerPubkey`: kotlin.String,
+ var `tradeId`: kotlin.String,
+ var `claimMutationId`: kotlin.String,
+ var `outcome`: TradeEvidenceOutcome,
+ var `reasonCodes`: List<kotlin.String>,
+ var `projectionDigest`: kotlin.String,
+ var `evidenceManifestDigest`: kotlin.String,
+ var `evidencePolicyDigest`: kotlin.String,
+ var `observedAtUnixS`: kotlin.String,
+ var `tradeGeneration`: kotlin.String,
+ var `statementDigest`: kotlin.String,
+ var `supersession`: RhiEvidenceSupersession?,
+ var `canonicalContent`: kotlin.String
+) {
+
+ companion object
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeRhiEvidenceReport: FfiConverterRustBuffer<RhiEvidenceReport> {
+ override fun read(buf: ByteBuffer): RhiEvidenceReport {
+ return RhiEvidenceReport(
+ FfiConverterString.read(buf),
+ FfiConverterUShort.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterTypeTradeEvidenceOutcome.read(buf),
+ FfiConverterSequenceString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterOptionalTypeRhiEvidenceSupersession.read(buf),
+ FfiConverterString.read(buf),
+ )
+ }
+
+ override fun allocationSize(value: RhiEvidenceReport) = (
+ FfiConverterString.allocationSize(value.`contractId`) +
+ FfiConverterUShort.allocationSize(value.`contractVersion`) +
+ FfiConverterString.allocationSize(value.`issuerPubkey`) +
+ FfiConverterString.allocationSize(value.`tradeId`) +
+ FfiConverterString.allocationSize(value.`claimMutationId`) +
+ FfiConverterTypeTradeEvidenceOutcome.allocationSize(value.`outcome`) +
+ FfiConverterSequenceString.allocationSize(value.`reasonCodes`) +
+ FfiConverterString.allocationSize(value.`projectionDigest`) +
+ FfiConverterString.allocationSize(value.`evidenceManifestDigest`) +
+ FfiConverterString.allocationSize(value.`evidencePolicyDigest`) +
+ FfiConverterString.allocationSize(value.`observedAtUnixS`) +
+ FfiConverterString.allocationSize(value.`tradeGeneration`) +
+ FfiConverterString.allocationSize(value.`statementDigest`) +
+ FfiConverterOptionalTypeRhiEvidenceSupersession.allocationSize(value.`supersession`) +
+ FfiConverterString.allocationSize(value.`canonicalContent`)
+ )
+
+ override fun write(value: RhiEvidenceReport, buf: ByteBuffer) {
+ FfiConverterString.write(value.`contractId`, buf)
+ FfiConverterUShort.write(value.`contractVersion`, buf)
+ FfiConverterString.write(value.`issuerPubkey`, buf)
+ FfiConverterString.write(value.`tradeId`, buf)
+ FfiConverterString.write(value.`claimMutationId`, buf)
+ FfiConverterTypeTradeEvidenceOutcome.write(value.`outcome`, buf)
+ FfiConverterSequenceString.write(value.`reasonCodes`, buf)
+ FfiConverterString.write(value.`projectionDigest`, buf)
+ FfiConverterString.write(value.`evidenceManifestDigest`, buf)
+ FfiConverterString.write(value.`evidencePolicyDigest`, buf)
+ FfiConverterString.write(value.`observedAtUnixS`, buf)
+ FfiConverterString.write(value.`tradeGeneration`, buf)
+ FfiConverterString.write(value.`statementDigest`, buf)
+ FfiConverterOptionalTypeRhiEvidenceSupersession.write(value.`supersession`, buf)
+ FfiConverterString.write(value.`canonicalContent`, buf)
+ }
+}
+
+
+
+/**
+ * Exact immutable RHI supersession reference.
+ */
+data class RhiEvidenceSupersession (
+ var `reportId`: kotlin.String,
+ var `eventId`: kotlin.String
+) {
+
+ companion object
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeRhiEvidenceSupersession: FfiConverterRustBuffer<RhiEvidenceSupersession> {
+ override fun read(buf: ByteBuffer): RhiEvidenceSupersession {
+ return RhiEvidenceSupersession(
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ )
+ }
+
+ override fun allocationSize(value: RhiEvidenceSupersession) = (
+ FfiConverterString.allocationSize(value.`reportId`) +
+ FfiConverterString.allocationSize(value.`eventId`)
+ )
+
+ override fun write(value: RhiEvidenceSupersession, buf: ByteBuffer) {
+ FfiConverterString.write(value.`reportId`, buf)
+ FfiConverterString.write(value.`eventId`, buf)
+ }
+}
+
+
+
+/**
+ * Signed NIP-01 event input for verified attestation admission.
+ */
+data class SignedEvent (
+ var `id`: kotlin.String,
+ var `authorPubkey`: kotlin.String,
+ var `createdAtUnixS`: kotlin.ULong,
+ var `kind`: kotlin.UInt,
+ var `tags`: List<List<kotlin.String>>,
+ var `content`: kotlin.String,
+ var `signature`: kotlin.String
+) {
+
+ companion object
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeSignedEvent: FfiConverterRustBuffer<SignedEvent> {
+ override fun read(buf: ByteBuffer): SignedEvent {
+ return SignedEvent(
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterULong.read(buf),
+ FfiConverterUInt.read(buf),
+ FfiConverterSequenceSequenceString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ )
+ }
+
+ override fun allocationSize(value: SignedEvent) = (
+ FfiConverterString.allocationSize(value.`id`) +
+ FfiConverterString.allocationSize(value.`authorPubkey`) +
+ FfiConverterULong.allocationSize(value.`createdAtUnixS`) +
+ FfiConverterUInt.allocationSize(value.`kind`) +
+ FfiConverterSequenceSequenceString.allocationSize(value.`tags`) +
+ FfiConverterString.allocationSize(value.`content`) +
+ FfiConverterString.allocationSize(value.`signature`)
+ )
+
+ override fun write(value: SignedEvent, buf: ByteBuffer) {
+ FfiConverterString.write(value.`id`, buf)
+ FfiConverterString.write(value.`authorPubkey`, buf)
+ FfiConverterULong.write(value.`createdAtUnixS`, buf)
+ FfiConverterUInt.write(value.`kind`, buf)
+ FfiConverterSequenceSequenceString.write(value.`tags`, buf)
+ FfiConverterString.write(value.`content`, buf)
+ FfiConverterString.write(value.`signature`, buf)
+ }
+}
+
+
+
+/**
+ * Bounded projection of one canonical evidence manifest.
+ */
+data class TradeEvidenceManifest (
+ var `contractId`: kotlin.String,
+ var `contractVersion`: kotlin.UShort,
+ var `tradeId`: kotlin.String,
+ var `tradeGeneration`: kotlin.String,
+ var `observedAtUnixS`: kotlin.String,
+ var `coverage`: TradeEvidenceCoverage,
+ var `evidencePolicyDigest`: kotlin.String,
+ var `manifestDigest`: kotlin.String,
+ var `canonicalBytesHex`: kotlin.String
+) {
+
+ companion object
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeTradeEvidenceManifest: FfiConverterRustBuffer<TradeEvidenceManifest> {
+ override fun read(buf: ByteBuffer): TradeEvidenceManifest {
+ return TradeEvidenceManifest(
+ FfiConverterString.read(buf),
+ FfiConverterUShort.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterTypeTradeEvidenceCoverage.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ )
+ }
+
+ override fun allocationSize(value: TradeEvidenceManifest) = (
+ FfiConverterString.allocationSize(value.`contractId`) +
+ FfiConverterUShort.allocationSize(value.`contractVersion`) +
+ FfiConverterString.allocationSize(value.`tradeId`) +
+ FfiConverterString.allocationSize(value.`tradeGeneration`) +
+ FfiConverterString.allocationSize(value.`observedAtUnixS`) +
+ FfiConverterTypeTradeEvidenceCoverage.allocationSize(value.`coverage`) +
+ FfiConverterString.allocationSize(value.`evidencePolicyDigest`) +
+ FfiConverterString.allocationSize(value.`manifestDigest`) +
+ FfiConverterString.allocationSize(value.`canonicalBytesHex`)
+ )
+
+ override fun write(value: TradeEvidenceManifest, buf: ByteBuffer) {
+ FfiConverterString.write(value.`contractId`, buf)
+ FfiConverterUShort.write(value.`contractVersion`, buf)
+ FfiConverterString.write(value.`tradeId`, buf)
+ FfiConverterString.write(value.`tradeGeneration`, buf)
+ FfiConverterString.write(value.`observedAtUnixS`, buf)
+ FfiConverterTypeTradeEvidenceCoverage.write(value.`coverage`, buf)
+ FfiConverterString.write(value.`evidencePolicyDigest`, buf)
+ FfiConverterString.write(value.`manifestDigest`, buf)
+ FfiConverterString.write(value.`canonicalBytesHex`, buf)
+ }
+}
+
+
+
+/**
+ * One unsigned typed event plan ready for host-owned signing.
+ */
+data class TypedEvidenceEventPlan (
+ var `contractId`: kotlin.String,
+ var `kind`: kotlin.UInt,
+ var `authorPubkey`: kotlin.String,
+ var `createdAtUnixS`: kotlin.String,
+ var `expectedEventId`: kotlin.String,
+ var `tags`: List<List<kotlin.String>>,
+ var `content`: kotlin.String
+) {
+
+ companion object
+}
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeTypedEvidenceEventPlan: FfiConverterRustBuffer<TypedEvidenceEventPlan> {
+ override fun read(buf: ByteBuffer): TypedEvidenceEventPlan {
+ return TypedEvidenceEventPlan(
+ FfiConverterString.read(buf),
+ FfiConverterUInt.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterString.read(buf),
+ FfiConverterSequenceSequenceString.read(buf),
+ FfiConverterString.read(buf),
+ )
+ }
+
+ override fun allocationSize(value: TypedEvidenceEventPlan) = (
+ FfiConverterString.allocationSize(value.`contractId`) +
+ FfiConverterUInt.allocationSize(value.`kind`) +
+ FfiConverterString.allocationSize(value.`authorPubkey`) +
+ FfiConverterString.allocationSize(value.`createdAtUnixS`) +
+ FfiConverterString.allocationSize(value.`expectedEventId`) +
+ FfiConverterSequenceSequenceString.allocationSize(value.`tags`) +
+ FfiConverterString.allocationSize(value.`content`)
+ )
+
+ override fun write(value: TypedEvidenceEventPlan, buf: ByteBuffer) {
+ FfiConverterString.write(value.`contractId`, buf)
+ FfiConverterUInt.write(value.`kind`, buf)
+ FfiConverterString.write(value.`authorPubkey`, buf)
+ FfiConverterString.write(value.`createdAtUnixS`, buf)
+ FfiConverterString.write(value.`expectedEventId`, buf)
+ FfiConverterSequenceSequenceString.write(value.`tags`, buf)
+ FfiConverterString.write(value.`content`, buf)
+ }
+}
+
+
+
+/**
* Current side-effect-free capability availability.
*/
@@ -1717,6 +2199,135 @@ public object FfiConverterTypeError : FfiConverterRustBuffer<Exception> {
+/**
+ * Final evidence coverage vocabulary.
+ */
+
+enum class TradeEvidenceCoverage {
+
+ MISSING,
+ PARTIAL,
+ SCOPE_SATISFIED,
+ UNSUPPORTED;
+ companion object
+}
+
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeTradeEvidenceCoverage: FfiConverterRustBuffer<TradeEvidenceCoverage> {
+ override fun read(buf: ByteBuffer) = try {
+ TradeEvidenceCoverage.values()[buf.getInt() - 1]
+ } catch (e: IndexOutOfBoundsException) {
+ throw RuntimeException("invalid enum value, something is very wrong!!", e)
+ }
+
+ override fun allocationSize(value: TradeEvidenceCoverage) = 4UL
+
+ override fun write(value: TradeEvidenceCoverage, buf: ByteBuffer) {
+ buf.putInt(value.ordinal + 1)
+ }
+}
+
+
+
+
+
+/**
+ * Final evidence outcome vocabulary.
+ */
+
+enum class TradeEvidenceOutcome {
+
+ VALID,
+ INVALID,
+ INDETERMINATE;
+ companion object
+}
+
+
+/**
+ * @suppress
+ */
+public object FfiConverterTypeTradeEvidenceOutcome: FfiConverterRustBuffer<TradeEvidenceOutcome> {
+ override fun read(buf: ByteBuffer) = try {
+ TradeEvidenceOutcome.values()[buf.getInt() - 1]
+ } catch (e: IndexOutOfBoundsException) {
+ throw RuntimeException("invalid enum value, something is very wrong!!", e)
+ }
+
+ override fun allocationSize(value: TradeEvidenceOutcome) = 4UL
+
+ override fun write(value: TradeEvidenceOutcome, buf: ByteBuffer) {
+ buf.putInt(value.ordinal + 1)
+ }
+}
+
+
+
+
+
+
+/**
+ * @suppress
+ */
+public object FfiConverterOptionalTypeRhiEvidenceSupersession: FfiConverterRustBuffer<RhiEvidenceSupersession?> {
+ override fun read(buf: ByteBuffer): RhiEvidenceSupersession? {
+ if (buf.get().toInt() == 0) {
+ return null
+ }
+ return FfiConverterTypeRhiEvidenceSupersession.read(buf)
+ }
+
+ override fun allocationSize(value: RhiEvidenceSupersession?): ULong {
+ if (value == null) {
+ return 1UL
+ } else {
+ return 1UL + FfiConverterTypeRhiEvidenceSupersession.allocationSize(value)
+ }
+ }
+
+ override fun write(value: RhiEvidenceSupersession?, buf: ByteBuffer) {
+ if (value == null) {
+ buf.put(0)
+ } else {
+ buf.put(1)
+ FfiConverterTypeRhiEvidenceSupersession.write(value, buf)
+ }
+ }
+}
+
+
+
+
+/**
+ * @suppress
+ */
+public object FfiConverterSequenceString: FfiConverterRustBuffer<List<kotlin.String>> {
+ override fun read(buf: ByteBuffer): List<kotlin.String> {
+ val len = buf.getInt()
+ return List<kotlin.String>(len) {
+ FfiConverterString.read(buf)
+ }
+ }
+
+ override fun allocationSize(value: List<kotlin.String>): ULong {
+ val sizeForLength = 4UL
+ val sizeForItems = value.map { FfiConverterString.allocationSize(it) }.sum()
+ return sizeForLength + sizeForItems
+ }
+
+ override fun write(value: List<kotlin.String>, buf: ByteBuffer) {
+ buf.putInt(value.size)
+ value.iterator().forEach {
+ FfiConverterString.write(it, buf)
+ }
+ }
+}
+
+
+
/**
* @suppress
@@ -1742,3 +2353,77 @@ public object FfiConverterSequenceTypeCapabilityStatus: FfiConverterRustBuffer<L
}
}
}
+
+
+
+
+/**
+ * @suppress
+ */
+public object FfiConverterSequenceSequenceString: FfiConverterRustBuffer<List<List<kotlin.String>>> {
+ override fun read(buf: ByteBuffer): List<List<kotlin.String>> {
+ val len = buf.getInt()
+ return List<List<kotlin.String>>(len) {
+ FfiConverterSequenceString.read(buf)
+ }
+ }
+
+ override fun allocationSize(value: List<List<kotlin.String>>): ULong {
+ val sizeForLength = 4UL
+ val sizeForItems = value.map { FfiConverterSequenceString.allocationSize(it) }.sum()
+ return sizeForLength + sizeForItems
+ }
+
+ override fun write(value: List<List<kotlin.String>>, buf: ByteBuffer) {
+ buf.putInt(value.size)
+ value.iterator().forEach {
+ FfiConverterSequenceString.write(it, buf)
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ @Throws(Exception::class) fun `parseRhiEvidenceReport`(`canonicalContent`: kotlin.String): RhiEvidenceReport {
+ return FfiConverterTypeRhiEvidenceReport.lift(
+ uniffiRustCallWithError(Exception) { _status ->
+ UniffiLib.INSTANCE.uniffi_radroots_sdk_ffi_fn_func_parse_rhi_evidence_report(
+ FfiConverterString.lower(`canonicalContent`),_status)
+}
+ )
+ }
+
+
+ @Throws(Exception::class) fun `parseTradeEvidenceManifest`(`canonicalBytes`: kotlin.ByteArray): TradeEvidenceManifest {
+ return FfiConverterTypeTradeEvidenceManifest.lift(
+ uniffiRustCallWithError(Exception) { _status ->
+ UniffiLib.INSTANCE.uniffi_radroots_sdk_ffi_fn_func_parse_trade_evidence_manifest(
+ FfiConverterByteArray.lower(`canonicalBytes`),_status)
+}
+ )
+ }
+
+
+ @Throws(Exception::class) fun `prepareRhiEvidenceAttestation`(`canonicalContent`: kotlin.String, `createdAtUnixS`: kotlin.ULong): TypedEvidenceEventPlan {
+ return FfiConverterTypeTypedEvidenceEventPlan.lift(
+ uniffiRustCallWithError(Exception) { _status ->
+ UniffiLib.INSTANCE.uniffi_radroots_sdk_ffi_fn_func_prepare_rhi_evidence_attestation(
+ FfiConverterString.lower(`canonicalContent`),FfiConverterULong.lower(`createdAtUnixS`),_status)
+}
+ )
+ }
+
+
+ @Throws(Exception::class) fun `validateRhiEvidenceAttestation`(`event`: SignedEvent): RhiEvidenceAttestation {
+ return FfiConverterTypeRhiEvidenceAttestation.lift(
+ uniffiRustCallWithError(Exception) { _status ->
+ UniffiLib.INSTANCE.uniffi_radroots_sdk_ffi_fn_func_validate_rhi_evidence_attestation(
+ FfiConverterTypeSignedEvent.lower(`event`),_status)
+}
+ )
+ }
diff --git a/generated/swift/radroots_sdk.swift b/generated/swift/radroots_sdk.swift
@@ -400,6 +400,54 @@ fileprivate final class UniffiHandleMap<T>: @unchecked Sendable {
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
+fileprivate struct FfiConverterUInt16: FfiConverterPrimitive {
+ typealias FfiType = UInt16
+ typealias SwiftType = UInt16
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UInt16 {
+ return try lift(readInt(&buf))
+ }
+
+ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
+ writeInt(&buf, lower(value))
+ }
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+fileprivate struct FfiConverterUInt32: FfiConverterPrimitive {
+ typealias FfiType = UInt32
+ typealias SwiftType = UInt32
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UInt32 {
+ return try lift(readInt(&buf))
+ }
+
+ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
+ writeInt(&buf, lower(value))
+ }
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+fileprivate struct FfiConverterUInt64: FfiConverterPrimitive {
+ typealias FfiType = UInt64
+ typealias SwiftType = UInt64
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UInt64 {
+ return try lift(readInt(&buf))
+ }
+
+ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
+ writeInt(&buf, lower(value))
+ }
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
fileprivate struct FfiConverterBool : FfiConverter {
typealias FfiType = Int8
typealias SwiftType = Bool
@@ -462,6 +510,24 @@ fileprivate struct FfiConverterString: FfiConverter {
}
}
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+fileprivate struct FfiConverterData: FfiConverterRustBuffer {
+ typealias SwiftType = Data
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Data {
+ let len: Int32 = try readInt(&buf)
+ return Data(try readBytes(&buf, count: Int(len)))
+ }
+
+ public static func write(_ value: Data, into buf: inout [UInt8]) {
+ let len = Int32(value.count)
+ writeInt(&buf, len)
+ writeBytes(&buf, value)
+ }
+}
+
@@ -743,67 +809,117 @@ public func FfiConverterTypeCapabilityStatus_lower(_ value: CapabilityStatus) ->
return FfiConverterTypeCapabilityStatus.lower(value)
}
-// Note that we don't yet support `indirect` for enums.
-// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
+
/**
- * Current side-effect-free capability availability.
+ * Verified final RHI attestation projection.
*/
+public struct RhiEvidenceAttestation {
+ public var issuerPubkey: String
+ public var tradeId: String
+ public var claimMutationId: String
+ public var outcome: TradeEvidenceOutcome
+ public var observedAtUnixS: String
+ public var tradeGeneration: String
+ public var statementDigest: String
+ public var supersession: RhiEvidenceSupersession?
+ public var canonicalContent: String
-public enum CapabilityAvailability {
-
- case available
- case degraded
- case unavailable
- case unsupported
+ // Default memberwise initializers are never public by default, so we
+ // declare one manually.
+ public init(issuerPubkey: String, tradeId: String, claimMutationId: String, outcome: TradeEvidenceOutcome, observedAtUnixS: String, tradeGeneration: String, statementDigest: String, supersession: RhiEvidenceSupersession?, canonicalContent: String) {
+ self.issuerPubkey = issuerPubkey
+ self.tradeId = tradeId
+ self.claimMutationId = claimMutationId
+ self.outcome = outcome
+ self.observedAtUnixS = observedAtUnixS
+ self.tradeGeneration = tradeGeneration
+ self.statementDigest = statementDigest
+ self.supersession = supersession
+ self.canonicalContent = canonicalContent
+ }
}
-
#if compiler(>=6)
-extension CapabilityAvailability: Sendable {}
-#endif
-
-#if swift(>=5.8)
-@_documentation(visibility: private)
+extension RhiEvidenceAttestation: Sendable {}
#endif
-public struct FfiConverterTypeCapabilityAvailability: FfiConverterRustBuffer {
- typealias SwiftType = CapabilityAvailability
-
- public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CapabilityAvailability {
- let variant: Int32 = try readInt(&buf)
- switch variant {
-
- case 1: return .available
- case 2: return .degraded
-
- case 3: return .unavailable
-
- case 4: return .unsupported
- default: throw UniffiInternalError.unexpectedEnumCase
+extension RhiEvidenceAttestation: Equatable, Hashable {
+ public static func ==(lhs: RhiEvidenceAttestation, rhs: RhiEvidenceAttestation) -> Bool {
+ if lhs.issuerPubkey != rhs.issuerPubkey {
+ return false
+ }
+ if lhs.tradeId != rhs.tradeId {
+ return false
+ }
+ if lhs.claimMutationId != rhs.claimMutationId {
+ return false
+ }
+ if lhs.outcome != rhs.outcome {
+ return false
+ }
+ if lhs.observedAtUnixS != rhs.observedAtUnixS {
+ return false
+ }
+ if lhs.tradeGeneration != rhs.tradeGeneration {
+ return false
+ }
+ if lhs.statementDigest != rhs.statementDigest {
+ return false
+ }
+ if lhs.supersession != rhs.supersession {
+ return false
+ }
+ if lhs.canonicalContent != rhs.canonicalContent {
+ return false
}
+ return true
}
- public static func write(_ value: CapabilityAvailability, into buf: inout [UInt8]) {
- switch value {
-
-
- case .available:
- writeInt(&buf, Int32(1))
-
-
- case .degraded:
- writeInt(&buf, Int32(2))
-
+ public func hash(into hasher: inout Hasher) {
+ hasher.combine(issuerPubkey)
+ hasher.combine(tradeId)
+ hasher.combine(claimMutationId)
+ hasher.combine(outcome)
+ hasher.combine(observedAtUnixS)
+ hasher.combine(tradeGeneration)
+ hasher.combine(statementDigest)
+ hasher.combine(supersession)
+ hasher.combine(canonicalContent)
+ }
+}
- case .unavailable:
- writeInt(&buf, Int32(3))
- case .unsupported:
- writeInt(&buf, Int32(4))
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeRhiEvidenceAttestation: FfiConverterRustBuffer {
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RhiEvidenceAttestation {
+ return
+ try RhiEvidenceAttestation(
+ issuerPubkey: FfiConverterString.read(from: &buf),
+ tradeId: FfiConverterString.read(from: &buf),
+ claimMutationId: FfiConverterString.read(from: &buf),
+ outcome: FfiConverterTypeTradeEvidenceOutcome.read(from: &buf),
+ observedAtUnixS: FfiConverterString.read(from: &buf),
+ tradeGeneration: FfiConverterString.read(from: &buf),
+ statementDigest: FfiConverterString.read(from: &buf),
+ supersession: FfiConverterOptionTypeRhiEvidenceSupersession.read(from: &buf),
+ canonicalContent: FfiConverterString.read(from: &buf)
+ )
+ }
- }
+ public static func write(_ value: RhiEvidenceAttestation, into buf: inout [UInt8]) {
+ FfiConverterString.write(value.issuerPubkey, into: &buf)
+ FfiConverterString.write(value.tradeId, into: &buf)
+ FfiConverterString.write(value.claimMutationId, into: &buf)
+ FfiConverterTypeTradeEvidenceOutcome.write(value.outcome, into: &buf)
+ FfiConverterString.write(value.observedAtUnixS, into: &buf)
+ FfiConverterString.write(value.tradeGeneration, into: &buf)
+ FfiConverterString.write(value.statementDigest, into: &buf)
+ FfiConverterOptionTypeRhiEvidenceSupersession.write(value.supersession, into: &buf)
+ FfiConverterString.write(value.canonicalContent, into: &buf)
}
}
@@ -811,79 +927,176 @@ public struct FfiConverterTypeCapabilityAvailability: FfiConverterRustBuffer {
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
-public func FfiConverterTypeCapabilityAvailability_lift(_ buf: RustBuffer) throws -> CapabilityAvailability {
- return try FfiConverterTypeCapabilityAvailability.lift(buf)
+public func FfiConverterTypeRhiEvidenceAttestation_lift(_ buf: RustBuffer) throws -> RhiEvidenceAttestation {
+ return try FfiConverterTypeRhiEvidenceAttestation.lift(buf)
}
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
-public func FfiConverterTypeCapabilityAvailability_lower(_ value: CapabilityAvailability) -> RustBuffer {
- return FfiConverterTypeCapabilityAvailability.lower(value)
+public func FfiConverterTypeRhiEvidenceAttestation_lower(_ value: RhiEvidenceAttestation) -> RustBuffer {
+ return FfiConverterTypeRhiEvidenceAttestation.lower(value)
}
-extension CapabilityAvailability: Equatable, Hashable {}
-
-
-
-
-
-
-// Note that we don't yet support `indirect` for enums.
-// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
/**
- * Stable capability maturity independent of runtime availability.
+ * Bounded projection of one canonical RHI evidence report.
*/
+public struct RhiEvidenceReport {
+ public var contractId: String
+ public var contractVersion: UInt16
+ public var issuerPubkey: String
+ public var tradeId: String
+ public var claimMutationId: String
+ public var outcome: TradeEvidenceOutcome
+ public var reasonCodes: [String]
+ public var projectionDigest: String
+ public var evidenceManifestDigest: String
+ public var evidencePolicyDigest: String
+ public var observedAtUnixS: String
+ public var tradeGeneration: String
+ public var statementDigest: String
+ public var supersession: RhiEvidenceSupersession?
+ public var canonicalContent: String
-public enum CapabilityMaturity {
-
- case stable
- case preview
- case experimental
+ // Default memberwise initializers are never public by default, so we
+ // declare one manually.
+ public init(contractId: String, contractVersion: UInt16, issuerPubkey: String, tradeId: String, claimMutationId: String, outcome: TradeEvidenceOutcome, reasonCodes: [String], projectionDigest: String, evidenceManifestDigest: String, evidencePolicyDigest: String, observedAtUnixS: String, tradeGeneration: String, statementDigest: String, supersession: RhiEvidenceSupersession?, canonicalContent: String) {
+ self.contractId = contractId
+ self.contractVersion = contractVersion
+ self.issuerPubkey = issuerPubkey
+ self.tradeId = tradeId
+ self.claimMutationId = claimMutationId
+ self.outcome = outcome
+ self.reasonCodes = reasonCodes
+ self.projectionDigest = projectionDigest
+ self.evidenceManifestDigest = evidenceManifestDigest
+ self.evidencePolicyDigest = evidencePolicyDigest
+ self.observedAtUnixS = observedAtUnixS
+ self.tradeGeneration = tradeGeneration
+ self.statementDigest = statementDigest
+ self.supersession = supersession
+ self.canonicalContent = canonicalContent
+ }
}
-
#if compiler(>=6)
-extension CapabilityMaturity: Sendable {}
-#endif
-
-#if swift(>=5.8)
-@_documentation(visibility: private)
+extension RhiEvidenceReport: Sendable {}
#endif
-public struct FfiConverterTypeCapabilityMaturity: FfiConverterRustBuffer {
- typealias SwiftType = CapabilityMaturity
-
- public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CapabilityMaturity {
- let variant: Int32 = try readInt(&buf)
- switch variant {
-
- case 1: return .stable
-
- case 2: return .preview
- case 3: return .experimental
- default: throw UniffiInternalError.unexpectedEnumCase
+extension RhiEvidenceReport: Equatable, Hashable {
+ public static func ==(lhs: RhiEvidenceReport, rhs: RhiEvidenceReport) -> Bool {
+ if lhs.contractId != rhs.contractId {
+ return false
+ }
+ if lhs.contractVersion != rhs.contractVersion {
+ return false
+ }
+ if lhs.issuerPubkey != rhs.issuerPubkey {
+ return false
+ }
+ if lhs.tradeId != rhs.tradeId {
+ return false
+ }
+ if lhs.claimMutationId != rhs.claimMutationId {
+ return false
+ }
+ if lhs.outcome != rhs.outcome {
+ return false
+ }
+ if lhs.reasonCodes != rhs.reasonCodes {
+ return false
+ }
+ if lhs.projectionDigest != rhs.projectionDigest {
+ return false
}
+ if lhs.evidenceManifestDigest != rhs.evidenceManifestDigest {
+ return false
+ }
+ if lhs.evidencePolicyDigest != rhs.evidencePolicyDigest {
+ return false
+ }
+ if lhs.observedAtUnixS != rhs.observedAtUnixS {
+ return false
+ }
+ if lhs.tradeGeneration != rhs.tradeGeneration {
+ return false
+ }
+ if lhs.statementDigest != rhs.statementDigest {
+ return false
+ }
+ if lhs.supersession != rhs.supersession {
+ return false
+ }
+ if lhs.canonicalContent != rhs.canonicalContent {
+ return false
+ }
+ return true
}
- public static func write(_ value: CapabilityMaturity, into buf: inout [UInt8]) {
- switch value {
-
-
- case .stable:
- writeInt(&buf, Int32(1))
-
+ public func hash(into hasher: inout Hasher) {
+ hasher.combine(contractId)
+ hasher.combine(contractVersion)
+ hasher.combine(issuerPubkey)
+ hasher.combine(tradeId)
+ hasher.combine(claimMutationId)
+ hasher.combine(outcome)
+ hasher.combine(reasonCodes)
+ hasher.combine(projectionDigest)
+ hasher.combine(evidenceManifestDigest)
+ hasher.combine(evidencePolicyDigest)
+ hasher.combine(observedAtUnixS)
+ hasher.combine(tradeGeneration)
+ hasher.combine(statementDigest)
+ hasher.combine(supersession)
+ hasher.combine(canonicalContent)
+ }
+}
- case .preview:
- writeInt(&buf, Int32(2))
- case .experimental:
- writeInt(&buf, Int32(3))
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeRhiEvidenceReport: FfiConverterRustBuffer {
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RhiEvidenceReport {
+ return
+ try RhiEvidenceReport(
+ contractId: FfiConverterString.read(from: &buf),
+ contractVersion: FfiConverterUInt16.read(from: &buf),
+ issuerPubkey: FfiConverterString.read(from: &buf),
+ tradeId: FfiConverterString.read(from: &buf),
+ claimMutationId: FfiConverterString.read(from: &buf),
+ outcome: FfiConverterTypeTradeEvidenceOutcome.read(from: &buf),
+ reasonCodes: FfiConverterSequenceString.read(from: &buf),
+ projectionDigest: FfiConverterString.read(from: &buf),
+ evidenceManifestDigest: FfiConverterString.read(from: &buf),
+ evidencePolicyDigest: FfiConverterString.read(from: &buf),
+ observedAtUnixS: FfiConverterString.read(from: &buf),
+ tradeGeneration: FfiConverterString.read(from: &buf),
+ statementDigest: FfiConverterString.read(from: &buf),
+ supersession: FfiConverterOptionTypeRhiEvidenceSupersession.read(from: &buf),
+ canonicalContent: FfiConverterString.read(from: &buf)
+ )
+ }
- }
+ public static func write(_ value: RhiEvidenceReport, into buf: inout [UInt8]) {
+ FfiConverterString.write(value.contractId, into: &buf)
+ FfiConverterUInt16.write(value.contractVersion, into: &buf)
+ FfiConverterString.write(value.issuerPubkey, into: &buf)
+ FfiConverterString.write(value.tradeId, into: &buf)
+ FfiConverterString.write(value.claimMutationId, into: &buf)
+ FfiConverterTypeTradeEvidenceOutcome.write(value.outcome, into: &buf)
+ FfiConverterSequenceString.write(value.reasonCodes, into: &buf)
+ FfiConverterString.write(value.projectionDigest, into: &buf)
+ FfiConverterString.write(value.evidenceManifestDigest, into: &buf)
+ FfiConverterString.write(value.evidencePolicyDigest, into: &buf)
+ FfiConverterString.write(value.observedAtUnixS, into: &buf)
+ FfiConverterString.write(value.tradeGeneration, into: &buf)
+ FfiConverterString.write(value.statementDigest, into: &buf)
+ FfiConverterOptionTypeRhiEvidenceSupersession.write(value.supersession, into: &buf)
+ FfiConverterString.write(value.canonicalContent, into: &buf)
}
}
@@ -891,48 +1104,635 @@ public struct FfiConverterTypeCapabilityMaturity: FfiConverterRustBuffer {
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
-public func FfiConverterTypeCapabilityMaturity_lift(_ buf: RustBuffer) throws -> CapabilityMaturity {
- return try FfiConverterTypeCapabilityMaturity.lift(buf)
+public func FfiConverterTypeRhiEvidenceReport_lift(_ buf: RustBuffer) throws -> RhiEvidenceReport {
+ return try FfiConverterTypeRhiEvidenceReport.lift(buf)
}
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
-public func FfiConverterTypeCapabilityMaturity_lower(_ value: CapabilityMaturity) -> RustBuffer {
- return FfiConverterTypeCapabilityMaturity.lower(value)
+public func FfiConverterTypeRhiEvidenceReport_lower(_ value: RhiEvidenceReport) -> RustBuffer {
+ return FfiConverterTypeRhiEvidenceReport.lower(value)
}
-extension CapabilityMaturity: Equatable, Hashable {}
-
+/**
+ * Exact immutable RHI supersession reference.
+ */
+public struct RhiEvidenceSupersession {
+ public var reportId: String
+ public var eventId: String
+ // Default memberwise initializers are never public by default, so we
+ // declare one manually.
+ public init(reportId: String, eventId: String) {
+ self.reportId = reportId
+ self.eventId = eventId
+ }
+}
+#if compiler(>=6)
+extension RhiEvidenceSupersession: Sendable {}
+#endif
+extension RhiEvidenceSupersession: Equatable, Hashable {
+ public static func ==(lhs: RhiEvidenceSupersession, rhs: RhiEvidenceSupersession) -> Bool {
+ if lhs.reportId != rhs.reportId {
+ return false
+ }
+ if lhs.eventId != rhs.eventId {
+ return false
+ }
+ return true
+ }
+ public func hash(into hasher: inout Hasher) {
+ hasher.combine(reportId)
+ hasher.combine(eventId)
+ }
+}
-/**
- * Secret-safe SDK failure at the language boundary.
- */
-public enum Error: Swift.Error {
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeRhiEvidenceSupersession: FfiConverterRustBuffer {
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RhiEvidenceSupersession {
+ return
+ try RhiEvidenceSupersession(
+ reportId: FfiConverterString.read(from: &buf),
+ eventId: FfiConverterString.read(from: &buf)
+ )
+ }
- case Sdk(code: String, message: String, retryable: Bool
- )
+ public static func write(_ value: RhiEvidenceSupersession, into buf: inout [UInt8]) {
+ FfiConverterString.write(value.reportId, into: &buf)
+ FfiConverterString.write(value.eventId, into: &buf)
+ }
}
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
-public struct FfiConverterTypeError: FfiConverterRustBuffer {
- typealias SwiftType = Error
-
- public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Error {
- let variant: Int32 = try readInt(&buf)
- switch variant {
-
+public func FfiConverterTypeRhiEvidenceSupersession_lift(_ buf: RustBuffer) throws -> RhiEvidenceSupersession {
+ return try FfiConverterTypeRhiEvidenceSupersession.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeRhiEvidenceSupersession_lower(_ value: RhiEvidenceSupersession) -> RustBuffer {
+ return FfiConverterTypeRhiEvidenceSupersession.lower(value)
+}
+
+
+/**
+ * Signed NIP-01 event input for verified attestation admission.
+ */
+public struct SignedEvent {
+ public var id: String
+ public var authorPubkey: String
+ public var createdAtUnixS: UInt64
+ public var kind: UInt32
+ public var tags: [[String]]
+ public var content: String
+ public var signature: String
+
+ // Default memberwise initializers are never public by default, so we
+ // declare one manually.
+ public init(id: String, authorPubkey: String, createdAtUnixS: UInt64, kind: UInt32, tags: [[String]], content: String, signature: String) {
+ self.id = id
+ self.authorPubkey = authorPubkey
+ self.createdAtUnixS = createdAtUnixS
+ self.kind = kind
+ self.tags = tags
+ self.content = content
+ self.signature = signature
+ }
+}
+
+#if compiler(>=6)
+extension SignedEvent: Sendable {}
+#endif
+
+
+extension SignedEvent: Equatable, Hashable {
+ public static func ==(lhs: SignedEvent, rhs: SignedEvent) -> Bool {
+ if lhs.id != rhs.id {
+ return false
+ }
+ if lhs.authorPubkey != rhs.authorPubkey {
+ return false
+ }
+ if lhs.createdAtUnixS != rhs.createdAtUnixS {
+ return false
+ }
+ if lhs.kind != rhs.kind {
+ return false
+ }
+ if lhs.tags != rhs.tags {
+ return false
+ }
+ if lhs.content != rhs.content {
+ return false
+ }
+ if lhs.signature != rhs.signature {
+ return false
+ }
+ return true
+ }
+
+ public func hash(into hasher: inout Hasher) {
+ hasher.combine(id)
+ hasher.combine(authorPubkey)
+ hasher.combine(createdAtUnixS)
+ hasher.combine(kind)
+ hasher.combine(tags)
+ hasher.combine(content)
+ hasher.combine(signature)
+ }
+}
+
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeSignedEvent: FfiConverterRustBuffer {
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SignedEvent {
+ return
+ try SignedEvent(
+ id: FfiConverterString.read(from: &buf),
+ authorPubkey: FfiConverterString.read(from: &buf),
+ createdAtUnixS: FfiConverterUInt64.read(from: &buf),
+ kind: FfiConverterUInt32.read(from: &buf),
+ tags: FfiConverterSequenceSequenceString.read(from: &buf),
+ content: FfiConverterString.read(from: &buf),
+ signature: FfiConverterString.read(from: &buf)
+ )
+ }
+
+ public static func write(_ value: SignedEvent, into buf: inout [UInt8]) {
+ FfiConverterString.write(value.id, into: &buf)
+ FfiConverterString.write(value.authorPubkey, into: &buf)
+ FfiConverterUInt64.write(value.createdAtUnixS, into: &buf)
+ FfiConverterUInt32.write(value.kind, into: &buf)
+ FfiConverterSequenceSequenceString.write(value.tags, into: &buf)
+ FfiConverterString.write(value.content, into: &buf)
+ FfiConverterString.write(value.signature, into: &buf)
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeSignedEvent_lift(_ buf: RustBuffer) throws -> SignedEvent {
+ return try FfiConverterTypeSignedEvent.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeSignedEvent_lower(_ value: SignedEvent) -> RustBuffer {
+ return FfiConverterTypeSignedEvent.lower(value)
+}
+
+
+/**
+ * Bounded projection of one canonical evidence manifest.
+ */
+public struct TradeEvidenceManifest {
+ public var contractId: String
+ public var contractVersion: UInt16
+ public var tradeId: String
+ public var tradeGeneration: String
+ public var observedAtUnixS: String
+ public var coverage: TradeEvidenceCoverage
+ public var evidencePolicyDigest: String
+ public var manifestDigest: String
+ public var canonicalBytesHex: String
+
+ // Default memberwise initializers are never public by default, so we
+ // declare one manually.
+ public init(contractId: String, contractVersion: UInt16, tradeId: String, tradeGeneration: String, observedAtUnixS: String, coverage: TradeEvidenceCoverage, evidencePolicyDigest: String, manifestDigest: String, canonicalBytesHex: String) {
+ self.contractId = contractId
+ self.contractVersion = contractVersion
+ self.tradeId = tradeId
+ self.tradeGeneration = tradeGeneration
+ self.observedAtUnixS = observedAtUnixS
+ self.coverage = coverage
+ self.evidencePolicyDigest = evidencePolicyDigest
+ self.manifestDigest = manifestDigest
+ self.canonicalBytesHex = canonicalBytesHex
+ }
+}
+
+#if compiler(>=6)
+extension TradeEvidenceManifest: Sendable {}
+#endif
+
+
+extension TradeEvidenceManifest: Equatable, Hashable {
+ public static func ==(lhs: TradeEvidenceManifest, rhs: TradeEvidenceManifest) -> Bool {
+ if lhs.contractId != rhs.contractId {
+ return false
+ }
+ if lhs.contractVersion != rhs.contractVersion {
+ return false
+ }
+ if lhs.tradeId != rhs.tradeId {
+ return false
+ }
+ if lhs.tradeGeneration != rhs.tradeGeneration {
+ return false
+ }
+ if lhs.observedAtUnixS != rhs.observedAtUnixS {
+ return false
+ }
+ if lhs.coverage != rhs.coverage {
+ return false
+ }
+ if lhs.evidencePolicyDigest != rhs.evidencePolicyDigest {
+ return false
+ }
+ if lhs.manifestDigest != rhs.manifestDigest {
+ return false
+ }
+ if lhs.canonicalBytesHex != rhs.canonicalBytesHex {
+ return false
+ }
+ return true
+ }
+
+ public func hash(into hasher: inout Hasher) {
+ hasher.combine(contractId)
+ hasher.combine(contractVersion)
+ hasher.combine(tradeId)
+ hasher.combine(tradeGeneration)
+ hasher.combine(observedAtUnixS)
+ hasher.combine(coverage)
+ hasher.combine(evidencePolicyDigest)
+ hasher.combine(manifestDigest)
+ hasher.combine(canonicalBytesHex)
+ }
+}
+
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeTradeEvidenceManifest: FfiConverterRustBuffer {
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TradeEvidenceManifest {
+ return
+ try TradeEvidenceManifest(
+ contractId: FfiConverterString.read(from: &buf),
+ contractVersion: FfiConverterUInt16.read(from: &buf),
+ tradeId: FfiConverterString.read(from: &buf),
+ tradeGeneration: FfiConverterString.read(from: &buf),
+ observedAtUnixS: FfiConverterString.read(from: &buf),
+ coverage: FfiConverterTypeTradeEvidenceCoverage.read(from: &buf),
+ evidencePolicyDigest: FfiConverterString.read(from: &buf),
+ manifestDigest: FfiConverterString.read(from: &buf),
+ canonicalBytesHex: FfiConverterString.read(from: &buf)
+ )
+ }
+
+ public static func write(_ value: TradeEvidenceManifest, into buf: inout [UInt8]) {
+ FfiConverterString.write(value.contractId, into: &buf)
+ FfiConverterUInt16.write(value.contractVersion, into: &buf)
+ FfiConverterString.write(value.tradeId, into: &buf)
+ FfiConverterString.write(value.tradeGeneration, into: &buf)
+ FfiConverterString.write(value.observedAtUnixS, into: &buf)
+ FfiConverterTypeTradeEvidenceCoverage.write(value.coverage, into: &buf)
+ FfiConverterString.write(value.evidencePolicyDigest, into: &buf)
+ FfiConverterString.write(value.manifestDigest, into: &buf)
+ FfiConverterString.write(value.canonicalBytesHex, into: &buf)
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTradeEvidenceManifest_lift(_ buf: RustBuffer) throws -> TradeEvidenceManifest {
+ return try FfiConverterTypeTradeEvidenceManifest.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTradeEvidenceManifest_lower(_ value: TradeEvidenceManifest) -> RustBuffer {
+ return FfiConverterTypeTradeEvidenceManifest.lower(value)
+}
+
+
+/**
+ * One unsigned typed event plan ready for host-owned signing.
+ */
+public struct TypedEvidenceEventPlan {
+ public var contractId: String
+ public var kind: UInt32
+ public var authorPubkey: String
+ public var createdAtUnixS: String
+ public var expectedEventId: String
+ public var tags: [[String]]
+ public var content: String
+
+ // Default memberwise initializers are never public by default, so we
+ // declare one manually.
+ public init(contractId: String, kind: UInt32, authorPubkey: String, createdAtUnixS: String, expectedEventId: String, tags: [[String]], content: String) {
+ self.contractId = contractId
+ self.kind = kind
+ self.authorPubkey = authorPubkey
+ self.createdAtUnixS = createdAtUnixS
+ self.expectedEventId = expectedEventId
+ self.tags = tags
+ self.content = content
+ }
+}
+
+#if compiler(>=6)
+extension TypedEvidenceEventPlan: Sendable {}
+#endif
+
+
+extension TypedEvidenceEventPlan: Equatable, Hashable {
+ public static func ==(lhs: TypedEvidenceEventPlan, rhs: TypedEvidenceEventPlan) -> Bool {
+ if lhs.contractId != rhs.contractId {
+ return false
+ }
+ if lhs.kind != rhs.kind {
+ return false
+ }
+ if lhs.authorPubkey != rhs.authorPubkey {
+ return false
+ }
+ if lhs.createdAtUnixS != rhs.createdAtUnixS {
+ return false
+ }
+ if lhs.expectedEventId != rhs.expectedEventId {
+ return false
+ }
+ if lhs.tags != rhs.tags {
+ return false
+ }
+ if lhs.content != rhs.content {
+ return false
+ }
+ return true
+ }
+
+ public func hash(into hasher: inout Hasher) {
+ hasher.combine(contractId)
+ hasher.combine(kind)
+ hasher.combine(authorPubkey)
+ hasher.combine(createdAtUnixS)
+ hasher.combine(expectedEventId)
+ hasher.combine(tags)
+ hasher.combine(content)
+ }
+}
+
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeTypedEvidenceEventPlan: FfiConverterRustBuffer {
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TypedEvidenceEventPlan {
+ return
+ try TypedEvidenceEventPlan(
+ contractId: FfiConverterString.read(from: &buf),
+ kind: FfiConverterUInt32.read(from: &buf),
+ authorPubkey: FfiConverterString.read(from: &buf),
+ createdAtUnixS: FfiConverterString.read(from: &buf),
+ expectedEventId: FfiConverterString.read(from: &buf),
+ tags: FfiConverterSequenceSequenceString.read(from: &buf),
+ content: FfiConverterString.read(from: &buf)
+ )
+ }
+
+ public static func write(_ value: TypedEvidenceEventPlan, into buf: inout [UInt8]) {
+ FfiConverterString.write(value.contractId, into: &buf)
+ FfiConverterUInt32.write(value.kind, into: &buf)
+ FfiConverterString.write(value.authorPubkey, into: &buf)
+ FfiConverterString.write(value.createdAtUnixS, into: &buf)
+ FfiConverterString.write(value.expectedEventId, into: &buf)
+ FfiConverterSequenceSequenceString.write(value.tags, into: &buf)
+ FfiConverterString.write(value.content, into: &buf)
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTypedEvidenceEventPlan_lift(_ buf: RustBuffer) throws -> TypedEvidenceEventPlan {
+ return try FfiConverterTypeTypedEvidenceEventPlan.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTypedEvidenceEventPlan_lower(_ value: TypedEvidenceEventPlan) -> RustBuffer {
+ return FfiConverterTypeTypedEvidenceEventPlan.lower(value)
+}
+
+// Note that we don't yet support `indirect` for enums.
+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
+/**
+ * Current side-effect-free capability availability.
+ */
+
+public enum CapabilityAvailability {
+
+ case available
+ case degraded
+ case unavailable
+ case unsupported
+}
+
+
+#if compiler(>=6)
+extension CapabilityAvailability: Sendable {}
+#endif
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeCapabilityAvailability: FfiConverterRustBuffer {
+ typealias SwiftType = CapabilityAvailability
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CapabilityAvailability {
+ let variant: Int32 = try readInt(&buf)
+ switch variant {
+
+ case 1: return .available
+
+ case 2: return .degraded
+
+ case 3: return .unavailable
+
+ case 4: return .unsupported
+
+ default: throw UniffiInternalError.unexpectedEnumCase
+ }
+ }
+
+ public static func write(_ value: CapabilityAvailability, into buf: inout [UInt8]) {
+ switch value {
+
+
+ case .available:
+ writeInt(&buf, Int32(1))
+
+
+ case .degraded:
+ writeInt(&buf, Int32(2))
+
+
+ case .unavailable:
+ writeInt(&buf, Int32(3))
+
+
+ case .unsupported:
+ writeInt(&buf, Int32(4))
+
+ }
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeCapabilityAvailability_lift(_ buf: RustBuffer) throws -> CapabilityAvailability {
+ return try FfiConverterTypeCapabilityAvailability.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeCapabilityAvailability_lower(_ value: CapabilityAvailability) -> RustBuffer {
+ return FfiConverterTypeCapabilityAvailability.lower(value)
+}
+
+
+extension CapabilityAvailability: Equatable, Hashable {}
+
+
+
+
+
+
+// Note that we don't yet support `indirect` for enums.
+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
+/**
+ * Stable capability maturity independent of runtime availability.
+ */
+
+public enum CapabilityMaturity {
+
+ case stable
+ case preview
+ case experimental
+}
+
+
+#if compiler(>=6)
+extension CapabilityMaturity: Sendable {}
+#endif
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeCapabilityMaturity: FfiConverterRustBuffer {
+ typealias SwiftType = CapabilityMaturity
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CapabilityMaturity {
+ let variant: Int32 = try readInt(&buf)
+ switch variant {
+
+ case 1: return .stable
+
+ case 2: return .preview
+
+ case 3: return .experimental
+
+ default: throw UniffiInternalError.unexpectedEnumCase
+ }
+ }
+
+ public static func write(_ value: CapabilityMaturity, into buf: inout [UInt8]) {
+ switch value {
+
+
+ case .stable:
+ writeInt(&buf, Int32(1))
+
+
+ case .preview:
+ writeInt(&buf, Int32(2))
+
+
+ case .experimental:
+ writeInt(&buf, Int32(3))
+
+ }
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeCapabilityMaturity_lift(_ buf: RustBuffer) throws -> CapabilityMaturity {
+ return try FfiConverterTypeCapabilityMaturity.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeCapabilityMaturity_lower(_ value: CapabilityMaturity) -> RustBuffer {
+ return FfiConverterTypeCapabilityMaturity.lower(value)
+}
+
+
+extension CapabilityMaturity: Equatable, Hashable {}
+
+
+
+
+
+
+
+/**
+ * Secret-safe SDK failure at the language boundary.
+ */
+public enum Error: Swift.Error {
+
+
+
+ case Sdk(code: String, message: String, retryable: Bool
+ )
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeError: FfiConverterRustBuffer {
+ typealias SwiftType = Error
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Error {
+ let variant: Int32 = try readInt(&buf)
+ switch variant {
+
@@ -993,6 +1793,222 @@ extension Error: Foundation.LocalizedError {
+// Note that we don't yet support `indirect` for enums.
+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
+/**
+ * Final evidence coverage vocabulary.
+ */
+
+public enum TradeEvidenceCoverage {
+
+ case missing
+ case partial
+ case scopeSatisfied
+ case unsupported
+}
+
+
+#if compiler(>=6)
+extension TradeEvidenceCoverage: Sendable {}
+#endif
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeTradeEvidenceCoverage: FfiConverterRustBuffer {
+ typealias SwiftType = TradeEvidenceCoverage
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TradeEvidenceCoverage {
+ let variant: Int32 = try readInt(&buf)
+ switch variant {
+
+ case 1: return .missing
+
+ case 2: return .partial
+
+ case 3: return .scopeSatisfied
+
+ case 4: return .unsupported
+
+ default: throw UniffiInternalError.unexpectedEnumCase
+ }
+ }
+
+ public static func write(_ value: TradeEvidenceCoverage, into buf: inout [UInt8]) {
+ switch value {
+
+
+ case .missing:
+ writeInt(&buf, Int32(1))
+
+
+ case .partial:
+ writeInt(&buf, Int32(2))
+
+
+ case .scopeSatisfied:
+ writeInt(&buf, Int32(3))
+
+
+ case .unsupported:
+ writeInt(&buf, Int32(4))
+
+ }
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTradeEvidenceCoverage_lift(_ buf: RustBuffer) throws -> TradeEvidenceCoverage {
+ return try FfiConverterTypeTradeEvidenceCoverage.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTradeEvidenceCoverage_lower(_ value: TradeEvidenceCoverage) -> RustBuffer {
+ return FfiConverterTypeTradeEvidenceCoverage.lower(value)
+}
+
+
+extension TradeEvidenceCoverage: Equatable, Hashable {}
+
+
+
+
+
+
+// Note that we don't yet support `indirect` for enums.
+// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
+/**
+ * Final evidence outcome vocabulary.
+ */
+
+public enum TradeEvidenceOutcome {
+
+ case valid
+ case invalid
+ case indeterminate
+}
+
+
+#if compiler(>=6)
+extension TradeEvidenceOutcome: Sendable {}
+#endif
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public struct FfiConverterTypeTradeEvidenceOutcome: FfiConverterRustBuffer {
+ typealias SwiftType = TradeEvidenceOutcome
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TradeEvidenceOutcome {
+ let variant: Int32 = try readInt(&buf)
+ switch variant {
+
+ case 1: return .valid
+
+ case 2: return .invalid
+
+ case 3: return .indeterminate
+
+ default: throw UniffiInternalError.unexpectedEnumCase
+ }
+ }
+
+ public static func write(_ value: TradeEvidenceOutcome, into buf: inout [UInt8]) {
+ switch value {
+
+
+ case .valid:
+ writeInt(&buf, Int32(1))
+
+
+ case .invalid:
+ writeInt(&buf, Int32(2))
+
+
+ case .indeterminate:
+ writeInt(&buf, Int32(3))
+
+ }
+ }
+}
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTradeEvidenceOutcome_lift(_ buf: RustBuffer) throws -> TradeEvidenceOutcome {
+ return try FfiConverterTypeTradeEvidenceOutcome.lift(buf)
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+public func FfiConverterTypeTradeEvidenceOutcome_lower(_ value: TradeEvidenceOutcome) -> RustBuffer {
+ return FfiConverterTypeTradeEvidenceOutcome.lower(value)
+}
+
+
+extension TradeEvidenceOutcome: Equatable, Hashable {}
+
+
+
+
+
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+fileprivate struct FfiConverterOptionTypeRhiEvidenceSupersession: FfiConverterRustBuffer {
+ typealias SwiftType = RhiEvidenceSupersession?
+
+ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
+ guard let value = value else {
+ writeInt(&buf, Int8(0))
+ return
+ }
+ writeInt(&buf, Int8(1))
+ FfiConverterTypeRhiEvidenceSupersession.write(value, into: &buf)
+ }
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
+ switch try readInt(&buf) as Int8 {
+ case 0: return nil
+ case 1: return try FfiConverterTypeRhiEvidenceSupersession.read(from: &buf)
+ default: throw UniffiInternalError.unexpectedOptionalTag
+ }
+ }
+}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+fileprivate struct FfiConverterSequenceString: FfiConverterRustBuffer {
+ typealias SwiftType = [String]
+
+ public static func write(_ value: [String], into buf: inout [UInt8]) {
+ let len = Int32(value.count)
+ writeInt(&buf, len)
+ for item in value {
+ FfiConverterString.write(item, into: &buf)
+ }
+ }
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [String] {
+ let len: Int32 = try readInt(&buf)
+ var seq = [String]()
+ seq.reserveCapacity(Int(len))
+ for _ in 0 ..< len {
+ seq.append(try FfiConverterString.read(from: &buf))
+ }
+ return seq
+ }
+}
+
#if swift(>=5.8)
@_documentation(visibility: private)
#endif
@@ -1017,6 +2033,31 @@ fileprivate struct FfiConverterSequenceTypeCapabilityStatus: FfiConverterRustBuf
return seq
}
}
+
+#if swift(>=5.8)
+@_documentation(visibility: private)
+#endif
+fileprivate struct FfiConverterSequenceSequenceString: FfiConverterRustBuffer {
+ typealias SwiftType = [[String]]
+
+ public static func write(_ value: [[String]], into buf: inout [UInt8]) {
+ let len = Int32(value.count)
+ writeInt(&buf, len)
+ for item in value {
+ FfiConverterSequenceString.write(item, into: &buf)
+ }
+ }
+
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [[String]] {
+ let len: Int32 = try readInt(&buf)
+ var seq = [[String]]()
+ seq.reserveCapacity(Int(len))
+ for _ in 0 ..< len {
+ seq.append(try FfiConverterSequenceString.read(from: &buf))
+ }
+ return seq
+ }
+}
private let UNIFFI_RUST_FUTURE_POLL_READY: Int8 = 0
private let UNIFFI_RUST_FUTURE_POLL_MAYBE_READY: Int8 = 1
@@ -1063,6 +2104,35 @@ fileprivate func uniffiFutureContinuationCallback(handle: UInt64, pollResult: In
print("uniffiFutureContinuationCallback invalid handle")
}
}
+public func parseRhiEvidenceReport(canonicalContent: String)throws -> RhiEvidenceReport {
+ return try FfiConverterTypeRhiEvidenceReport_lift(try rustCallWithError(FfiConverterTypeError_lift) {
+ uniffi_radroots_sdk_ffi_fn_func_parse_rhi_evidence_report(
+ FfiConverterString.lower(canonicalContent),$0
+ )
+})
+}
+public func parseTradeEvidenceManifest(canonicalBytes: Data)throws -> TradeEvidenceManifest {
+ return try FfiConverterTypeTradeEvidenceManifest_lift(try rustCallWithError(FfiConverterTypeError_lift) {
+ uniffi_radroots_sdk_ffi_fn_func_parse_trade_evidence_manifest(
+ FfiConverterData.lower(canonicalBytes),$0
+ )
+})
+}
+public func prepareRhiEvidenceAttestation(canonicalContent: String, createdAtUnixS: UInt64)throws -> TypedEvidenceEventPlan {
+ return try FfiConverterTypeTypedEvidenceEventPlan_lift(try rustCallWithError(FfiConverterTypeError_lift) {
+ uniffi_radroots_sdk_ffi_fn_func_prepare_rhi_evidence_attestation(
+ FfiConverterString.lower(canonicalContent),
+ FfiConverterUInt64.lower(createdAtUnixS),$0
+ )
+})
+}
+public func validateRhiEvidenceAttestation(event: SignedEvent)throws -> RhiEvidenceAttestation {
+ return try FfiConverterTypeRhiEvidenceAttestation_lift(try rustCallWithError(FfiConverterTypeError_lift) {
+ uniffi_radroots_sdk_ffi_fn_func_validate_rhi_evidence_attestation(
+ FfiConverterTypeSignedEvent_lower(event),$0
+ )
+})
+}
private enum InitializationResult {
case ok
@@ -1079,6 +2149,18 @@ private let initializationResult: InitializationResult = {
if bindings_contract_version != scaffolding_contract_version {
return InitializationResult.contractVersionMismatch
}
+ if (uniffi_radroots_sdk_ffi_checksum_func_parse_rhi_evidence_report() != 37549) {
+ return InitializationResult.apiChecksumMismatch
+ }
+ if (uniffi_radroots_sdk_ffi_checksum_func_parse_trade_evidence_manifest() != 35922) {
+ return InitializationResult.apiChecksumMismatch
+ }
+ if (uniffi_radroots_sdk_ffi_checksum_func_prepare_rhi_evidence_attestation() != 53127) {
+ return InitializationResult.apiChecksumMismatch
+ }
+ if (uniffi_radroots_sdk_ffi_checksum_func_validate_rhi_evidence_attestation() != 46555) {
+ return InitializationResult.apiChecksumMismatch
+ }
if (uniffi_radroots_sdk_ffi_checksum_method_mobileclient_capabilities() != 23938) {
return InitializationResult.apiChecksumMismatch
}
diff --git a/generated/swift/radroots_sdkFFI.h b/generated/swift/radroots_sdkFFI.h
@@ -282,6 +282,26 @@ uint64_t uniffi_radroots_sdk_ffi_fn_method_mobileclient_close(void*_Nonnull ptr
int8_t uniffi_radroots_sdk_ffi_fn_method_mobileclient_is_closed(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
);
#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_PARSE_RHI_EVIDENCE_REPORT
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_PARSE_RHI_EVIDENCE_REPORT
+RustBuffer uniffi_radroots_sdk_ffi_fn_func_parse_rhi_evidence_report(RustBuffer canonical_content, RustCallStatus *_Nonnull out_status
+);
+#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_PARSE_TRADE_EVIDENCE_MANIFEST
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_PARSE_TRADE_EVIDENCE_MANIFEST
+RustBuffer uniffi_radroots_sdk_ffi_fn_func_parse_trade_evidence_manifest(RustBuffer canonical_bytes, RustCallStatus *_Nonnull out_status
+);
+#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_PREPARE_RHI_EVIDENCE_ATTESTATION
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_PREPARE_RHI_EVIDENCE_ATTESTATION
+RustBuffer uniffi_radroots_sdk_ffi_fn_func_prepare_rhi_evidence_attestation(RustBuffer canonical_content, uint64_t created_at_unix_s, RustCallStatus *_Nonnull out_status
+);
+#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_VALIDATE_RHI_EVIDENCE_ATTESTATION
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_FN_FUNC_VALIDATE_RHI_EVIDENCE_ATTESTATION
+RustBuffer uniffi_radroots_sdk_ffi_fn_func_validate_rhi_evidence_attestation(RustBuffer event, RustCallStatus *_Nonnull out_status
+);
+#endif
#ifndef UNIFFI_FFIDEF_FFI_RADROOTS_SDK_FFI_RUSTBUFFER_ALLOC
#define UNIFFI_FFIDEF_FFI_RADROOTS_SDK_FFI_RUSTBUFFER_ALLOC
RustBuffer ffi_radroots_sdk_ffi_rustbuffer_alloc(uint64_t size, RustCallStatus *_Nonnull out_status
@@ -562,6 +582,30 @@ void ffi_radroots_sdk_ffi_rust_future_free_void(uint64_t handle
void ffi_radroots_sdk_ffi_rust_future_complete_void(uint64_t handle, RustCallStatus *_Nonnull out_status
);
#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_PARSE_RHI_EVIDENCE_REPORT
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_PARSE_RHI_EVIDENCE_REPORT
+uint16_t uniffi_radroots_sdk_ffi_checksum_func_parse_rhi_evidence_report(void
+
+);
+#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_PARSE_TRADE_EVIDENCE_MANIFEST
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_PARSE_TRADE_EVIDENCE_MANIFEST
+uint16_t uniffi_radroots_sdk_ffi_checksum_func_parse_trade_evidence_manifest(void
+
+);
+#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_PREPARE_RHI_EVIDENCE_ATTESTATION
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_PREPARE_RHI_EVIDENCE_ATTESTATION
+uint16_t uniffi_radroots_sdk_ffi_checksum_func_prepare_rhi_evidence_attestation(void
+
+);
+#endif
+#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_VALIDATE_RHI_EVIDENCE_ATTESTATION
+#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_FUNC_VALIDATE_RHI_EVIDENCE_ATTESTATION
+uint16_t uniffi_radroots_sdk_ffi_checksum_func_validate_rhi_evidence_attestation(void
+
+);
+#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_METHOD_MOBILECLIENT_CAPABILITIES
#define UNIFFI_FFIDEF_UNIFFI_RADROOTS_SDK_FFI_CHECKSUM_METHOD_MOBILECLIENT_CAPABILITIES
uint16_t uniffi_radroots_sdk_ffi_checksum_method_mobileclient_capabilities(void
diff --git a/generated/swift/source.lock b/generated/swift/source.lock
@@ -2,13 +2,13 @@
"schema_version": 1,
"source_package": "radroots_sdk_ffi",
"source_version": "0.1.0-alpha",
- "source_sha256": "dccf9f024910684a3225310a593667312f0c2598c22f05fa233b6012b0e133eb",
+ "source_sha256": "bb89f460401a22a2bca7d58bb9dbe3300f114f25bd8f64156e492c43563ae12c",
"generator": "uniffi",
"generator_version": "0.29.5",
"language": "swift",
"outputs": {
- "radroots_sdk.swift": "0f81256c17243e485d9bca8f2dd4771c0ed2c2c1dc4fb03eb352389aab8599b0",
- "radroots_sdkFFI.h": "511d3a22f969ef21d1a6d7357241756c2fda5d96adbb8bb17f2da5e8c65bcc54",
+ "radroots_sdk.swift": "38ff1a652ff49b45c48601d2b1c0064103c1e815df9e80604f3369af2e53f4ac",
+ "radroots_sdkFFI.h": "2efe02ecda4a68a495bacc61acf8ff41dc84bc01d9132a00b38353a57c51466a",
"radroots_sdkFFI.modulemap": "b18fa5af1567a940fc699afe371a3a4653dca206f3233bcdf322062ab8192170"
}
}
diff --git a/packages/event-bindings/src/generated/kinds.ts b/packages/event-bindings/src/generated/kinds.ts
@@ -122,6 +122,8 @@ export const KIND_TRADE_SELLER_RESERVATION_ASSERTION = 3475;
export const KIND_TRADE_VALIDATION_RECEIPT = 3440;
+export const KIND_RHI_EVIDENCE_ATTESTATION = 3441;
+
export const KIND_KNOWLEDGE_CLAIM = 3460;
export const KIND_KNOWLEDGE_RELATION = 3461;
diff --git a/packages/trade-bindings/src/generated/types.ts b/packages/trade-bindings/src/generated/types.ts
@@ -23,6 +23,20 @@ export type RadrootsTradeConflictStateV1 = "none" | "concurrent_candidates" | "d
export type RadrootsTradeEvidenceStateV1 = "complete" | "missing" | "query_partial" | "unsupported_version";
+export type RadrootsTradeEvidenceCoverageV1 = "missing" | "partial" | "scope_satisfied" | "unsupported";
+
+export type RadrootsTradeEvidenceOutcomeV1 = "valid" | "invalid" | "indeterminate";
+
+export type RadrootsTradeEvidenceManifestV1 = { contract_id: "radroots.trade.evidence-manifest.v1", contract_version: 1, trade_id: string, trade_generation: string, observed_at_unix_s: string, coverage: RadrootsTradeEvidenceCoverageV1, evidence_policy_digest: string, manifest_digest: string, canonical_bytes_hex: string, };
+
+export type RadrootsRhiEvidenceSupersessionV1 = { report_id: string, event_id: string, };
+
+export type RadrootsRhiEvidenceReportV1 = { contract_id: "radroots.rhi.evidence_attestation.v1", contract_version: 1, issuer_pubkey: string, trade_id: string, claim_mutation_id: string, outcome: RadrootsTradeEvidenceOutcomeV1, reason_codes: Array<string>, projection_digest: string, evidence_manifest_digest: string, evidence_policy_digest: string, observed_at_unix_s: string, trade_generation: string, statement_digest: string, supersession?: RadrootsRhiEvidenceSupersessionV1 | null, canonical_content: string, };
+
+export type RadrootsRhiEvidenceAttestationV1 = { issuer_pubkey: string, trade_id: string, claim_mutation_id: string, outcome: RadrootsTradeEvidenceOutcomeV1, observed_at_unix_s: string, trade_generation: string, statement_digest: string, supersession?: RadrootsRhiEvidenceSupersessionV1 | null, canonical_content: string, };
+
+export type RadrootsTypedEvidenceEventPlanV1 = { contract_id: string, kind: number, author_pubkey: string, created_at_unix_s: string, expected_event_id: string, tags: Array<Array<string>>, content: string, };
+
export type RadrootsTradeFacetCount = { key: string, count: number, };
export type RadrootsTradeFulfillmentStateV1 = "not_started";
diff --git a/radroots.lib.source-lock.v1.toml b/radroots.lib.source-lock.v1.toml
@@ -1,8 +1,8 @@
schema = "radroots.lib.source-lock.v1"
repository = "https://github.com/radrootslabs/lib"
-revision = "2a982d02f4b251f59edf5c5ec54c53daac25fdcc"
+revision = "3563f3b5a4331eb2cb3f925cafc9de524d844228"
architecture = "radroots.crates.release.v2"
-workspace_catalog_sha256 = "8c27cebf6825f9ed74e122513c661f6dd31837dddb39d0988014121d8ab05e75"
+workspace_catalog_sha256 = "deca0c080deae187ff8186c0708903e42f41ea57f77c5f91581e23aa561164a4"
version = "0.1.0-alpha"
-source_archive_sha256 = "0e7928364cf05659c688e6320028f64f83ab7b92246c8cff9fd66e34afab94ff"
-lockfile_sha256 = "3c539b02db83e7109094ff63e7eaaed9aaeccf74948d7ff740aa782a21e69576"
+source_archive_sha256 = "2da62bd0112d43b634ba5e87dfc09d048f7ea1836ab89d2fd18fcfce5186ad6b"
+lockfile_sha256 = "f296a4199802e629cfd04e058b67471a8e68a50efc262a0a15d94bdf383a13df"